Garry's Mod

Garry's Mod

Not enough ratings
Simple Doors
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Entity
Addon Tags: Build
File Size
Posted
8.709 KB
24 Aug, 2022 @ 8:35am
1 Change Note ( view )

Subscribe to download
Simple Doors

Description
To open door hold E

This is simple entity which can pass things through yourself when the E key is clamped.

This is my first addon i make it in 2 days, you can find here much bugs if you know how to fix
it please leave comment below, and if you know how to add icons to this door,
tell me and I'll add you to the co-authors:)
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.