02.06.2011, 04:28
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.
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:
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];
pawn Code:
format(VehicleOwner[vehicleid], MAX_PLAYER_NAME, "%s", dini_Get(file, "Owner"));
if(!strlen(VehicleOwner[vehicleid]))
VehicleOwner[vehicleid] = "Nobody";