IsVehicleUpsideDown
#1

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);
}
Reply
#2

thanks <3
Reply
#3

nice1 m8 maybe better going in code snippets (lol i thought there was a useful snippets sticky fail) thanks anyway
Reply
#4

The useful code snippets is here: https://sampforum.blast.hk/showthread.php?tid=281
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)