Server name
#3

try this

pawn Код:
new ServerNameLast = 1;

public OnGameModeInit()
{
     SetTimer("UpdateServerName",5000,1);
     return 1;
}
forward UpdateServerName();
public UpdateServerName()
{
      if(ServerNameLast == 1)
      {
            SendRconCommand("hostname [0.3x]Razer Gaming Roleplay");
            ServerNameLast++;
      }
      if(ServerNameLast == 2)
      {
            SendRconcommand("hostname [0.3x l ENG] RGRP is currently hiring");
            ServerNameLast = 1;
      }
      return 1;
}
EDIT: you can extend it too... like you need to extend the " if " statement like

pawn Код:
new ServerNameLast = 1;

public OnGameModeInit()
{
     SetTimer("UpdateServerName",5000,1);
     return 1;
}
forward UpdateServerName();
public UpdateServerName()
{
      if(ServerNameLast == 1)
      {
            SendRconCommand("hostname [0.3x]Razer Gaming Roleplay");
            ServerNameLast++;
      }
      if(ServerNameLast == 2)
      {
            SendRconCommand("hostname [0.3x l ENG] RGRP is currently hiring");
            ServerNameLast++;
      }
      if(ServerNameLast == 3)
      {
            SendRconCommand("hostname new hostname which you want to display");
            ServerNameLast = 1;
      }
      return 1;
}
just set the "ServerNameLast" var to 1 so that the loop continues setting the hostname again and again...

And increment it whenever the hostname arent the last to display..
Reply


Messages In This Thread
Server name - by DouglasRamirez - 28.10.2013, 14:39
Re: Server name - by HyDrAtIc - 28.10.2013, 14:41
Re: Server name - by -=Dar[K]Lord=- - 28.10.2013, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)