AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help witch classes sounds (https://forums.alliedmods.net/showthread.php?t=94111)

~Ice*shOt 06-06-2009 12:33

need help witch classes sounds
 
PHP Code:

if ( PlayerClass[id] == 
{
new const 
g_sound_miss[][] =

"l4d/miss1_hunter.wav"
"l4d/miss2_hunter.wav" 
}
new const 
g_sound_hit[][] = 

"l4d/strike1_hunter.wav"
"l4d/strike2_hunter.wav",
"l4d/strike3_hunter.wav" 
}
new const 
g_sound_pain[][] =
{
"l4d/pain1_hunter.wav",
"l4d/pain2_hunter.wav",
"l4d/pain3_hunter.wav",
"l4d/pain4_hunter.wav",
"l4d/pain5_hunter.wav",
"l4d/pain6_hunter.wav",
"l4d/pain7_hunter.wav"
}
new const 
g_sound_die[][] =
{
"l4d/die1_hunter.wav",
"l4d/die2_hunter.wav",
"l4d/die3_hunter.wav",
"l4d/die4_hunter.wav",
"l4d/die5_hunter.wav",
"l4d/die6_hunter.wav"

else if (
PlayerClass[id] == 1)
{
new const 
g_sound_miss[][] =

"l4d/miss1_smoker.wav"
"l4d/miss2_smoker.wav" 
}
new const 
g_sound_hit[][] = 

"l4d/strike1_smoker.wav"
"l4d/strike2_smoker.wav",
"l4d/strike3_smoker.wav" 
}
new const 
g_sound_pain[][] =
{
"l4d/pain1_smoker.wav",
"l4d/pain2_smoker.wav",
"l4d/pain3_smoker.wav",
"l4d/pain4_smoker.wav",
"l4d/pain5_smoker.wav",
"l4d/pain6_smoker.wav",
"l4d/pain7_smoker.wav"
}
new const 
g_sound_die[][] =
{
"l4d/die1_smoker.wav",
"l4d/die2_smoker.wav",
"l4d/die3_smoker.wav",
"l4d/die4_smoker.wav",
"l4d/die5_smoker.wav",
"l4d/die6_smoker.wav"

else if (
PlayerClass[id] == 2)
{
new const 
g_sound_miss[][] =

"l4d/miss1_boomer.wav"
"l4d/miss2_boomer.wav" 
}
new const 
g_sound_hit[][] = 

"l4d/strike1_boomer.wav"
"l4d/strike2_boomer.wav",
"l4d/strike3_boomer.wav" 
}
new const 
g_sound_pain[][] =
{
"l4d/pain1_boomer.wav",
"l4d/pain2_boomer.wav",
"l4d/pain3_boomer.wav",
"l4d/pain4_boomer.wav",
"l4d/pain5_boomer.wav",
"l4d/pain6_boomer.wav",
"l4d/pain7_boomer.wav"
}
new const 
g_sound_die[][] =
{
"l4d/die1_boomer.wav",
"l4d/die2_boomer.wav",
"l4d/die3_boomer.wav",
"l4d/die4_boomer.wav",
"l4d/die5_boomer.wav",
"l4d/die6_boomer.wav"


What i do bad for this?
I know this need a do on spawn but i need spaw codes please help :(

Xellath 06-06-2009 12:41

Re: need help witch classes sounds
 
WOW, look at you! What an awesome coder! ..before even posting, please just read a scripting tutorial. Wait, no! - stop coding instead.

EDIT: 102 threads?! WTF..

TitANious 06-06-2009 12:43

Re: need help witch classes sounds
 
"sound/l4d/*_*.wav"

Xellath 06-06-2009 13:04

Re: need help witch classes sounds
 
Quote:

Originally Posted by TitANious (Post 843102)
"sound/l4d/*_*.wav"

That helps a lot - nothing IMO.

TitANious 06-06-2009 13:08

Re: need help witch classes sounds
 
An example:
PHP Code:

"sound/l4d/pain4_smoker.wav" 


~Ice*shOt 06-06-2009 13:24

Re: need help witch classes sounds
 
I want to do this sound for classes:
PHP Code:

          if (!g_infreezetime && g_zombie[id] && PlayerClass[id] == 0
          { 

          
// There are a sounds Hunter - give example

          


PHP Code:

          if (!g_infreezetime && g_zombie[id] && PlayerClass[id] == 1
          { 

          
// There are a sounds  Smoker- give example

          


and etc..

Owyn 06-06-2009 13:30

Re: need help witch classes sounds
 
Quote:

Originally Posted by ~Ice*shOt (Post 843131)
I want to do this sound for classes:
PHP Code:

          if (!g_infreezetime && g_zombie[id] && PlayerClass[id] == 0
          { 

          
// There are a sounds Hunter - give example

          


PHP Code:

          if (!g_infreezetime && g_zombie[id] && PlayerClass[id] == 1
          { 

          
// There are a sounds  Smoker- give example

          


and etc..

http://www.amxmodx.org/funcwiki.php?go=func&id=282

~Ice*shOt 06-06-2009 13:37

Re: need help witch classes sounds
 
.Owyn. You are GOD :D, but i have use this it ?:
<B>
PHP Code:

emit_sound (idchannelsample[], Float:volFloat:att,flagspitch)
{
// My dounds here ?



TitANious 06-06-2009 13:46

Re: need help witch classes sounds
 
Look here..
emit_sound ( index, channel, sample[], Float:vol, Float:att,flags, pitch )

Index = id or something like that
channel = Idk
Sample = The sound
Idk last

~Ice*shOt 06-06-2009 14:26

Re: need help witch classes sounds
 
what means idk ?, can give me more example ?


All times are GMT -4. The time now is 10:14.

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