From eca08699c4c8620d9e31889684aaa1cac5f64443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5BMEF=5D=20=D0=BC=D0=B5=D1=85=D1=80=D0=BE=D0=B1?= <124378025+happy1063@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:42:35 +0300 Subject: [PATCH] Create anti-blind.txt --- anti-blind.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 anti-blind.txt diff --git a/anti-blind.txt b/anti-blind.txt new file mode 100644 index 0000000..fd2e96c --- /dev/null +++ b/anti-blind.txt @@ -0,0 +1,25 @@ +--@name anti blind +--@author cool-bro +--@owneronly +--@client +--[[ +Make invisible wire holograms in 200 units radius +--]] +local z = 0 +hook.add("Tick","h",function() + if z == 0 then + z = 1 + timer.simple(1,function() + local holos = find.byClass("gmod_wire_hologram") + for i = 1 , table.count(holos) do + if holos[i]:isValid() and math.round(holos[i]:getPos():getDistance(owner():getPos()),0) < 200 and holos[i]:getOwner() != owner() then + holos[i]:setColor(Color(holos[i]:getColor()[1],holos[i]:getColor()[2],holos[i]:getColor()[3],0)) + end + if holos[i]:isValid() and math.round(holos[i]:getPos():getDistance(owner():getPos()),0) > 200 and holos[i]:getOwner() != owner() then + holos[i]:setColor(Color(holos[i]:getColor()[1],holos[i]:getColor()[2],holos[i]:getColor()[3],255)) + end + end + z = 0 +end) +end +end)