06.11.2011, 21:29
pawn Код:
CMD:ban(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1, "You're not allowed to use this command.");
new pID, reason[128], string[128], pName[MAX_PLAYER_NAME], pSenderName[MAX_PLAYER_NAME];
if(sscanf(params,"us[128]",id, string))
return SendClientMessage(playerid, -1, "Usage: /ban [PlayerID] [Reason]");
GetPlayerName(pID, pName, MAX_PLAYER_NAME);
GetPlayerName(playerid, pSenderName, MAX_PLAYER_NAME);
format(string, sizeof string, "Admin %s banned you for %s.", pSenderName, reason);
SendClientMessage(pID, -1, string);
format(string, sizeof string, "You banned %s for %s", pName, reason);
SendClientMessage(playerid, -1, string;
Ban(pID, reason);
return 1;
}