Admin Levels
#4

I see that 'GetPlayerNameEx(playerid,' should be 'GetPlayerNameEx(playerid),'.
Also, you could use this stock, too:
pawn Код:
stock admName(playerid)
{
    new output[50];
    switch (PlayerInfo[playerid][pAdmin])
    {
        case 0: format(output, 50, "No admin");
        case 1: format(output, 50, "Adm 1");
        case 2: format(output, 50, "Adm 2"); //Etc!

        default: format(output, 50, "Unknown");
    }
    return output;
}
And you don't have to use what I posted, the format was an example .
Just use the stock I provided (I tested the first one I posted and it worked for me) and futher just use admName(playerid) to show the admin name. Use the first stock if you want to use admName(PlayerInfo[playerid][pAdmin])
For the duplicated "case" (the first error), did you perhaps edit this function? For the next 'case' you must 'case 3', then 'case 4' etcetera. If you don't understand this, please post the admName function if you have editted it.
Reply


Messages In This Thread
Admin Levels - by Lucky™ - 09.05.2013, 17:24
Re: Admin Levels - by Kwarde - 09.05.2013, 17:30
Re: Admin Levels - by Lucky™ - 09.05.2013, 17:44
Re: Admin Levels - by Kwarde - 09.05.2013, 17:48
Re: Admin Levels - by Lucky™ - 09.05.2013, 18:38
Re: Admin Levels - by Kwarde - 09.05.2013, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)