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?