Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
Bump
(I know it hasn't been exactly 24hrs, but it was very much snowed under and i don't expect an answer on page 4)
Posts: 1,801
Threads: 21
Joined: Mar 2008
Reputation:
0
I don't think bumping will result in real answers, except "stop bumping" etc... Since nobody seems to have an answer.
It's a SAMP problem, since the vehicle wasn't updated yet (or st. like this).
Try if GetVehicleZAngle returns a correct value after spawning. If not, I guess your question is answered.
There is actually no real fix, but since YOU spawn the vehicle, you have the rotation already right?
Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
yup, and i am storing it, but i need to know a way/moment when to re-apply the rotation to fix the problem; I want a player to interact with with the vehicle (standing behind it; i'm using the mathplugin which uses GetVehicleRotationQuat to determine the rotation) while no-one has entered the vehicle yet.
Posts: 1,801
Threads: 21
Joined: Mar 2008
Reputation:
0
That's the more easy way, yeah.
Is it a Math Plugin issue or does your code work even with just spawned vehicles?
Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
It's an issue with SA-MP; you can't rely on GetVehicleRotationQuat when the vehicle isn't ocupied. Since the math plugin uses GetVehicleRotationQuat, it may return faulty information. GetVehicleZAngle, however, returns the right information even when the vehicle isn't ocupied. But you can't calculate the exact trunk location due to not taking the x and y rotations in consideration in the calculation.
Posts: 132
Threads: 5
Joined: Aug 2013
Reputation:
0
in ur code u didnt define vehicleid
maybe this the problem? look for silly mistakes too
if ur taking the quat right after creating veh /spawning it might not work try making timer?
experiment with it, but i see you might have solved it different way now