Garry's Mod

Door HL2RP!?

Submitted by Ozor, , Thread ID: 48550

Thread Closed
24-09-2017, 11:26 PM
#1
Hello!
I need help? I would like to make a function for the HL2 doors. Many know that on cards like city17, there are doors that can not just be opened. Can you help me with this?

RE: Door HL2RP!?

#2
OOOO CTY 17 HELP NUH OFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF OH

RE: Door HL2RP!?

#3
Use alyx EMP swep for civil protection, they are very good

RE: Door HL2RP!?

#4
Use alyx EMP swep for civil protection, they are very good

RE: Door HL2RP!?

#5
You should put a script on your server.

function KeyPressedUse (ply, key)
if key == IN_USE then
local t = {}
t.start = ply:GetPos()
t.endpos = ply:GetShootPos() + ply:GetAimVector() * 100
t.filter = ply
local trace = util.TraceLine(t)
if trace.Entity and trace.Entity:IsValid() and (trace.Entity:GetClass() == "func_door" or trace.Entity:GetClass() == "prop_door_rotating" or trace.Entity:GetClass() == "prop_dynamic") then
trace.Entity:Fire("Open")
end
end
end
hook.Add( "KeyPress", "KeyPressedUse", KeyPressedUse )


This one should work

Users browsing this thread: