SA-MP Forums Archive
IsVehicleUpsideDown - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsVehicleUpsideDown (/showthread.php?tid=167669)



IsVehicleUpsideDown - hencz - 13.08.2010

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);
}



Re: IsVehicleUpsideDown - Johnny_Xayc - 13.08.2010

thanks <3


Re: IsVehicleUpsideDown - iggy1 - 13.08.2010

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


Re: IsVehicleUpsideDown - Kayla.S - 13.08.2010

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