Raised This Month: $ Target: $400
 0% 

Trying to change 2 emit sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 08-05-2013 , 14:35   Trying to change 2 emit sound
Reply With Quote #1

None of them want to change sound
Code:
register_forward(FM_EmitSound, "EmitSound")
Code:
public fw_emitsound(id, ent,channel,sample[],Float:volume,Float:atten,flags,pitch) {
 if( g_iCurrentDay == DAY_DODGEBALL )
 { 
  if(containi(sample,"he_bounce") != -1) {
   if(entity_get_float(ent,EV_FL_fuser1) + 0.3 < get_gametime()) {
    entity_set_float(ent,EV_FL_fuser1,get_gametime()); 
    emit_sound(ent,CHAN_ITEM,"weapons/g_bounce1.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);
   }
   return FMRES_SUPERCEDE;
  }
 }
 
 if(!is_user_alive(id) || !is_user_connected(id)) 
  return FMRES_IGNORED
 
 new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
 if( g_iCurrentDay == DAY_BOXING )
 { 
  if(weapon == CSW_KNIFE)
  {
   if(equal(sample,"weapons/knife_hit1.wav")) 
   {
    emit_sound(id, CHAN_WEAPON, g_szBoxingSound1, 1.0, ATTN_NORM, 0, PITCH_NORM)
    return FMRES_SUPERCEDE
   }
   else if(equal(sample,"weapons/knife_hit2.wav")) 
   {
    emit_sound(id, CHAN_WEAPON, g_szBoxingSound2, 1.0, ATTN_NORM, 0, PITCH_NORM) 
    return FMRES_SUPERCEDE
   }
   else if(equal(sample,"weapons/knife_hit3.wav")) 
   {
    emit_sound(id, CHAN_WEAPON, g_szBoxingSound3, 1.0, ATTN_NORM, 0, PITCH_NORM) 
    return FMRES_SUPERCEDE
   }
   else if(equal(sample,"weapons/knife_hit4.wav")) 
   {
    emit_sound(id, CHAN_WEAPON, g_szBoxingSound4, 1.0, ATTN_NORM, 0, PITCH_NORM)
    return FMRES_SUPERCEDE
   }
   else if(equal(sample,"weapons/knife_stab.wav")) 
   {
    emit_sound(id, CHAN_WEAPON, g_szBoxingSound5, 1.0, ATTN_NORM, 0, PITCH_NORM) 
    return FMRES_SUPERCEDE
   }
  }
 }
 return FMRES_IGNORED;
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 08-05-2013 at 14:36.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-05-2013 , 15:12   Re: Trying to change 2 emit sound
Reply With Quote #2

Quote:
register_forward(FM_EmitSound, "EmitSound")
public fw_emitsound

->

public EmitSound
akcaliberg is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 08-05-2013 , 18:13   Re: Trying to change 2 emit sound
Reply With Quote #3

Quote:
Originally Posted by akcaliberg View Post
public fw_emitsound

->

public EmitSound
Now the server crashes
evrytime these sound should play
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-05-2013 , 19:10   Re: Trying to change 2 emit sound
Reply With Quote #4

You can't change weapons' sounds except knife.
akcaliberg is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 08-06-2013 , 06:03   Re: Trying to change 2 emit sound
Reply With Quote #5

Quote:
Originally Posted by akcaliberg View Post
You can't change weapons' sounds except knife.
You can change the he_bounce sound
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 08-06-2013 , 06:17   Re: Trying to change 2 emit sound
Reply With Quote #6

Quote:
Originally Posted by ironskillz1 View Post
You can change the he_bounce sound
This is what i use:

PHP Code:
if(!is_user_alive(id)) 
        return 
FMRES_IGNORED
    
    
new temp[2], weapon get_user_weapon(idtemp[0], temp[1])
    if(
weapon == CSW_KNIFE)
    {
        if(
g_iCurrentGame == GAME_BOXING)
        {
            if(
equal(sample,"weapons/knife_hit1.wav")) 
            {
                
emit_sound(idCHAN_WEAPON"bknuckles/knife_hit1.wav"1.0ATTN_NORM0PITCH_NORM)
            }
            else if(
equal(sample,"weapons/knife_hit2.wav")) 
            {
                
emit_sound(idCHAN_WEAPON"bknuckles/knife_hit2.wav"1.0ATTN_NORM0PITCH_NORM)  
            }
            else if(
equal(sample,"weapons/knife_hit3.wav")) 
            {
                
emit_sound(idCHAN_WEAPON"bknuckles/knife_hit3.wav"1.0ATTN_NORM0PITCH_NORM)  
            }
            else if(
equal(sample,"weapons/knife_hit4.wav")) 
            {
                
emit_sound(idCHAN_WEAPON"bknuckles/knife_hit4.wav"1.0ATTN_NORM0PITCH_NORM)
            }
            else if(
equal(sample,"weapons/knife_stab.wav")) 
            {
                
emit_sound(idCHAN_WEAPON"bknuckles/knife_stab.wav"1.0ATTN_NORM0PITCH_NORM)  
            }
            
            return 
FMRES_SUPERCEDE
        
}
    }
    
    return 
FMRES_IGNORED 
MrKiller2010 is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 08-06-2013 , 06:39   Re: Trying to change 2 emit sound
Reply With Quote #7

Both sound Changes work when i dont combine them.
But when i combine them (He_bounce and knife sound)

The server goes to shit
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-06-2013 , 12:14   Re: Trying to change 2 emit sound
Reply With Quote #8

I have tried to change he bounce sound before. But it gave an error like Channel = 115 :/
akcaliberg is offline
Old 08-06-2013, 16:55
Blizzard_87
This message has been deleted by Blizzard_87. Reason: never mind
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-06-2013 , 20:38   Re: Trying to change 2 emit sound
Reply With Quote #10

Change this

Code:
public fw_emitsound(id, ent,channel,sample[],Float:volume,Float:atten,flags,pitch) {
to this

Code:
public fw_emitsound(id, channel,sample[],Float:volume,Float:atten,flags,pitch) {
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
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:49.


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