DarkRP Players Able To Physgun Cars & Edit Them

Post Reply
Moe Lester
New to forums
New to forums
Posts: 9
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Aug 14, 2016 2:53 pm

DarkRP Players Able To Physgun Cars & Edit Them

Post by Moe Lester »

I haven't had very much luck on these forums, but it's worth a try. In my server, players are able to pick up their cars and change the skin and disable collisions. How do I fix this? I do not see an obvious answer.
GetScrubed
New to forums
New to forums
Posts: 11
Joined: Wed Aug 24, 2016 12:48 pm

Re: DarkRP Players Able To Physgun Cars & Edit Them

Post by GetScrubed »

Do you have an Admin Mod such as ULX or Evolve on your server to be able to restrict it to certain usergroups?
geckie456
New to forums
New to forums
Posts: 13
Joined: Sat Jul 18, 2015 2:41 pm

Re: DarkRP Players Able To Physgun Cars & Edit Them

Post by geckie456 »

I know this is a very late reply and you hopefully have this fixed but DarkRP comes with FPP (Falcos Prop Protection) and you can use that to change who can pick up entitys and such. Also if its not there you can install it with an addon from the workshop.
AssortedGaming
New to forums
New to forums
Posts: 9
Joined: Mon Mar 06, 2017 11:20 am

Re: DarkRP Players Able To Physgun Cars & Edit Them

Post by AssortedGaming »

Put this in lua/autorun and name it whatever you want. (has to have the .lua extention)

Code: Select all

-- ULX ONLY
-- DISALLOW GROUPS GO HERE
local DenyGroups = 
{ 
	"user",
	"respected",
	"moderator",
	"vipplus",
	"vip"
}

-- ALLOWED GROUPS GO HERE
local AllowGroups = {
	"owner",
	"superadmin",
	"admin"

}

local function VehPickup(ply, ent)
	if table.HasValue( DenyGroups, ply:GetNWString("usergroup") ) and (ent:GetClass():lower() == "prop_vehicle_jeep") then
		return false
	elseif table.HasValue( AllowGroups, ply:GetNWString("usergroup") ) then
		return true
	end
end
 
hook.Add("PhysgunPickup", "Physgun.VehPickup", VehPickup)
Post Reply