Advertisement
Exho

Untitled

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