-
Notifications
You must be signed in to change notification settings - Fork 9
/
player_access.xml
36 lines (36 loc) · 1003 Bytes
/
player_access.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<mod name="player_access" enabled="yes">
<config name="c"><![CDATA[
config = {
maxPlayers = 10
}
]]></config>
<talkaction words="!access" event="script"><![CDATA[
domodlib("c")
local result = db.getResult("SELECT * FROM `players` WHERE `group_id` > 1;")
local final, i = "", 0
local ter = ""
while true do
final = final .. "[" .. result:getDataString("name") .. "] - Group Id: " .. result:getDataInt("group_id")
local n = result:getDataInt("group_id")
if n == 2 then
ter = "Tutor"
elseif n == 3 then
ter = "Senior tutor"
elseif n == 4 then
ter = "Gamemaster"
elseif n == 5 then
ter = "Community Manager"
elseif n == 6 then
ter = "God"
end
final = final .. ", Group Name: " .. ter .. "\n"
i = i + 1
if not result:next() or i > config.maxPlayers then
break
end
end
result:free()
return doShowTextDialog(cid, 2160, final)
]]></talkaction>
</mod>