Dialog - 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)
+--- Thread: Dialog (
/showthread.php?tid=509330)
Dialog -
Yasubo - 26.04.2014
Any tutorial of how to create dialog?
Re: Dialog -
Sojo12 - 26.04.2014
We have many but here is one:
Код:
CMD:help(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Help", "This is our server help section\n1.Join us at .....\n","Okay","Cancel");
return 1;
}
Re: Dialog -
NviDa - 26.04.2014
Yea there are alot of tutorials out there.Just ****** " SAMP dialog script tutorials" or something with "dialog" in it.
Here is an example of WEAPONS dialog.(A dialog box allowing you to choose what weapon you want to buy)
I used ZCMD include to make this.
pawn Код:
CMD:weapons(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Weapons", "Deagle 2500$\nMP5 3000$\nAK-47 4500$\nM4 4500$", "Select", "Cancel");
return 1;
}
Here the command is /weapons.You type that in and you will get a Dialog box in a list style.Showing names of a a few weapons with their prices.
Note: If you click any of the weapon name,nothing will happen as there is no response for the dialog.(OnDialogResponse)
There are 3 types of Dialogs in SA-MP:
They are:
https://sampwiki.blast.hk/wiki/Dialog_Styles