View Single Post
Old 21/09/2018, 04:35 PM   #4
CodeStyle175
Banned
 
Join Date: Apr 2014
Posts: 455
Reputation: 35
Default Re: /admins in dialog

PHP Code:
new arrAdminRanks[][]={"Admin","Moderator","Moderator","Administrator","Main Administrator","Developer"};
GetUserName(p){
    new 
s[20];
    
GetPlayerName(p,s,20);
    return 
s;
}

CMD:admins(p){
    new 
s[1024],
        
s2[20],
        
cnt;
    foreach(new 
Player){
        if(!
PlayerInfo[i][pAdmin])continue;
        
cnt++;
        
format(s,1024,"%s%d | %s | %s\n",s,cnt,arrAdminRanks[PlayerInfo[i][pAdmin]],GetUserName(i));
    }
    
format(s2,20,"Admins online - %d",cnt);
    
ShowPlayerDialog(p,d_admins,DIALOG_STYLE_MSGBOX,s2,s,"Close","");
    return 
1;


Last edited by CodeStyle175; 21/09/2018 at 06:36 PM.
CodeStyle175 is offline   Reply With Quote