HUD
Functions

Vehicle: get Cruise

Get the vehicles cruise control data.

Used in: VCMod Main addon.

Shared Entity Vehicle:VC_getCruise()

Returns

1. Integer / nil Nil if cruise control is off, otherwise it returns current speed in gmod units.

Example

concommand.Add("vehicle_getcruise", function()
	local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
	if IsValid(ent) then
		local data = ent:VC_getCruise()
		if data then
			print("Vehicle you are currently looking at cruise control is not on.")
		else
			print("Vehicle you are currently looking at is cruising at: "..data..".")
		end
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:38