Advertisement
Guest User

abc

a guest
Nov 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. local term = require('term')
  2. local com = require('component')
  3. local sensor = com.openperipheral_sensor
  4. local gpu = com.gpu
  5. local cb = com.chat_box
  6. floor = math.floor
  7.  
  8.  cb.setName("§4Радар§7")
  9. color = {
  10.   green = 0x00ff00,
  11.   yellow = 0xffb600,
  12.   red = 0xff0000,
  13.   cyan = 0x008B8B
  14. }
  15.  
  16. -- Белый список ---
  17. white = {
  18.   Jane = true,
  19.   DanilValiev1 = true,
  20.   Vestalfa = true,
  21.   SkillS = true,
  22.   Bro777 = true,
  23.   Dmitriy19 = true,
  24.   Sausage = true
  25.  
  26.  
  27. }
  28.  
  29.  
  30. gpu.setResolution(35,15)
  31.  
  32. while true do
  33.   pl = sensor.getPlayers()
  34.   term.clear()
  35.   gpu.setForeground(color.yellow)
  36.   gpu.set(2,1, 'В зоне обнаружения радара: '..#pl..' чел.')
  37.     for i = 1, #pl do
  38.    
  39.       if white[pl[i].name] then gpu.setForeground(color.green)
  40.       cb.say("§2"..pl[i].name.." §c# §6Here")
  41.       else gpu.setForeground(color.red)
  42.       cb.say("§4"..pl[i].name.." §с# §6Here")
  43.      
  44.       end
  45.       gpu.set(2, i+1, i..'. '..pl[i].name)
  46.      
  47.     end
  48.   os.sleep(60)
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement