ADMINS DIALOG
#1

please need help admins to dialog

Код:
CMD:admins(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		new string[128];
		SendClientMessage(playerid, 0xFC9803AA, "Administrбtoři On-line:");
		for(new i=0; i <= GetPlayerPoolSize(); i++)
		{
			if(IsPlayerConnected(i))
			{
				if(IsPlayerAdmin(i) && AdminLevel[i] < 1)
				{
					format(string, 128, "[On-line] %s - > RCON", jmeno(i));
					SendClientMessage(playerid, 0x0EDBF1AA, string);
				}
				else if(AdminLevel[i] > 0 && !IsPlayerAdmin(i))
				{
					format(string, 128, "[On-line] %s - > ADMIN", jmeno(i));
					SendClientMessage(playerid, 0x0EDBF1AA, string);
				}
				else if(IsPlayerAdmin(i) && AdminLevel[i] > 0)
				{
					format(string, 128, "[On-line] %s - > Admin+ RCON", jmeno(i));
					SendClientMessage(playerid, 0x0EDBF1AA, string);
				}
			}
		}
	}
	return 1;
}
Reply
#2

I've seen a tutorial about this a couple of weeks ago, you can try this:

pawn Код:
CMD:admins(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new string[128];
        new dialog[256];
        SendClientMessage(playerid, 0xFC9803AA, "Administrбtori On-line:");
        for(new i=0; i <= GetPlayerPoolSize(); i++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerAdmin(i) && AdminLevel[i] < 1)
                {
                    format(string, 128, "[On-line] %s - > RCON\n", jmeno(i));
                    strcat(dialog, string);
                }
                else if(AdminLevel[i] > 0 && !IsPlayerAdmin(i))
                {
                    format(string, 128, "[On-line] %s - > ADMIN\n", jmeno(i));
                    strcat(dialog, string);
                }
                else if(IsPlayerAdmin(i) && AdminLevel[i] > 0)
                {
                    format(string, 128, "[On-line] %s - > Admin+ RCON\n", jmeno(i));
                    strcat(dialog, string);
                }
            }
        }
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Administrбtori On-line", dialog, "OK", "Cancel");
    }
    return 1;
}
not sure if it works, haven't tested it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)