Forum

> > CS2D > Scripts > Lua usgn
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua usgn

1 reply
To the start Previous 1 Next To the start

old Lua usgn

Black Wolf
User Off Offline

Quote
What this means?

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
function lvl(id)
	local filename = "sys/lua/admin.txt"
	local file = io.open(filename)
	if file then
		for line in file:lines() do
			local parses = totable(line)
			if tonumber(parses[1]) ~= nil then
				if player(id,"usgn") == tonumber(parses[1]) then
					if parses[2] ~= nil then
                                                if parses[2] == "member" then
							return 1
                                                elseif parses[2] == "vip" then
                                                        return 2
                                                elseif parses[2] == "mod" then
							return 3
						elseif parses[2] == "gamemaster" then
							return 4
						elseif parses[2] == "admin" then
							return 5
						elseif parses[2] == "Scripter" then
							return 6
						end
					else
						return 0
					end
				end
			end
		end

old Re: Lua usgn

mafia_man
User Off Offline

Quote
It reads file admin.txt inside to check is player admin or member or in other group.

File is built like that:
[usgn] [group]
1
2
3
9102 admin
1234 member
4321 mod
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview