SA-MP Forums Archive
Changegm - 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: Changegm (/showthread.php?tid=77408)



Changegm - Rks25 - 10.05.2009

How to change a gamemode by using a simple check of PropertyGet and PropertySet...?


Re: Changegm - MenaceX^ - 10.05.2009

What PropretyGet + PropretySet are?


Re: Changegm - Weirdosport - 10.05.2009

Quote:
Originally Posted by MenaceX^ [adream-rp.com
]
What PropretyGet + PropretySet are?
I thought he meant like this:

https://sampwiki.blast.hk/wiki/GetServerVarAsInt

but then i realised you can only get them, not set them...


Re: Changegm - Rks25 - 15.05.2009

for example mini missions, how they do it? randomly with files i think?, cuz they dont get repeated,it is effeciency,.

if i could get an example of that.


Re: Changegm - JaYmE - 15.05.2009

pawn Код:
public LOL()
{
 new Rand = random(5);
 if(Rand = 0)
 {
 SendRconCommand("changegm -Gamemode-");
 }
 else if (Rane = 1)
 // So on ;)
}



Re: Changegm - Rks25 - 15.05.2009

yes but think, if at 2 times, the random gives 2, that will set the same gm again, that sucks. how to make it a bit better?


Re: Changegm - Jefff - 15.05.2009

Maybe that
Код:
new ChangeGM;
public LOL()
{
	ChangeGM++;
	if(ChangeGM == 5) ChangeGM = 1;
	switch(CHangeGM)
	{
		case 1: SendRconCommand("changemode -Gamemode1-");
		case 2: SendRconCommand("changemode -Gamemode2-");
		case 3: SendRconCommand("changemode -Gamemode3-");
		case 4: SendRconCommand("changemode -Gamemode4-");
	}
}



Re: Changegm - JaYmE - 15.05.2009

Quote:
Originally Posted by RKS_
for example mini missions, how they do it? randomly with files i think?, cuz they dont get repeated,it is effeciency,.

if i could get an example of that.
Mini missions is not random it actually loops through games in the server.cfg, just that there is always a admin online changing it


Re: Changegm - Rks25 - 15.05.2009

no what someone said to me was summarised:

MM uses a file in which they store numbers like 1 2 3, and detect at Exit() which number is occupied, the rest gets randomed.
It also does the same thing when a admin is not online..


Re: Changegm - Ignas1337 - 15.05.2009

you can add list of gms into a file and load the file and then make the script randomly select one gamemode. It would be more dynamic