Raised This Month: $ Target: $400
 0% 

[HELP] emit_sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
4554
Senior Member
Join Date: Aug 2009
Old 08-19-2009 , 06:43   [HELP] emit_sound
Reply With Quote #1

Who can help me fix the code?
PHP Code:
public emitsound(idchannelsample[])
{
 if(!
is_user_alive(id) || !is_user_connected(id)) 
  return 
FMRES_IGNORED
 
new temp[2], weapon get_user_weapon(idtemp[0], temp[1])
 if(
weapon == CSW_M3)
 {
   if(
equal(sample,"weapons/m3-1.wav")) 
   {
    
emit_sound(idCHAN_WEAPON"weapons/sadsd-1.wav"0.8ATTN_NORM0PITCH_NORM)
    return 
FMRES_SUPERCEDE
   
}
   if(
equal(sample,"weapons/m3_pump.wav")) 
   {
    
emit_sound(idCHAN_WEAPON"weapons/sadsd_draw.wav"1.0ATTN_NORM0PITCH_NORM)
    return 
FMRES_SUPERCEDE
   
}
   if(
equal(sample,"weapons/m3_insertshell.wav")) 
   {
    
emit_sound(idCHAN_WEAPON"weapons/sadsd.wav"1.0ATTN_NORM0PITCH_NORM)
    return 
FMRES_SUPERCEDE
   
}
  }
 return 
FMRES_IGNORED

I want to change m3 sound but fire sound not work, help +k
4554 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-19-2009 , 06:58   Re: [HELP] emit_sound
Reply With Quote #2

I suggest using contain() function.

PHP Code:
if (contain(sample"m3-1.wav") != -1)
{
emit_sound(...)
return 
FMRES_SUPERCEDE


Also show the full code.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-19-2009 , 07:35   Re: [HELP] emit_sound
Reply With Quote #3

Quote:
Originally Posted by ot_207 View Post
Also show the full code.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
4554
Senior Member
Join Date: Aug 2009
Old 08-19-2009 , 07:05   Re: [HELP] emit_sound
Reply With Quote #4

Not work
PHP Code:
if(contain(sample"weapons/m3-1.wav") != -1
{
emit_sound(idCHAN_WEAPON"weapons/asdsd-1.wav"1.0ATTN_NORM0PITCH_NORM)
return 
FMRES_SUPERCEDE

4554 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2009 , 08:38   Re: [HELP] emit_sound
Reply With Quote #5

You can't hook/replace weapon sounds except for the knife since it's something client-side.
__________________
Arkshine is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-19-2009 , 09:15   Re: [HELP] emit_sound
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
You can't hook/replace weapon sounds except for the knife since it's something client-side.
Lol, I didn't looked carefully at the sounds he wanted to modify.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2009 , 11:24   Re: [HELP] emit_sound
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
You can't hook/replace weapon sounds except for the knife since it's something client-side.
__________________
Arkshine is offline
4554
Senior Member
Join Date: Aug 2009
Old 08-19-2009 , 11:40   Re: [HELP] emit_sound
Reply With Quote #8

Sorry, i mean modify m3 fire sound , not knife sound. Can you give me a code?

Last edited by 4554; 08-19-2009 at 11:44.
4554 is offline
4554
Senior Member
Join Date: Aug 2009
Old 08-19-2009 , 11:16   Re: [HELP] emit_sound
Reply With Quote #9

yeah. i mean modify sound. how to fix?
4554 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2009 , 11:44   Re: [HELP] emit_sound
Reply With Quote #10

You CAN NOT replace ANY weapon sounds because these sounds are coded client-side. (except for the knife which is coded server-side )
__________________
Arkshine 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 15:03.


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