I’m trying to change the maximun health of the vehicle petrol tank, how could i do this? i was not able to change the default 1000.0 amount
Try SetVehiclePetrolTankHealth. Note that the max health is 1000.
i’ve tried to set up this one on my qb-vehicle failure but i didn’t had sucess, can you give me an example by chance? i’ve probably wrote it completely wrong cuz i’m quite new at lua coding. what i used was
“local SetVehiclePetrolTankHealth = 710.0”
You didn’t specify a vehicle. Here is a simple example for you:
local player = PlayerPedId()
if IsPedInAnyVehicle(player, false) then
SetVehiclePetrolTankHealth(GetVehiclePedIsIn(player, false), 730.0)
end
i was able to make it, thank you.
The only issue i’m having now is that when i use /fix the health goes back to 1000.0
local tank = GetVehiclePetrolTankHealth(vehicle)
SetVehiclePetrolTankHealth(GetVehiclePedIsIn(player, false), tank)
Something like that should work