HUD
Functions

Vehicle: fuel Set Max

Sets maximum capacity of fuel the vehicle can have in liters. By default this value is semi-automatically generated based on vehicle type.

Used in: VCMod Main addon.

Server Entity Vehicle:VC_fuelSetMax(Integer amount)

Arguments

1. Integer amount; Amount of fuel.
The amount of fuel, in liters.

Example

// Set all vehicles fuel capacity to 500 liters
hook.Add("VC_postVehicleInit", "VC_postVehicleInit_fuel500", function(ent)
	local newFuel = 500

	// First, we set the maximum fuel
	ent:VC_fuelSetMax(500)

	// Then we increase the current fuel the vehicle has to the maximum level. This can also be set to newFuel variable in this example
	local fuelCurrent = ent:VC_fuelGetMax()
	ent:VC_fuelSet(fuelCurrent)
end)
Page modified:
...2020-07-06 07:05:46