Mine
public text v1 · immutablefunction CSDoorFuncs(ply,cmd,args)
local aimvec=Vector(tonumber(args[2]),tonumber(args[3]),tonumber(args[4]))
if args[1]=="0" then
local tr = util.GetPlayerTrace( ply, aimvec )
local trace = util.TraceLine( tr )
local tr2=trace.Entity
if not ValidEntity(tr2) then return end
if IsNormalDoor(tr2) then
tr2=tr2.pimp
end
if ply:IsDoorOwner(tr2) then
tr2:Fire("lock","",0)
ply:SendServerMessage("Locked.")
else
ply:SendServerMessage("You do not own this.")
end
end