18.12.2014, 02:14
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;
}