20.11.2012, 16:08
pawn Код:
CMD:ban(playerid, params[])
{
new pID, reason[68], msg[128], name[MAX_PLAYER_NAME], bannername[MAX_PLAYER_NAME];
if(sscanf(params, "us", pID, reason)) return SendClientMessage(playerid, 0xDF0000FF, "USAGE: /ban [playerid] [reason]");
{
GetPlayerName(pID, name, sizeof(name));
GetPlayerName(pID, bannername, sizeof(bannername));
format(msg, sizeof(msg), "[AdmCmd]: %s has been banned by %s, reason: %s", name, bannername, reason);
SendClientMessageToAll(0xDF0000FF, msg);
BanEx(pID, reason);
}
return 1;
}