HUD
Functions

Vehicle: set Cruise Speed

Sets the current cruise speed of a vehicle. Does nothing if cruise is not active.

Used in: VCMod Main addon.

Server Entity Vehicle:VC_setCruiseSpeed(Integer val)

Arguments

1. Integer val; Speed of the car.
This speed is in garrysmod units.

Example

concommand.Add("VC_SetCruiseSpeed", function()
	local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
	if IsValid(ent) and ent:GetVelocity() > 500 then
		ent:VC_setCruiseSpeed(500)
		print("Some vehicle trying to go too fast, lets not allow it.")
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:40