SA-MP Forums Archive
automatic gamemode change problem - 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: automatic gamemode change problem (/showthread.php?tid=78868)



automatic gamemode change problem - jesse237 - 23.05.2009

hello

I hope somebody can help me with my problem:
I'm trying to make a server with multiple gamemodes witch switches every 15 - 20 minutes.

I already have something:

Код:
// on top or above the function
forward GMswitch

// ongamemodeinit
SetTimer("GMswitch",30000,true); // gamemode switch test GMSWITCH

// down on the script
public GMswitch(playerid)
{
  GameModeExit();
	return 1;
}
with this function it restarts the server every 30 seconds (the 30 seconds i will change later, so don't mind that, it's just for testing)
but I don't want it to restart the server/gamemode
I want it to load a new gamemode
Any help?

I've searched the whole web so maybe somebody could help me by giving me a good link or just explain or whatever


thanks



Re: automatic gamemode change problem - Lewwy - 23.05.2009

pawn Код:
// on top or above the function
forward GMswitch();

// ongamemodeinit
SetTimer("GMswitch",30000,true); // gamemode switch test GMSWITCH

// down on the script
public GMswitch()
{
    SendRCONCommand("changemode modename");
    return 1;
}



Re: automatic gamemode change problem - jesse237 - 23.05.2009

thanks! I will test it i think it will work

I tried it like that before (with sendRconCommand() but a little different, this is what i tried... but thank you!! very much.

[EDIT] oh and it has to be: SendRconCommand, not SendRCONcommand just a little detail for other people