24.02.2009, 13:42
cmd: /kick [id] [reason]
i want to be able to add a reason to this code:
i want to be able to add a reason to this code:
pawn Код:
if(strcmp("/kick", cmdtext, true, 5) == 0)
{
if(Level[playerid] == 0) return 0;
if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, red, "You did not enter an ID");
if(IsPlayerConnected(strval(cmdtext[6])) == 0) return SendClientMessage(playerid, red, "That player is not connected");
new cmdname[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, cmdname, sizeof(cmdname));
GetPlayerName(strval(cmdtext[6]), cmdname, sizeof(cmdname));
format(string, sizeof(string), "**KICK [ADMIN KICK] %s Has Been Kicked From The Server By An Admin.", cmdname);
SendClientMessageToAll(pink, string);
Kick(strval(cmdtext[6]));
return 1;
}