SA-MP Forums Archive
dialog question - 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: dialog question (/showthread.php?tid=131328)



dialog question - aircombat - 02.03.2010

lets say :
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Welcome To Shop", "anything", "Buy", "Cancel");

how to control the buttons like if the player pressed cancel it says : you canceled shop
________
Lost forums


Re: dialog question - -Rebel Son- - 02.03.2010

OnplayerDialog responce.



Code:
  public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])// Begining rules
{
	if(dialogid == 1)
	{
		if(response)
		{
		  SendClientMessage(playerid,COLOR_YELLOW, "accepted button 1.");
		}
		else
		{
		  SendClientMessage(playerid, 0xFF0000FF, "denied");
		}
    return 1;
	}
	if(dialogid == 2)
	{
	if(response)
	{
  SendClientMessage(playerid,COLOR_YELLOW, "thanks for accepting the rules!");
	}
  return 1;
  }
  return 0;
  }



Re: dialog question - aircombat - 02.03.2010

i use case :
if(dialogid == 1 && response)
{
switch(listitem)
{
case 0://hydra
{
}
}
}
________
MEDICAL CANNABIS


Re: dialog question - aircombat - 02.03.2010

anyone?!?
________
Vaporite 6Th Element Review


Re: dialog question - Ironboy500 - 02.03.2010

Use Dakota's way.


Re: dialog question - Torran - 02.03.2010

Quote:
Originally Posted by [AC
Etch ]
i use case :
if(dialogid == 1 && response)
{
switch(listitem)
{
case 0://hydra
{
}
}
}
I also use that

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog


Re: dialog question - aircombat - 02.03.2010

Quote:
Originally Posted by Ironboy500
Use Dakota's way.
i can't dude i dont use that way and i am not gonna rescript my whole script and torran i know how to create a dialog but i want how to edit buttons
________
M117 engine


Re: dialog question - Joe Staff - 02.03.2010

They've shown you,

if response = 1 then the person pressed the left button, if response = 0 then they pressed the right button.


Re: dialog question - DarkPower - 02.03.2010

Quote:
Originally Posted by Joe Staff
They've shown you,

if response = 1 then the person pressed the left button, if response = 0 then they pressed the right button.
but you dont need to type if response = 0 if is first if response = 1 just use >ELSE<