Advertisement
Guest User

radars

a guest
Jan 26th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. local radar = peripheral.wrap("top")
  2.     local x,y = 1,1
  3.     local monitor = peripheral.wrap("left")
  4.     local timer = os.startTimer(1.5)
  5.     local counter = 0
  6.     print("Radarsystem online")
  7.     while true do
  8.           local event, param = os.pullEvent("key")
  9.           if param == "timer" then
  10.             monitor.clear()
  11.             counter = table.getn(radar.getPlayerNames())
  12.             if counter ~= 0 then
  13.                   for i=0,counter,i+1 do
  14.                     monitor.write(radar.getPlayerNames()[i]) --is doing nothing :/
  15.                     x,y = monitor.getCursorPos()
  16.                     y = y + 1
  17.                     monitor.setcursorPos(1,y)
  18.                   end
  19.             end
  20.             timer = os.startTimer(1.5)
  21.           elseif param == 16 then
  22.             print("closing program...")
  23.             error("Radar System Closed")
  24.           end
  25.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement