I Need Help With a Dialog loop :)
#1

Well guys, i want to create a dialog that loops and show every administrator on, but i have issues formatting the string with the DIALOG_STYLE_TABLIST_HEADERS cause the format don't recognize the "Nickname\tLevel\tFunction\n\" Please help me with this guys !
Reply
#2

PHP код:
#define DIALOG_ADMINS 1
CMD:admins(playeridparams[])
{
    new 
moneys1string[256];
    
string="Name\tLevel\tFunction"
    
for (new 0MAX_PLAYERSi++)
    {
          if (
IsPlayerConnected(i))
          {
               if (
PlayerInfo[i][AdminLevel] >=)//You can change with your admin system
               
{
                    
moneys1 ++;
               }
          }
    }
    if (
moneys1 != 0)
    {
            for (new 
0PLAYERSi++)
            {
                if (
IsPlayerConnected(i) && PlayerInfo[i][AdminLevel] >=1)
                {
                            
GetPlayerName(iplayernameMAX_PLAYER_NAME);
                            
format(stringsizeof(string), "%s\n%s\t%d\t%s"stringplayernamePlayerInfo[i][AdminLevel]/*,here you can add function*/);
                }
            }
            
ShowPlayerDialog(playeridDIALOG_ADMINSDIALOG_STYLE_TABLIST_HEADERS"Online Administrators"string"Ok""");
    }
    else
    {
        
SendClientMessage(playerid0x006633FF"{FFFFFF}No online staff members found.");
        
SendClientMessage(playerid0xFFCCE7FF"");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)