SHOW:
|
|
- or go back to the newest paste.
| 1 | ---by serafim | |
| 2 | ||
| 3 | local admins = {
| |
| 4 | {"Alex25764","Owner"},
| |
| 5 | - | {"Aboba1337","Member"},
|
| 5 | + | {"Aboba1337","Daniil"},
|
| 6 | - | {"sad_volodia","Member"},
|
| 6 | + | {"sad_volodia","Sebek"},
|
| 7 | - | {"jesia_","Member"},
|
| 7 | + | {"jesia_","Bebek"},
|
| 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 | local rank = admins[ind][2] | |
| 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 | elseif rank == "afk" then | |
| 39 | gpu.setForeground(0xC0C0C0) | |
| 40 | elseif rank == "Daniil" then | |
| 41 | gpu.setForeground(0x00FFFF) | |
| 42 | elseif rank == "Sebek" then | |
| 43 | gpu.setForeground(0x00FFFF) | |
| 44 | elseif rank == "Bebek" then | |
| 45 | gpu.setForeground(0x00FFFF) | |
| 46 | end | |
| 47 | gpu.set(2,line,rank) | |
| 48 | if computer.addUser(name) then | |
| 49 | computer.removeUser(name) | |
| 50 | gpu.setForeground(0x00FF00) | |
| 51 | gpu.set(x_resol-7,line,"online") | |
| 52 | else | |
| 53 | gpu.setForeground(0x444444) | |
| 54 | gpu.set(x_resol-7,line,"offline") | |
| 55 | end | |
| 56 | line = line + 1 | |
| 57 | end | |
| 58 | end | |
| 59 | ||
| 60 | os.execute("cls")
| |
| 61 | for ind = 1,#admins do | |
| 62 | computer.removeUser(admins[ind][1]) | |
| 63 | end | |
| 64 | gpu.setResolution(x_resol,y_resol) | |
| 65 | ||
| 66 | while true do | |
| 67 | check() | |
| 68 | local e = ({event.pull(5,"key_down")})[4]
| |
| 69 | if e == 29 or e == 157 then -- Ctrl Выход | |
| 70 | gpu.setResolution(w,h) | |
| 71 | gpu.setBackground(0x000000) | |
| 72 | gpu.setForeground(0xFFFFFF) | |
| 73 | os.execute("cls")
| |
| 74 | os.exit() | |
| 75 | end | |
| 76 | end |