Help with /admin command
#5

PHP Code:
CMD:admins(playeridparams[])
{
    new 
playername[MAX_PLAYER_NAME];
    
    if(
GetPlayerScore(playerid) < 50) return SendClientMessage(playeridCOLOR_RED"You need 50 score to see online administrators");
    new 
count 0string[828], AdmRank[128];
    new 
ChangeColor;
    
SendClientMessage(playeridCOLOR_GREEN" ");
    
SendClientMessage(playeridCOLOR_GREEN"___________ |- Online Admins -| ___________");
    
SendClientMessage(playeridCOLOR_GREEN" ");
    for(new 
0MAX_PLAYERSi++) {
      if(
IsPlayerConnected(i))
       {
        if (
adlvl[i] >= 1)
        {
            
GetPlayerName(iplayernameMAX_PLAYER_NAME);
            if(
adlvl[i] > 6)
            {
                
AdmRank "Server Owner/Developer";
                
ChangeColor COL_LEVEL4;
            }
            else
            {
                switch(
adlvl[i])
                {
                    case 
1: {
                    
AdmRank "Moderator";
                    
ChangeColor COL_LEVEL1;
                    }
                    case 
2: {
                    
AdmRank "Senior Moderator";
                    
ChangeColor COL_LEVEL2;
                    }
                    case 
3: {
                    
AdmRank "Administrator";
                    
ChangeColor COL_LEVEL3;
                    }
                    case 
4: {
                    
AdmRank "Lead Administrator";
                    
ChangeColor COL_LEVEL4;
                    }
                    case 
5: {
                    
AdmRank "Lead Administrator";
                    
ChangeColor COL_LEVEL4;
                    }
                }
            }
        }
        
format(string128"%s | %s"playernameAdmRank);
        
SendClientMessage(playeridChangeColorstring);
        
count ++;
      }
    }
    if(
count == 0)
    
SendClientMessage(playeridADMINSONLINE"There are currently no administrators online.");
    return 
1;

Code:
SendClientMessage(playerid, string, ChangeColor);
should be ;_; >
PHP Code:
SendClientMessage(playeridChangeColorstring); 
Reply


Messages In This Thread
Help with /admin command - by Tass007 - 03.02.2016, 09:43
Re: Help with /admin command - by jlalt - 03.02.2016, 09:56
Re: Help with /admin command - by KillerDVX - 03.02.2016, 09:58
Re: Help with /admin command - by Tass007 - 03.02.2016, 10:11
Re: Help with /admin command - by jlalt - 03.02.2016, 10:19
Re: Help with /admin command - by Sew_Sumi - 03.02.2016, 11:47
Re: Help with /admin command - by Tass007 - 03.02.2016, 18:46
Re: Help with /admin command - by povargek - 03.02.2016, 19:02
Re: Help with /admin command - by Tass007 - 03.02.2016, 19:30
Re: Help with /admin command - by Rufio - 03.02.2016, 19:46

Forum Jump:


Users browsing this thread: 1 Guest(s)