Create anti-blind.txt
This commit is contained in:
parent
ae9f8958e0
commit
eca08699c4
1 changed files with 25 additions and 0 deletions
25
anti-blind.txt
Normal file
25
anti-blind.txt
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Reference in a new issue