Advertisement
Exho

Untitled

Jul 31st, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. --ExhoRoxMySox
  2. AddCSLuaFile()
  3.  
  4. hook.Add("PlayerSay", "TTTTraitorGrabber", function(ply, text)
  5. local text = string.lower(text)
  6. if ( string.sub( text, 1, 11 ) == "!gettraitor" ) then
  7. if (ply:IsSpec() or not ply:Alive()) then
  8. local traitors = {}
  9. for k,v in pairs(player.GetAll()) do
  10. if v:GetRole() == ROLE_TRAITOR then
  11. table.insert(traitors, v:Nick() )
  12. end
  13. end
  14. ply:ChatPrint("The Traitors are "..table.concat(traitors, ", ") )
  15. else
  16. ply:ChatPrint("You cannot use this command while alive!")
  17. end
  18. return false
  19. end
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement