Help with Restarting game mode - 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: Help with Restarting game mode (
/showthread.php?tid=167622)
Help with Restarting game mode -
lSCARl - 13.08.2010
How Do i make a script that auto restarts my game mode when TEAM_HIDER 0 has no players on it?
Re: Help with Restarting game mode -
marharth - 13.08.2010
well you would need to check under onplayerupdate if team hider had 0 players, then if it did you would send the rcon command gmx...
Your using gteam right? If so ill write you out a small code snippet
Re: Help with Restarting game mode -
lSCARl - 13.08.2010
Quote:
Originally Posted by marharth
well you would need to check under onplayerupdate if team hider had 0 players, then if it did you would send the rcon command gmx...
Your using gteam right? If so ill write you out a small code snippet
|
yeah im using gTeam id really appreciate it if you wrote me a code because ive been trying to get this on my server for like 3 days its the last thing i need before my server is finished
Re: Help with Restarting game mode -
[NWA]Hannes - 13.08.2010
//Gamemodeinit
SetTimer("RestartCheck", 1000, true);
//Somewhere in your script
forward RestartCheck();
public RestartCheck()
{
if(TEAM_HIDER == 0) // Im not sure if that would work
{
SendRconCommand("gmx");
}
}