SA-MP Forums Archive
String in DIALOG_STYLE_MSGBOX - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String in DIALOG_STYLE_MSGBOX (/showthread.php?tid=408617)



String in DIALOG_STYLE_MSGBOX - Noles2197 - 18.01.2013

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","");
    }
}



Re: String in DIALOG_STYLE_MSGBOX - hydravink - 18.01.2013

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.