There are some sounds I want to override so first I've been testing random blatant replacements. None of them seem to work though:
PHP Code:
public Action:SoundHook(clients[64], &numClients, String:sound[PLATFORM_MAX_PATH], &client, &channel, &Float:volume, &level, &pitch, &flags)
{
if (!IsValidClient(client)) return Plugin_Continue;
if (volume == 0.0 || volume == 0.9997) return Plugin_Continue;
if (StrContains(sound, "player/footsteps/", false) != -1)
{
Format(sound, sizeof(sound), "vo/heavy_battlecry03.wav");
PrecacheSound(sound);
//EmitSoundToAll(sound, client, _, _, _, 0.2, 100);
return Plugin_Changed;
}
return Plugin_Continue;
}
I can emit a sound fine when the one I check for plays but the normal sound still plays no matter what. I want to replace the sound entirely. return Plugin_Stop; also does not cancel the sound
Also
PHP Code:
if (StrContains(sound, "weapons/demo_charge_windup", false) != -1)
never returns true, it can't detect the sound though I am sure it's playing. What's going on there? Is it ambient, and how do I know what sounds are which
The thing is I know these things worked in plugins like TF2Fix and BeTheRobot, I can't figure out what I'm doing differently or wrong