Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require('term')
- local computer = require("computer")
- local com = require('component')
- local sensor = com.isAvailable("os_entdetector") and com.os_entdetector or error("нет сенсора entity detector")
- local gpu = com.gpu
- -- Белый список ---
- white = {
- none = false
- }
- gpu.setResolution(35,15)
- while true do
- pl = sensor.scanPlayers(64)
- term.clear()
- gpu.setForeground(0xffb600)
- gpu.set(2,1, 'В зоне обнаружения радара: '..#pl..' чел.')
- for i = 1, #pl do
- if white[pl[i].name] then
- gpu.setForeground(0x00ff00)
- else
- gpu.setForeground(0xff0000)
- computer.beep(440, 1)
- end
- gpu.set(2, i+1, i..'. '..pl[i].name)
- gpu.set(25, i+1, ' - '..math.floor(pl[i].range)..' м')
- end
- os.sleep(5)
- end
Add Comment
Please, Sign In to add comment