03.08.2013, 19:36
Ok i just got my admin system working. Here the Code
But i notice right if i go in game and i use command it just change the user file admin= 1 even if i set level to 5 it just goes up one
Код:
CMD:setadmin(playerid,params[]) { if(IsPlayerAdmin(playerid)) { new id,level; if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid, COLOR_RED, "Usage: /setadmin [id] [level] "); if(level > 5) return SendClientMessage(playerid, COLOR_RED, "Usage: /setadmin id 1-5"); new INI:File = INI_Open(UserPath(id)); INI_WriteInt(File,"Admin",level); PlayerInfo[playerid][pAdmin]++; INI_Close(File); } else SendClientMessage(playerid, COLOR_RED, "That id is not connected"); return 1; }