-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFilteredNamePlateHelp.lua
More file actions
executable file
·43 lines (40 loc) · 1.01 KB
/
FilteredNamePlateHelp.lua
File metadata and controls
executable file
·43 lines (40 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function FilteredNamePlate.printTable(table , level, key)
level = level or 1
local indent = ""
for i = 1, level do
indent = indent.." "
end
if key and key ~= "" then
print(indent..key.." ".."=".." ".."{")
else
print(indent .. "{")
end
key = ""
for k,v in pairs(table) do
if type(v) == "table" then
key = k
print("key>>"..key)
-- FilteredNamePlate.printTable(v, level + 1, key)
else
local content = string.format("%s%s = %s", indent .. " ",tostring(k), tostring(v))
print(content)
end
end
print(indent .. "}")
end
function FilteredNamePlate.insertATabValue(tab, value)
local isExist = false;
for pos, name in ipairs(tab) do
if (name == value) then
isExist = true;
end
end
if not isExist then table.insert(tab, value) end;
end
function FilteredNamePlate.removeATabValue(tab, value)
for pos, name in ipairs(tab) do
if (name == value) then
table.remove(tab, pos)
end
end
end