24.12.2011, 19:40
It wont set level
always said
Levels only from 1 - 6
please
always said
Levels only from 1 - 6
please
Код:
CMD:setlevel(playerid, params[]) { if(PInfo[playerid][pAdmin] >= 5) { new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id; if (sscanf(params, "ds", id, admlvl)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /setadmin [id] [adminlevel]"); if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player."); if (admlvl > 6 || admlvl < 0) return SendClientMessage(playerid, COLOR_WHITE,"Levels only from 1 - 6"); GetPlayerName(id, victimname, sizeof(victimname)); GetPlayerName(playerid, adminname, sizeof(adminname)); new str[128]; format(str,128,"You have gave admin level %i to %s[ID %d]", admlvl, victimname, id); SendClientMessage(playerid, COLOR_WHITE, str); format(str,128,"Admin %s[ID %d] gave you admin level %i", adminname, playerid, admlvl); SendClientMessage(id, COLOR_WHITE, str); format(str,128,"Admin %s[ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl); SendClientMessageToAll(COLOR_WHITE,str); return PInfo[playerid][pAdmin] = admlvl; } else return AdminCMD(playerid, 5); }