Raised This Month: $ Target: $400
 0% 

VSH i wanna change The Eureka Effect Taunt Sound,How?someone help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eminemxw88
Senior Member
Join Date: Dec 2009
Old 04-03-2014 , 11:22   i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #1

i tred to modify exp line,but not working.someone help.

exp line:
PHP Code:
public Action:HookSound(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
 if (!
Enabled || ((entity != Hale) && ((entity <= 0) || !IsValidClient(Hale) || (entity != GetPlayerWeaponSlot(Hale0)))))
  return 
Plugin_Continue;
 if (
StrContains(sample"saxton_hale"false) != -1)
  return 
Plugin_Continue;
 if (
entity != Hale && strcmp(sample"weapons/drg_wrench_teleport.wav"false) == 0)
 {
  
strcopy(samplePLATFORM_MAX_PATH"saxton_hale/steven_chow_sounds/zxxblblm.wav");
  return 
Plugin_Changed;
 } 
someone help,god bless u!

Last edited by eminemxw88; 04-03-2014 at 11:23.
eminemxw88 is offline
Send a message via MSN to eminemxw88
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 04-03-2014 , 11:25   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #2

Use plugin stop, but some sounds cannot be changed, since they are predicted by the client through events.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 04-03-2014 at 11:25.
friagram is offline
eminemxw88
Senior Member
Join Date: Dec 2009
Old 04-03-2014 , 12:11   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
Use plugin stop, but some sounds cannot be changed, since they are predicted by the client through events.
can you show exp?
eminemxw88 is offline
Send a message via MSN to eminemxw88
xXDeathreusXx
Veteran Member
Join Date: Mar 2013
Location: pPlayer->GetOrigin();
Old 04-10-2014 , 12:48   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #4

Quote:
Originally Posted by eminemxw88 View Post
i tred to modify exp line,but not working.someone help.

exp line:
PHP Code:
public Action:HookSound(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
 if (!
Enabled || ((entity != Hale) && ((entity <= 0) || !IsValidClient(Hale) || (entity != GetPlayerWeaponSlot(Hale0)))))
  return 
Plugin_Continue;
 if (
StrContains(sample"saxton_hale"false) != -1)
  return 
Plugin_Continue;
 if (
entity != Hale && strcmp(sample"weapons/drg_wrench_teleport.wav"false) == 0)
 {
  
strcopy(samplePLATFORM_MAX_PATH"saxton_hale/steven_chow_sounds/zxxblblm.wav");
  return 
Plugin_Changed;
 } 
someone help,god bless u!
Use ReplaceString rather then strcopy, and use Plugin_Stop on the weapons sound to stop it from emitting it's normal sound, then use EmitSoundToAll to play the new sound.
__________________
Plugins|Profile
Requests closed

I'm a smartass by nature, get used to it
xXDeathreusXx is offline
eminemxw88
Senior Member
Join Date: Dec 2009
Old 04-11-2014 , 21:04   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #5

Quote:
Originally Posted by xXDeathreusXx View Post
Use ReplaceString rather then strcopy, and use Plugin_Stop on the weapons sound to stop it from emitting it's normal sound, then use EmitSoundToAll to play the new sound.
like this?but other sound are Stoped.... -.-!!
PHP Code:
public Action:CustomPlayerSoundHook(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
 if (
StrContains(sample"weapons/drg_wrench_teleport.wav"false) != -1)
 {
  
strcopy(samplePLATFORM_MAX_PATHEurekaSound);
  
EmitSoundToAll(sample_SNDCHAN_VOICESNDLEVEL_TRAFFICSND_NOFLAGSSNDVOL_NORMAL100_NULL_VECTORNULL_VECTORfalse0.0);
  
EmitSoundToAll(sample_SNDCHAN_VOICESNDLEVEL_TRAFFICSND_NOFLAGSSNDVOL_NORMAL100_NULL_VECTORNULL_VECTORfalse0.0);
  
  return 
Plugin_Changed;
 }
 return 
Plugin_Stop;

someone can give a example!thx god!!!
eminemxw88 is offline
Send a message via MSN to eminemxw88
xXDeathreusXx
Veteran Member
Join Date: Mar 2013
Location: pPlayer->GetOrigin();
Old 04-11-2014 , 21:58   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #6

Quote:
Originally Posted by eminemxw88 View Post
like this?but other sound are Stoped.... -.-!!
PHP Code:
public Action:CustomPlayerSoundHook(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
 if (
StrContains(sample"weapons/drg_wrench_teleport.wav"false) != -1)
 {
  
strcopy(samplePLATFORM_MAX_PATHEurekaSound);
  
EmitSoundToAll(sample_SNDCHAN_VOICESNDLEVEL_TRAFFICSND_NOFLAGSSNDVOL_NORMAL100_NULL_VECTORNULL_VECTORfalse0.0);
  
EmitSoundToAll(sample_SNDCHAN_VOICESNDLEVEL_TRAFFICSND_NOFLAGSSNDVOL_NORMAL100_NULL_VECTORNULL_VECTORfalse0.0);
  
  return 
Plugin_Changed;
 }
 return 
Plugin_Stop;

someone can give a example!thx god!!!
Remove the second emitsound, remove the plugin stop, replace changed with stop

You still should use ReplaceString
__________________
Plugins|Profile
Requests closed

I'm a smartass by nature, get used to it

Last edited by xXDeathreusXx; 04-11-2014 at 21:58.
xXDeathreusXx is offline
eminemxw88
Senior Member
Join Date: Dec 2009
Old 04-11-2014 , 22:43   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #7

Quote:
Originally Posted by xXDeathreusXx View Post
Remove the second emitsound, remove the plugin stop, replace changed with stop

You still should use ReplaceString
can you show?plz!
eminemxw88 is offline
Send a message via MSN to eminemxw88
eminemxw88
Senior Member
Join Date: Dec 2009
Old 04-12-2014 , 00:26   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #8

im done.thx.
eminemxw88 is offline
Send a message via MSN to eminemxw88
xXDeathreusXx
Veteran Member
Join Date: Mar 2013
Location: pPlayer->GetOrigin();
Old 04-12-2014 , 00:27   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #9

Quote:
Originally Posted by eminemxw88 View Post
can you show?plz!
Code:
public Action:CustomPlayerSoundHook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
 if (StrContains(sample, "weapons/drg_wrench_teleport.wav", false) != -1)
 {
  ReplaceString(sample, sizeof(sample), "weapons/drg_wrench_teleport.wav", "pathofsound", false);
  EmitSoundToAll(sample, _, SNDCHAN_VOICE, SNDLEVEL_TRAFFIC, SND_NOFLAGS, SNDVOL_NORMAL, 100, _, NULL_VECTOR, NULL_VECTOR, false, 0.0);
  
   return Plugin_Stop;
 }
 return Plugin_Changed;
}
__________________
Plugins|Profile
Requests closed

I'm a smartass by nature, get used to it

Last edited by xXDeathreusXx; 04-12-2014 at 11:54.
xXDeathreusXx is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 04-12-2014 , 08:21   Re: i wanna change The Eureka Effect Taunt Sound,How?someone help.
Reply With Quote #10

Just because we're in the VSH section (for some reason) doesn't mean we have to use VSH code
PHP Code:
public Action:CustomPlayerSoundHook(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
    if (
StrContains(sample"drg_wrench_teleport.wav"false) != -1)
    {
        
Format(samplesizeof(sample), "soundpath.mp3");
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

Although if you're trying to modify VSH to change a sound on someone that isn't Hale, that's no fun. You should make a seperate plugin instead. Even if you're trying to change a Hale sound (and not make a new Hale) you can use saxtonhale.inc to check if a client is Hale.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 04-12-2014 at 08:23.
MasterOfTheXP 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:11.


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