HUD
Functions

Vehicle: fuel Get

Displays the current vehicles fuel.

Used in: VCMod Main addon.

Shared Entity Vehicle:VC_fuelGet(Boolean perc)

Arguments

1. Boolean perc; Show in percentage
If it should show the fuel in percentage instead of liters.

Returns

1. Integer Either fuel in liters or in percentage of the maximum fuel.

Example

concommand.Add("vehicle_getfuel", function()
	local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
	if IsValid(ent) then
		print("Vehicle you are currently looking at fuel is: "..ent:VC_fuelGet(true).." percent.")
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:38