Raised This Month: $51 Target: $400
 12% 

Method for Sourcemod to Replace Sounds Yet?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-04-2007 , 01:00   Method for Sourcemod to Replace Sounds Yet?
Reply With Quote #1

I seem very inquisitive today, haha. Anywho, I was curious is there a method for replacing sounds or stopping a sound from occuring through Sourcemod yet? I'm working on a plugin where if a player is killed, depending on what team they are on, they will emit a different sound.

So far, based on some suggestions in an unrelated thread about catching messages and stopping them I've applied the same technique to player_death to see if it was possible for me to stop the sound because then I'd be able to figure out how to specify for that player to emit a different sound from there.

Here's what I have, although I'm not entirely sure if it's stopping the sound. What it seems like is that it's stopping other players from hearing the death sound ( I'm referring to the death sound for players in Counterstrike Source where it kind of sounds as if the player is sighing ), but it's still playing the sound for the person that died.


public OnPluginStart()
{

HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);

}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{

return Plugin_Handled;

}
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
BAILOPAN
Join Date: Jan 2004
Old 09-04-2007 , 07:18   Re: Method for Sourcemod to Replace Sounds Yet?
Reply With Quote #2

There's a number of sound functions and each has their own subtle differences, so making a general callback isn't entirely trivial.

But I believe there is an open feature request for just that.
__________________
egg
BAILOPAN is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 09-05-2007 , 06:34   Re: Method for Sourcemod to Replace Sounds Yet?
Reply With Quote #3

I also want to replace sounds so I suggested this:
http://bugs.alliedmods.net/index.php...ls&task_id=861
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
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 09:29.


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