Garry's Mod

Garry's Mod

Simple Doors
8 Comments
A kind skull 30 Dec, 2024 @ 7:06am 
every time i remove or spawn it in it creates hundreds of errors trying to use a null entity, if fixed this mod will be perfect
>KB> >KEKSQUAD 18 Aug, 2024 @ 4:50pm 
If anyone here wants to use this on their server, run this in a file on garrysmod/lua/autorun/server

hook.Add("OnEntityCreated", "SimpleDoorFixTest", function(ent)
if string.Left(ent:GetClass(), 5) == "door " then
function ent:Use(a, c)
local delay = 0
ent:SetSolid(SOLID_NONE)
ent:SetMaterial("models/props_combine/stasisshield_sheet")
hook.Add("Think", "CurTimeDelay", function()
if CurTime() < delay then return end
if IsValid(ent) then
ent:SetSolid(SOLID_VPHYSICS)
ent:SetMaterial("")
end
end)
end
end
end)
>KB> >KEKSQUAD 18 Aug, 2024 @ 3:43pm 
That null entity thing can be fixed by checking the validity of whatever entity is being set solid
lucky? 25 May, 2023 @ 2:09am 
:steamthumbsup:
gelflinggirl83 20 Feb, 2023 @ 1:08pm 
this gives me errors every time i spawn it the NULL entity error comes up please fix it.
wiimeiser 30 Jan, 2023 @ 1:57am 
It is indeed giving errors:
[Simple Doors] lua/entities/door 01/init.lua:32: Tried to use a NULL entity!
1. SetSolid - [C]:-1
2. v - lua/entities/door 01/init.lua:32
3. unknown - lua/autorun/hook_inspector.lua:229 (x355)
This was AFTER doing an admin cleanup BTW
Itzjinners 9 Jan, 2023 @ 7:45pm 
Your mod is Great and causes no errors when you spawn it or delete it.
Joe J. 26 Nov, 2022 @ 9:33am 
Your mod is terrible and causes millions of errors when you delete it.