Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if client:IsTraitor() and GetRoundState() == ROUND_ACTIVE then
- target_traitor = ent:IsTraitor() -- We only set this to true IF THE CLIENT TRAITOR
- -- This means Traitors will still see fake Detectives as Traitors
- end
- -- I overrode IsDetective(), fake Detectives will return true
- -- and because we only set target_traitor is the client is a traitor, then everyone else should see fake detectives
- target_detective = GetRoundState() > ROUND_PREP and ent:IsDetective() or false
- -- ... some lines of code that are irrelevant
- -- You can see, we check if target_traitor first. If it's true, short circuit evaluation means we don't care about
- -- target_detective.
- if target_traitor or target_detective then
- surface.SetTexture(ring_tex)
- -- Again we check if target_traitor first, so Traitor players will still always see fake Detectives as Traitors
- if target_traitor then
- surface.SetDrawColor(255, 0, 0, 200)
- else
- surface.SetDrawColor(0, 0, 255, 220)
- end
- surface.DrawTexturedRect(x-32, y-32, 64, 64)
- end
Advertisement
Add Comment
Please, Sign In to add comment