zombiesurvival-evolved/gamemodes/zombiesurvival/gamemode/gmapex/shared.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

25 lines
619 B
Lua

function GMAPEX:Initialize()
scripted_ents.RegisterFromFile("point_lentmanentity.lua")
end
function scripted_ents.RegisterFromFile(filename)
ENT = {}
include(filename)
scripted_ents.Register(filename:sub(1, -5):lower(), filename)
end
function AccessorFuncDT(tab, membername, type, id)
local emeta = FindMetaTable("Entity")
local setter = emeta["SetDT"..type]
local getter = emeta["GetDT"..type]
tab["Set"..membername] = function(me, val)
setter(me, id, val)
end
tab["Get"..membername] = function(me)
return getter(me, id)
end
end
hook.Add("Initialize", "gmapex", function() GMAPEX:Initialize() end)