Dialog
#1

Any tutorial of how to create dialog?
Reply
#2

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;
}
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)