Do not know, I think it's too much code for something so simple..
pawn Код:
new TimerChange, ChangerWalk;
stock InformationChanger[][] =
{
{"WebHost1", "NameHost 1"}, {"WebHost2", "NameHost 2"},
{"WebHost3", "NameHost 3"}, {"WebHost4", "NameHost 4"}
};
forward ChangerHostname();
public ChangerHostname()
{
new string[50];
format(string, sizeof(string), "weburl %s", InformationChanger[ChangerWalk][0]);
SendRconCommand(string);
format(string, sizeof(string), "hostname %s", InformationChanger[ChangerWalk][1]);
SendRconCommand(string);
switch(ChangerWalk)
{
case 0, 1, 2: ChangerWalk++;
case 3: ChangerWalk = 0;
}
return 1;
}
public OnFilterScriptInit()
{
TimerChange = SetTimer("ChangerHostname", 5000, true);
return 1;
}
public OnFilterScriptExit()
{
KillTimer(TimerChange);
return 1;
}