Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
TempeR - 27.11.2013
Can i make a dialog (list) with one button only?
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Pottus - 27.11.2013
This is from 2009 boys there is much better methods for doing dialogs these days on top of that the author didn't mention to use some #define's for the dialogids this tutorial is not a way for someone to learn from.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
TempeR - 27.11.2013
Any links...? That will be great
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Pottus - 27.11.2013
Well I would concentrate on using a system and there is only two systems that are worth your time to learn in my opinion. We have easydialog and y_inline/y_dialog your probably best off using easydialog to start I think the y_inline/y_dialog method is a little more advanced.
Easy Dialog
https://sampforum.blast.hk/showthread.php?tid=475838
YSI
http://ysi.tl/
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
kamiliuxliuxliux - 26.02.2014
How is it possible to make a dialog with 3 buttons? I saw one in RP server.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Tuntun - 27.02.2014
Well,Its easy but using a dialog creator is more easy
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Th3UnKnOwN - 26.08.2014
How do I add two list? I made my weapon shop with a Dialog list, Now I want to add a car spawner, But when I try to place the list underneath the first one, It keeps telling me, OnDialogResponce should return a value... I've been playing with return 1; and return 0; ALL DAY!! I have tried different spots but nothing is working for me... Please help.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
HumbleGuy - 28.07.2016
Great Guid you doing great on it
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
KevinKush - 10.08.2016
Great tutorial, this helped to understand the dialog system better
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Aniw - 12.08.2016
Nice Tutorial, Thanks
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
princejeet1510 - 13.08.2016
Very nice guide,First guide with everything well explained.

+Rep.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
DarkMythHunter - 28.04.2018
Can anyone help? Why if I use listitem, it doesnt work, it works for the first line ( 0 ) but for the second( 1)/( (listitem == 1) it doesnt, anyone knows a solution?
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Flashhiee - 28.04.2018
Show us your code please
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
DarkMythHunter - 28.04.2018
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat
Commands \nAnimation Commands \nGroup Commands \nPremium Commands \nHelper
Commands \nStaff Commands ", "Select", "Cancel");
}
return 1;
}
return 1;
}
if(dialogid == 2)
{
if(response)
{
if(listitem == 1)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "FAQs", "How to refill an empty water bottle?
\nHow to get weapons? \nHow to speak in the global chat? \nHow to refill an empty jerry canister
\nHow to open,close,lock and unlock doors? \nHow can I know my current location and reach
destinations easily? \nWhy do players have different colors?", "Select", "Close");
}
return 1;
}
return 1;
}
if(dialogid == 2)
{
if(response)
{
if(listitem == 2)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Tutorials", "Stats \nWeapon Management
\nPrivate Tents \nVehicles \nFishing \nBase Building", "Select", "Cancel");
}
return 1;
}
return 1;
}
return 0;
}
then I have this on, this is where it responds. The first one works, like on the "Commands" part, it shows the designated dialog for them, but when it comes to FAQs and Tutorials...it won't work...but there aren't any errors when you compile. It just won't appear....
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Help Menu", "Commands \nFAQs \nTutorials \nCommunity ", "Select", "Cancel");
return 1;
}
return 0;
}
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Flashhiee - 28.04.2018
This is how it should be
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat
Commands \nAnimation Commands \nGroup Commands \nPremium Commands \nHelper
Commands \nStaff Commands ", "Select", "Cancel");
}
else if(listitem == 1)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "FAQs", "How to refill an empty water bottle?
\nHow to get weapons? \nHow to speak in the global chat? \nHow to refill an empty jerry canister
\nHow to open,close,lock and unlock doors? \nHow can I know my current location and reach
destinations easily? \nWhy do players have different colors?", "Select", "Close");
}
else if(listitem == 2)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Tutorials", "Stats \nWeapon Management
\nPrivate Tents \nVehicles \nFishing \nBase Building", "Select", "Cancel");
}
}
return 1;
}
return 0;
}
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
DarkMythHunter - 28.04.2018
Quote:
Originally Posted by Flashhiee
This is how it should be
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 2) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat Commands \nAnimation Commands \nGroup Commands \nPremium Commands \nHelper Commands \nStaff Commands ", "Select", "Cancel");
} else if(listitem == 1) { ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "FAQs", "How to refill an empty water bottle? \nHow to get weapons? \nHow to speak in the global chat? \nHow to refill an empty jerry canister \nHow to open,close,lock and unlock doors? \nHow can I know my current location and reach destinations easily? \nWhy do players have different colors?", "Select", "Close");
} else if(listitem == 2) { ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Tutorials", "Stats \nWeapon Management \nPrivate Tents \nVehicles \nFishing \nBase Building", "Select", "Cancel");
} } return 1; }
return 0; }
|
Ah, it shouldn't be alligned? Oh if thats the matter, thanks a lot!
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Flashhiee - 28.04.2018
The allignment is only important to understand the code better later on. How i alligned the code now(even though its not perfect) is how i usually allign it. Some other people align it differently.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
DarkMythHunter - 28.04.2018
Quote:
Originally Posted by Flashhiee
The allignment is only important to understand the code better later on. How i alligned the code now(even though its not perfect) is how i usually allign it. Some other people align it differently.
|
There is one problem, it won't identify
This is how I did it:
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
SendClientMessage(playerid,0x008000FF, "Please read the game rules to avoid any issues!");
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "You selected 'Quit', therefore you got kicked. ");
Kick(playerid);
}
return 1;
}
return 1;
if(dialogid == 2)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat\
Commands \nAnimation Commands \nGroup Commands \nPremium Commands \nHelper\
Commands \nStaff Commands ", "Select", "Cancel");
}
else if(listitem == 1)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "FAQs", "How to refill an empty water bottle?\
\nHow to get weapons? \nHow to speak in the global chat? \nHow to refill an empty jerry canister\
\nHow to open,close,lock and unlock doors? \nHow can I know my current location and reach\
destinations easily? \nWhy do players have different colors?", "Select", "Close");
}
else if(listitem == 2)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Tutorials", "Stats \nWeapon Management\
\nPrivate Tents \nVehicles \nFishing \nBase Building", "Select", "Cancel"); }
return 1;
}
return 1;
}
return 0;
}
Any idea how to fix it?
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
Zeth - 28.04.2018
You need to #define or put the dialog definition in a enum.
Re: [TUT] How To Make A Dialog Menu (LIST And MSGBOX Only!) -
DarkMythHunter - 28.04.2018
Quote:
Originally Posted by Debjit
You need to #define or put the dialog definition in a enum.
|
Still not working tho,,,,
http://prntscr.com/jbbefa
it is still unreachable code..somehow...the line 242
Edit: NVM, fixed it. Thanks users