28.10.2013, 14:45
try this
EDIT: you can extend it too... like you need to extend the " if " statement like
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..
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;
}
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;
}
And increment it whenever the hostname arent the last to display..