26.10.2014, 22:08
No, he means that when someone is kicked, it bans them instead (I think).
Here's a /kick command that works fully.
Here's a /kick command that works fully.
pawn Код:
CMD:kick(playerid, params[])
{
new targetid, reason[64], string[128];
[ADMIN SYSTEM HERE] return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /kick [playerid] [reason]");
else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot kick administrators of a higher rank.");
format(string, sizeof(string), "SERVER: %s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
Log("kick.txt", string);
Kick(targetid);
return 1;
}