AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sound.res? sound management (https://forums.alliedmods.net/showthread.php?t=46605)

Spiky Pirate 10-29-2006 18:00

sound.res? sound management
 
I have some sounds that i added to the server recently, and people told me to use sound.res so that my clients can download the sounds from the server. So I made a file called, "sound.res" and put it in right under sound folder. But for some reason, my clients still don't get to download the sounds from the server...

Here's what I have in my sound.res
sound/misc/multikill.wav
sound/misc/ultrakill.wav
sound/misc/killingspree.wav
sound/misc/monsterkill.wav
sound/misc/godlike.wav
sound/misc/scatman.wav

I just can't find any errors..

SweatyBanana 10-30-2006 00:00

Re: sound.res? sound management
 
.res files are called when the mapname equals the .res name..

When the map is changed to de_dust2, if de_dust2.res exists, it will make all clients that connect to the server as long as it is dust2 download all files within de_dust2.res

If you want it for every map,

PHP Code:

plugin_precache()
{
     
precache_sound(const sound)



Spiky Pirate 11-01-2006 16:17

Re: sound.res? sound management
 
do you type those lines and save as what?

Nostrodamous 11-01-2006 23:35

Re: sound.res? sound management
 
yes a res file is like a computer genreated list that tells the server what files the user has to downlaod in order to use , lets say a certain map .

XxAvalanchexX 11-02-2006 00:06

Re: sound.res? sound management
 
SweatyBanana already explained to you how .res files work. You can't do what you want with them, unless you make a .res file for every single map on your server that includes those sounds, which would be inefficient. This is how you would do it with a plugin:

Code:
 #include <amxmodx>  public plugin_init()  {     register_plugin("Precache","0.00","---");  }  public plugin_precache()  {     precache_sound("misc/multikill.wav");     precache_sound("misc/ultrakill.wav");     precache_sound("misc/killingspree.wav");     precache_sound("misc/monsterkill.wav");     precache_sound("misc/godlike.wav");     precache_sound("misc/scatman.wav");  }

I believe SweatyBanana was trying to only give you a hint, so that you would do it on your own (which is a good teaching method), but I get the impression that you aren't a scripter, and that this should in fact be in another forum.

Spiky Pirate 11-05-2006 19:30

Re: sound.res? sound management
 
well some people were tellng me that i could simply make sounds.res so that it can manage all the sound files in the server. The line about precache_sound you provided above, where do they go to?

SweatyBanana 11-05-2006 20:41

Re: sound.res? sound management
 
That is the source code to a plugin to make clients download all files within the plugin_precache() function.

You need to compile the source code into a plugin. :wink:

Spiky Pirate 11-07-2006 13:27

Re: sound.res? sound management
 
but where do i do this at?
in what file? I am confused.. sorry

SweatyBanana 11-07-2006 16:19

Re: sound.res? sound management
 
Either in the amxmodx/scripting/ folder of your server or http://www.amxmodx.org/webcompiler.cgi

Spiky Pirate 11-07-2006 16:34

Re: sound.res? sound management
 
those lines that avalanche gave to me, do i need to make a new file and add those lines in there?? And create my own plugin? I am pretty new to this stuff, so kinda need specific help

Also, I get an impression that you guys are suggesting me to make a whole new plugin for this.. Is there a way to do w.o making my own plugin


All times are GMT -4. The time now is 04:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.