Monthly Target: $400 Donations: $289
 72% 

Alternative End Round Sounds v2.3b - [ Updated : 22 dec 2007 ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   Orangutanz (13)
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-07-2007 , 03:17   Alternative End Round Sounds v2.3b - [ Updated : 22 dec 2007 ]
Reply With Quote #1

Alternative End Round Sounds
( v2.3b - Last update: 22 dec 2007 )

Introduction :
- - - - - - - - - -
Original idea and plugin by PaintLancer.
Orignal thread : http://forums.alliedmods.net/showthread.php?t=6784

This plugin is intented to replace End Round Sounds plugin.
Its author did not give news since 2005.

Description :
- - - - - - - - - -
Plays random music at the end of a round according to who wins,
instead of just "Terrorists Win" or "Counter-Terrorists Win".

Features :
- - - - - - - -
* Support mp3 and wav files
* Using a file for the sounds
* Per-map files supported
* Per-map prefix files supported
* Sounds can be toggle on/off by players
* Ability to choose x sounds to be precache per map
* Multilingual support
* And more...


Requirements :
- - - - - - - - - -
* CS 1.6 / CZ.
* AMXX 1.7x or higher.

Cvars :
- - - - -
* ers_enabled <iNum>
<0|1> Disable/Enable this plugin. (default: 1)

* ers_player_toggle <iNum>
<0|1> Disable/Enable the client command /roundsound (default: 1)

* erc_time_ads <iTime>
Times in seconds between 2 ads messages. 0 disable ads. (default: 120)

* erc_random_precache <iMaxTeam or iMax_T-iMax_CT>
Specify how many sounds by team you want to precache randomly among all sounds.
This means that x sounds will be choosen randomly among all sounds of each team so to be precache at each map. ( 0 = disable feature )

/!\ Map change on cvar change required !

e.g :
  • erc_random_precache "2" :
    2 sounds will be choosen among all CTs sounds and all Ts sounds
  • erc_random_precache "2-3" :
    2 Ts sounds will be choosen randomly among all Ts sounds
    3 CT sound will be choosen randomly among all CTs sounds.
    /!\ Don't forget to insert '-' .

Client command :
- - - - - - - - - - - - -
* say /roundsound :
Give to players the ability to turn on/off the end round sounds

Installation :
- - - - - - - - - -
Files locations:
./game_mod/addons/amxmodx/plugins/alt_end_round_sounds.amxx ( compiled under Amxx 1.8.x )
./game_mod/addons/amxmodx/plugins/alt_end_round_sounds[old].amxx ( compiled under Amxx 1.7x )
./game_mod/addons/amxmodx/data/lang/end_roundsound.txt
./game_mod/addons/amxmodx/configs/roundsound.ini (if using default file 'roundsound.ini')
./game_mod/addons/amxmodx/configs/round_sound/mapname.ini (if using per-map config file)
./game_mod/addons/amxmodx/configs/round_sound/prefix-TYPE.ini (if using per-map config file by prefix)

Configuration :
- - - - - - - - - - - -
About ' roundsound.ini ' file :
This one have to be put in configs/ directory.
It's the default file. It supposed to be load on all maps if no files are found in /configs/round_sound/ directory
.


About ' per-map prefix-based configuration files ' :
You have to create a folder ' round_sound ' in the configs/ folder.
It will automatically load any sounds listed in files having the following name :

  • <mapname>.ini
  • prefix-<map_prefix>.ini

Example: You want to load some sounds on de_dust map
You have to create a file de_dust.ini in configs/round_sound/ directory.
Exemple: You want to load some sounds on all maps beginning by 'de_'
You have to create a file prefix-de.ini in configs/round_sound/ directory.



About ' the syntax in file ' :
  • Syntax: "sound file" "team"
    e.g. : "sound/my_folder/my_sound.wav" "T"
    e.g. : "sound/my_folder/my_sound.mp3" "CT"
  • Firstly, prefix-xxx.ini file is read. If not found, it searches for mapname.ini file. If not found, it tries the file by default : roundsound.ini .
  • You have to specify a team name. "T" for Terrorists wins, or "CT" for Couter-terrorists wins.
  • If you are using Amxx 1.7x, MAX_SOUNDS per team is defined in the .sma file. ( 25 by default )


N.B : Default sounds are from original thread. You can find anothers sounds posted by people.
- 20 sounds by kilatz : here
- 6 sounds by DoGi : here
- 2 sounds by Striker : here
- 2 sounds by v3x : here



EDIT :A new version is coming very soon with a lot of changes/features. (really a huge update)

EDIT2 : When online compiler will be up-to-date ( for Amxx 1.8.x ) and if you are running under Amxx 1.7x, you will have to compile plugin locally under an Amxx 1.7x compiler. Anyway, compiled plugins for both versions are included in the package.


Enjoy.

*.zip : ( from 2.1a : ~5127 dl ) )
*sma : ( from 2.1a : ~3059 dl )


It's recommended to use the beta. I've just changed the method to precache the sounds, and so removing the tricky way because of ers_random_precache cvar.
Attached Files
File Type: zip alt_end_round_sounds.zip (1.31 MB, 33933 views)
File Type: sma Get Plugin or Get Source (alt_end_round_sounds.sma - 39760 views - 23.9 KB)
File Type: sma Get Plugin or Get Source (alt_end_round_sounds(beta).sma - 11504 views - 23.8 KB)
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),


Last edited by Arkshine; 09-20-2008 at 07:02. Reason: Updated.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-07-2007 , 03:18   Re: Alternative End Round Sound
Reply With Quote #2

Notes :
- - - - - - -
Language translation :
- [fr] : Arkshine
- [de] : Mordekay
- [es] : Darkless

Changelog :
- - - - - - - - - -
-> Arksine :

v3.0 - [ xx-xx-2007 ] ( Major update )
- Soon. A lot of changes/new features. Huge update. ;)
v2.3b - [ 22-12-2007 ]
(!) Fixed a compatibility bug from 2.3a version.
v2.3a - [ 19-12-2007 ]
(+) Added compatibility for Amxx 1.7x.
(!) Now 'erc_random_precache' cvar is set to 0 by default.
(!) Fixed. At the first start of server, value from 'erc_random_precache' cvar from a config file was not read.
(!) Some others minors changes.
v2.3 - [ 29-10-2007 ]
(+) Added 'erc_random_precache' cvar : Specify how many sounds per team you want to precache randomly among all sounds.
This means that x sounds will be choosen randomly among all sounds of each team so to be precache at each map. ( request by Arion )
(!) Debug mode is enabled by default now.
(-) Removed 3 keys languages. No more need.( ERS_LOG_TOTAL_SOUND_LOADED, ERS_LOG_DEBUG_T, ERS_LOG_DEBUG_CT )
v2.2b - [ 28-10-2007 ]
(!) Removed a check. Since trim() is used :
Now no need to check space, new line, tabs, carriage returns, etc..
v2.2a - [ 28-10-2007 ]
(!) Changed the method of checking empty file. Now it's more efficient.
(!) Added another check to ignore texts which are no comments.
(!) Fixed a typo ( key language ).
v2.2 - [ 27-10-2007 ]
(+) Added a check to prevent to get a warning when a team has no sound.
(+) Added a check to prevent to not load empty file.
(+) Added support for coding-style '//' comments.
(!) No longer has a predefined max sounds limit. ( using dynamic array from amxx 1.8.0 )
(!) Minors optimizations.
(-) Removed useless code.
v2.1a - [ 13-07-2007 ]
(!) Fixed a bug with ML system.
(!) Fixed a stupid glitch with formatex().
v2.1 - [ 06-07-2007 ]
(!) Optimize a little.
(!) Rewritted loading_file() function.
(+) Added ML system & some texts.
(+) Added Color in text. ( !g = green ; !t = team color; !n = yellow (normal) )
(+) Added #_DEBUG.
(+) Added chat command : toggle on/off end round sounds.
(+) Added "ers_enabled" cvar : enable/disable plugin
(+) Added "ers_player_toggle" cvar : enable/disabled command chat for players
(+) Added ads message for chat command
(+) Added "erc_time_ads" cvar : control amount of times between 2 messages.
v2.0b - [ 04-07-2007 ]
(!) No features added. Sma reorganized a little and more.
v2.0a - [ 26-06-2007 ]
(!) Fixed. Bug under linux. Some blank lines weren't ignored. (thanks Deejay & NiLuje)
v2.0 - [ 26-06-2007 ]
(!) Totaly rewritted
(+) Added support for mp3 files.
(+) Added support per file. No more to edit .sma file to add sounds.
(+) Added support per-map file.
(+) Added support per-map prefix file.
-> Paintlancer :

v1.0 : [ 2004-10-14 ]
First release by Paintlancer.
Orignal thread : http://forums.alliedmods.net/showthread.php?t=6784

Credits :
- - - - - - - -
* PaintLancer : Original idea and plugin.
* Avalanche : Inspired color chat function from gungame plugin.
* Arion : Random precache idea.

Old version :
- - - - - - - - - - -
Attached Files
File Type: sma Get Plugin or Get Source (alt_end_round_sounds[2.3].sma - 2747 views - 19.5 KB)
File Type: sma Get Plugin or Get Source (alt_end_round_sounds[2.3a].sma - 2542 views - 24.1 KB)
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),


Last edited by Arkshine; 12-22-2007 at 11:51.
Arkshine is offline
loren28
Senior Member
Join Date: Nov 2006
Old 07-07-2007 , 03:46   Re: Alternative End Round Sounds
Reply With Quote #3

can u maked to work whit moore than 3 sounds for a team?like 5 sounds?
loren28 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-07-2007 , 03:51   Re: Alternative End Round Sounds
Reply With Quote #4

By default you can put 20 sounds by team. ;)

If you want more, you can change in the .sma file :

Code:
#define MAX_SOUND         20     // Max Sounds by team.
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is offline
dishbemarkxp
Member
Join Date: May 2007
Location: by reading this, your ba
Old 07-07-2007 , 10:55   Re: Alternative End Round Sounds
Reply With Quote #5

omg sweet mp3 files! but im pretty sure you cna change this

Quote:
new fp = fopen( file, "rt" );

while( !feof( fp ) )
{
fgets( fp, sBuffer, _charsmax( sBuffer ) );
this is going to go on my server
__________________
+ KARMA IF I HELPED d:)
iLLiCENT EViNE PROZACS ARE BENEFICIAL FOR YOU
dishbemarkxp is offline
Send a message via AIM to dishbemarkxp
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-07-2007 , 11:50   Re: Alternative End Round Sounds
Reply With Quote #6

Quote:
Originally Posted by dishbemarkxp View Post
this is going to go on my server
Mine got mp3 support too...
Deviance is offline
dishbemarkxp
Member
Join Date: May 2007
Location: by reading this, your ba
Old 07-07-2007 , 13:33   Re: Alternative End Round Sounds
Reply With Quote #7

oh i apologized its just that from the title his looks more compelling, sorry for the unconvience
__________________
+ KARMA IF I HELPED d:)
iLLiCENT EViNE PROZACS ARE BENEFICIAL FOR YOU
dishbemarkxp is offline
Send a message via AIM to dishbemarkxp
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 07-07-2007 , 17:53   Re: Alternative End Round Sounds
Reply With Quote #8

Exemple = Example D:
__________________
i stop around here and there.
Da_sk8rboy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-07-2007 , 18:17   Re: Alternative End Round Sounds
Reply With Quote #9

Quote:
Originally Posted by Da_sk8rboy View Post
Exemple = Example D:
Oops. Stupid french typos. Thanks.
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 07-07-2007 , 19:44   Re: Alternative End Round Sounds
Reply With Quote #10

Quote:
Originally Posted by Da_sk8rboy View Post
Exemple = Example D:
Quote:
(!) Totaly rewritted
should be
Quote:
(!) Total rewrite.
__________________
i stop around here and there.
Da_sk8rboy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2015, vBulletin Solutions, Inc.
Theme made by Freecode