10.06.2011, 20:28
pawn Код:
command(kick, playerid, params[])
{
new string[128];
new ID;
new pname[24];
new aname[24];
new explan[128];
GetPlayerName(ID, pname, sizeof(pname));
GetPlayerName(playerid,aname,24);
if( PlayerInfo[playerid][Admin] >= 1)
{
if(sscanf(params, "i", ID, explan))
{
SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /kick (playerid)(reason)" );
return 1;
}
if(!IsPlayerConnected(ID))
{
SendClientMessage(playerid, COLOUR_ORANGE, "Hint: Invalid Player ID");
return 1;
}
format(string, sizeof(string), "%s (%d) has been kicked by Admin %s", pname, ID, aname, explan);
SendClientMessageToAll(ADMIN_WARNING, string);
Kick(ID);
}
return 1;
}