Y_INI Help
#12

I Am Level 7

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;
}
Heres My Setlevel Command
Reply


Messages In This Thread
Y_INI Help - by MrReBzz - 13.10.2012, 08:00
Re: Y_INI Help - by Jarnu - 13.10.2012, 08:03
Re: Y_INI Help - by Glint - 13.10.2012, 08:03
Re: Y_INI Help - by T-Raw - 13.10.2012, 08:10
Re: Y_INI Help - by MrReBzz - 13.10.2012, 08:13
Re: Y_INI Help - by T-Raw - 13.10.2012, 08:16
Re: Y_INI Help - by Glint - 13.10.2012, 08:16
Re: Y_INI Help - by gtakillerIV - 13.10.2012, 08:16
Re: Y_INI Help - by MrReBzz - 14.10.2012, 20:53
Re: Y_INI Help - by JhnzRep - 14.10.2012, 21:26
Re: Y_INI Help - by Anthony © - 14.10.2012, 21:54
Re: Y_INI Help - by MrReBzz - 15.10.2012, 16:57

Forum Jump:


Users browsing this thread: 3 Guest(s)