From e79615c07a72573d74fd456425a40d2f4974ef91 Mon Sep 17 00:00:00 2001 From: erius0 <63460770+erius0@users.noreply.github.com> Date: Fri, 8 Jan 2021 21:13:18 +0300 Subject: [PATCH] Update tabletRadar.lua --- tabletRadar.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tabletRadar.lua b/tabletRadar.lua index f19d04d..8bb7020 100644 --- a/tabletRadar.lua +++ b/tabletRadar.lua @@ -4,10 +4,19 @@ 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 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("") end