From 217599e1de91ca7e2441b981fd38eae298a4536c Mon Sep 17 00:00:00 2001 From: VindoesCompooter <100soundsystem32@gmail.com> Date: Sat, 20 Mar 2021 08:51:39 +0000 Subject: [PATCH 1/2] Added Hook CanDrawDoorInfo gets parsed the entity so that it can be done in specific circumstances --- plugins/doors/cl_plugin.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/doors/cl_plugin.lua b/plugins/doors/cl_plugin.lua index d11f47b2..75ae8be9 100644 --- a/plugins/doors/cl_plugin.lua +++ b/plugins/doors/cl_plugin.lua @@ -17,7 +17,7 @@ local configGet = nut.config.get local teamGetColor = team.GetColor function PLUGIN:DrawEntityInfo(entity, alpha) - if (entity.isDoor(entity) and !entity:getNetVar("hidden") and hook.Run("CanDrawDoorInfo") ~= false) then + if (entity.isDoor(entity) and !entity:getNetVar("hidden") and hook.Run("CanDrawDoorInfo",entity) ~= false) then local position = toScreen(entity.LocalToWorld(entity, entity.OBBCenter(entity))) local x, y = position.x, position.y local owner = entity.GetDTEntity(entity, 0) @@ -35,7 +35,7 @@ function PLUGIN:DrawEntityInfo(entity, alpha) local classData if (class) then classData = nut.class.list[class] - + if (classData) then color = classData.color else From 31769a3e20e131f1b6b3c19de7018ae76f1fdac6 Mon Sep 17 00:00:00 2001 From: Zoephix Date: Sat, 20 Mar 2021 10:00:10 +0100 Subject: [PATCH 2/2] Update cl_plugin.lua --- plugins/doors/cl_plugin.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/doors/cl_plugin.lua b/plugins/doors/cl_plugin.lua index 75ae8be9..0476e846 100644 --- a/plugins/doors/cl_plugin.lua +++ b/plugins/doors/cl_plugin.lua @@ -17,7 +17,7 @@ local configGet = nut.config.get local teamGetColor = team.GetColor function PLUGIN:DrawEntityInfo(entity, alpha) - if (entity.isDoor(entity) and !entity:getNetVar("hidden") and hook.Run("CanDrawDoorInfo",entity) ~= false) then + if (entity.isDoor(entity) and !entity:getNetVar("hidden") and hook.Run("CanDrawDoorInfo", entity)) then local position = toScreen(entity.LocalToWorld(entity, entity.OBBCenter(entity))) local x, y = position.x, position.y local owner = entity.GetDTEntity(entity, 0) @@ -90,4 +90,4 @@ netstream.Hook("doorPerm", function(door, client, access) end end end -end) \ No newline at end of file +end)