Car flipping at certain angles.
#1

Basically, here's what I want to do. If a player's vehicle is at LESS than 250 degrees or greater than 130 degrees on the Y coordinate, the car flips. Here's my script.

pawn Код:
if (newkeys & KEY_SUBMISSION) // && !(oldkeys & KEY_SUBMISSION)
        {
                new VEHID, Float:W, Float:X, Float:Y, Float:Z;
                VEHID = GetPlayerVehicleID(playerid);
                GetVehicleRotationQuat(VEHID, W,X,Y,Z);
                if(Y >= 130 || Y <= 250)
                {
                    RepairVehicle(VEHID);
                    RemoveVehicleComponent(VEHID,1010);
                    AddVehicleComponent(VEHID,1010);
                    GetVehicleZAngle(VEHID, Z);
                    SetVehicleZAngle(VEHID, Z+0.1);
                }
                else
                {
                    RepairVehicle(VEHID);
                    RemoveVehicleComponent(VEHID,1010);
                    AddVehicleComponent(VEHID,1010);
                }
                return 1;
        }
Any help would be HIGHLY appreciated. Thanks!
Reply


Messages In This Thread
Car flipping at certain angles. - by TyThaBomb - 01.01.2013, 05:31
Re: Car flipping at certain angles. - by dr.lozer - 01.01.2013, 05:54
Re: Car flipping at certain angles. - by dr.lozer - 01.01.2013, 05:59
Re: Car flipping at certain angles. - by TyThaBomb - 01.01.2013, 06:04
Re: Car flipping at certain angles. - by mastermax7777 - 01.01.2013, 09:15
Re: Car flipping at certain angles. - by SHRP - 01.01.2013, 09:35

Forum Jump:


Users browsing this thread: 2 Guest(s)