16.11.2014, 11:07
Alright, so i have made a ban command, but when i type '/ban 2 test' it shows the usage and doesn't ban the player, could i have a little help with this, thank you
Код:
ACMD:ban(playerid, params[]) { if (pInfo[playerid][Adminlevel] < 2)return 0; new reason[25], string[250]; if(sscanf(params, "ui",ID, reason)) return SendClientMessage(playerid, red, "--- /ban <ID> <Reason> ---"); if(ID == IPI)return SCM(playerid, red, "Player is not connected!"); pInfo[playerid][Banned]=1; GetPlayerName(ID,pname,MAX_PLAYER_NAME); GetPlayerName(playerid,Nam, MAX_PLAYER_NAME); format(string, sizeof(string), "%s %s has banned %s for %s", AdminLevelName(playerid),Nam, pname, reason); SendClientMessageToAll(red, string); Kick(ID); return 1; }