Admin Levels
#2

Here you go:
pawn Код:
stock admName(level)
{
    new output[50];
    switch (level)
    {
        case 0: format(output, 50, "No admin"); //Admin level 0
        case 1: format(output, 50, "Adm 1"); //Admin level 1
        case 2: format(output, 50, "Adm 2"); //Admin level 2
       
        default: format(output, 50, "Unknown"); //Name for undefined admin levels
    }
    return output;
}
In order to use, do this:

format(szMessage, 128, "* %s %s(%d): %s", admName(PlayerInfo[playerid][pAdmin]), GetPlayerNameEx(playerid, playerid, params);
This would return (if the admin level would be 2, playername 'Kwarde', ID 0 and 'params' = 'Hello'):
* Adm 1 Kwarde(0): Hello.
Off course you must edit this function; add more levels, edit current level names . If you have admin-level names that contains more then 50 characters, change this too!
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)