Dialog
#1

I have this code to show all oline admins
PHP код:
CMD:admins(playeridparams[])
{
    new 
IsOnline 0string[128];
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pAdmin] > && IsPlayerConnected(i))
         {
            switch(
PlayerInfo[i][pAdmin])
            {
                case 
2LevelName ADMIN_LEVEL_2;
                case 
3LevelName ADMIN_LEVEL_3;
                case 
4LevelName ADMIN_LEVEL_4;
                case 
5LevelName ADMIN_LEVEL_5;
            }
            
format(stringsizeof(string), "%s {FF2400}(%d) %s\n"PlayerName(i), iLevelName);
            
IsOnline++;
            
ShowPlayerDialog(playeridDIALOG_ADMINSDIALOG_STYLE_LIST"Online Administrators team"string"Close""");
            if(
IsOnline == 0)
            {
                 
ShowPlayerDialog(playeridDIALOG_NO_ADMINSDIALOG_STYLE_MSGBOX"Online Administrators team""There are no administrators currently online!""Close""");
            }
        }
    }
    return 
1;

It show the dialog but it only show one admin while there are three online it show one of them.
Please Help !
Reply
#2

pawn Код:
format(string, sizeof(string), "%s %s {FF2400}(%d) %s\n", string, PlayerName(i), i, LevelName);
Reply
#3

pawn Код:
if(PlayerInfo[i][pAdmin])
        {
            format(string, sizeof(string), " %s %s ", RPALN(i), RPN(i));
Try it like this , this is from my server just edit it ..
Reply
#4

pawn Код:
if(PlayerInfo[i][pAdmin] > 0)
{                  
format(string, sizeof(string),"%s{FFFFFF} Name:{0087FF} %s{FFFFFF}\n", string,PlayerName(i));
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)