Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2024, 08:36:59 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Custom Sounds not working
Pages: [1]
Author Topic: Custom Sounds not working  (Read 2859 times)
christopher92
Poster

Posts: 4


« on: October 24, 2010, 10:28:39 PM »

Hey, i am trying to put two custom sound files into the ttt script to play then the round ends

i edited the part in cl_init.lua to

--- optional sound cues on round start and end
CreateConVar("ttt_cl_soundcues", "0")

local cues = {
  Sound("ttt/your_team_win.mp3"),
  Sound("ttt/your_team_lost.mp3")
};
local function PlaySoundCue()
  if GetConVar("ttt_cl_soundcues"):GetBool() then
      surface.PlaySound(table.Random(cues))
  end
end

GM.TTTBeginRound = PlaySoundCue
GM.TTTEndRound = PlaySoundCue


but it doesn't work or they can't download the files 2 sounds files when connecting to the server

can anyone tell me if its correct or is there anything wrong?
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #1 on: October 25, 2010, 12:35:24 PM »

Make your files with a different name, go into resources.lua and add resource.AddFile("sound/NAME.mp3")

Then get your players to enable ttt_cl_soundcues.

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Custom Sounds not working « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.011 seconds with 17 queries.