06.06.2010, 15:06
hi, anyways, i got my admin system working, saves the level and what not. but i have this ban command, and i made it so if the level isnt 2 they cant use it.
but im level 3 on the server. and it says i cant use it... whats rong?
Код:
dcmd_ban(playerid, params[]) { if(PlayerInfo[playerid][AdminLevel] >= 2) return SendClientMessage(playerid, COLOR_RED, "Sorry, You need to be a level 2 or higher admin to use this command"); new id, reason[64]; if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid/partname> <reason (optional)>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else { BanEx(id, reason); format(reason, sizeof (reason), "You have been banned%s%s.", reason[0] ? (" for: ") : (""), reason); SendClientMessage(id, 0xFF0000AA, reason); SendClientMessage(playerid, 0x00FF00AA, "Player banned"); } return 1;}