[HELP] Dialog - 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: [HELP] Dialog (
/showthread.php?tid=331603)
[HELP] Dialog -
V4at - 05.04.2012
How to create a big dialog with DIALOG_STYLE_MSGBOX style? When the line does not fit I add \ but still another line of me shows the error.
Re: [HELP] Dialog -
.FuneraL. - 05.04.2012
An Example of command Msg Dialog Box
pawn Код:
if(strcmp("/example", cmdtext, true) == 0)
{
new Ex[999]
new string[256]
format(string, sizeof(string), "Example\n"); strcat(Ex, string);
format(string, sizeof(string), "Example2\n"); strcat(Ex, string);
format(string, sizeof(string), "Example3\n"); strcat(Ex, string);
ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "Example Name", Ex, "Ok", "");
return 1;
}
Re: [HELP] Dialog -
Scripter12345 - 05.04.2012
Quote:
Originally Posted by .FuneraL.
An Example of command Msg Dialog Box
pawn Код:
if(strcmp("/example", cmdtext, true) == 0) { new Ex[999] new string[256] format(string, sizeof(string), "Example\n"); strcat(Ex, string); format(string, sizeof(string), "Example2\n"); strcat(Ex, string); format(string, sizeof(string), "Example3\n"); strcat(Ex, string); ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "Example Name", Ex, "Ok", ""); return 1; }
|
Or if you are using ZCMD
Add this to the top of your script
#define DIALOG_EXAMPLE 1
pawn Код:
CMD:example(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_EXAMPLE, DIALOG_STYLE_MSGBOX, "Option 1","Option 2", "Select" " Cancel ");
}
Re: [HELP] Dialog -
Ezay - 05.04.2012
You Could Use Funreal's Way, Althought
ZCMD is a Fast Command Processor,
Scripter12345's Method is a Better Option,
Cheers,
Ezay
\o/
Re: [HELP] Dialog -
Mark™ - 05.04.2012
Quote:
Originally Posted by Scripter12345
Or if you are using ZCMD
Add this to the top of your script
#define DIALOG_EXAMPLE 1
pawn Код:
CMD:example(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_EXAMPLE, DIALOG_STYLE_MSGBOX, "Option 1","Option 2", "Select" " Cancel "); return 1; }
|
You forgot to add return 1;