• TTTPrepareRound hook is not working
    0 replies, posted
I have this code: [CODE]local PrepareSounds = { "p01.mp3", "p02.mp3", "p03.mp3", "p04.mp3", "p05.mp3" } for k, v in pairs (PrepareSounds) do resource.AddFile("sound/"..v) util.PrecacheSound("sound/"..v) end local function PlayPrepareSound() BroadcastLua('surface.PlaySound("'..PrepareSounds[math.random(1, #PrepareSounds)]..'")') end hook.Add("TTTPrepareRound", "SoundPrepareRound", PlayPrepareSound)[/CODE] And it doesn't work. But If I replace TTTPrepareRound with TTTBeginRound it magically works! I suppose it is a TTT code issue.
Sorry, you need to Log In to post a reply to this thread.