Setting Dialog Names.
#2

If I understood you, you can do:
pawn Код:
// let's say you define vehicle slots
new vehicle1[15];
new vehicle2[15];

// then you assign vehicles to slots
vehicle1 = "Infernus";
vehicle2 = "Bullet";

// then you can do:
new str[128];
format(str, sizeof str, "%s\n%s", vehicle1, vehicle2);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Vehicle", str, "Spawn", "Cancel");
Then in OnDialogResponse, you can do:
pawn Код:
if(listitem == 0) { // vehicle slot 1
    if(!strcmp(vehicle1, "Infernus", true)) {
        // If slot 1 is infernus, you do stuff here.
    }
}
This code would output Infernus and Bullet in a dialog.
Also, you can use arrays for vehicle slots, but it's not needed.
Reply


Messages In This Thread
Setting Dialog Names. - by Shockey HD - 30.06.2012, 17:14
Re: Setting Dialog Names. - by Mean - 30.06.2012, 17:23
Re: Setting Dialog Names. - by Shockey HD - 30.06.2012, 17:27
Re: Setting Dialog Names. - by Mean - 30.06.2012, 17:29
Re: Setting Dialog Names. - by Shockey HD - 30.06.2012, 17:48

Forum Jump:


Users browsing this thread: 3 Guest(s)