Dialog help
#1

Hello guys,

I have some trouble with /admins command. Take a look:


Code here:
Код:
CMD:admins(playerid, params[])
{
	if(PlayerInfo[playerid][pHour] >= 2 || PlayerInfo[playerid][pAdminLevel] >= 1 || PlayerInfo[playerid][pVIP] >= 1)
	{
	    new adminstring[128],countadmin=0;
	    if(IsPlayerConnected(playerid))
	    {
	        for (new i = 0; i < MAX_PLAYERS; i++)
	        {
	            if(IsPlayerConnected(i))
	            {
	                if(PlayerInfo[i][pAdminLevel] > 0)
	                {
	                    format(adminstring, sizeof(adminstring),"Name\tPosition\tStatus\n\%s%s\t%s\t%s\n", adminstring, GetName(i),GetAdminName(i),GetAdminOnlineStatus(i));
	                    countadmin++;
	                }
	            }
	        }
	        ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_TABLIST_HEADERS,"{00CED1}Online Staff Members",adminstring,"{00CED1}Close","");
		}
 		if(countadmin == 0) return ShowPlayerDialog(playerid, DIALOG_NOONLINE, DIALOG_STYLE_MSGBOX,"{00CED1}Online Staff Members","No Staff members online","{00CED1}Close","");
	}	
    return 1;
}
Reply


Messages In This Thread
Dialog help - by TomRedlake - 12.11.2017, 12:11
Re: Dialog help - by SyS - 12.11.2017, 12:18
Re: Dialog help - by TomRedlake - 12.11.2017, 12:29

Forum Jump:


Users browsing this thread: 2 Guest(s)