Require client to download sound file upon connecting

How can i make it so a client has to download a sound? Or any other file?
Thanks.

Yes agreed. im trying to figure this out too. but not just sounds. models and materials and lua also

Try Coding a lua download list. Make it so when player joins, downloads speciffic files to a speciffic location.

Could you throw a link on how to code it?

I dont no much about lua…so…im not quite sure.

You have to use LUA to do this.

In the garrysmod/garrysmod/lua/autorun/server/ folder, create a new file called something.lua
Open the file and add in this code:
[lua]resource.AddFile(“file path here”)[/lua]

*Note that the file something.lua can be named anything you want.

i dont see a code after you colon is it because there is none or i cant see it im confused but im haveing this problem on my server as well i wish to enforce model downloading on my server

Thanks.

[editline]10:31AM[/editline]

So it would be
resource.AddFile(orangebox/garrysmod/sound/siren.mp3?

Can i Have multiple Addfile Downloads in one Lua document? And Since its dedicatd, do i need to include the Ftp Address?

So it would be (Ftp Address)/orangebox/garrysmod/sound/siren.mp3

Yes you can have multiple lines in one doc. Don’t inlude the FTP address. just the sound/siren.mp3

Oh ok so its would just be
resource.AddFile(sound/siren.mp3)?

yes.

No it would be
[lua]resource.AddFile(“sound/siren.mp3”)[/lua]

Ahh Ok thanks.