18.10.2010, 10:10
How can i add a reason why was player kicked to this command, example: Admin Matej kicked John for weapon hax.
pawn Код:
dcmd_kick(playerid,params[])
{
new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
new tmp[256], Index, str[49];
tmp = strtok(params,Index), id = strval(tmp);
GetPlayerName(id,on,sizeof(on));
GetPlayerName(playerid,n,sizeof(n));
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /kick <ID> ");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID");
format(str,sizeof(str),"Administrator %s has kicked %s",n,on);
SendClientMessageToAll(0xFF0000FF,str);
Kick(id);
return 1;
}