Vehicle spawns with %100 fuel (#120)

* Vehicle spawns with %100 fuel

On Jobs Vehicles spawn with random fuel level creates problem for players.
This little fix from Legacy fuel solve that problem.

* For Native Fuel not Legacy starts with %100

I edited the code based on the request from legacy to native
Not tested by me
This commit is contained in:
Berkeratay
2020-07-03 09:59:30 -07:00
committed by GitHub
parent bc023c0c4d
commit 6cbc37ddf7
+3
View File
@@ -244,6 +244,9 @@ AddEventHandler('esx_jobs:spawnJobVehicle', function(spawnPoint, vehicle)
myPlate[plate] = true
TaskWarpPedIntoVehicle(playerPed, spawnedVehicle, -1)
Citizen.Wait(1)
SetVehicleFuelLevel(vehicle, 100.0)
DecorSetFloat(vehicle, "_FUEL_LEVEL", GetVehicleFuelLevel(vehicle))
if vehicle.HasCaution then
vehicleInCaseofDrop = spawnedVehicle