Server GM:VC_canDetachTrailer(Entity truck, )
1. Entity truck; Truck
Truck vehicle entity.
2. ;
1. Boolean If returned false will halt this operation.
// 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)