/admins problem
#1

I use this command but when is there are 2 or more admins online it only write 1 player

PHP код:
dcmd_admins(playerid,params[])
{
    
#pragma unused params
    
new count 0;
     new 
string[128],name[50];
      new 
name1[MAX_PLAYER_NAME];
    for(new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i))
        {
            
GetPlayerName(i,name1,MAX_PLAYER_NAME);
            if(
AdminLevel[i] > 0)
            {
                      if(
AdminLevel[i] == 1)
                    {
name "{FFFF00}Server Moderator {FFFFFF}(Level 1)";}
                     if(
AdminLevel[i] ==2)
                    {
name "{0000BB}Global Moderator {FFFFFF}(Level 2)";}
                       if(
AdminLevel[i] ==3)
                       {
name "{ADFF2F}Administrator {FFFFFF}(Level 3)";}
                       if(
AdminLevel[i] ==4)
                       {
name "{ADFF2F}Lead Adminstrator {FFFFFF}(Level 4)";}
                       if(
AdminLevel[i] ==5)
                       {
name "{FF0000}Owner {FFFFFF}(Level 5)";}
                    
format(string128"\"%s\" {%s}"name1,name);
                    
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"ADMINS ONLINE",string,"Ok","");
                    
count++;
              }
        }
    }
    if (
count == 0)
    
SendClientMessage(playerid,COLOR_ADMIN,"There are no admins Online at the moment");
    return 
1;

Reply


Messages In This Thread
/admins problem - by nor15 - 14.06.2013, 18:38
Re: /admins problem - by IstuntmanI - 14.06.2013, 18:45

Forum Jump:


Users browsing this thread: 1 Guest(s)