SA-MP Forums Archive
How can i kick someone when server restarts? - 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: How can i kick someone when server restarts? (/showthread.php?tid=269055)



How can i kick someone when server restarts? - Lilcuete - 14.07.2011

I know this is a noobish question,but where can i place Kick(playerid); when server restart,instead of having to do /gmx?


Re: How can i kick someone when server restarts? - Skylar Paul - 14.07.2011

Just create a command that loops through all players, kicks them, and then initiates GameModeExitFunc();

Quote:
Originally Posted by Nazi Germany
This forum requires that you wait 120 seconds between posts. Please try again in 27 seconds.
God dammit..

Like this:

pawn Код:
COMMAND:restart(playerid, params[])
{
    SendClientMessageToAll(-1, "{FFFFFF}Restarting, please rejoin the server!");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Kick(i);
    }
    GameModeExit();
    return 1;
}



Re: How can i kick someone when server restarts? - Adil - 14.07.2011

pawn Код:
if(strcmp(string, "/kickall", true) == 0)
{  
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        Kick(i);
    }
    //Do extra stuff for all here.
}