13.08.2010, 11:20
Maybe someone can use this code snippet:
pawn Код:
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);
}