Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pcX = 1
- pcY = 1
- pcZ = 1
- basename = temp
- players2 = {}
- t = peripheral.wrap("top")
- while true do
- -- reports if enemy is inside!
- local people = t.getPlayers()
- for i,v in pairs(people) do
- if players2[v.name] == nil then
- -- whitelist names here (otherwise will spam!)
- if
- v.name ~= "TheNetPle" and
- v.name ~= " "
- then
- players2[v.name] = t.getPlayerByName(v.name).all()
- x2 = players2[v.name].position.x
- y2 = players2[v.name].position.y
- z2 = players2[v.name].position.z
- -- ONLY REPORTS WHEN IN RANGE OF 10. Change values to your liking
- if (x2 < 10 and x2 > -10 and y2 < 10 and y2 > -10 and z2 < 10 and z2 > -10) then
- print(players2[v.name].name)
- sleep(1.00)
- end
- end
- players2[v] = nil
- end
- end
- local people = nil
- players2 = {}
- sleep(0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement