Simple repair script with a fancy camera and button, works with QB/ESX and standalone, its made as a full script but I recommend just taking the code and implementing it yourself somewhere, or use it like that .
There a reason one would remain stuck in the cam aimed at the hood after repair? Can also only run command from inside of vehicle. And there is a error with ps-ui, Remake the function.
This should work
Psui = function()
exports['ps-ui']:Circle(function(success)
if success then
print("success")
Wrapper:RemoveItem('repairkit', 1)
SetVehicleEngineHealth(Main.veh, 1000)
SetVehicleEngineOn(Main.veh, true, true)
SetVehicleFixed(Main.veh)
RenderScriptCams(false, 1, 1500, false, false)
Main.veh = nil
else
Wrapper:Notify("You Failed")
end
end, 5, 12)
end