15.10.2012, 16:57
I Am Level 7
It Might Be A Probelm Of My Setlevel COmmand To
Heres My Setlevel Command
It Might Be A Probelm Of My Setlevel COmmand To
Code:
CMD:setlevel(playerid,params[]) { new id,level,n[MAX_PLAYER_NAME], str[265]; new playername[MAX_PLAYER_NAME]; new adminname [MAX_PLAYER_NAME]; if(IsPlayerAdmin(playerid)) { if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setlevel <id> level[1-7]!"); else { if(level > 7) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setlevel <id> level[1-7]!"); else { GetPlayerName(id,n,MAX_PLAYER_NAME); GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); new INI:File = INI_Open(UserPath(id)); INI_WriteInt(File,"Admin",level); INI_Close(File); format(str,sizeof(str),"You have set %s's level to %d",n,level); SendClientMessage(playerid,COLOR_LIGHTBLUE,str); format(str,sizeof(str),"Administrator %s Has Set Your Level To %d",adminname,level); SendClientMessage(player1,COLOR_LIGHTBLUE,str); } } } else { SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not Rcon Admin!"); } return 1; }