Garry's Mod

Garry's Mod

Simple Doors
8 条留言
A kind skull 2024 年 12 月 30 日 上午 7:06 
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 2024 年 8 月 18 日 下午 4:50 
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 2024 年 8 月 18 日 下午 3:43 
That null entity thing can be fixed by checking the validity of whatever entity is being set solid
lucky? 2023 年 5 月 25 日 上午 2:09 
:steamthumbsup:
gelflinggirl83 2023 年 2 月 20 日 下午 1:08 
this gives me errors every time i spawn it the NULL entity error comes up please fix it.
wiimeiser 2023 年 1 月 30 日 上午 1:57 
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
RealFloridaMan 2023 年 1 月 9 日 下午 7:45 
Your mod is Great and causes no errors when you spawn it or delete it.
Brian Badonde 2022 年 11 月 26 日 上午 9:33 
Your mod is terrible and causes millions of errors when you delete it.