• Combine Doors
    7 replies, posted
How do you make Combine doors (nexus doors) like on the map city18 work when you press e on them.
Do they not work currently or are you trying to mimic them? You could probably move the door using lua, or just decompile the map.
Are you using DarkRP or want the door to open regardless of group ownership/player team? This code will work on DarkRP<2.5 for cop-owned doors and cop players. [lua]local function SpecialDoorFunc(pl, key) if (key == IN_USE) then local tr = pl:GetEyeTrace() if (tr.HitPos:Distance(pl:GetShootPos()) > 75) then return end if (tr.Entity and tr.Entity.DoorData and tr.Entity.DoorData.GroupOwn and tr.Entity.DoorData.GroupOwn and tr.Entity.DoorData.GroupOwn:lower() == "cops" and pl:IsCP()) then tr.Entity:Fire("open", "", 0) tr.Entity:Fire("setanimation", "open", 0) end end end hook.Add("KeyPress", "SpecialDoorFunc", SpecialDoorFunc)[/lua]
Yea I am using darkrp I'll see f that code works thanks.
Where do i put that code?
sv_init would be the easiest place to throw it.
In the doors module?
Sure. I'm not sure what all is in bone stock DarkRP.
Sorry, you need to Log In to post a reply to this thread.