11.06.2013, 21:28
Try this,
Код:
YCMD:ban(playerid, params[], help) { if(GetPlayerAdminLevel(playerid) < 4) return SendClientMessage(playerid, 0xFFFFFF, "You aren't authorized to use this command." if (help) { return SendClientMessage(playerid, 0xFF0000AA, "Bans another player."); } else { new pid, reason[32]; if (sscanf(params, "uS[32]", pid, reason)) { return SendClientMessage(playerid, 0xFF0000AA, "Parameters: <playerid/name> [reason]"); } if (reason[0]) { SendClientMessage(pid, 0xFF0000AA, "You have been banned. Reason:"); SendClientMessage(pid, 0xFF0000AA, reason); } else { SendClientMessage(pid, 0xFF0000AA, "You have been banned."); } Ban(pid); } return 1; }