Raised This Month: $ Target: $400
 0% 

replacing sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-26-2006 , 12:32   replacing sounds
Reply With Quote #1

i'm trying to replace some weapon sounds, but on the server it dont work

Code:
public plugin_init() {     register_forward(FM_EmitSound, "EmitSound") } public EmitSound(id, channel, sample[]) {     if(!is_user_alive(id) || !is_user_connected(id))         return FMRES_IGNORED     new clip,ammo, weapon = get_user_weapon(id, clip, ammo)     if(weapon == CSW_DEAGLE)     {             if(equal(sample,"weapons/deagle-1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/deagle-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/deagle-2.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/deagle-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }     }     else if(weapon == CSW_M4A1)     {             if(equal(sample,"weapons/m4a1-1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_boltpull.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_boltpull.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                    return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_clipin.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_clipin.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_clipout.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_clipout.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_silencer_off.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_silencer_off.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                    return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_silencer_on.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_silencer_on.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_unsil-1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_unsil-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/m4a1_unsil-2.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/m4a1_unsil-2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }     }     else if(weapon == CSW_AK47)     {             if(equal(sample,"weapons/ak47-1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/ak47-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/ak47-2.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/ak47-2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                   return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/ak47_boltpull.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/ak47_boltpull.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                    return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/ak47_clipin.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/ak47_clipin.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/ak47_magout.wav"))             {                 emit_sound(id, CHAN_WEAPON, "customsounds/ak47_magout.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }     }     return FMRES_IGNORED }

any idea's?
Deviance is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-26-2006 , 12:56  
Reply With Quote #2

Please, search.
VEN is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-26-2006 , 12:58  
Reply With Quote #3

Quote:
Originally Posted by VEN
Please, search.
"Please, search."

i didnt find anything...
Deviance is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-26-2006 , 13:23  
Reply With Quote #5

Quote:
Originally Posted by VEN
http://forums.alliedmods.net/showthread.php?t=23303
http://forums.alliedmods.net/showthread.php?t=24060
whats the difference ?

VEN i bet you haven't look into the source -.-
Deviance is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-26-2006 , 13:31  
Reply With Quote #6

Code:
if(equal(sample,"weapons/deagle-1.wav"))
That would never happen because you can't catch such sounds with such forward.
Read other threads for more details.
VEN is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-26-2006 , 13:32  
Reply With Quote #7

Quote:
Originally Posted by VEN
Code:
if(equal(sample,"weapons/deagle-1.wav"))
That would never happen because you can't catch such sounds with such forward.
how to then....

and i have already readed 2 many tread's w/ nothing, so if you know it say it
Deviance is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-26-2006 , 13:35  
Reply With Quote #8

I believe that's impossible now.
VEN is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-26-2006 , 13:37  
Reply With Quote #9

Quote:
Originally Posted by VEN
I believe that's impossible now.
...?

okey okey, is it amxmodx or steam?
Deviance 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 16:42.


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