[Release] esx-kr-vehicle-push - Push broken vehicles off the road!

Got it all working! Thanks for the reply! I used IsVehicleTyreBurst just didn’t think about the fact it needs to be on the rim.

i have same problem, do you have solution?

Same issue. Do you have solution?

Maybe you have a bad citizen check the previous modifications you made.

for everyone which always push from infront of car

local playerCoords = GetEntityCoords(ped)
...
...
...
            if #(playerCoords - GetOffsetFromEntityInWorldCoords(closestVehicle, 0.0, 4.0, 0.0)) > #(playerCoords - GetOffsetFromEntityInWorldCoords(closestVehicle, 0.0, -4.0, 0.0)) then
                Vehicle.IsInFront = false
            else
                Vehicle.IsInFront = true
            end

how can i change the button from shift + e to dpad down and LB?

you need to update your police scirpt

Is there a way to make this a non-ESX script or is it reliant to ESX?

Yes.

Great release, just what I’ve been looking for. I’ve modified your script to be standalone, changed the wheel rotation mechanism, also fixed the issue where players could push flipped vehicles to unflip them and added configs for fuel check so that players can also push the vehicle when fuel goes below a set value. If anyone needs it, hmu.
I can also make a PR if you want.

@himadri i’m very interested by your version of the ressource? Can you make a PR, or share it.

Thanks !

how to push the car without getting damaged?

@KRILLE how to push the car without getting damaged

Where can I find your modified script. Ive tried modifying it myself but no luck.

when i start my server it says couldnt find resource and it doesnt work please help

This is really awesome. I love it. Is there not a way you can create a script for customized tools to get the vehicles repaired after pushing to the road side

I would love it to be a VRP version to use on my server, if it’s possible.

Thank you, Literally replaced the client file with this code block, and its perfect!

Dont work for me

Yes it is possible, in the client.lua you should modify the default logic. Here is the modified one:
if IsVehicleSeatFree(Vehicle.Vehicle, -1) and GetVehicleEngineHealth(Vehicle.Vehicle) <= Config.DamageNeeded then
ESX.Game.Utils.DrawText3D({x = Vehicle.Coords.x, y = Vehicle.Coords.y, z = Vehicle.Coords.z}, ‘Press [~g~SHIFT~w~] and [~g~E~w~] to push the vehicle’, 0.4)
elseif IsVehicleSeatFree(Vehicle.Vehicle, -1) and GetVehicleFuelLevel(Vehicle.Vehicle) <= 0 then
ESX.Game.Utils.DrawText3D({x = Vehicle.Coords.x, y = Vehicle.Coords.y, z = Vehicle.Coords.z}, ‘Press [~g~SHIFT~w~] and [~g~E~w~] to push the vehicle’', 0.4)
end