SA-MP Forums Archive
change gm by timer - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: change gm by timer (/showthread.php?tid=148628)



change gm by timer - jamesbond007 - 18.05.2010

how do i change game mode on timer like in mini missions?

the timer part i made myself but what is the command to change game mode automatically?


Re: change gm by timer - Calgon - 18.05.2010

pawn Код:
SetTimerEx("SendRconCommand", 600000, false, "s", "changemode lol");
This will change to "lol.amx", note that the interval is in milliseconds, you'll need to update the interval in milliseconds to what you believe is sufficient, currently the mode will change every 10 minutes.


Re: change gm by timer - jamesbond007 - 18.05.2010

Quote:
Originally Posted by Freddo [BINMAN
]
pawn Код:
SetTimerEx("SendRconCommand", 600000, false, "s", "changemode lol");
This will change to "lol.amx", note that the interval is in milliseconds, you'll need to update the interval in milliseconds to what you believe is sufficient, currently the mode will change every 10 minutes.
thanks dude, i knew it has something to do with Sendrconcommand but i didnt know how to put it together!

+1

ok no doubt this is TOTAL bullshit

i used this
Код:
SendRconCommand("changemode new");
and it worked







Re: change gm by timer - aircombat - 18.05.2010

Код:
OnGameModeInit()
{
SetTimer("changegm",Time in milliseconds,1);
return 1;
}
Код:
forward changegm();
Код:
public changegm()
{
SendRconCommand("changemode YourGM");
return 1;
}



Re: change gm by timer - Calgon - 18.05.2010

Either way works.