Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // Put this in lua/autorun/client/
  2.  
  3. local function Check()
  4.  
  5. for key,ply in pairs(player.GetAll()) do
  6. for key2, wep in pairs(ply.GetWeapons()) do
  7. DoWeapon(wep,ply)
  8. emd
  9. end
  10.  
  11. timer.Simple(1,Check)
  12. end
  13.  
  14.  
  15. local function DoWeapon(wep,owner)
  16. if wep:TraitorWeapon() then
  17. if wep.TTTCHECKED == nil then
  18. wep.TTTCHECKED = true
  19. local str = owner:Name() .. " " .. wep:GetClass()
  20. chat.AddText(Color(255,0,0), str)
  21. end
  22. end
  23. end
  24.  
  25. local function _R.Entity:TraitorWeapon()
  26. if !ValidEntity(self) || !self:IsWeapon() then return false end
  27. if self.Role == {ROLE_TRAITOR} then
  28. return true
  29. end return false
  30. end
  31.  
  32. Check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement