Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 11:19:42 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: How do I change the round start and end songs?
Pages: [1]
Author Topic: How do I change the round start and end songs?  (Read 3864 times)
Charrax
Poster

Posts: 6


« on: July 07, 2011, 02:33:04 AM »

I tried putting them in the folder with the "thump" sounds and changing the name in the cl_init to match the new song names. (line 150-164).

How can I change the sounds correctly?

Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: July 07, 2011, 02:51:17 AM »

local function PlayMusic(wintype)
  if wintype == WIN_INNOCENT then
      BroadcastLua('surface.PlaySound("nnjg/detective.mp3")')
  else
      BroadcastLua('surface.PlaySound("nnjg/pwnedftw.mp3")')
  end
end
hook.Add("TTTEndRound", "MyMusic", PlayMusic)


Change to what you want, lua/autorun/server
Charrax
Poster

Posts: 6


« Reply #2 on: July 07, 2011, 03:05:45 AM »

local function PlayMusic(wintype)
  if wintype == WIN_INNOCENT then
     BroadcastLua('surface.PlaySound("nnjg/detective.mp3")')
  else
     BroadcastLua('surface.PlaySound("nnjg/pwnedftw.mp3")')
  end
end
hook.Add("TTTEndRound", "MyMusic", PlayMusic)


Change to what you want, lua/autorun/server


Thanks!

But what about round start?
« Last Edit: July 07, 2011, 03:09:56 AM by Charrax »
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #3 on: July 07, 2011, 03:26:20 AM »

Quote
TTTPrepareRound (no parameters)
Shared
Called when the "Preparing" phase begins.

TTTBeginRound (no parameters)
Shared
Called when Traitors/Detectives have been selected and the round is active.


http://ttt.badking.net/guides/hooks
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: How do I change the round start and end songs? « 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.009 seconds with 18 queries.