Hoi, ik ben pas nieuw met scripten en probeer elke keer is iets nieuws. Dit keer ben ik gefocused op dialog boxes en ben ik een probleem tegen gekomen. Ik probeer een dialog box te verwijzen naar mijn vorige dialog box, alleen werkt dat niet zo goed, misschien dat iemand me hier kan helpen?
Dialog id 3,4, en 5 zijn niet te vinden.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==1 && response==1)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, COLOR_RED, "You have locked your house.");
}
case 1:
{
SendClientMessage(playerid, COLOR_GREEN, "You have unlocked your house.");
}
case 2:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Items", "**house items**", "Confirm", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Deposit items", "Cash $(your amount)\nMaterials(your amount)\nCrack(your amount)\nPot(your amount)\nWeapons(your weapons)", "Proceed", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Withdraw items", "Cash $(house amount)\nMaterials(house amount)\nCrack(house amount)\nPot(house amount)\nWeapons(house weapons)", "Proceed", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Housetag", "Enter your new house nametag.", "Confirm", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Sellhouse", "To which player do you wish to sell your house to?", "Proceed", "Cancel");
}
case 7:
{
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "Sellhouse", "Are you sure you want to sell your house to the market for $(amount)?", "Confirm", "Cancel");
}
}
}
return 0;
if(dialogid==3 && response==1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_INPUT, "Deposit", "How much money would you like to deposit into your safe?", "Proceed", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 9, DIALOG_STYLE_INPUT, "Deposit", "How much materials would you like to deposit into your safe?", "Proceed", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Deposit", "How much crack would you like to deposit into your safe?", "Proceed", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Deposit", "How much pot would you like to deposit into your safe?", "Proceed", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 12, DIALOG_STYLE_INPUT, "Deposit", "Which weapon would you like to deposit into your safe?", "Proceed", "Cancel");
}
}
}
return 0;
if(dialogid==4 && response==1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 13, DIALOG_STYLE_INPUT, "Withdraw", "How much money would you like to withdraw from your safe?", "Proceed", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 14, DIALOG_STYLE_INPUT, "Withdraw", "How much materials would you like to withdraw from your safe?", "Proceed", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 15, DIALOG_STYLE_INPUT, "Withdraw", "How much crack would you like to withdraw from your safe?", "Proceed", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 16, DIALOG_STYLE_INPUT, "Withdraw", "How much pot would you like to withdraw into from safe?", "Proceed", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 17, DIALOG_STYLE_INPUT, "Withdraw", "Which weapon would you like to withdraw into from safe?", "Proceed", "Cancel");
}
}
}
return 0;
if(dialogid==5 && response==1)
{
switch(listitem)
{
case 0:
SendClientMessage(playerid, COLOR_BLUE, "Your new house tag has been set!");
}
}
return 1;
}
Hoi, ik ben pas nieuw met scripten en probeer elke keer is iets nieuws. Dit keer ben ik gefocused op dialog boxes en ben ik een probleem tegen gekomen. Ik probeer een dialog box te verwijzen naar mijn vorige dialog box, alleen werkt dat niet zo goed, misschien dat iemand me hier kan helpen?
Dialog id 3,4, en 5 zijn niet te vinden.