Y_INI question
#6

This is a really basic solution you'll surely want to add more messages and more checks etc but just to give you a idea.

Code:
CMD:setlevel(playerid, params[])
{
     new pid;
     new level;

     sscanf(params, "ui", pid, level);
    if(IsPlayerConnected(pid))
    {
        // Level between 1 and 5
       if(level >= 1 && level <= 5) 
       {
            PlayerInfo[playerid][pAdmin] = newlevel;
            SendClientMessage(playerid, 0xFF00FFFF, "Set This Users Level!");
       }
   }
}
Edit - I see a lot of people posting code with multiple returns don't get into that habit it's bad practice and makes ugly looking hard to read code.
Reply


Messages In This Thread
Y_INI question - by Anjh - 05.04.2013, 16:29
Re: Y_INI question - by SilverKiller - 05.04.2013, 16:31
Re: Y_INI question - by Tamer - 05.04.2013, 16:32
Re: Y_INI question - by Anjh - 05.04.2013, 16:34
Re: Y_INI question - by SilverKiller - 05.04.2013, 16:36
Re: Y_INI question - by Pottus - 05.04.2013, 16:38
Re: Y_INI question - by Anjh - 05.04.2013, 16:39
Re: Y_INI question - by SilverKiller - 05.04.2013, 16:43
Re: Y_INI question - by Pottus - 05.04.2013, 16:44
Re: Y_INI question - by Anjh - 05.04.2013, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)