Advertisement
Guest User

Untitled

a guest
Mar 14th, 2015
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. local taunts = {}
  2.  
  3. function addTaunt(cat, soundFile,)
  4.     if !taunts[cat] then
  5.         taunts[cat] = {}
  6.     end
  7.     local t = {}
  8.     t.sound = soundFile
  9.     t.category = cat
  10.     table.insert(taunts[cat], t)
  11. end
  12.  
  13. addTaunt("help", "vo/npc/male01/help01.wav",)
  14.  
  15. addTaunt("scream", "vo/npc/male01/runforyourlife01.wav")
  16. addTaunt("scream", "vo/npc/male01/runforyourlife02.wav")
  17. addTaunt("scream", "vo/npc/male01/runforyourlife03.wav")
  18. addTaunt("scream", "vo/npc/male01/watchout.wav")
  19. addTaunt("scream", "vo/npc/male01/gethellout.wav")
  20.  
  21. addTaunt("morose", "vo/npc/female01/question31.wav")
  22. addTaunt("morose", "vo/npc/male01/question30.wav")
  23. addTaunt("morose", "vo/npc/male01/question20.wav")
  24. addTaunt("morose", "vo/npc/male01/question25.wav")
  25. addTaunt("morose", "vo/npc/male01/question15.wav")
  26.  
  27. addTaunt("funny", "vo/npc/male01/doingsomething.wav")
  28. addTaunt("funny", "vo/npc/male01/busy02.wav")
  29. addTaunt("funny", "vo/npc/male01/gordead_ques07.wav")
  30. addTaunt("funny", "vo/npc/male01/notthemanithought01.wav")
  31. addTaunt("funny", "vo/npc/male01/notthemanithought02.wav")
  32. addTaunt("funny", "vo/npc/male01/question06.wav")
  33. addTaunt("funny", "vo/npc/male01/question09.wav")
  34.  
  35. concommand.Add("mu_taunt", function (ply, com, args, full)
  36.     if ply.LastTaunt && ply.LastTaunt > CurTime() then return end
  37.     if !ply:Alive() then return end
  38.     if ply:Team() != 2 then return end
  39.  
  40.     if #args < 1 then return end
  41.     local cat = args[1]:lower()
  42.     if !taunts[cat] then return end
  43.  
  44.  
  45.     local taunt = table.Random(taunts[cat])
  46.     ply:EmitSound(taunt.sound)
  47.  
  48.     ply.LastTaunt = CurTime() + SoundDuration(taunt.sound) + 0.3
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement