21.01.2013, 15:00
AND my second suggestion for new dialogs:
Example:
pawn Код:
native ShowPlayerDialogEx(playerid,dialogid,style,title[],content[],button1[],button2[],button3[],button4[]);
//playerid - you know what it is
//dialogid - you know this too
//style - dialog style
//title - the dialog title
//content - what is written in the dialig
//button1;button2(optional) etc... - buttons for this dialog.
forward OnDialogResponseEx(playerid,dialogid,listitem,buttonid);//callback for new dialog type
pawn Код:
CMD:testdialog(playerid,params[])
{
ShowPlayerDialogEx(playerid,1000,DIALOG_STYLE_LIST,"Test DIalog","Hello! This is the test dialog!\nPress 'Cancel' to close it, \n'Next' to go to the next dialog, \m'Prev' to go to the previous dialog, or \n'Vehicles' to go to vehicles spawner","Vehicles","Next","Prev","Cancel");
return 1;
}
public OnDialogResponseEx(playerid,dialogid,listitem,buttonid)
{
if(buttonid == 0) OpenVehicleSpawner//shows vehicles spawner for player
if(buttonid == 1) ShowPlayerDialog(.......);//example to show player next dialog
if(buttonid == 2) ShowPlayerDialog(.......);//example to show player previous dialog
if(buttonid == 3) return 0;//do nothing and close :)
return 1;
}

