Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- local proximity = sensor.wrap("top")
- repeat
- local targets = proximity.getTargets()
- term.clear()
- print("Players in range:-")
- for name, details in pairs(targets) do
- if details.Type == "Player" then
- local status, fullDetails = pcall(proximity.getTargetDetails, name)
- if status then
- print(fullDetails.Username)
- end
- end
- end
- until false
Advertisement
Add Comment
Please, Sign In to add comment