Update tabletRadar.lua

This commit is contained in:
erius0 2021-01-08 21:13:18 +03:00 committed by GitHub
parent a3c42ac212
commit e79615c07a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,10 +4,19 @@ local WHITELIST = {"erius", "DummyWalrus"}
print("радар запущен") print("радар запущен")
function isWhiteListed(name)
for whitelisted in WHITELIST do
if name == whitelisted then
return false
end
end
return true
end
while true do while true do
local players = radar.getPlayers() local players = radar.getPlayers()
for i = 1, #players do for i = 1, #players do
if players[i].name not in WHITELIST then 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(players[i].name.." ; Расстояние: "..players[i].distance.." ; Координаты: x = "..players[i].x.." y = "..players[i].y.." z = "..players[i].z)
print("") print("")
end end