/admin cmd prob
#4

Quote:
Originally Posted by rakinz
Посмотреть сообщение
I've tried that too **btw the return 1;} in the end is useless
The problem is when you make the command like that on the admin list you're getting shown with level 0.
it should be.
you don't need
Код:
if(PlayerInfo[playerid][pAdmin] > 0)
on top


Код:
CMD:admins(playerid, params[]) 
{ 
    if(PlayerInfo[playerid][pAdmin] > 0) 
    { 
        new string[50], string2[50]; 
        SendClientMessage(playerid, COLOR_YELLOW, "Online Administrators:"); 
        foreach(new i : Player) 
        { 
            if(PlayerInfo[i][pAdmin] >= 1) // set the number you want to show in /admins
            { 
                GetPlayerName(i, string2, sizeof(string2)); 
                format(string, sizeof(string), "%s | Admin Level: %d", string2, PlayerInfo[i][pAdmin]); 
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
            } 
        } 
        return 1; 
    } 
    return 1; 
}
OR

Код:
CMD:admins(playerid, params[]) 
{ 
        new string[50], string2[50]; 
        SendClientMessage(playerid, COLOR_YELLOW, "Online Administrators:"); 
        foreach(new i : Player) 
        { 
            if(PlayerInfo[i][pAdmin] >= 1) 
            { 
                GetPlayerName(i, string2, sizeof(string2)); 
                format(string, sizeof(string), "%s | Admin Level: %d", string2, PlayerInfo[i][pAdmin]); 
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
            } 
        } 
        return 1; 
    } 
    return 1; 
}
Reply


Messages In This Thread
/admin cmd prob - by rakinz - 16.02.2017, 20:19
Re: /admin cmd prob - by Ryan50 - 16.02.2017, 20:21
Re: /admin cmd prob - by rakinz - 16.02.2017, 20:30
Re: /admin cmd prob - by Ryan50 - 16.02.2017, 20:37
Re: /admin cmd prob - by rakinz - 16.02.2017, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)