Raised This Month: $2 Target: $400
 0% 

CS:GO Round Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
DevilBoy.eXe
Member
Join Date: Mar 2017
Location: Romania
Old 03-29-2017 , 08:04   CS:GO Round Sounds
Reply With Quote #1

CS:GO Round Sounds

This plugin, play some sound when ct/t win and when round start.
I will add sound when bomb is planted and defuse when hostage is saved or not etc... .
Attached Files
File Type: zip sound.zip (4.73 MB, 432 views)
File Type: sma Get Plugin or Get Source (csgoroundsounds.sma - 934 views - 1.1 KB)
__________________


Last edited by DevilBoy.eXe; 03-29-2017 at 15:25.
DevilBoy.eXe is offline
Send a message via Yahoo to DevilBoy.eXe Send a message via Skype™ to DevilBoy.eXe
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-29-2017 , 15:15   Re: CS:GO Round Sounds
Reply With Quote #2

Nice!
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel

CrazY. is offline
Murz
Member
Join Date: Jan 2015
Location: Lithuania Vilnius
Old 03-31-2017 , 16:52   Re: CS:GO Round Sounds
Reply With Quote #3

could you add granade explosion custum sounds ? fb he sg
Murz is offline
Send a message via Skype™ to Murz
Blizzard_87
AlliedModders Donor
Join Date: Oct 2012
Old 04-06-2017 , 06:13   Re: CS:GO Round Sounds
Reply With Quote #4

your code can do with alot of optimising, first off.. you should use emit_sound instead of client_cmd. and you should store your sounds in variables after you precache them.

either way this type of plugin has been made heaps of times.
__________________
Blizzard_87 is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 06-06-2017 , 10:46   Re: CS:GO Round Sounds
Reply With Quote #5

This could be better ( added bomb planted, defused and exploded )
PHP Code:
#include <amxmodx>

#define PLUGIN "CS:GO Round Sounds"
#define VERSION "1.0"
#define AUTHOR "Devilboy.exe"

enum RoundSounds
{
    
Start1,
    
Start2,
    
Start3,
    
Start4,
    
BombPlanted,
    
BombDefused,
    
BombExploded,
    
TerWin,
    
CtWin
}

new const 
RoundSettings[RoundSounds][] =
{
    
"misc/start1.wav",
    
"misc/start2.wav",
    
"misc/start3.wav",
    
"misc/start4.wav",
    
"misc/bomb_planted.wav",
    
"misc/bomb_defused.wav",
    
"misc/bomb_explode.wav",
    
"misc/twingo.wav",
    
"misc/ctwingo.wav"    
}

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("SendAudio""twin""a""2&%!MRAD_terwin")
    
register_event("SendAudio""ctwin""a""2&%!MRAD_ctwin")
    
register_logevent("start",2,"0=World triggered","1=Round_Start")
}

public 
plugin_precache() 
{
    
precache_sound(RoundSettings[Start1])
    
precache_sound(RoundSettings[Start2])
    
precache_sound(RoundSettings[Start3])
    
precache_sound(RoundSettings[Start4])
    
precache_sound(RoundSettings[BombPlanted])
    
precache_sound(RoundSettings[BombDefused])
    
precache_sound(RoundSettings[BombExploded])
    
precache_sound(RoundSettings[TerWin])
    
precache_sound(RoundSettings[CtWin])
}

public 
start()
{
    new 
rand random_num(0,3)

    switch(
rand)
    {
        case 
0emit_sound(0CHAN_AUTORoundSettings[Start1], 1.0ATTN_NORM0PITCH_NORM)
        case 
1emit_sound(0CHAN_AUTORoundSettings[Start2], 1.0ATTN_NORM0PITCH_NORM)
        case 
2emit_sound(0CHAN_AUTORoundSettings[Start3], 1.0ATTN_NORM0PITCH_NORM)
        case 
3emit_sound(0CHAN_AUTORoundSettings[Start4], 1.0ATTN_NORM0PITCH_NORM)
    }

}

public 
bomb_planted()
{
    
emit_sound(0CHAN_AUTORoundSettings[BombPlanted], 1.0ATTN_NORM0PITCH_NORM)
}

public 
bomb_defused()
{
    
emit_sound(0CHAN_AUTORoundSettings[BombDefused], 1.0ATTN_NORM0PITCH_NORM)
}

public 
bomb_explode()
{
    
emit_sound(0CHAN_AUTORoundSettings[BombExploded], 1.0ATTN_NORM0PITCH_NORM)
}

public 
twin()
{
      
emit_sound(0CHAN_AUTORoundSettings[TerWin], 1.0ATTN_NORM0PITCH_NORM)
}

public 
ctwin()
{
      
emit_sound(0CHAN_AUTORoundSettings[CtWin], 1.0ATTN_NORM0PITCH_NORM)

__________________

Last edited by Ayman Khaled; 06-08-2017 at 04:09.
Ayman Khaled is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-06-2017 , 11:11   Re: CS:GO Round Sounds
Reply With Quote #6

for (new i = 0; i < sizeof RoundSettings; i++) ?
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel

CrazY. is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-06-2017 , 13:29   Re: CS:GO Round Sounds
Reply With Quote #7

Less loops is better.
__________________
EFFx is offline
Send a message via Skype™ to EFFx
Blizzard_87
AlliedModders Donor
Join Date: Oct 2012
Old 06-08-2017 , 04:04   Re: CS:GO Round Sounds
Reply With Quote #8

PHP Code:
public start(id)
{
    new 
rand random_num(0,4)

    switch(
rand)
    {
        case 
0emit_sound(0CHAN_AUTORoundSettings[Start1], 1.0ATTN_NORM0PITCH_NORM)
        case 
1emit_sound(0CHAN_AUTORoundSettings[Start2], 1.0ATTN_NORM0PITCH_NORM)
        case 
2emit_sound(0CHAN_AUTORoundSettings[Start3], 1.0ATTN_NORM0PITCH_NORM)
        case 
3emit_sound(0CHAN_AUTORoundSettings[Start4], 1.0ATTN_NORM0PITCH_NORM)
    }


you dont need (id) in the public function as its never used.

and your random_num( 0, 4 ) should be random( 0, 3 ) as 0 - 4 is essentially 1 - 5....
__________________

Last edited by Blizzard_87; 06-08-2017 at 04:06.
Blizzard_87 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-08-2020 , 06:14   Re: CS:GO Round Sounds
Reply With Quote #9

Way too simple to be approved.
__________________
HamletEagle is offline
LondoN
Member
Join Date: Dec 2015
Location: Roman, Romania.
Old 06-18-2020 , 10:47   Re: CS:GO Round Sounds
Reply With Quote #10

Code:
#include < amxmodx >
#include < fakemeta >

#define PLUGIN	"CS:GO Round Sounds"
#define VERSION	"1.0"
#define AUTHOR	"london extream"

enum 
{
	START_SOUND_ONE = 0,
	START_SOUND_TWO,
	START_SOUND_THREE,
	START_SOUND_FOUR,
	BOMB_PLANTED,
	BOMB_DEFUSED,
	BOMB_EXPLODED,
	CT_WIN,
	T_WIN
};

new const Sounds [ ] [ ] =
{
	"misc/start1.wav",
	"misc/start2.wav",
	"misc/start3.wav",
	"misc/start4.wav",
	"misc/bomb_planted.wav",
	"misc/bomb_defused.wav",
	"misc/bomb_exploded.wav",
	"misc/ctwingo.wav",
	"misc/twingo.wav"
};

public plugin_precache ( )
{
	for ( new i = 0; i < sizeof Sounds; i++ )
		engfunc(EngFunc_PrecacheSound, Sounds [ i ] );
}

public plugin_init ( )
{
	register_plugin ( PLUGIN, VERSION, AUTHOR );
	register_cvar ( "csgo_r_sounds", VERSION, FCVAR_SERVER|FCVAR_SPONLY );
	set_cvar_string ( "csgo_r_sounds", VERSION );

	register_event ( "SendAudio", "tero_win", "a", "2&%!MRAD_terwin" );
	register_event ( "SendAudio", "ct_win", "a", "2&%!MRAD_ctwin" );

	register_logevent ( "RoundStart", 2, "0=World triggered", "1=Round_Start" );
}

public RoundStart ( )
{
	new i = random_num ( START_SOUND_ONE, START_SOUND_FOUR );
	emit_sound ( 0, CHAN_AUTO, Sounds [ i ], 1.0, ATTN_NORM, 0, PITCH_NORM );
}

public bomb_planted ( )	emit_sound ( 0, CHAN_AUTO, Sounds [ BOMB_PLANTED ], 1.0, ATTN_NORM, 0, PITCH_NORM );
public bomb_defused ( )	emit_sound ( 0, CHAN_AUTO, Sounds [ BOMB_DEFUSED ], 1.0, ATTN_NORM, 0, PITCH_NORM );
public bomb_exploded ( ) emit_sound ( 0, CHAN_AUTO, Sounds [ BOMB_EXPLODED ], 1.0, ATTN_NORM, 0, PITCH_NORM );
public tero_win ( )	emit_sound ( 0, CHAN_AUTO, Sounds [ T_WIN ], 1.0, ATTN_NORM, 0, PITCH_NORM );
public ct_win ( )	emit_sound ( 0, CHAN_AUTO, Sounds [ CT_WIN ], 1.0, ATTN_NORM, 0, PITCH_NORM );
__________________
Want to support me? - Just click from one of the ad's!

Last edited by LondoN; 06-18-2020 at 10:47.
LondoN 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 11:54.


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