Garry's Mod

Garry's Mod

评价数不足
Simple Doors
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 实体
插件标签: 建筑
文件大小
发表于
8.709 KB
2022 年 8 月 24 日 上午 8:35
1 项改动说明 ( 查看 )

订阅以下载
Simple Doors

描述
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 条留言
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.
Joe Jagger 2022 年 11 月 26 日 上午 9:33 
Your mod is terrible and causes millions of errors when you delete it.