Spawning Multiple Vehicles But Only Need One
#2

Fairly memory-heavy array. I'm pretty sure you won't be able to save anything to 'Owner' because that'd be acting as a 3D array and pawn only supports 2D arrays. You could just not use the enumeration and just give them the same name in front. Example.

pawn Code:
new VehicleOwner        [MAX_VEHICLES][MAX_PLAYER_NAME];
new VehicleOwnerType    [MAX_VEHICLES];
new VehicleModel        [MAX_VEHICLES];
new Float:VehiclePosX   [MAX_VEHICLES];
new Float:VehiclePosY   [MAX_VEHICLES];
new Float:VehiclePosZ   [MAX_VEHICLES];
new Float:VehiclePosA   [MAX_VEHICLES];
new VehicleColor1       [MAX_VEHICLES];
new VehicleColor2       [MAX_VEHICLES];
new VehicleMod0         [MAX_VEHICLES];
new VehicleMod1         [MAX_VEHICLES];
new VehicleMod2         [MAX_VEHICLES];
new VehicleMod3         [MAX_VEHICLES];
new VehicleMod4         [MAX_VEHICLES];
new VehicleMod5         [MAX_VEHICLES];
new VehicleMod6         [MAX_VEHICLES];
new VehicleMod7         [MAX_VEHICLES];
new VehicleMod8         [MAX_VEHICLES];
new VehicleMod9         [MAX_VEHICLES];
new VehicleMod10        [MAX_VEHICLES];
new VehicleMod11        [MAX_VEHICLES];
new VehicleMod12        [MAX_VEHICLES];
new VehicleMod13        [MAX_VEHICLES];
new VehiclePaintjob     [MAX_VEHICLES];
Lol it seems like a lot but it should be faster then what you're using now because it only has one multi-dimensional array. Then, for the name situation, you could do this when you load up the vehicles.

pawn Code:
format(VehicleOwner[vehicleid], MAX_PLAYER_NAME, "%s", dini_Get(file, "Owner"));
if(!strlen(VehicleOwner[vehicleid]))
     VehicleOwner[vehicleid] = "Nobody";
Reply


Messages In This Thread
Spawning Multiple Vehicles But Only Need One - by AustinJ74 - 02.06.2011, 02:10
Re: Spawning Multiple Vehicles But Only Need One - by Backwardsman97 - 02.06.2011, 04:28
Re: Spawning Multiple Vehicles But Only Need One - by Mike Garber - 02.06.2011, 08:30

Forum Jump:


Users browsing this thread: 1 Guest(s)