admins dialog
#1

can someone please help me make a /admins command but in dialog form i can onlly make it without dialog i want it to look like this , thx:


Hope you can help me make this
Reply
#2

pawn Код:
command(admins,playerid,params[]) //You can change to strcmp or w/e
{
       //You may need to make the longstring longer depending on how many admins you have which are usually online,
    new longstring[200],shortstring[30],Count = 0,pName[25];
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i)) //Change this to your admin rank.
        {
            Count++;
            GetPlayerName(i,pName,25);
            format(shortstring,sizeof(shortstring),"\n%s",pName); //You could also add some more things in like there admin level. But remember to make the string length longer!
            strcat(longstring,shortstring);
        }
    }
    format(shortstring,sizeof(shortstring),"%d admins online",Count);
    ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX,"Online Admins",longstring,"Ok","");
        //Change the dialogid to a number, make sure there are no dialog id's with the same number.
    return 1;
}
Hopefully something like this should work, I didn't test it but it will give you a fair idea on how it works.

Goodluck!
Reply
#3

COOOOOOOOOOOOOOOOOOOOOOOOL
Reply
#4

ye but how could I be able to change this:
Код:
	if (strcmp(cmd, "/admins", true) == 0)
	{
     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Admins Online:");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
			    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 11)
			    {
					GetPlayerName(i, sendername, sizeof(sendername));
					format(string, 256, "%s | Level: %d", sendername, PlayerInfo[i][pAdmin]);
     				SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
			}
		}
		return 1;
	}
into the dialog above
Reply
#5

soz for double post but any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)