HUD
Functions

GM: can Detach Trailer

Called before a trailer is detached from a truck.

Used in: VCMod Main addon.

Server GM:VC_canDetachTrailer(Entity truck,  )

Arguments

1. Entity truck; Truck
Truck vehicle entity.

2. ;


Returns

1. Boolean If returned false will halt this operation.

Example

// Halts the ability to detach trailers unless truck is slow enough
hook.Add("VC_canDetachTrailer", "TooFastToDetach", function(truck)
	local speed = VC_getSpeedKmH()
	if speed > 20 then then
		print("Stopping a vehicle attempting to detach a trailer at high speeds.")
		return false
	end
end)
Page modified:
...2018-11-08 16:22:27