Y_INI question
#8

pawn Code:
CMD:setadmin(playerid, params[])
{
    new id, adminlevel;
    if(PlayerInfo[playerid][pAdmin] <= 4) return SendClientMessage(playerid, COLOR_SILVER, "You must be atleast a Community Owner to use this command!");
    else if(sscanf(params, "ud", id, adminlevel)) return SendClientMessage(playerid, COLOR_SILVER, "Syntax: /setadmin [PlayerID][Admin Level]");
    else if(adminlevel > 0 || adminlevel < 5) return SendClientMessage(playerid, COLOR_SILVER, "Error: Must be level 1-5!");
    else
    {
        if(PlayerInfo[id][pAdmin] == adminlevel) return SendClientMessage(playerid, COLOR_SILVER, "Error: This player is already that level!");
        else
        {
            PlayerInfo[id][pAdmin] = adminlevel;
        }
    }
    return 1;
}
Should work fine..
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: 2 Guest(s)