├── kq_rollback ├── fxmanifest.lua ├── config.lua └── client │ └── client.lua └── README.md /kq_rollback/fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'cerulean' 2 | games { 'gta5' } 3 | lua54 'yes' 4 | 5 | author 'KuzQuality | Kuzkay' 6 | description 'Better Rollback & handbrake turns by KuzQuality.com' 7 | version '1.0.0' 8 | 9 | -- 10 | -- Client 11 | -- 12 | 13 | client_scripts { 14 | 'config.lua', 15 | 'client/client.lua', 16 | } 17 | 18 | escrow_ignore { 19 | 'config.lua', 20 | 'client/client.lua', 21 | } 22 | -------------------------------------------------------------------------------- /kq_rollback/config.lua: -------------------------------------------------------------------------------- 1 | Config = {} 2 | 3 | -- Rollback options 4 | Config.betterRollback = { 5 | -- Whether better rollback should be enabled 6 | enabled = true, 7 | -- Duration/period of the rollback 8 | duration = 30, 9 | -- Strength/speed of the rollback 10 | strength = 10, 11 | } 12 | 13 | -- These handbrake turns happen when the player lets off their throttle (W). Turns their wheel and applies the handbrake 14 | Config.betterHandbrakeTurns = { 15 | -- Whether to enable better hand brake turns 16 | enabled = true, 17 | -- Strength of the improved handbrake turns system 18 | strength = 1.5, 19 | } 20 | 21 | -- Check out our store for more: https://kuzquality.com/ 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Recommended addons 2 | - [Traction control toggle](https://kuzquality.com/package/5881435) 3 | - [Drift smoke](https://kuzquality.com/package/4906863) 4 | 5 | # More car releases 6 | - [Realistic offroad physics (BEST SELLER 🔥)](https://kuzquality.com/package/5919133) 7 | - [Car Dyno](https://kuzquality.com/package/5998695) 8 | - [Towing & Winching](https://kuzquality.com/package/5919150) 9 | - [Realistic wheel damage](https://kuzquality.com/package/5179518) 10 | - [Car Lift](https://kuzquality.com/package/5030175) 11 | 12 | ## INSTALLATION GUIDE 13 | 14 | This guide will provide step-by-step instructions on how to install and set up the kq_rollback script for FiveM. 15 | 16 | ### Step 1: 17 | After downloading the script, unzip the folder and place it in the `resources` directory on your FiveM server. 18 | 19 | ### Step 2: 20 | Open the `config.lua` file in the script folder and configure the script to your liking 21 | 22 | ### Step 3: 23 | After the config file has been set up, add the script to your `server.cfg` file 24 | 25 | ### Done 26 | Enjoy the script 27 | 28 | 29 | ## > https://kuzquality.com/ 30 | 31 | ## > Join our Discord for more awesome releases: https://discord.gg/fZsyam7Rvz 32 | -------------------------------------------------------------------------------- /kq_rollback/client/client.lua: -------------------------------------------------------------------------------- 1 | Citizen.CreateThread(function() 2 | local usedForce = 0 3 | 4 | while true do 5 | local sleep = 3000 6 | 7 | local playerPed = PlayerPedId() 8 | if IsPedInAnyVehicle(playerPed) then 9 | local veh = GetVehiclePedIsIn(playerPed) 10 | 11 | -- Whether or not the ped is the driver 12 | if GetPedInVehicleSeat(veh, -1) == playerPed then 13 | sleep = 250 14 | 15 | local speed = GetEntitySpeedVector(veh, true).y 16 | if speed < 20 then 17 | sleep = 100 18 | local throttle = GetVehicleThrottleOffset(veh) 19 | 20 | if speed < 0 and (throttle == 0.0 or usedForce > 0) then 21 | if Config.betterRollback.enabled then 22 | -- Apply vehicle clutch to allow for free rollback 23 | SetVehicleClutch(veh, 1.0) 24 | 25 | -- We'll apply a bit of force to push the car back more 26 | if usedForce < Config.betterRollback.duration then 27 | usedForce = usedForce + 1 28 | ApplyForceToEntity(veh, 0, vector3(0, math.max(-6, speed * Config.betterRollback.strength), 0), 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 0) 29 | end 30 | sleep = 1 31 | end 32 | else 33 | if Config.betterHandbrakeTurns.enabled then 34 | if throttle == 0.0 and speed < 15 and speed > 2 and GetVehicleHandbrake(veh) and math.abs(GetVehicleSteeringAngle(veh)) > 0.5 then 35 | -- Apply sideways sway force to turn the vehicle quicker 36 | ApplyForceToEntity(veh, 1, vector3(GetVehicleSteeringAngle(veh) * speed * Config.betterHandbrakeTurns.strength, 0.0, 0), 0.0, -3.0, 0, 0, 1, 1, 0, 0) 37 | end 38 | end 39 | if usedForce > 0 then 40 | usedForce = math.max(0, usedForce - 10) 41 | end 42 | end 43 | end 44 | end 45 | end 46 | 47 | Citizen.Wait(sleep) 48 | end 49 | end) 50 | --------------------------------------------------------------------------------