21.01.2011, 03:15
Try this:
I know that I've done a mistake, I can't see it though.
I know that I've done a mistake, I can't see it though.
pawn Код:
COMMAND:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
new pid = playerid, reason[128], id = strval(tmp);
if(sscanf(params, "us[128]", player, reason)) return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /kick [id] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GRAY,"AdmCmd This player is not online!");
PlayHintSoundAtPos(playerid);
new globalmsg[100];
new adminid[MAX_PLAYERS], victimid[MAX_PLAYERS];
GetPlayerName(pid, adminid, sizeof(victimid));
GetPlayerName(id, victimid, sizeof(victimid));
format(globalmsg,sizeof(globalmsg),"AdmWarn: Administrator %s has kicked player %s [%s]",adminid,victimid,reason);
SendClientMessageToAll(COLOR_LIGHTBLUE,globalmsg);
Kick(id);
}
else SendClientMessage(playerid,COLOR_GRAY,"You don't have authorization.");
return 1;
}