So I am getting this glitch that when my traitor glow's are activated they make the whole viewmodel black.
I am using spy's Customizeable Weaponry on the server. This does not happen on the regular ttt weapons.
Heres a video of the glitch:
[url]https://www.youtube.com/watch?v=91uk7MFsgQM[/url]
Here is the code of the glows, this file is in both client and server.
[LUA]local msg_name = "Halos_inform"
if SERVER then
AddCSLuaFile()
util.AddNetworkString(msg_name)
hook.Add("PlayerDeath", "PlayerDeathHalos", function(ply)
net.Start(msg_name)
net.WriteEntity(ply)
net.Send(GetTraitors())
end)
else
local rolestable = {}
hook.Add("TTTEndRound", "TTTEndRoundResetTable", function()
table.Empty(rolestable)
end)
hook.Add("TTTBeginRound", "TTTBeginRoundHalos", function()
timer.Simple(3,function()
for k,v in pairs(player.GetAll()) do
if v:GetRole() != ROLE_TRAITOR then continue end
table.insert(rolestable, v)
end
end)
end)
hook.Add("PreDrawHalos", "AddTraitorHalos", function()
if LocalPlayer():IsActiveTraitor() then
halo.Add(rolestable, Color(255,50,50), 2, 2, 2, true, true)
end
end)
net.Receive(msg_name, function()
local ent = net.ReadEntity()
for k,v in pairs(rolestable) do
if v == ent then
table.remove(rolestable, k)
end
end
end)
end[/LUA]
This is a viewmodel shading glitch and probably can't be fixed, especially only if it happens on some models.
[QUOTE=code_gs;45504049]This is a viewmodel shading glitch and probably can't be fixed, especially only if it happens on some models.[/QUOTE]
It happens with every single CW weapon when traitor. When I delete the glows they work fine.
[LUA]if SERVER then
AddCSLuaFile()
util.AddNetworkString("TTTG.UpdateTraitors")
hook.Add("DoPlayerDeath", "TTTG.DoPlayerDeath", function(ply, attacker, dmginfo)
if !ply:GetTraitor() then return end
net.Start("TTTG.UpdateTraitors")
net.WriteEntity(ply)
net.Broadcast(GetTraitors())
end)
else
local TraitorsOutline = {}
net.Receive("TTTG.UpdateTraitors", function(len, ply)
local deadTraitor = net.ReadEntity()
if !IsValid(deadTraitor) then return end
local key = table.KeyFromValue(TraitorsOutline, deadTraitor)
local traitor = TraitorsOutline[key]
if traitor then
table.remove(TraitorsOutline, key)
end
end)
hook.Add("TTTBeginRound", "TTTG.TTTBeginRound", function()
table.Empty(TraitorsOutline)
local ply = LocalPlayer()
if !ply:GetTraitor() then return end
for k,v in ipairs(player.GetAll()) do
if v:GetTraitor() and v != ply then
table.insert(TraitorsOutline, v)
end
end
end)
hook.Add("PreDrawHalos", "TTTG.PreDrawHalos", function()
if !TraitorsOutline or #TraitorsOutline < 1 then return end
halo.Add(TraitorsOutline, Color(255, 0, 0), 2, 2, 2, false, false)
end)
end[/LUA] thats another ttt glow for traitors but doesn't have see through wall outline. only a see through wall t symbol. put that in a lua file then client/server
so if anyone can just add the wall see through t outline thnx.
There has to be some way to fix this like make sure it has no effect on view models or something?
Bump
Sorry, you need to Log In to post a reply to this thread.