LuaScripts/tabletRadar.lua
2021-01-08 21:13:18 +03:00

24 lines
621 B
Lua

local component = require("component")
local radar = component.radar
local WHITELIST = {"erius", "DummyWalrus"}
print("радар запущен")
function isWhiteListed(name)
for whitelisted in WHITELIST do
if name == whitelisted then
return false
end
end
return true
end
while true do
local players = radar.getPlayers()
for i = 1, #players do
if isWhiteListed(players[i].name) then
print(players[i].name.." ; Расстояние: "..players[i].distance.." ; Координаты: x = "..players[i].x.." y = "..players[i].y.." z = "..players[i].z)
print("")
end
end
end