Got it, thanks for explaining @Shadow , so clear.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: vito on Jan 30, 2017, 06:37 AMfunction CVehicle::GetRadiansAngle(){
But I recommend to save whole Vehicle.Rotation because car's position can be saved on stairs/or something else not perpendicular.
local angle;
angle = ::asin( Rotation.z ) * -2;
return Rotation.w < 0 ? 3.14159 - angle : 6.28319 - angle;
}
local angle = player.Vehicle.GetRadiansAngle();
player.Vehicle.EulerAngle.x
player.Vehicle.EulerAngle.y
player.Vehicle.EulerAngle.z
player.Vehicle.Angle.x
player.Vehicle.Angle.y
player.Vehicle.Angle.z
stats[player.ID].Example = player.Vehicle.Angle;
then on another cmd;player.Vehicle.Angle = stats[player.ID].Example;
(and works)