This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[TF2] Soundhook Won't Override


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trotim
Junior Member
Join Date: Mar 2011
Old 08-29-2014 , 07:58   [TF2] Soundhook Won't Override
Reply With Quote #1

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], &numClientsString: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(soundsizeof(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
Trotim is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 08-29-2014 , 08:08   Re: [TF2] Soundhook Won't Override
Reply With Quote #2

Some sounds are clientside, overriding the footstep sound should work tho as i've done it myself
__________________
Pelipoika 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 09:02.


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