SA-MP Forums Archive
is this possible? - 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: is this possible? (/showthread.php?tid=174042)



is this possible? - Code_Red - 04.09.2010

hey!
ive just been into some mini mission servers and i saw they change into a random GM each time they have a restart , is this possible? or do they just write all of that in one GM?
thanks@!


Re: is this possible? - WillyP - 04.09.2010

possible...

newrand gm

and put like 12gm's in 1 rather than all of the different ones in a line at server.cfg


Re: is this possible? - Cameltoe - 04.09.2010

new gm = random(1,5)
SendRconCommand("gamemode %d",gm);

Should get you the idea of were to start, im pretty sure that dosn't work, but nvm ull get the idea!


Re: is this possible? - Hiddos - 04.09.2010

pawn Код:
new GMs[][32] = {
  {"lvdm"},
  {"grandlarc"},
  {"rivershell"}
};

stock LoadRandomGm()
{
  new string[43];
  format(string, sizeof string, "changemode %s", GMs[random(sizeof GMs)]);
  SendRconCommand(string);
}
Might get some errors at the format(string, bla) crap, but something like that should do the trick.

Place all your GMs in a variable and random them.


Re: is this possible? - Code_Red - 04.09.2010

ill try that^