Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 43

Thread: server welcome messages

  1. #31

    Default

    Hello there,

    I apologize if it's written somewhere and I didn't see it but I die to get answer on this.


    I got the script from anywhere throughout my research to get a Welcome message when someone get on my server. The problem is, it's repeating itself everytime we changing map and everyone re-enter the game. I'm putting the script here so you can see everything. Could anyone give me a hint about it ?

    main:

    if(level.welcomemessage_run)
    end

    level.welcomemessage_run = 1

    // Registers event
    local.result = registerev "connected" global/welcomemessage.scr::connected

    end

    /// Connected event
    connected local.player:

    //// Change this to how long after player connects does the message play
    wait 5

    /// Makes sure player is not NULL and not already been welcomed
    if(local.player != NULL && local.player.welcomed != 1)
    {
    /// Gets player name
    local.player.name = netname local.player


    /// Says message
    stuffsrv ("say Welcome to the Server -- " + local.player.name + " -- ")
    wait 8
    stuffsrv ("say Bienvenue sur le server -- " + local.player.name + " -- ")
    /// Tag player so they dnt get the message again while in game
    local.player.welcomed = 1

    }

    end

    I got another problem that is not linked to this one. My server appears on the Mohaa Query Tool but my ping is always 999. Is there anything special to do to fix this ?



    Thanks to y'all !

  2. #32

    Default

    The only way to fix is you have to save the players name to a file and check if they join the server on the day if they join only print one time

  3. #33
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    Just add a check for if player is not in spectator, that will stop 90% of the repeat messages, only those in spectator at the time of connection event will get the repeat message. If they were playing previous map they will still be in a team

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #34

    Default

    IP2Co-Mod-new.pk3

    maybe somethign liek that?... i didnt test it!!

  5. #35

    Default

    Quote Originally Posted by Purple Elephant1au View Post
    Just add a check for if player is not in spectator, that will stop 90% of the repeat messages, only those in spectator at the time of connection event will get the repeat message. If they were playing previous map they will still be in a team

    I'm new on that kind of programming. I'm learning right now and there's not planty of info on google ( or i'm not looking at the good places ).

    What would be the command to check if it's in spectator mode ? I'm learning with logics and what I see so...

  6. #36

    Default

    On this page you have all the tutorials you need to learn the scripting and mapping:

    Tutorials

    if you learning the scripting the tutorials is almost on the end of the page


    to check the player if is in spec use a for loop like this:


    for(local.i = 1;local.i <= $player.size;local.i++)
    {

    local.player = $player[local.i] // player in array

    if(local.player.dmteam == "spectator") //dmteam is to get the team of the player can be allies axis or spectator
    {

    //messague

    }

    }

    Last edited by DoubleKill; June 4th, 2016 at 01:20 PM.

  7. #37

    Default

    Quote Originally Posted by DoubleKill View Post
    On this page you have all the tutorials you need to learn the scripting and mapping:

    Tutorials

    if you learning the scripting the tutorials is almost on the end of the page


    to check the player if is in spec use a for loop like this:


    for(local.i = 1;local.i <= $player.size;local.i++)
    {

    local.player = $player[local.i] // player in array

    if(local.player.dmteam == "spectator") //dmteam is to get the team of the player can be allies axis or spectator
    {

    //messague

    }

    }


    I tried it, but it crashed my server on startup. Unable to see if it really works..

    Edit: And thanks tho, for the Tutorials ! I'll spend a couple of hours on it this evening
    Last edited by mcced92; June 4th, 2016 at 02:19 PM. Reason: Forgot to thank.

  8. #38

    Default

    sorry, bumping an old thread.

    I am running Mefy's freezetag mod on my server. Is there any way to stop the messages from repeating after each round?

  9. #39

    Default

    Quote Originally Posted by win151 View Post
    sorry, bumping an old thread.

    I am running Mefy's freezetag mod on my server. Is there any way to stop the messages from repeating after each round?
    what kind of messages? you have some mod printing messages?

  10. #40

    Default

    Quote Originally Posted by DoubleKill View Post
    what kind of messages? you have some mod printing messages?
    Sorry, I worded that poorly. This is for the IP2CO Mod. It welcomes the player every time the round restarts or the map changes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •