Setting Dialog Names.

What im meaning is in the following Code:

ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Vehicle", "Vehicle One\nVehicle Two\nVehicle Three\nVehicle Four\nVehicle Five\nVehicle Six\n", "Spawn", "Cancel");
My system would identify the vehicle that is in Vehicle One's Slot, Then set it to Lets say Infernus. So when i do my command, Vehicle One will be Identified as "Infernus"?

its pretty confusing to understand this... Ask for me to re-explain and ill do so.

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.

I have this,

	new VehicleOne = OneModel[playerid];
    new Fstring[24+MAX_PLAYER_NAME]; 
	format(Fstring, sizeof(Fstring), "1. %s\n", GetVehicleName(VehicleOne));
	return 1;
Yet when i use it in game, Im getting:

Unkown Command..

What's "OneMode[playerid]"? How do you assign it?

Also, the command seems fine overall, no idea why it gives you "Unknown command".

I've created a Dynamic Vehicle Storing System, and OneModel is the model of the vehicle in the Storage slot one

Forum Jump:

Users browsing this thread: 1 Guest(s)