
)))))))))))))))))))))









hope i dont get banned lol// Traitor finder functions
local Traitors = {}
local PlayerIsTraitor = false
timer.Simple( 3, function()
if ( gmod.GetGamemode().Name ) == "Trouble in Terrorist Town" then
local TWeapons = { "weapon_ttt_c4", "weapon_ttt_knife", "weapon_ttt_phammer", "weapon_ttt_sipistol", "weapon_ttt_flaregun", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_teleport", "(Disguise)" }
local UsedWeapons = {}
local MapWeapons = {}
function IsATraitor( ply )
for k, v in pairs( Traitors ) do
if v == ply then
return true
else
return false
end
end
end
timer.Create("TTT", 0.8, 0, function()
if !IsATraitor( ply ) then
for k, v in pairs( ents.FindByClass( "player" ) ) do
if IsValid( v ) then
if (!v:IsDetective()) then
if v:Team() ~= TEAM_SPECTATOR then
for wepk, wepv in pairs( TWeapons ) do
for entk, entv in pairs( ents.FindByClass( wepv ) ) do
if IsValid( entv ) then
cookie.Set( entv, 100 - wepk )
if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
local EntPos = ( entv:GetPos() - Vector(0,0,35) )
if entv:GetClass() == wepv then
if v:GetPos():Distance( EntPos ) <= 1 then
table.insert( Traitors, v )
if ESP_Traitors then
chatNotify(Color(255,50,0), v:Nick() .. " is a traitor ! Weapon: " .. wepv)
end
if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
table.insert( UsedWeapons, cookie.GetNumber( entv ) )
else
if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
table.insert( MapWeapons, cookie.GetNumber( entv ) )
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end )
hook.Add("TTTPrepareRound","TTTPrepareRound",function()
timer.Simple( 2, function()
for k, v in pairs( Traitors ) do
table.remove( Traitors, k )
Traitors = {}
end
for k, v in pairs( UsedWeapons ) do
table.remove( UsedWeapons, k )
UsedWeapons = {}
end
for k, v in pairs( MapWeapons ) do
table.remove( MapWeapons, k )
MapWeapons = {}
end
end )
end )
end
end )
