[DarkRP 2.7] TDM cars can be set to No collide through Context menu.
3 replies, posted
How would I go about disabling collision off for vehicles?
[CODE]properties.Add( "collision_off", {
MenuLabel = "#collision_off",
Order = 1500,
MenuIcon = "icon16/collision_off.png",
Filter = function( self, ent, ply )
if ( !IsValid( ent ) ) then return false end
if ( ent:IsPlayer() ) then return false end
if ( !gamemode.Call( "CanProperty", ply, "collision", ent ) ) then return false end
if ( ent:GetCollisionGroup() == COLLISION_GROUP_WORLD ) then return false end
return true
end,[/CODE]
[editline]17th August 2016[/editline]
Would this work?
[B]if (ent:IsVehicle()) then return false end[/B]
Use this hook instead of editing base files:
[url]http://wiki.garrysmod.com/page/SANDBOX/CanProperty[/url]
[QUOTE=Robotboy655;50901516]Use this hook instead of editing base files:
[url]http://wiki.garrysmod.com/page/SANDBOX/CanProperty[/url][/QUOTE]
It doesn't tell me which file to put this in.
Where would I add this Hook in DarkRP?
Create a new file with shared realm (Not autorun/client or autorun/server)
And put the hook there
Sorry, you need to Log In to post a reply to this thread.