Changegm
#1

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

What PropretyGet + PropretySet are?
Reply
#3

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...
Reply
#4

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.
Reply
#5

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

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?
Reply
#7

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-");
	}
}
Reply
#8

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
Reply
#9

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..
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)