blob: 443f4501124f7d18b0115de888fa4da39f74c3b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
local events = {
"Player_Move",
"Player_Change",
"Player_Spawn",
"Player_Kick"
}
function CreatEnumTable(tbl, index)
assert(IsTable(tbl))
local enumtbl = {}
local enumindex = index or 0
for i, v in ipairs(tbl) do
enumtbl[v] = enumindex + i
end
return enumtbl
end
return CreatEnumTable(events)
|