Changing Always??/!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Changing Always??/!! (
/showthread.php?tid=299509)
Changing Always??/!! -
YoUnG_KiD - 26.11.2011
hey all
i have seen in one server the hostname , mode , map everything changes by 3 secs!! Is there any filterscripts or nything to do like that

!!
Thnx In Advance
YoUnG_KiD
Re: Changing Always??/!! -
Ash. - 26.11.2011
Make it...
pawn Код:
public OnFilterScriptInit()
{
SetTimer("Change", 3000, true);
}
forward Change();
public Change()
{
switch(random(3)) //Change based on the random function. If the "random" number is the same as last time it won't change.
{
case 0:
{
SendRconCommand("hostname MyNewHostname");
SendRconCommand("mapname MyNewMapName");
SetGameModeText("MyNewGameModeText");
}
case 1:
{
SendRconCommand("hostname MyOtherNewHostname");
SendRconCommand("mapname MyOtherNewMapName");
SetGameModeText("MyOtherNewGameModeText");
}
case 2:
{
SendRconCommand("hostname MyOtherOtherNewHostname");
SendRconCommand("mapname MyOtherOtherNewMapName");
SetGameModeText("MyOtherOtherNewGameModeText");
}
case 2:
{
SendRconCommand("hostname MyOtherOtherOtherNewHostname");
SendRconCommand("mapname MyOtherOtherOtherNewMapName");
SetGameModeText("MyOtherOtherOtherNewGameModeText");
}
}
}