Kick all Plz Help
#3

Quote:
Originally Posted by Namer
Посмотреть сообщение
use a loop for that
You are correct, but creating your own code isn't going to help. When did he ask for it to be restricted to level 5 admins? You removed the NPC check and the admin check to make sure he wasn't kicking those.

pawn Код:
CMD:kickall(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Aval Bayad login Koni Ghabl Az inke Az CMD Ha Estefade Koni.");
    if(!PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pHelper]) return 1;
    new reason[60];
    if(sscanf(params, "s[60]", reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kickall [reason]");
    new string[128];
    format(string, sizeof(string), "[Admin]{FF6347} All Players have been kicked by %s, reason: %s", NORPN(playerid), reason);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    format(string, sizeof(string), "[Admin]{FF6347} All Players have been kicked by %s (%s), reason: %s", NORPN(playerid), RPIP(playerid), reason);
    Log("logs/kick.log", string);
    for(new i = 0; i < MAX_PLAYERS; i++))
    {
        if(!IsPlayerConnected(i) || i == playerid || IsPlayerNPC(i)) continue;
        if(PlayerInfo[i][pAdmin] > PlayerInfo[playerid][pAdmin]) continue;
        TextDrawShowForPlayer(i, KickedNotice);
        FixedKick(i);
    }
    return 1;
}
Reply


Messages In This Thread
Kick all Plz Help - by Airblog - 17.12.2014, 17:25
Re: Kick all Plz Help - by JeaSon - 17.12.2014, 17:38
Re: Kick all Plz Help - by Threshold - 18.12.2014, 02:14

Forum Jump:


Users browsing this thread: 1 Guest(s)