DarkRp Lockpick and battering ram

Hey i run a darkrp server and i have done tons of modding myself but i am unable to do this bit of coding
we try to run a very fair server we are very strict we dont abuse admins or players.

i need lock pick that can pick props and unfreeze them and un constraint them which currently it can only go throught doors

and the battering ram does unfreeze props but it doesnt unconstraint them so its very hard to rp if people prop block everything.

if you could do this i would be VERY gratefull as i have spent hours trying to do it myself.

I can do this for a few bucks.

But not in 2014 anymore so please don’t ask me about 5 year old things.

i only have a dollar in paypal :frowning:

Since you said you have already done some modding I guess you know some ( basic? ) lua, so just check the code of the original lockpick and use this function to remove the constraints, http://wiki.garrysmod.com/?title=Constraint.RemoveAll

I could try for you.

that would be awesome. i have looked at the unweld brick and tried to put all 3 of the ones i have together to make them but it didnt work.

Had I similar problem, just wrote and tested this. First LUA box is “door_ram/shared.lua”. Lines 25, 68 - 74 were added.
[lua]function SWEP:PrimaryAttack()
if (CLIENT) then return end

if not self.Ready then return end

local trace = self.Owner:GetEyeTrace()

self.Weapon:SetNextPrimaryFire(CurTime() + 2.5)
if (not ValidEntity(trace.Entity) or (not trace.Entity:IsDoor() and not trace.Entity:IsVehicle() and trace.Entity:GetClass() ~= "prop_physics")) then

if (trace.Entity:IsDoor() and self.Owner:EyePos():Distance(trace.HitPos) > 45) then

if (trace.Entity:IsVehicle() and self.Owner:EyePos():Distance(trace.HitPos) > 100) then

local a = CfgVars["copscanunfreeze"] == 1
local d = CfgVars["copscanunconstraint"] == 1
local b = trace.Entity:GetClass() == "prop_physics"
local c = true
if trace.Entity.Owner then
	c = trace.Entity.Owner.warranted
if (trace.Entity:IsDoor()) then
	local allowed = false
	local team = self.Owner:Team()
	-- if we need a warrant to get in and we're not a gangster or the mob boss
	if CfgVars["doorwarrants"] == 1 and trace.Entity:IsOwned() and not trace.Entity:OwnedBy(self.Owner) and team ~= 4 and team ~= 5 then
		-- if anyone who owns this door has a warrant for their arrest
		-- allow the police to smash the door in
		for k, v in pairs(player.GetAll()) do
			if trace.Entity:OwnedBy(v) and v.warranted == true then
				allowed = true
		-- rp_doorwarrants 0, allow warrantless entry
		allowed = true
	-- Do we have a warrant for this player?
	if allowed then
		trace.Entity:Fire("unlock", "", .5)
		trace.Entity:Fire("open", "", .6)
		Notify(self.Owner, 1, 5, "You need a warrant in order to be able to unlock this door.")
elseif (trace.Entity:IsVehicle()) then
	trace.Entity:Fire("unlock", "", .5)
	local driver = trace.Entity:GetDriver()
	if driver and driver.ExitVehicle then
elseif a and b and not trace.Entity:GetPhysicsObject( ):IsMoveable() and self.Owner:EyePos():Distance(trace.HitPos) < 100 then
	if c then
		trace.Entity:GetPhysicsObject( ):EnableMotion( true ) 
		Notify(self.Owner, 1, 5,"You need a warrant in order to be able to unfreeze this prop.")

–Battering ram can remove constraints to prevent prop blocking.
elseif d and b and constraint.HasConstraints(trace.Entity) and self.Owner:EyePos():Distance(trace.HitPos) < 100 then
if c then
Notify(self.Owner, 1, 5,“You need a warrant in order to be able to un-constrain this prop.”)
self.Owner:ViewPunch(Angle(-10, math.random(-5, 5), 0))


I also added a ConVar to “DarkRP/gamemode/init.lua”.
[lua] CfgVars[“copscanunconstraint”] = 1 – Cops can remove constraints with battering ram[/lua]

If frozen and constrained, first hit will unfreeze, second will remove constraints.

Take a look at Counter strike realistic’s M3 Super 90.

I already done this for him, but he refused it.

what a selfish bastard! Lol.

Entirely. He said his server didnt need it anymore O.o