View Single Post
Old 21/09/2018, 04:21 PM   #2
DeMoo
Big Clucker
 
DeMoo's Avatar
 
Join Date: Dec 2015
Location: Georgia
Posts: 64
Reputation: 3
Default Re: /admins in dialog

maybe like this?

PHP Code:
CMD:admins(playeridparams[])
{
    new 
string[1024],string1[512],total 0;
    foreach(new 
Player)
    {
        if(
IsPlayerConnected(i))
            {
            if(
PlayerInfo[i][pAdmin] > 1)
                {
                new 
admin[20];
                if(
PlayerInfo[i][pAdmin] == 1) { admin "Admin"; }
                else if(
PlayerInfo[i][pAdmin] == 2) { admin "Moderator"; }
                else if(
PlayerInfo[i][pAdmin] == 3) { admin "Administrator"; }
                else if(
PlayerInfo[i][pAdmin] == 4) { admin "Main Administrator"; }
                else if(
PlayerInfo[i][pAdmin] == 5) { admin "Developer"; }
                if(
PlayerInfo[i][pAdmin] >= total++;
                new 
sendername[MAX_PLAYER_NAME];
                
GetPlayerName(isendernamesizeof(sendername));
                
format(string1024"%s\n{00CCFF}%s: {FFFFFF}%s (ID: %d) Status:{00ff00} Online",stringadminsendernamei);
                }
            }
    }
       
format(string1,512,"Admins Online: {ff3300}%d",total);
    
ShowPlayerDialog(playerid65535DIALOG_STYLE_MSGBOXstring1string"Close""");
    return 
1;

__________________
DeMoo is offline   Reply With Quote