Posts: 101
Threads: 18
Joined: Aug 2010
Reputation:
0
Dialogs with submenus arent working for me. The dialog shows, but then when i double click an option it just disappears and no other menu shows up. Can someone help me?
Posts: 101
Threads: 18
Joined: Aug 2010
Reputation:
0
Yea, when I click option 2 on the first dialog, nothing happens. The first dialog with the title "Something" shows up though. I told it to SendClientMessage, but it didnt.
Posts: 101
Threads: 18
Joined: Aug 2010
Reputation:
0
This is my problem:
[ame]http://www.youtube.com/watch?v=Qby6UfPZUEk[/ame]
Source:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/drinks", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
return 1;
}
if(!strcmp(cmdtext, "/relax", true))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "are you sure?", "Are you sure you have time to relax?", "yes", "no");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)//they pressed the first button
{
switch(dialogid)//if your using only one dialog this isn't needed but you never know.
{
case 1://our dialog
{
switch(listitem)//wich listitem is chosen
{
case 0://the first item in the list
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1:
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
case 2:
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
}
}
//from here we added things
case 2://the new dialog
{
ApplyAnimation(playerid,"BEACH","Lay_Bac_Loop",4.1 ,1,1,1,1,10);//this will let you relax for 10 seconds
}
//till here
}
}
return 1;
}
Posts: 1,464
Threads: 90
Joined: Aug 2009
Reputation:
0
That means dialog id's are conflicting, try changing the ID's to a random number.
Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
Sometimes if the dialog isn't in the GM or the 1st or second FS submenu's dont show try putting it (the dialog) in the GM or 1st FS thats loaded and try that. I'v had this problem many times and this fixes it.