[Anti Vehicle Flip]
This is a script to prevent you from being able to control your vehicle in the air. It also stops you being able to flip a car when it is on its back. Script was put together for GTA5Police.
[Features]
Prevents controlling the vehicle in the air
Prevents flipping your vehicle over when it is upside down
Makes vehicle unusable once it is flipped
Function to unflip the vehicle that can be used by mechanics or similar
[Installation]
Drop ‘blurr_antivehflip’ into resource folder
Add ‘blurr_antivehflip’ to start up in server config
Go into 'cl_antivehflip.lua` and add any blacklisted vehicles
[Downloads]
V1.2 - Download - Fully fixed some issues with cars being froze slightly off the ground or on one corner of the car. Added a function to reset the car. Call this function in the mechanic script or wherever. Will unflip it and unfreeze it.
V1.1 - Download - Fixes issue of cars being froze in mid air (Quick Fix).
V1.0 - Download - Initial Release
[Bugs / Issues / Suggestions]
Notify me if you find any bugs or issues, even if you are able to fix yourself. This way I can update it for anyone else. If you have any suggestions let me know and I will look into them!
[Credits]
Thank you to @Vespura, I used his air control script as a guide for a few things, FiveM and you guys/girls
V1.2 UPDATE
Fixed issue of car freezing like this…
Also added a function for resetting/flipping the car as a few people have asked about this.
Call resetVehicle(veh) in a command or menu item. I have only made the function, you’ll have to do the rest such as the event.
572/5000
I put the function in the place where the mechanic uses to repair vehicle
local function ch_repair (player, choice)
local user_id = vRP.getUserId (player)
if user_id then
if vRP.tryGetInventoryItem (user_id, “repair kit”, 1, true) then
vRPclient._playAnim (player, false, {task = “WORLD_HUMAN_WELDING”}, false)
SetTimeout (15000, function ()
vRPclient._fixeNearestVehicle (player, 7)
vRPclient._stopAnim (player, false)
enableVehicle ()
end)
end
end
end
but this one is giving error after it repairs the vehicle and the vehicle does not start
Error resuming coroutine: modules/basic_garage.lua:360: attempt to call a nil value (global ‘FreezeEntityPosition’)
[ 332328] stack traceback:
[ 332328] modules/basic_garage.lua:360: in function ‘enableVehicle’
[ 332328] modules/basic_garage.lua:351: in function <modules/basic_garage.lua:348>