SA-MP Forums Archive
Help with BIG dialog in msgbox style! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with BIG dialog in msgbox style! (/showthread.php?tid=126936)



Help with BIG dialog in msgbox style! - Posorkon - 11.02.2010

Hey guys! I need to find some way to create a big msgbox...

I tried to do with strings, but it doesn't work.

Now i'm looking for new solution. Can someone show me a way to do BIG messages box (to tutorials in game, infos, help, and more...)?

Here is my code:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (!strcmp(cmdtext, "/tutorial", true, 9))
	{
	  ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DILOAG_STYLE_MSGBOX, "Part 1 - Rules:", "Dont spam\n dont dm\n dont...", "cancel", "next");
	  return 1;
	}
	return 0;
}
	
	
	
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new tut1_1[] = "blablablablablablablablablablablablablablablablablablablablablablablabla";
	new tut1_2[] = "blablablablablablablablablablablablablablablablablablablablablablablabla";
	.......
	..
	new tut1_5[] = "blablablablablablablablablablablablablablablablablablablablablablablabla";
	new tut1[640]; format(tut1, sizeof (tut1), "%s\n%s\n%s\n%s\n%s", tut1_1, tut1_2, tut1_3, tut1_4, tut1_5);

	new tut2_1[] = "blablablablablablablablablablablablablablablablablablablablablablablabla";
	......
	...
	new tut2_5[] = "blablablablablablablablablablablablablablablablablablablablablablablabla";
	new tut2[640]; format(tut2, sizeof (tut2), "%s\n%s\n%s\n%s\n%s", tut2_1, tut2_2, tut2_3, tut2_4, tut2_5);

	if (dialogid == DIALOG_TUTORIAL_0)
	{
	  if (response)
	  {
	    // Close tutorial
		}
		else
		{
		  ShowPlayerDialog(playerid, DIALOG_TUTORIAL_1, DIALOG_STYLE_MSGBOX, "Part 1:", tut1, "previous", "next");
		}
	}

	if (dialogid == DIALOG_TUTORIAL_1)
	{
	  if (response)
	  {
	    ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DIALOG_STYLE_MSGBOX, "Part 0 - Rules:", "Dont spam\n dont dm\n dont...", "cancel", "next");
	  }
	  else
	  {
	    ShowPlayerDialog(playerid, DIALOG_TUTORIAL_2, DIALOG_STYLE_MSGBOX, "Part 2:", tut2, "previous", "next");
		}
	}
 	
	if (dialogid == DIALOG_TUTORIAL_2)
	{
	  if (response)
	  {
	  	ShowPlayerDialog(playerid, DIALOG_TUTORIAL_1, DIALOG_STYLE_MSGBOX, "Part 1:", tut1, "previous", "next");
		}
		else
		{
		  //next tutorial - DIALOG_TUTORIAL_3 .......
		}
	}
	
	......
	...
	..
	return 1;
}
it doesn't work and make another dialog like registration/login too...

Help guys! Sorry for my "Brazilian english".. Thanks!


Re: Help with BIG dialog in msgbox style! - Onyx09 - 11.02.2010

use timers and give each timer a response for the dialog you want show? i hope this helps
btw i dont get your code at all but that answer might help


Re: Help with BIG dialog in msgbox style! - Posorkon - 11.02.2010

man, you don't understand...

the problem is the showing.. it doesn't work..


Re: Help with BIG dialog in msgbox style! - Onyx09 - 11.02.2010

because in each response your showin a new dialog not the text that you want show man chek the wiki tutorial for dialog
i see you didnt get it lol try reading it again


Re: Help with BIG dialog in msgbox style! - Onyx09 - 11.02.2010

even check this line
Code:
if (!strcmp(cmdtext, "/tutorial", true, 9))
	{
	  ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DILOAG_STYLE_MSGBOX, "Part 1 - Rules:", "Dont spam\n dont dm\n dont...", "cancel", "next");
	  return 1;
	}
DILOAG_STYLE_MSGBOX i thought it was DIALOG


Re: Help with BIG dialog in msgbox style! - Posorkon - 11.02.2010

again... i wanna make a tutorial with msgbox... and that structure is correct.. But the "strings" are to long or wrong.... that's the problem...

i wanna make something like this:

[img width=1024 height=640]/imageshack/img21/9928/imagemst.gif[/img]

but i don't know how... my way is wrogn :'(


Re: Help with BIG dialog in msgbox style! - mansonh - 11.02.2010

Not sure why yours isn't working.
Does it just not display at all. or does it just not include the text? what exactly is wrong?

Its not the length, cause you can have 4096 characters in the info"
Quote:

RC6-1
- Fixed falling to death during gmx.
- Dialog info limit is now 4096 characters.

http://forum.sa-mp.com/index.php?top...7710#msg737710


Re: Help with BIG dialog in msgbox style! - Posorkon - 11.02.2010

it just not display at all.. and make the others dialog too...

Can you give me a example that's work??

I tried using "\" to the next line too...

thanks


Re: Help with BIG dialog in msgbox style! - mansonh - 11.02.2010

So when you type in your command, it does nothing at all or it brings up a different dialog?


Re: Help with BIG dialog in msgbox style! - Posorkon - 11.02.2010

Nothing happens! And makes the other dialogues and commands do not work.

Please, I need a simple example.
Thanks ...


Re: Help with BIG dialog in msgbox style! - mansonh - 12.02.2010

Well try putting yourself in some debug checks:
Then you will know exactly whether its something in your commands, or something with the dialog itself.

like put
public OnPlayerCommandText(playerid, cmdtext[])
{
printf("OnPlayerCommandText (%d, %s)", playerid, cmdtext);
if (!strcmp(cmdtext, "/tutorial", true, 9))
{
printf("running dialog %d", DIALOG_TUTORIAL_0);
ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DILOAG_STYLE_MSGBOX, "Part 1 - Rules:", "Dont spam\n dont dm\n dont...", "cancel", "next");
return 1;
}
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

...put some in here too


Re: Help with BIG dialog in msgbox style! - Daren_Jacobson - 12.02.2010

so you can't do

pawn Код:
new tuttext[] = "Welcome to GamerX.... a Death Match/.......";
ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DIALOG_STYLE_MSGBOX, "GamerX Help", tuttext, "Okay", "Cancel");
Also, making it not a variable doesn't work either?


Re: Help with BIG dialog in msgbox style! - Posorkon - 12.02.2010

Quote:
Originally Posted by Daren_Jacobson
so you can't do

pawn Код:
new tuttext[] = "Welcome to GamerX.... a Death Match/.......";
ShowPlayerDialog(playerid, DIALOG_TUTORIAL_0, DIALOG_STYLE_MSGBOX, "GamerX Help", tuttext, "Okay", "Cancel");
Also, making it not a variable doesn't work either?
that's not the problem...

and i'll make it with SendClientMessage... But i still want the example.. Thanks!