Please help?
#3

Not work man.
Can you create another cmd for check admins online and admin level?
i tryed this, but this show me all admins with level 6, not their real lvl..
PHP код:
CMD:admins(playeridparams[])
{
    if(
IsPlayerConnected(playerid))
    {
        new 
count 0string[196], sendername[MAX_PLAYER_NAME];
        
SendClientMessage(playeridCOLOR_TEAL"----Admins Online----------------------------------------------------");
         foreach(
Playeri)
        {
            if(
IsPlayerConnected(i))
            {
                if(
playerVariables[i][pAdminLevel] == 1)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 1"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 1"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 2)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 2"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 2"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 3)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 3"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 3"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 4)
                {
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 4"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 4"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 5)
                {
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 5"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 5"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 6)
                {
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - admin level 6"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - admin level 6"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
                if(
playerVariables[playerid][pAdminLevel] == 7)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    if(
AdminDuty[i] == 0)
                    {
                        
format(stringsizeof(string), "(%d) %s - Founder"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                    else
                    {
                           
format(stringsizeof(string), "(%d) %s - Founder"isendername);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
count++;
                    }
                }
            }
         }
        if(
count == 0)
          {
            
SendClientMessage(playeridCOLOR_IN2,"* No admins online on the server.");
            
SendClientMessage(playeridCOLOR_TEAL,"----------------------------------------------------------------------------");
            
SendClientMessage(playeridCOLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
            
SendClientMessage(playeridCOLOR_TEAL,"----------------------------------------------------------------------------");
        }
        else if(
count == 1)
          {
            
SendClientMessage(playeridCOLOR_IN2,"* Now are 1 admin online.");
            
SendClientMessage(playeridCOLOR_TEAL,"----------------------------------------------------------------------------");
            
SendClientMessage(playeridCOLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
            
SendClientMessage(playeridCOLOR_TEAL,"----------------------------------------------------------------------------");
        }
        else if (
count >= 2)
        {
            
format(stringsizeof(string), "* There are now %d admins online."count);
            
SCM(playeridCOLOR_IN2string);
            
SendClientMessage(playeridCOLOR_TEAL"----------------------------------------------------------------------------");
            
SendClientMessage(playeridCOLOR_WHITE"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
            
SendClientMessage(playeridCOLOR_TEAL"----------------------------------------------------------------------------");
        }
    }
    return 
1;

Reply


Messages In This Thread
Please help? - by GabiXx - 20.12.2015, 21:49
Re: Please help? - by N0FeaR - 20.12.2015, 22:16
Re: Please help? - by GabiXx - 20.12.2015, 22:28
Re: Please help? - by SilverStand - 21.12.2015, 01:53
Re: Please help? - by Amunra - 21.12.2015, 02:13
Re: Please help? - by jlalt - 21.12.2015, 03:03
Re: Please help? - by GabiXx - 21.12.2015, 16:05
Re: Please help? - by Mencent - 21.12.2015, 16:31
Re: Please help? - by GabiXx - 21.12.2015, 19:04
Re: Please help? - by TwinkiDaBoss - 21.12.2015, 21:35

Forum Jump:


Users browsing this thread: 1 Guest(s)