Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 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. Check()
  14.  
  15. local function DoWeapon(wep,owner)
  16. if wep:TraitorWeapon() then
  17. if wep.TTTCHECKED == nil then
  18. wep.TTTCHECKED = true
  19. print(owner:Name() .. " " .. wep:GetClass())
  20. end
  21. end
  22. end
  23.  
  24. local function _R.Entity:TraitorWeapon()
  25. if !ValidEntity(self) || !self:IsWeapon() then return false end
  26. if self.Role == {ROLE_TRAITOR} then
  27. return true
  28. end return false
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement