• If Checks not returning properly
    1 replies, posted
[CODE]local function SpectatorOutlines() if !LocalPlayer():IsTerror() then for k, v in pairs( player.GetAll() ) do if v:IsRole(TEAM_TRAITOR) then halo.Add( ents.FindByClass( "player" ), Color( 255, 0, 0 ), 1, 1, 0.5, 1, 1 ) elseif v:IsRole(ROLE_DETECTIVE) then halo.Add( ents.FindByClass( "player" ), Color( 0, 0, 255 ), 1, 1, 0.5, 1, 1 ) elseif v:IsRole(ROLE_INNOCENT) then halo.Add( ents.FindByClass( "player" ), Color( 0, 255, 0 ), 1, 1, 0.5, 1, 1 ) end end end end hook.Add( "PreDrawHalos", "TTTSpectatorOutlines", SpectatorOutlines)[/CODE] That is the current code. As you can see, it's trying to based on the role, draw an outline around them to those who are dead. Yet it only draws them as green, I have a feeling I'm being foolish and doing the table wrong.
Traitors are stored serverside, unless sent to all clients, which would be a stupid thing to do. If you check in TTT's code, if you're a Traitor when the round starts, the game will send you a usermessage telling you who all your other Traitor buddies are.
Sorry, you need to Log In to post a reply to this thread.