Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Put this in lua/autorun/client/
- local function Check()
- for key,ply in pairs(player.GetAll()) do
- for key2, wep in pairs(ply.GetWeapons()) do
- DoWeapon(wep,ply)
- emd
- end
- timer.Simple(1,Check)
- end
- local function DoWeapon(wep,owner)
- if wep:TraitorWeapon() then
- if wep.TTTCHECKED == nil then
- wep.TTTCHECKED = true
- local str = owner:Name() .. " " .. wep:GetClass()
- chat.AddText(Color(255,0,0), str)
- end
- end
- end
- local function _R.Entity:TraitorWeapon()
- if !ValidEntity(self) || !self:IsWeapon() then return false end
- if self.Role == {ROLE_TRAITOR} then
- return true
- end return false
- end
- Check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement