TTT Traitor Finder (untested)
I don't play this game anymore, I didn't test this, this will only work in TTT but a friend wanted a traitor detector so I stole the one from SethHack
Let me know of any issues and I'll look into it.
Code:
local traitors = {}
local _R = debug.getregistry()
if(_G.KARMA) then
for k, v in ipairs(player.GetAll()) do
if(v:Alive() and not table.HasValue(traitors, v)) then
for x, y in pairs(_R.Player.GetWeapons(v)) do
if(IsValid(y)) then
if(y.CanBuy and table.HasValue(y.CanBuy, ROLE_TRAITOR)) then
table.insert(traitors, v);
chat.AddText(Color(100, 100, 100),
"[Gay Traitor Finder] ", Color(255, 10, 10), v:Nick() .. " has traitor weapon " .. y:GetClass() .. "!"
);
end
end
end
end
end
end
