This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View File

@@ -0,0 +1,42 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
ix.char.RegisterVar("ownedDoors", {
field = "OwnedDoors",
fieldType = ix.type.array,
default = {},
bNoDisplay = true,
OnSet = function(character, value)
if (character.vars.ownedDoors) then
table.insert(
character.vars.ownedDoors,
#character.vars.ownedDoors + 1,
value
)
else
character.vars.ownedDoors = {value}
end
end,
OnGet = function(character, _)
return character.vars.ownedDoors or {}
end
})
function PLUGIN:CanPlayerAccessDoor(client, door, access)
for _, v in ipairs(client:GetCharacter():GetOwnedDoors()) do
if (v == door:EntIndex()) then
return true
end
end
end
util.AddNetworkString("OnDoorPrintOwners")