HELP /a command
#2

pawn Код:
CMD:a(playerid,params[])
{
        new string[128];
    if (IsPlayerConnected(playerid))
            {
                GetPlayerName(playerid,PlayerName2(playerid),MAX_PLAYER_NAME);
                if(PlayerInfo[playerid][Level] == 1)
                {
                    format(string,sizeof(string), "{FF9900}[BasicVip]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 2)
                {
                    format(string,sizeof(string), "{FF9900}[Vip]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 3)
                {
                    format(string,sizeof(string), "{FF9900}[MasterVip]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 4)
                {
                    format(string,sizeof(string), "{7CFC00}[Admin]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 5)
                {
                    format(string,sizeof(string), "{1E90FF}[MasterAdmin]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 6)
                {
                    format(string,sizeof(string), "{00FFFF}[ProAdmin]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 7)
                {
                    format(string,sizeof(string), "[SuperAdmin]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                else if(PlayerInfo[playerid][Level] == 8)
                {
                    format(string,sizeof(string), "{FF0000}[DeltaAdmin]{09F911} %s (Level: %d) : %s",PlayerName2(playerid),PlayerInfo[playerid][Level], params );
                }
                    MessageToAdmins(NICE_PINK,string);
      }
        return 1;
}
You were looping through all the online players. It should work, not tested :P
Reply


Messages In This Thread
HELP /a command - by XYZero - 24.02.2015, 15:21
Re: HELP /a command - by De4dpOol - 24.02.2015, 15:27
Re: HELP /a command - by XYZero - 24.02.2015, 15:41

Forum Jump:


Users browsing this thread: 1 Guest(s)