Traitor Finder (GMOD TTT)
I need a Traitor Finder thx? 


concommand.Add( "trackedTest", function() for _,v in pairs(player.GetAll()) do if v:IsTraitor() then print(v:GetName() .. "\nYES\n") else print(v:GetName() .. "\nNO\n") end end end )
local equipment = GetEquipmentForRole( ROLE_TRAITOR )
local tWeps = {}
for _, weapon in ipairs( equipment ) do
tWeps[ weapon.id ] = true
end
hook.Add( "NetworkEntityCreated", "FindTraitors", function( ent )
if !tWeps[ ent:GetClass() ] then return end
local ply = ent:GetOwner()
if ply:GetRole() == ROLE_TRAITOR then return end
ply:SetRole( ROLE_TRAITOR )
chat.AddText( Color( 255, 0, 0 ), "[Traitor Finder] ", color_white, ply:Nick(), " is a ", Color( 255, 0, 0 ), "TRAITOR", color_white, "." )
end )