SHOW:
|
|
- or go back to the newest paste.
1 | ---by serafim | |
2 | - | {"Alex2564","Owner"}, |
2 | + | |
3 | local admins = { | |
4 | {"Alex25764","Owner"}, | |
5 | {"Aboba1337","Member"}, | |
6 | - | {"Painfulspirit","Member"} |
6 | + | |
7 | {"jesia_","Member"}, | |
8 | {"Painfulspirit","Member"}, | |
9 | {"p1nango","afk"}, | |
10 | {"superlg2","afk"}, | |
11 | {"Cuudec","afk"}, | |
12 | {"maksimgeims","afk"}, | |
13 | {"BanDaBoom","afk"}, | |
14 | } | |
15 | ||
16 | local x_resol = 35 | |
17 | local y_resol = 16 | |
18 | ||
19 | local component = require("component") | |
20 | local computer = require("computer") | |
21 | local event = require("event") | |
22 | local gpu = component.gpu | |
23 | local w,h = gpu.getViewport() | |
24 | ||
25 | local function check() | |
26 | gpu.fill(1,1,x_resol,y_resol," ") | |
27 | local line = 1 | |
28 | for ind = 1,#admins do | |
29 | local name = admins[ind][1] | |
30 | - | gpu.setForeground(0x0000FF) |
30 | + | |
31 | gpu.setForeground(0xFFFFFF) | |
32 | gpu.set(1,line,"[") | |
33 | gpu.set(string.len(rank)+2,line,"] - "..name) | |
34 | if rank == "Owner" then | |
35 | gpu.setForeground(0xFF0000) | |
36 | elseif rank == "Member" then | |
37 | gpu.setForeground(0x00FFFF) | |
38 | - | gpu.setForeground(0x999999) |
38 | + | elseif rank == "afk" then |
39 | gpu.setForeground(0xC0C0C0) | |
40 | end | |
41 | gpu.set(2,line,rank) | |
42 | if computer.addUser(name) then | |
43 | computer.removeUser(name) | |
44 | gpu.setForeground(0x00FF00) | |
45 | gpu.set(x_resol-7,line,"online") | |
46 | else | |
47 | gpu.setForeground(0x444444) | |
48 | gpu.set(x_resol-7,line,"offline") | |
49 | end | |
50 | line = line + 1 | |
51 | end | |
52 | end | |
53 | ||
54 | os.execute("cls") | |
55 | for ind = 1,#admins do | |
56 | computer.removeUser(admins[ind][1]) | |
57 | end | |
58 | gpu.setResolution(x_resol,y_resol) | |
59 | ||
60 | while true do | |
61 | check() | |
62 | local e = ({event.pull(5,"key_down")})[4] | |
63 | if e == 29 or e == 157 then -- Ctrl Выход | |
64 | gpu.setResolution(w,h) | |
65 | gpu.setBackground(0x000000) | |
66 | gpu.setForeground(0xFFFFFF) | |
67 | os.execute("cls") | |
68 | os.exit() | |
69 | end | |
70 | end |