Y_INI question
#7

Ok, my command is:

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, "d", 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[playerid][pAdmin] == adminlevel) return SendClientMessage(playerid, COLOR_SILVER, "Error: This player is already that level!");
        {
            PlayerInfo[id][pAdmin] = adminlevel;
        }
    }
    return 1;
}
It's probably horribly wrong.

I managed to edit out the compiling errors.

I've tested the command, and it does not work ingame. When you type it correctly, it does not do anything.

Thanks,
anjh.
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)