[STANDALONE] Keep wheel angle after exiting the car

This script keeps the steering angle of your wheels when exiting the vehicle.

My friend searched for a script like this (and although it most certainly already exists somewhere) he couldn’t find anything. So I wrote this from scratch. If you want it you can pay how much it’s worth to you.

When exiting the vehicle by holding down the F key (default) the steering angle of your wheels wont be reset like usual.
The steering will be synced by the server (in chosen interval) so it’s perfect for displaying cars at a cardealer or car-meet.

Performance Update. Runs now with 0.00ms in idle and 0.00ms when you are in a car.

If you want raw performance you can enable lightMode which will disable server side syncing.
Although the angle might get lost if all players leave the area.

Config
Config = {}
Config.holdTime = 0.5       -- How long you need to hold the key down (in seconds, default: 0.5)
Config.key = 49             -- What key do you want to use. I recommend you use F (default 49). https://docs.fivem.net/docs/game-references/controls/

Config.lightMode = false    -- If you enable this, the script will not use the server function. If a car is not in range of a player it will lose the steering angle.
                            -- This would be bad when i.e. displaying cars at the cardealer

Config.interval = 5         -- If you are using the server functions (lightMode = false) then this is how often (in seconds) the steering angle will be set. (default 5)
                            -- If you assume server impact you can increase this before going into lightMode.
Changelog

Updates:
Version 1.0.0:

  • Got rid of some redundancy
  • Changed some loops to get lower ms

Pay what you want at my Tebex Store

Code is accessible Yes
Subscription-based No
Lines (approximately) 120
Requirements none
Support Yes

Maybe check out my other work?

car_wash_1
[ESX] Immersive Carwash with Wax

fuenf_blackmoney
[ESX] Hand in Black Money at the department

2 Likes

f#@k<kjcing dOPE!
Thanks for the free release!! <3 my community will be S T O K E D!

2 Likes

:slight_smile:

2 Likes

Yeah tbh I expected that. :smile:
I searched for “wheel angle” :sweat_smile:

But I have to say my script is superior to both because none of them have server side saving and syncing. :+1:

1 Like

I’m almost certain the native they’re using is synced across players, and even if I’m wrong and it isn’t. What’s so hard about syncing. You can just trigger a server event with the entity network id then just send it to all clients and set the angle. I understand that this is a free release but no need to escrow such a simple resource.

1 Like

Well yeah it’s kinda synced but as I wrote the steering angle will get lost if no player is near the car.

I know people have diffrent emotions about the escrow system and I don’t like to prohibit users to edit the code. But I also don’t like people reuploading without added value :person_shrugging:

1 Like

I would understand if your concern was people reuploading it and claiming it as theirs but that’s very unlikely to happen to a 120 line script that’s already been made multiple times before.

I personally think the escrow system is good but releases like this make it look bad.

From your activity it looks like you’re new to developing on FiveM so I wanted to leave you a positive suggestion. making open source scripts will make people interested, and maybe they contribute to your projects and improve them with you. Which will lead to you learning a lot more and a lot faster.

4 Likes

Cool😎

1 Like

Performance Update.
Runs now with 0.00ms in idle and 0.00ms when driving a car.

THANK YOU for this!

1 Like


Can this be looked, possibly solved?
Not driving, logged in this morning. Teleporting around setting some stuff up on a new server.
Seen this.

Thanks!

Yes I fixed it. Thanks for pointing it out :+1:
Get the new version on the keymaster.

1 Like

Awesome, thanks for quick fix! Cheers! <3