[HELP] /kickall
#2

pawn Код:
COMMAND:kickall(playerid, params[])
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && !IsPlayerAdmin(i))
    {
        Kick(i);
    }
    //Everyone except RCON admin got kicked
    return true;
}
Edit:
i just saw the /kickall command. Here is the /kick command, using zmcd & sscanf!

pawn Код:
COMMAND:kick(playerid, params[])
{
    new targetid, reason[128],  string[128];
    if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /kick (id/name) (reason)");
    {
        new playername[24], targetname[24];
        GetPlayerName(playerid, playername, sizeof(playername));
        GetPlayerName(targetid, targetname, sizeof(targetname));
        format(string, sizeof(string), "%s kicked %s because %s", playername, targetname, reason);
        SendClientMessageToAll(0xFF0000AA, string);
        Kick(targetid);
    }
    return true;
}
Reply


Messages In This Thread
[HELP] /kickall - by Swizzzy - 03.10.2011, 22:18
Re: [HELP] /kickall - by Laronic - 03.10.2011, 22:25
Re: [HELP] /kickall - by Swizzzy - 03.10.2011, 22:32
Re: [HELP] /kickall - by Laronic - 03.10.2011, 22:41

Forum Jump:


Users browsing this thread: 2 Guest(s)