Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. //adding your sound files here
  2. resource.AddFile(“sound/gfl/innoSampleMP3-1.mp3”)
  3. resource.AddFile(“sound/gfl/innoSampleMP3-2.mp3”)
  4. resource.AddFile(“sound/gfl/innoSampleMP3-3.mp3”)
  5. resource.AddFile(“sound/gfl/innoSampleMP3-4.mp3”)
  6. resource.AddFile(“sound/gfl/traitorSampleMP3-1.mp3”)
  7. resource.AddFile(“sound/gfl/traitorSampleMP3-2.mp3”)
  8. resource.AddFile(“sound/gfl/traitorSampleMP3-3.mp3”)
  9. resource.AddFile(“sound/gfl/traitorSampleMP3-4.mp3”)
  10. resource.AddFile(“sound/gfl/timeSampleMP3-1.mp3”)
  11. resource.AddFile(“sound/gfl/timeSampleMP3-2.mp3”)
  12. resource.AddFile(“sound/gfl/timeSampleMP3-3.mp3”)
  13. resource.AddFile(“sound/gfl/timeSampleMP3-4.mp3”)
  14.  
  15. /pre caching your sounds here
  16. util.PrecacheSound(“sound/gfl/innoSampleMP3-1.mp3”)
  17. util.PrecacheSound (“sound/gfl/innoSampleMP3-2.mp3”)
  18. util.PrecacheSound (“sound/gfl/innoSampleMP3-3.mp3”)
  19. util.PrecacheSound (“sound/gfl/innoSampleMP3-4.mp3”)
  20. util.PrecacheSound (“sound/gfl/traitorSampleMP3-1.mp3”)
  21. util.PrecacheSound (“sound/gfl/traitorSampleMP3-2.mp3”)
  22. util.PrecacheSound (“sound/gfl/traitorSampleMP3-3.mp3”)
  23. util.PrecacheSound (“sound/gfl/traitorSampleMP3-4.mp3”)
  24. util.PrecacheSound (“sound/gfl/timeSampleMP3-1.mp3”)
  25. util.PrecacheSound (“sound/gfl/timeSampleMP3-2.mp3”)
  26. util.PrecacheSound (“sound/gfl/timeSampleMP3-3.mp3”)
  27. util.PrecacheSound (“sound/gfl/timeSampleMP3-4.mp3”)
  28.  
  29.  
  30.  
  31. //this creates the “sound table”, or where all the music gets put in so
  32. // the table.random can randomly select from here
  33.  
  34. //inno sound table
  35. local soundTable = {insertInnoVariableHere={"innnoSampleMP3-1.mp3", " innoSampleMP3-2.mp3", " innoSampleMP3-3.mp3", " innoSampleMP3-4.mp3"},
  36.  
  37. //traitor sound table
  38. insertTraitorVariableHere={"traitorSampleMP3-1.mp3", " traitorSampleMP3-2.mp3", " traitorSampleMP3-3.mp3", " traitorSampleMP3-4.mp3"},
  39.  
  40. //time win sound table
  41. insertWinByTimeVariableHere={" timeSampleMP3-1.mp3", " timeSampleMP3-2.mp3", " timeSampleMP3-3.mp3", " timeSampleMP3-1.mp4"}}
  42.  
  43. local function PlaySound(winType)
  44. if winType == WIN_INNOCENT then
  45. BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertInnoVariableHere])..'")')
  46. elseif wintype == WIN_TRAITOR then
  47. BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertTraitorVariableHere])..'")')
  48. elseif wintype == WIN_TIMELIMIT then
  49. BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertWinByTimeVariableHere])..'")')
  50. end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement