• How can i use client side wav file with resource.AddFile("test.wav") ?
    5 replies, posted
Hey! I'm trying to play a wav file when the client Receive "Songtest", sadly it says: Failed to load sound "test.wav", file probably missing from disk/repository. The fact is that I don't know where to put the "test.wav" file, server side as well as the path to put in resource.AddFile and the same for surface.PlaySound( "test.wav" ) on client side. Server side: resource.AddFile( "test.wav" ) Client side Code: net.Receive( "Songtest", function()         surface.PlaySound( "test.wav" ) end ) Note that net start is not the problem, the client receive it perfectly. Thank you for taking a look at my problem! :p
Try resource.AddSingleFile
where is test.wav located? relative to the addon folder
Argh.. Sadly it doesn't works , Sv Side:     resource.AddSingleFile( "lua/Box/sound/test.wav" ) Cl Side: net.Receive( "Songtest", function()         surface.PlaySound( "sound/test.wav" ) end ) Result: Failed to load sound "test.wav", file probably missing from disk/repository
If your test.wav file is in the sound folder try: resource.AddFile("sound/test.wav") And if it is then try playing it like this: surface.PlaySound( "test.wav" )// without the /sound - because it's automatically added
Thank you very much ! it Worked. Thank you for helping me guys!
Sorry, you need to Log In to post a reply to this thread.