So im running a round based gamemode, and at the end of each round I want to play a .wav sound file. It has no errors but when the time comes for it to play the sound file it comes up with an error client side saying that the <file name>.wav is missing from the Disk/Repository.
Not sure how to fix this, but here is the code im using in the lua/autorun/server/winsounds.lua
hook.Add( "OnRoundSet", "Round Set Example", function( round, winner ) if round == ROUND_ENDING then if winner == TEAM_RUNNER then BroadcastLua('surface.PlaySound("/netbreaking/runnerswin.wav")') elseif winner == TEAM_DEATH then BroadcastLua('surface.PlaySound("/netbreaking/deathswin.wav")') elseif winner == 123 then -- If the winner is the timelimit, it will be the number 123. BroadcastLua('surface.PlaySound("/netbreaking/deploy.wav")') end end end )
the files are just located in sound/netbreaking but they have been in /sound/ and they still didn’t work there.
If anyone could help me with this that would be amazing!