09.08.2014, 14:49
Hey ya'all.
Let's get to the problem, shall we?
I recently made a Vehicle System that uses 'Enumerator'. I use SII include for saving/loading data. I'll give you some of my Snippets.
Creation of Vehicle.
Enumerator
I use fwrite,io read, io append for Reading and Saving Data. But the result of this Vehicle system, is this.

Well, the Vehicles are saving, but are damn bugged on loading. In this pic, the vehicle at this Pos was a Fortune and a Cadrona at the back. Where did that Black Car come from? It isn't the only one, it spawns in Millions,one over another. Any help please?
Let's get to the problem, shall we?

I recently made a Vehicle System that uses 'Enumerator'. I use SII include for saving/loading data. I'll give you some of my Snippets.
Creation of Vehicle.
pawn Код:
for(new i=1;i<MAX_CARS;i++)
{
AddStaticVehicleEx(VehicleInfo[i][vModel],VehicleInfo[i][vLocX],VehicleInfo[i][vLocY],VehicleInfo[i][vLocZ],VehicleInfo[i][vAngle],
VehicleInfo[i][vColorOne],VehicleInfo[i][vColorTwo],-1);
SetVehicleNumberPlate(i,VehicleInfo[i][vPlate]);
SetVehicleToRespawn(i);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(i,0,0,alarm,doors,bonnet,boot,objective);
pawn Код:
enum vInfo
{
vModel,
Float: vLocX,
Float: vLocY,
Float: vLocZ,
Float: vAngle,
vColorOne,
vColorTwo,
vOwner[MAX_PLAYER_NAME],
vOwned,
vDescription[MAX_PLAYER_NAME],
vPrice,
vLock,
vTrunkWeapon[MAX_PLAYER_NAME],
vTrunkWeaponAmmo,
Float: vTrunkArmour,
vCash,
vAlarm,
vFuel,
vPlate[8],
vSideJob,
vParkingTicket,
}
new VehicleInfo[MAX_CARS][vInfo];

Well, the Vehicles are saving, but are damn bugged on loading. In this pic, the vehicle at this Pos was a Fortune and a Cadrona at the back. Where did that Black Car come from? It isn't the only one, it spawns in Millions,one over another. Any help please?