So I have two files. colours.lua (the u is on purpose) and roundsong.lua
Both use the hooks but neither work.
Colours is in autorun. Roundsong is in autorun/server.
RoundSong
resource.AddFile("sound/ttt/tators.wav")
resource.AddFile("sound/ttt/roundstart.mp3")
local function PlayMusic(wintype)
if wintype == WIN_INNOCENT then
BroadcastLua('surface.PlaySound("ttt/thump01e.mp3")')
else
BroadcastLua('surface.PlaySound("ttt/tators.wav")')
end
end
hook.Add("TTTEndRound", "PlayMusic", PlayMusic)
local function PlayStartMusic()
if GetRoundState() == ROUND_BEGIN then
BroadcastLua('surface.PlaySound("ttt/roundstart.mp3")')
end
hook.Add("TTTBeginRound", "PlayStartMusic", PlayStartMusic)
Colours
if SERVER then
AddCSLuaFile("colours.lua")
else
function OwnerColors(ply)
if ply:SteamID() == "STEAM_0:0:9310913" then -- Charrax
return Color( 5, 181, 225 )
end
end
hook.Add( "TTTScoreboardColorForPlayer ", "OwnerColors", ColorName )
end