Hello guys !!
I have a script about admin base , but in the script when I want to change IsPlayerAdmin(playerid)) To if(PlayerInfo[playerid][Level] >= 3) { I got some error How can I fix it __________________________________________________ ______________________________________________ *Sorry for bad english. *don't insult me please because im newbie. |
#define PATH "/Users/%s.ini" enum pInfo { pPass, pMoney, pAdmin, pKills, pDeaths } new PlayerInfo[MAX_PLAYERS][pInfo];
do you have this code?
Код:
#define PATH "/Users/%s.ini" enum pInfo { pPass, pMoney, pAdmin, pKills, pDeaths } new PlayerInfo[MAX_PLAYERS][pInfo]; |
CMD:setlevel(playerid, params[]) { new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id; if(PlayerInfo[playerid][pAdmin] >=7 || IsPlayerAdmin(playerid)) { if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setlevel [id] [adminlevel]"); if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[ERROR]:Invalid ID"); if (admlvl > 10 || admlvl < 0) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid Admin Levels: 1-10!"); PlayerInfo[id][pAdmin] = admlvl; GetPlayerName(id, victimname, sizeof(victimname)); GetPlayerName(playerid, adminname, sizeof(adminname)); new str[128]; format(str,128,"Admin %s [ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl); SendClientMessage(playerid,COLOR_BLUE,str); return 1; } else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!"); }