Pivity

Players can lift up Vehicles and nocollide!

Last read Never
#1

Hello I have a Darkrp server and I don't know how to use fpp to disable/restrict people to abuse physgun on cars and nocollide them they can also change bodygroups.

#2

https://wiki.facepunch.com/gmod/GM:PhysgunPickup

ent:GetClass():lower() == "prop_vehicle_jeep" return false

https://wiki.facepunch.com/gmod/ENTITY:CanTool

same thing as above


DarkRP has a config for properities. Set bodygroups to false.

Informative x 1
#3

Make a file in lua/autorun/server and call it vehicle_fix.lua or something

and poste this code in the lua file


hook.Add( "CanTool", "Vehicle_toolgun_fix_sweettea", function( ply, tr, toolname, tool, button )
if(tr.Entity:IsVehicle()) then
if(!ply:IsSuperAdmin()) then
return false
end
end
end )
hook.Add( "PhysgunPickup", "Vehicle_physgun_fix_sweettea", function( ply, ent )
if ( ent:IsValid() and ent:IsVehicle() and !ply:IsSuperAdmin() ) then
return false
end
end )

//Just to make sure they dont nocolide
hook.Add( "ShouldCollide", "Vehicle_vehcolission_fix_sweettea", function( ent1, ent2 )
   if(ent1:IsVehicle() and ent2:IsVehicle()) then
   return false
   end
end )


Now only superadmins can use toolguns and physguns on vehicles.


This is a very, very simple fix.


Agree x 1
Users viewing this thread
Nobody