daily pastebin goal
56%
SHARE
TWEET

t detector scrip

Caliber_ Jul 21st, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local matOverlay = Material( "sprites/glow08" )
  2. local matTraitor = Material( "sprites/dot" )
  3. local twep = {"spiderman's_swep", "weapon_ttt_trait_defilibrator", "weapon_ttt_xbow", "weapon_ttt_dhook", "weapon_awp", "weapon_ttt_ak47", "weapon_jihadbomb", "weapon_ttt_knife", "weapon_ttt_c4", "weapon_ttt_decoy", "weapon_ttt_flaregun", "weapon_ttt_phammer", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_sipistol", "weapon_ttt_teleport", "weapon_ttt_awp", "weapon_mad_awp", "weapon_real_cs_g3sg1", "weapon_ttt_cvg_g3sg1", "weapon_ttt_g3sg1", "weapon_ttt_healthstation5", "weapon_ttt_sentry", "weapon_ttt_poison_dart", "weapon_ttt_trait_defibrillator"}
  4.  
  5. for _,v in pairs(player.GetAll()) do
  6. v.HatTraitor = nil
  7. end
  8. for _,v in pairs(ents.GetAll()) do
  9. v.HatESPTracked = nil
  10. end
  11.  
  12. hook.Add("PostDrawOpaqueRenderables", "wire_animations_idle", function()
  13. if GAMEMODE.round_state != ROUND_ACTIVE then
  14. for _,v in pairs(player.GetAll()) do
  15. v.HatTraitor = nil
  16. end
  17. for _,v in pairs(ents.GetAll()) do
  18. v.HatESPTracked = nil
  19. end
  20. return
  21. end
  22. for _,v in pairs( ents.GetAll() ) do
  23. if v and IsValid(v) and (table.HasValue(twep, v:GetClass()) and !v.HatESPTracked) then
  24. local pl = v.Owner
  25. if pl and IsValid(pl) and pl:IsTerror() then
  26. if pl:IsDetective() then
  27. v.HatESPTracked = true
  28. else
  29. v.HatESPTracked = true
  30. pl.HatTraitor = true
  31. chat.AddText( pl, Color(255,125,0), " is a ",Color(255,0,0), "TRAITOR",Color(255,125,0), " with a ",Color(255,0,0),v:GetClass().."!")
  32. end
  33. end
  34. end
  35. end
RAW Paste Data
Top