String in DIALOG_STYLE_MSGBOX
#1

I want to make it to where when a person selects this case then all of the people that have the PlayerInfo pAdmin equal to 1 (admin), that the string will go where it says, "ADMINS GO HERE" and it will show their names. I came up with this, but I'm not really sure of what I'm doing.

pawn Код:
case 2:
{
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
         new Name[MAX_PLAYER_NAME],string[128];
         GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
         format(string,sizeof(string),"Administrator %s",Name);
         ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"Administrators"," ADMINS GO HERE ","Close","");
    }
}
Reply
#2

You formatted a string. Do something with it, instead of text just place STRING and it will display.
Just make a loop through all players, check if they're admin and then format a string that displays their name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)