Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. locID = "" --Put a name for the location reference
  2. scr = peripheral.wrap("top");
  3. modem = peripheral.wrap("left");
  4. timeInt = 1;
  5.  
  6. function sendData(user)
  7. modem.transmit(28812,0,user);
  8. end;
  9.  
  10. while true do
  11. players = scr.getPlayers();
  12.  
  13. for i=1,#players do
  14. for key,value in pairs(players[i]) do
  15. if key == "name" and value ~=nil and value ~= "ClockCycle" then
  16. local data = locID .. " - " .. value;
  17. sendData(data);
  18. end;
  19. end;
  20. end;
  21. sleep(timeInt);
  22. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement