Some Help
#1

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
Reply
#2

By creating another dialog.
Reply
#3

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
    }
Reply
#4

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.
Reply
#5

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

Help Plz
Double Post Sorry
Reply
#7

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
    }
Reply
#8

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
Reply
#9

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
    }
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)