/Admins - Need Help!
#1

Hi mates, I'm TheHonnor!
Recently i made a command called '/Admins'. What does do this command?
Well, this command will Show you a DIALOG_STYLE_TABLIST_HEADERS dialog with all connected admins on server.

Photo with dialog: http://imgur.com/4a5aDEK

Ok, what's the trouble? In the photo, I'm the only connected admin. But, if there are more than one connected admins on the server, then the dialog will show "Admin name" "Level" "Status" "Rcon Access" where the admins must appear.

Код:
CMD:admins(playerid)
{
    if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][Level] >= 1)
    {
        Str[0] = '\0'; new TotalCount = 0, HonnCaption[52], Status[64], HonnT[24];
        //----------------------------------------------------------------------
        foreach(new i: Player) if(PlayerInfo[i][Level] >= 1)
        {
            if(IsPlayerAdmin(i))                            HonnT = "{00FF00}Yes";
            else if(!IsPlayerAdmin(i))                      HonnT = "{FF0000}No";
            //------------------------------------------------------------------
            if(PlayerInfo[i][AFKBRB] 	  == 1)             Status = "{FFFF00}AFK";
            else if(PlayerInfo[i][Hidden] == 1)             Status = "{FF8000}Hidden";
            else                                            Status = "{FFFFFF}Playing";
            //------------------------------------------------------------------
            format(Str, sizeof(Str), "Admin Name\tLevel\tStatus\tRCON Access\n{00FF00}%s{FFFFFF}(%d)\t{00BBF6}%d\t%s\t%s\n%s", PlayerName(i), i, PlayerInfo[i][Level], Status, HonnT, Str); TotalCount++;
	}
        //----------------------------------------------------------------------
        format(HonnCaption, 128, "{00BBF6}Online Admins - {FF0000}%d", TotalCount);
	//----------------------------------------------------------------------
	if(TotalCount == 0) return GameTextForPlayer(playerid, "~w~~h~No Admins ~r~~h~Online", 3000, 4);
	else return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_TABLIST_HEADERS, HonnCaption, Str, "Close", "");
    }
    else return SendLangInfo(playerid, "{FF0000}Vrei sa raportezi un jucator? Foloseste /Report [ID] [Motiv] !", "Do you wanna report someone? Use /Report [ID] [Reason] !");
}
Thanks in advance and sorry for my english, I'm romanian ^_^
Reply


Messages In This Thread
/Admins - Need Help! - by TheHonnor - 26.06.2016, 10:58
Re: /Admins - Need Help! - by Mencent - 26.06.2016, 11:13
Re: /Admins - Need Help! - by TheHonnor - 26.06.2016, 11:39
Re: /Admins - Need Help! - by TheHonnor - 26.06.2016, 13:49
Re: /Admins - Need Help! - by Sjn - 26.06.2016, 14:02
Re: /Admins - Need Help! - by Mencent - 27.06.2016, 04:59
Re: /Admins - Need Help! - by Sew_Sumi - 27.06.2016, 08:27

Forum Jump:


Users browsing this thread: 2 Guest(s)