Jump to content

Need help with vehicle rotation change


Recommended Posts

Posted

Hello, I Need some help, Although im not sure if it can be fixed, but Here the problem:

There is a downhill road in my map, and i made a code which rotates the car all the time

plveh = getPedOccupiedVehicle(getLocalPlayer()) 
    if plveh and getVehicleName(plveh) == "Infernus" then 
        rx1,ry1,rz1 = getVehicleRotation(plveh) 
        setVehicleRotation(plveh, rx1, ry1, rz1+20) 
    end 

So, it sets the rotation +20 normally, But because its downhill, it crashes some time with the road, I dont know if you get it.. In a straight road works fine, but here is downhill.. so could we fix it somehow? thanks.

Posted

you can try to bring the car litel up whit modifi car z position or i don't know how xD

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

if this is a race then, try:

plveh = getPedOccupiedVehicle(getLocalPlayer()) 
    if plveh and getVehicleName(plveh) == "Infernus" then 
        rx1,ry1,rz1 = getVehicleRotation(plveh) 
        setVehicleRotation(plveh, rx1, ry1, rz1+20) 
        setVehicleFrozen(plveh,true) 
    end 

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...