mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 19:01:35 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user