Admin ranks - Switch
#4

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
PHP код:
ReturnAdminLevel(playerid)
{
    new
        
string[64]
    ;
    switch (
PlayerInfo[playerid][pAdmin])
    {
        case 
1string"Moderator";
        case 
2string"Game Administrator";
        case 
3string"Lead Administrator";
        case 
4string"Server Manager";
        default:  
string"Undefined";
    }
    return 
string;

Then to use it here's an example:

PHP код:
SendClientMessageEx(playeridCOLOR_LAWNGREEN"%s has just promoted you to %s",ReturnName(playerid), ReturnAdminLevel(id)); 
I mean when I do /makeadmin 0 4, it displays first case 2 and then the correct one. Same thing if I choose case 4 and then case 3, it displays first case 4 and then the correct one which is case 3.
Reply


Messages In This Thread
Admin ranks - Switch - by Mo123 - 28.10.2018, 22:18
Re: Admin ranks - Switch - by RogueDrifter - 28.10.2018, 22:24
Re: Admin ranks - Switch - by TheToretto - 28.10.2018, 22:25
Re: Admin ranks - Switch - by Mo123 - 28.10.2018, 22:52
Re: Admin ranks - Switch - by TheToretto - 28.10.2018, 22:56
Re: Admin ranks - Switch - by d3Pedro - 29.10.2018, 04:07
Re: Admin ranks - Switch - by TheToretto - 29.10.2018, 06:45
Re: Admin ranks - Switch - by d3Pedro - 29.10.2018, 07:40
Re: Admin ranks - Switch - by TheToretto - 29.10.2018, 07:46

Forum Jump:


Users browsing this thread: 1 Guest(s)