29.09.2011, 14:27
Is there anything wrong with calling this function in a timer? Cause I can't find anything in the speedometer that would cause this problem (other than the timer issue that I mentioned above that I'm not 100% sure of)
Код:
stock IsVehicleUpsideDown(vehicleid) { new Float:quat_w,Float:quat_x,Float:quat_y,Float:quat_z; GetVehicleRotationQuat(vehicleid,quat_w,quat_x,quat_y,quat_z); new Float:y = atan2(2*((quat_y*quat_z)+(quat_w*quat_x)),(quat_w*quat_w)-(quat_x*quat_x)-(quat_y*quat_y)+(quat_z*quat_z)); return (y > 90 || y < -90); }