Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //adding your sound files here
- resource.AddFile(“sound/gfl/innoSampleMP3-1.mp3”)
- resource.AddFile(“sound/gfl/innoSampleMP3-2.mp3”)
- resource.AddFile(“sound/gfl/innoSampleMP3-3.mp3”)
- resource.AddFile(“sound/gfl/innoSampleMP3-4.mp3”)
- resource.AddFile(“sound/gfl/traitorSampleMP3-1.mp3”)
- resource.AddFile(“sound/gfl/traitorSampleMP3-2.mp3”)
- resource.AddFile(“sound/gfl/traitorSampleMP3-3.mp3”)
- resource.AddFile(“sound/gfl/traitorSampleMP3-4.mp3”)
- resource.AddFile(“sound/gfl/timeSampleMP3-1.mp3”)
- resource.AddFile(“sound/gfl/timeSampleMP3-2.mp3”)
- resource.AddFile(“sound/gfl/timeSampleMP3-3.mp3”)
- resource.AddFile(“sound/gfl/timeSampleMP3-4.mp3”)
- /pre caching your sounds here
- util.PrecacheSound(“sound/gfl/innoSampleMP3-1.mp3”)
- util.PrecacheSound (“sound/gfl/innoSampleMP3-2.mp3”)
- util.PrecacheSound (“sound/gfl/innoSampleMP3-3.mp3”)
- util.PrecacheSound (“sound/gfl/innoSampleMP3-4.mp3”)
- util.PrecacheSound (“sound/gfl/traitorSampleMP3-1.mp3”)
- util.PrecacheSound (“sound/gfl/traitorSampleMP3-2.mp3”)
- util.PrecacheSound (“sound/gfl/traitorSampleMP3-3.mp3”)
- util.PrecacheSound (“sound/gfl/traitorSampleMP3-4.mp3”)
- util.PrecacheSound (“sound/gfl/timeSampleMP3-1.mp3”)
- util.PrecacheSound (“sound/gfl/timeSampleMP3-2.mp3”)
- util.PrecacheSound (“sound/gfl/timeSampleMP3-3.mp3”)
- util.PrecacheSound (“sound/gfl/timeSampleMP3-4.mp3”)
- //this creates the “sound table”, or where all the music gets put in so
- // the table.random can randomly select from here
- //inno sound table
- local soundTable = {insertInnoVariableHere={"innnoSampleMP3-1.mp3", " innoSampleMP3-2.mp3", " innoSampleMP3-3.mp3", " innoSampleMP3-4.mp3"},
- //traitor sound table
- insertTraitorVariableHere={"traitorSampleMP3-1.mp3", " traitorSampleMP3-2.mp3", " traitorSampleMP3-3.mp3", " traitorSampleMP3-4.mp3"},
- //time win sound table
- insertWinByTimeVariableHere={" timeSampleMP3-1.mp3", " timeSampleMP3-2.mp3", " timeSampleMP3-3.mp3", " timeSampleMP3-1.mp4"}}
- local function PlaySound(winType)
- if winType == WIN_INNOCENT then
- BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertInnoVariableHere])..'")')
- elseif wintype == WIN_TRAITOR then
- BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertTraitorVariableHere])..'")')
- elseif wintype == WIN_TIMELIMIT then
- BroadcastLua('surface.PlaySound("'..table.Random(soundTable[insertWinByTimeVariableHere])..'")')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement