SA-MP Forums Archive
NEXT button help - 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: NEXT button help (/showthread.php?tid=296336)



NEXT button help - johnnyyy - 11.11.2011

Ok so, im making a /help dialog with DIALOG_STYLE_MSGBOX, my help is too long to fit in one dialog.
It's probably the most simplest thing, but I need help making a next button to show a page 2 dialog of my help. I've been stumped on this for 3 days. I've searched and searched this site, even using ****** to search too, and I couldn't really find a related clear answer. Any help would be much appreciated!


Re: NEXT button help - Backwardsman97 - 11.11.2011

Just make one of your buttons like ">>" and then do on response, change to the next dialog.


Re: NEXT button help - fiki574 - 11.11.2011

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if (strcmp("/info", cmdtext, true, 10) == 0)
    {
         ShowPlayerDialog(playerid,0,DIALOG_STLYE_MSGBOX,"Text Here","More Here","Button1","Button2");
         return 1;
    }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
 switch(dialogid == 0)
  	{
	case 1:
	{
	   ShowPlayerDialog(playerid,1,DIALOG_STLYE_MSGBOX,"Text Here","More Here","Button1","Button2");
	}
}
switch(dialogid == 1)
  	{
	case 1:
	{
	   ShowPlayerDialog(playerid,0,DIALOG_STLYE_MSGBOX,"Text Here","More Here","Button1","Button2");
	}
    }
    }
    return 1;
}



Re: NEXT button help - johnnyyy - 12.11.2011

Thank you guys so much! This was all I needed, and it works great