Problem with /admins.
#3

Quote:
Originally Posted by Sledgehammer
Посмотреть сообщение
....
You still need to show the dialog when the loop ends or else it wont work...

Код:
if(strcmp(cmd, "/admins", true) == 0)
{
    if (IsPlayerConnected(playerid))
    {
    	new 
    		string[128],
    		dialogstring[500];

        for(new i = 0; i < GetPlayerPoolSize(); i++) 
        {
        	if (!IsPlayerConnected(i))
        		continue;

        	if (!PlayerInfo[i][pAdmin])
        		continue;
        
        	if (!PlayerInfo[i][pStealthed])
        		continue;

            new 
            	alevel[30];

            switch(PlayerInfo[i][pAdmin])
            {
                case 1: 
             		alevel = "{951FD0}Probie Admin";

                case 2: 
                	alevel = "{00FF0C}Junior Admin";

                case 3: 
                	alevel = "{00FF0C}General Admin";

                case 4 .. 1335: 
                	alevel = "{F4A460}Senior Admin";

                case 1336 .. 99998: 
                	alevel = "{FF0000}Head Admin";

                case 99999: 
                	alevel = "Executive Admin";
            }

            format(string, sizeof(string), "{FFFFFF}[ %s {FFFFFF}] %s\n", alevel, PlayerRPName(i));
            strcat(string, dialogstring);
        }
        ShowPlayerDialog(playerid, 1378, DIALOG_STYLE_LIST, "{FFFFFF}Admins Online", string, "Ok", "");
    }
    return 1;
}
Reply


Messages In This Thread
Problem with /admins. - by Alpay0098 - 30.05.2015, 09:28
Re: Problem with /admins. - by Sledgehammer - 30.05.2015, 09:37
Re: Problem with /admins. - by Evocator - 30.05.2015, 11:33
Re: Problem with /admins. - by Vince - 30.05.2015, 12:07
Re: Problem with /admins. - by Alpay0098 - 30.05.2015, 13:40
Re: Problem with /admins. - by amirab - 30.05.2015, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)