SA-MP Forums Archive
removing all players - 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)
+--- Thread: removing all players (/showthread.php?tid=301614)



removing all players - xMichaelx - 04.12.2011

Hey,

Could someone please explain how to remove all the players from the servers but not the administrators. I use PlayerInfo[playerid][pAdmin] as my administrator defines. Thanks.


Re: removing all players - Tanush123 - 04.12.2011

pawn Код:
CMD:kickall(playerid,params[])
{
    format(str,sizeof(str),"Administrator %s has kicked everyone in the server for %s",Nam,Reason);
    SendClientMessageToAll(-1,str);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] == 0)
        {
        Kick(i);
        }
    }
    return 1;
}
didnt tested but try it


Re: removing all players - xMichaelx - 04.12.2011

Thanks


Re: removing all players - Tanush123 - 04.12.2011

Btw if you got defined color error change the sendclientmessage to
pawn Код:
SendClientMessageToAll(-1,str);
I posted this since i see you only have 16 posts so you might be new. I am sorry if i insulted you and if your not new in pawno