24.02.2013, 19:04
You can try declaring a long string (I usually use 2048 to 3072 so as to contain as many characters as possible) like this:
You have to know that dialogs use \n to create a new line. So you can concatenate the string using format like this, as I see you have some integers and strings in your code:
If you do that by searching all the players and check if they are admins, you can simply do the job. After that you can show the dialog:
Check it out in the SA-MP wiki:
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
Finally I suggest you to use "switch" to replace those "if(pAdmin[i] blablabla": https://sampwiki.blast.hk/wiki/Control_Structures#switch_2
and also changing those '24's for pname into MAX_PLAYER_NAME. When the name length changes after SA-MP releases a new update, you don't need to modify that much to support it.
pawn Код:
new string[2048] = "";//Initialisation is important here
pawn Код:
format(string, sizeof(string), "%sBlaBlaBla(name or something)\n", string, (your parameters) );
pawn Код:
ShowPlayerDialog(playerid, dialog id, dialog style(I like DIALOG_STYLE_LIST but DIALOG_STYLE_MSGBOX is also possible), caption/title , content of the dialog (you string), button1, button2);
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
Finally I suggest you to use "switch" to replace those "if(pAdmin[i] blablabla": https://sampwiki.blast.hk/wiki/Control_Structures#switch_2
and also changing those '24's for pname into MAX_PLAYER_NAME. When the name length changes after SA-MP releases a new update, you don't need to modify that much to support it.

