17.10.2009, 09:59
pawn Код:
if(!strcmp(cmdtext, "/kick", true, 5))
{
if(!strlen(cmdtext[6]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /kick [playerid] [reason]");
return 1;
}
new ID = strval(cmdtext[6]);
new pName[24], stri[64], strv[64],rest[256];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(strv, 64, "~ You have been kicked from the server for ^%s^", rest);
SendClientMessage(ID,COLOR_ORANGE, strv);
Kick(ID);
format(stri, 64, "%s has been kicked from the server", pName);
SendClientMessageToAll(COLOR_ORED, stri);
print(stri);
}
return 1;
}