Author
|
Message
|
Senior Member
Join Date: Aug 2006
Location: United States
|
09-04-2007
, 01:00
Method for Sourcemod to Replace Sounds Yet?
|
#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;
}
|
|
|
|