28.04.2012, 07:06
pawn Код:
CMD:kick(playerid, params[])
{
new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id, reason, string[128];
if(GetPVarInt(playerid, "Admin") != 1) return 0;
if(sscanf(params, "ui", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /kick [playerid] [reason]");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
GetPlayerName(id, targetname, MAX_PLAYER_NAME);
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected!");
Kick(id);
format(string, 128, "Administrator %s(%d) kicked player: %i Reason: %i", name, playerid, targetname, reason);
SendClientMessageToAll(-1, string);
format(string, 128, "You kicked player: %s(%d) reason: %i", targetname, id, reason);
SendClientMessage(playerid, -1, string);
return 1;
}