Raised This Month: $ Target: $400
 0% 

[RoundSound] Custom Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
satelitegames
Member
Join Date: Nov 2010
Old 05-04-2012 , 11:58   Re: [RoundSound] Custom Sounds
Reply With Quote #1

you added more sounds than the original, but not increased the value of the variable rand

PHP Code:
new rand random_num(0,2
new rand = random_num(0,2)

2 changes the value for the number of sounds which have

PHP Code:
new rand random_num(0,6


the code below

PHP Code:
#include <amxmodx>
public plugin_init() 

register_plugin("RoundSound","1.0","PaintLancer")
register_event("SendAudio""t_win""a""2&%!MRAD_terwin")
register_event("SendAudio""ct_win""a""2&%!MRAD_ctwin"
}
public 
t_win()
{
new 
rand random_num(0,6)
client_cmd(0,"stopsound")
switch(
rand)
{
case 
0client_cmd(0,"spk sdgaming/01_05_2012/ct0")
case 
1client_cmd(0,"spk sdgaming/01_05_2012/ct1")
case 
2client_cmd(0,"spk sdgaming/01_05_2012/ct2")
case 
3client_cmd(0,"spk sdgaming/01_05_2012/ct3")
case 
4client_cmd(0,"spk sdgaming/01_05_2012/ct4")
case 
5client_cmd(0,"spk sdgaming/01_05_2012/ct5")
case 
6client_cmd(0,"spk sdgaming/01_05_2012/ct6")
}
return 
PLUGIN_CONTINUE
}
public 
ct_win()
{
new 
rand random_num(0,6)
client_cmd(0,"stopsound")
switch(
rand)
{
case 
0client_cmd(0,"spk sdgaming/01_05_2012/te0")
case 
1client_cmd(0,"spk sdgaming/01_05_2012/te1")
case 
2client_cmd(0,"spk sdgaming/01_05_2012/te2")
case 
3client_cmd(0,"spk sdgaming/01_05_2012/te3")
case 
4client_cmd(0,"spk sdgaming/01_05_2012/te4")
case 
5client_cmd(0,"spk sdgaming/01_05_2012/te5")
case 
6client_cmd(0,"spk sdgaming/01_05_2012/te6")
}
 
return 
PLUGIN_CONTINUE
}
public 
plugin_precache() 
{
precache_sound("sdgaming/01_05_2012/ct0.wav")
precache_sound("sdgaming/01_05_2012/ct1.wav")
precache_sound("sdgaming/01_05_2012/ct2.wav")
precache_sound("sdgaming/01_05_2012/ct3.wav")
precache_sound("sdgaming/01_05_2012/ct4.wav")
precache_sound("sdgaming/01_05_2012/ct5.wav")
precache_sound("sdgaming/01_05_2012/ct6.wav")
precache_sound("sdgaming/01_05_2012/te0.wav")
precache_sound("sdgaming/01_05_2012/te1.wav")
precache_sound("sdgaming/01_05_2012/te2.wav")
precache_sound("sdgaming/01_05_2012/te3.wav")
precache_sound("sdgaming/01_05_2012/te4.wav")
precache_sound("sdgaming/01_05_2012/te5.wav")
precache_sound("sdgaming/01_05_2012/te6.wav")
return 
PLUGIN_CONTINUE

__________________




satelitegames is offline
Reply



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 00:26.


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