02.03.2011, 09:11
SetVehicleZAngle() seems to have no effect in OnVehicleSpawn().
Example code:
Vehicle angle was the same as when it was first spawned. When I'm trying to load it's position where it was last parked, the position is set correctly, but angle isn't. When using another function to load vehicle position from these variables, it works correctly.
Example code:
pawn Code:
public OnVehicleSpawn(vehicleid)
{
if (OwnedVehicles[vehicleid])
{
new vid = OwnedVehicles[vehicleid];
SetVehicleZAngle(vehicleid, vehicles[vid][cr]);
SetVehiclePos(vehicleid, vehicles[vid][cx], vehicles[vid][cy], vehicles[vid][cz]);
}
else
{
Fuel[vehicleid] = MAX_FUEL;
}
return 1;
}