• Require client to download sound file upon connecting
    13 replies, posted
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.
[QUOTE=milkyway;16441572]Try Coding a lua download list. Make it so when player joins, downloads speciffic files to a speciffic location.[/QUOTE] 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
[QUOTE=Benji;16473920]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.[/QUOTE] Thanks. [editline]10:31AM[/editline] [QUOTE=Benji;16473920]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.[/QUOTE] 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
[QUOTE=compwhizii;16545865]Yes you can have multiple lines in one doc. Don't inlude the FTP address. just the sound/siren.mp3[/QUOTE] Oh ok so its would just be resource.AddFile(sound/siren.mp3)?
yes.
No it would be [lua]resource.AddFile("sound/siren.mp3")[/lua]
[QUOTE=ecabc;16552053]No it would be [lua]resource.AddFile("sound/siren.mp3")[/lua][/QUOTE] Ahh Ok thanks.
Sorry, you need to Log In to post a reply to this thread.