Shared Entity Vehicle:VC_getCruise()
1. Integer / nil Nil if cruise control is off, otherwise it returns current speed in gmod units.
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)