AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Background Sounds (https://forums.alliedmods.net/showthread.php?t=166562)

nikhilgupta345 09-05-2011 01:05

Background Sounds
 
4 Attachment(s)
Background Sounds

By: nikhilgupta345

Description:
This plugin enables you to play map-specific or general background music on your server during the round. It will start playing at the beginning of the round, and stop at when the round ends.

This plugin supports both .mp3 and .wav file, and also prevents the server from crashing if the sound files do not exist. A message will be logged about which file is missing, so you can easily find out which file needs to be uploaded.

Installation:
    • Click 'Get Plugin' link below
    • Place 'background_sounds.amxx' in addons/amxmodx/plugins/ folder
    • Open addons/amxmodx/configs/plugins.ini and add the line 'background_sounds.amxx' at the bottom
    • If you wish to have specific sounds play on a certain map, create a new folder called sounds in your configs folder. (addons/amxmodx/configs/sounds), and then create a new ini file with the mapname. (Ex. de_dust2.ini)

      DO NOT INCLUDE THE SOUND DIRECTORY IN THE FILE NAME

      Example file
      de_dust2.ini
      Code:

      my_sound1.mp3
      my_sound2.mp3
      my_sound3.wav

    • If you are using the default sounds from below, click on 'resources.zip' from below and extract it to your cstrike folder.
    • Restart server or change map

Cvars:
    • ba_ambience <0/1> <default:1> - Turns plugin on or off
    • ba_sound_change <any number greater than 1> <default:1> - how often a new sound is chosen to be played

Changelog:

Code:

September 05, 2011 - v1.0 -    Initial release
September 06, 2011 - v1.0.1 -  Fixed bug with death sounds not playing at the end of the round


Credits:



ConnorMcLeod 09-05-2011 01:13

Re: Background Sounds
 
precache_sound native and spk command only work without "sound/" in the path, you mustn't include it.

r0ck 09-05-2011 01:29

Re: Background Sounds
 
or use precache_generic

nikhilgupta345 09-05-2011 01:30

Re: Background Sounds
 
Quote:

Originally Posted by ConnorMcLeod (Post 1548446)
precache_sound native and spk command only work without "sound/" in the path, you mustn't include it.

For the precache_sound, I'm not precaching with the sound directory in the path, but I see that I am using it in the spk. Uploading fix.

EDIT: Uploaded.

ConnorMcLeod 09-05-2011 02:10

Re: Background Sounds
 
PHP Code:

        new szPath256 ];
        
formatexszPathcharsmaxszPath ), "sound/%s"szBuffer );
        
        
client_cmd0"spk ^"%s^""szPath ); 

I'm still seeing that.
Also, maybe you should use "speak" instead of "spk", then you don't need to send stopsound (will stop all sound that's bad).

nikhilgupta345 09-05-2011 02:36

Re: Background Sounds
 
Quote:

Originally Posted by ConnorMcLeod (Post 1548462)
PHP Code:

        new szPath256 ];
        
formatexszPathcharsmaxszPath ), "sound/%s"szBuffer );
        
        
client_cmd0"spk ^"%s^""szPath ); 

I'm still seeing that.
Also, maybe you should use "speak" instead of "spk", then you don't need to send stopsound (will stop all sound that's bad).

Oops, uploaded the wrong file.

Anyway, what exactly is difference between speak and spk? How will it know when to stop (on round end)?

Arkshine 09-05-2011 04:19

Re: Background Sounds
 
You may also be interested by this message : http://wiki.amxmodx.org/Half-Life_1_...AWNSTATICSOUND

nikhilgupta345 09-05-2011 09:41

Re: Background Sounds
 
Quote:

Originally Posted by Arkshine (Post 1548486)
You may also be interested by this message : http://wiki.amxmodx.org/Half-Life_1_...AWNSTATICSOUND

Would it automatically loop the sound?

Also, does it support both sound formats?

And that type of thing seems like if I set it from an entity, then it becomes like emit_sound, the farther away you are from the start origin or the entity, the softer the sound is.

vaan123 09-06-2011 22:33

Re: Background Sounds
 
bug: death sounds are blocked at the end of every round.

nikhilgupta345 09-06-2011 22:44

Re: Background Sounds
 
Quote:

Originally Posted by vaan123 (Post 1549815)
bug: death sounds are blocked at the end of every round.

Try now.

Updated to v1.0.1


All times are GMT -4. The time now is 23:07.

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