21.10.2014, 17:06
pawn Код:
CMD:ban(playerid, params[])
{
new id,reason[64], str[128];
if(sscanf(params, "us[64]", id,reason))return SendClientMessage(playerid, COLOR_RED, ">>Error: USAGE: /Ban [ID] [Reason]");
if(id == playerid) return SendClientMessage(playerid, COLOR_RED, ">>Error: Huh!");
if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLOR_RED, ">>Error: Player is not connected!");
format(str, sizeof(str), ">>Action: %s has been banned by an administrator %s. >>Reason: %s", pName(id), pName(playerid), reason);
SendClientMessageToAll(-1, str);
GameTextForPlayer(id, "~r~You have been banned!", 5000, 4);
Ban(id);
printf("Ban: %s Has Been Banned By %s, Reason: %s",pName(id), pName(playerid),reason);
return 1;
}