If a vehicle has a trailer connected - detaches it.
Used in: VCMod Main addon.
Server Entity Vehicle:VC_detachTrailer()
concommand.Add("vehicle_detachtrailer", function()
local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
if IsValid(ent) then
ent:VC_detachTrailer()
print("Umm, sir, think we just lost our cargo.")
else
print("Invalid entity.")
end
end)