SA-MP Forums Archive
Some 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: Some Help (/showthread.php?tid=299261)



Some Help - -BadGirl- - 25.11.2011

Need More Next Pages
Little Help

Code:
if (strcmp("/commands", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Commands Menu","My Commands", "Next", "Cancel");
	return 1;
    }

if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+1, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 1;// button close
    }
In THis Command Only 1 next Page How I Add More Pages


Re: Some Help - =WoR=Varth - 25.11.2011

By creating another dialog.


Re: Some Help - -BadGirl- - 25.11.2011

Like This

Code:
if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+2, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 1;// button close
    }



Re: Some Help - =WoR=Varth - 25.11.2011

Quote:
Originally Posted by -BadGirl-
View Post
Like This

Code:
if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+2, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 1;// button close
    }
Yes.


Re: Some Help - -BadGirl- - 25.11.2011

Hm I Try But I Cant Done That Help Me
Make 10+2 2nd Page Plz


Re: Some Help - -BadGirl- - 25.11.2011

Help Plz
Double Post Sorry


Re: Some Help - [MWR]Blood - 25.11.2011

pawn Code:
if (strcmp("/commands", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Commands Menu","My Commands", "Next", "Cancel");
    return 1;
    }



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 10)
{
if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+2, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 0;// button close
    }



Re: Some Help - -BadGirl- - 25.11.2011

you didn't understand


My commands Start From Here
Code:
if (strcmp("/commands", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Commands Menu","My Commands bla bla bla..", "Next", "Cancel");
    return 1;
    }
And This Is My 1st page
Code:
if(dialogid == 10)
{
   if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+1, DIALOG_STYLE_MSGBOX, "Commands Menu", "/Tubes\n/Viphelp =For Vip Members\n/Objects =Attach Object To Body\n/bank [amount]\n/Kill\n/Me [Text]\n/Buyarmour\n/givecash [playerid] [amount]\n/bounty [playerid]\n/withdraw [amount]\n/balance\n/hitman [playerid] [amount]\n/bounties\n/gangcommands\n/anims\n/anims2\n/afk\n/back\n/buyhouse =Buy House\n/buybus =Buy Business\n/buyproperty =Buy Property.", "Next", "Cancel");
}
  else return 1;// button close
    }
i need a 3rd page


Re: Some Help - [MWR]Blood - 25.11.2011

And what's the difference if you need 3, 4, 5, 1000, pages? The method is always the same, the dialog id is the only thing that changes.

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 10)//second page
{
if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+2, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 0;// button close
    }
if(dialogid == 10+2)//third page
{
if(response)//button Next
  {
      ShowPlayerDialog(playerid, 10+3, DIALOG_STYLE_MSGBOX, "Commands Menu", "My COmmands 1", "Next", "Cancel");
}
  else return 0;// button close
    }



Re: Some Help - HyperZ - 25.11.2011

Example FS:
pawn Code:
#include <a_samp>

#define DialogID 112

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,DialogID,DIALOG_STYLE_MSGBOX,"My Commands (PAGE 1)","Commands here xD","Close","Next");
        return 1;
    }
    return 0;
}

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

    if(dialogid == DialogID) // Dialog ID
    {
        if(response) return SendClientMessage(playerid, -1, "SERVER: Dialog Closed"); //
        else ShowPlayerDialog(playerid,DialogID+2,DIALOG_STYLE_MSGBOX,"My Commands (PAGE 2)","Commands here xD","Close","Next");
    }
    if(dialogid == DialogID+2) // Dialog ID
    {
        if(response) return SendClientMessage(playerid, -1, "SERVER: Dialog Closed"); //
        else ShowPlayerDialog(playerid,DialogID+3,DIALOG_STYLE_MSGBOX,"My Commands (PAGE 3)","Commands here xD","Close","Next");
    }
    if(dialogid == DialogID+3) // Dialog ID
    {
        if(response) return SendClientMessage(playerid, -1, "SERVER: Dialog Closed"); //
        else ShowPlayerDialog(playerid,DialogID+4,DIALOG_STYLE_MSGBOX,"My Commands (PAGE 4)","Commands here xD","Close","");
    }
    return 1;
}