Name changing
#1

Is there a way to keep the name of the server changing like random sentences or something like that ?
Reply
#2

Yes with a looping timer.
Reply
#3

can u make me a example? I never use timer so I don't know how to start.
Reply
#4

pawn Код:
public OnGameModeInit()
{
    SetTimer("SetServerName",5000,1);//timer SetServerName, 5000 ms (5secs), looping true
pawn Код:
forward SetServerName()
public SetServerName()
{
    switch(random(3)) // change this to the ammount of random names
    {
        // cases start with zero not with one
        case 0: SendRconCommand("hostname TDM"); // hostname TDM sets the name to TDM
        case 1: SendRconCommand("hostname DM War of nations");
        case 2: SendRconCommand("hostname www.tdm.com");
        return 1;
    }
}
Reply
#5

Perfect, thx so much bro
Reply
#6

A few erros but I think I can fix
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)