Please check this code out for me please
#1

Код:
CMD:setadmin(playerid,params[])
{
		new id,level;
	if(IsPlayerAdmin(playerid))
	{
	    if(sscanf(params,"ud",id,level) return SendClientMessage(playerid, COL_RED, "Usage: /setadmin [id] [level] ");
		else
		{
		    if(level > 5) return SendClientMessage(playerid, COL_RED, "Usage: /setadmin id 1-5");
		    else
		    {
					new INI:File = INI_Open(UserPath(id));
					INI_WriteInt(File,"Admin",level);
					INI_Close(File);
			}
		}
	}
	else
	{
	SendClientMessage(playerid, COL_RED, "That id is not connected");
	}
}
and can you tell me what i did wrong. explain to me what i did wrong so i can correct it in the future
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)