[HELP] Place / Admins in Dialog
#2

You can try declaring a long string (I usually use 2048 to 3072 so as to contain as many characters as possible) like this:
pawn Код:
new string[2048] = "";//Initialisation is important here
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:
pawn Код:
format(string, sizeof(string), "%sBlaBlaBla(name or something)\n", string, (your parameters) );
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:
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);
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.
Reply


Messages In This Thread
[HELP] Place / Admins in Dialog - by xRuffles - 24.02.2013, 18:40
Re: [HELP] Place / Admins in Dialog - by leong124 - 24.02.2013, 19:04
Re: [HELP] Place / Admins in Dialog - by xRuffles - 25.02.2013, 09:22
Re: [HELP] Place / Admins in Dialog - by Gamer_007 - 25.02.2013, 09:26
Re: [HELP] Place / Admins in Dialog - by leong124 - 25.02.2013, 12:06
Re: [HELP] Place / Admins in Dialog - by xRuffles - 26.02.2013, 12:46
Re: [HELP] Place / Admins in Dialog - by leong124 - 26.02.2013, 15:51
Re: [HELP] Place / Admins in Dialog - by xRuffles - 27.02.2013, 14:13
Re: [HELP] Place / Admins in Dialog - by mittukuttan - 27.02.2013, 14:21
Re: [HELP] Place / Admins in Dialog - by leong124 - 27.02.2013, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)