29.01.2015, 16:16
Oh, okay. So, something like this?
pawn Код:
#define DIALOG_1 1
#define DIALOG_VEH1 10
#define DIALOG_VEH2 11
#define DIALOG_VEH3 12
// put this below somewhere
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Cars", "Veh1\nVeh2\nVeh3", "Choose", "Cancel");
//...
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch (dialogid)
{
case DIALOG_1: // 1
{
if( !response ) return 1;
switch(listitem)
{
case 0:// Veh1
{
ShowPlayerDialog(playerid, DIALOG_VEH1, DIALOG_STYLE_MSGBOX, "Confirmation", "Are you sure you want to buy this vehicle?", "Hell yeah", "Nope");
}
case 1:// Veh2
{
ShowPlayerDialog(playerid, DIALOG_VEH2, DIALOG_STYLE_MSGBOX, "Confirmation", "Are you sure you want to buy this vehicle?", "Hell yeah", "Nope");
}
case 2:// Veh3
{
ShowPlayerDialog(playerid, DIALOG_VEH3, DIALOG_STYLE_MSGBOX, "Confirmation", "Are you sure you want to buy this vehicle?", "Hell yeah", "Nope");
}
}
}
case DIALOG_VEH1: // 10
{
if( response )
{
SendClientMessage(playerid, -1,"You bought a vehicle! ");
}
}
}