HUD
Functions

GM: can Use Cruise Control

Called right prior to player toggling the vehicles cruise control on.

Used in: VCMod Main addon.

Shared GM:VC_canUseCruiseControl(Entity ply, Entity ent)

Arguments

1. Entity ply; Player
Player who is doing it.

2. Entity ent; Vehicle
The vehicle that the player is driving.

Returns

1. Boolean If it should allow player to do it or not.

Example

hook.Add("VC_canUseCruiseControl", "VC_canUseCruiseControl", function(ply, ent)
	if ply:Nick() == "freemmaann" then
		print("Oh no, freemmaann is attempting to use the cruise control if vehicle: "..ent:VC_getName()..". This is not allowed.")
		local can = false
		return can
	end
end)
Page modified:
...2019-08-09 20:13:14