Raised This Month: $ Target: $400
 0% 

Replace footsteps sounds with other sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-17-2011 , 17:05   Replace footsteps sounds with other sounds
Reply With Quote #1

Hey, i tried this but doesnt work..
I want to replace default player footstep sounds with custom ones

PHP Code:


new const gDefaultStepSounds[ ][ ] =
{
    
"player/pl_dirt1.wav""player/pl_dirt2.wav""player/pl_dirt3.wav""player/pl_dirt4.wav",
    
"player/pl_duct1.wav""player/pl_duct2.wav""player/pl_duct3.wav""player/pl_duct4.wav",
    
"player/pl_grate1.wav""player/pl_grate2.wav""player/pl_grate3.wav""player/pl_grate4.wav",
    
"player/pl_metal1.wav""player/pl_metal2.wav""player/pl_metal3.wav""player/pl_metal4.wav",
    
"player/pl_slosh1.wav""player/pl_slosh2.wav""player/pl_slosh3.wav""player/pl_slosh4.wav",
    
"player/pl_snow1.wav""player/pl_snow2.wav""player/pl_snow3.wav""player/pl_snow4.wav"
    
"player/pl_snow5.wav""player/pl_snow6.wav""player/pl_step1.wav""player/pl_step2.wav"
    
"player/pl_step3.wav""player/pl_step4.wav""player/pl_tile1.wav""player/pl_tile2.wav",
    
"player/pl_tile3.wav""player/pl_tile4.wav""player/pl_tile5.wav"
};

public 
forward_EmitSound( const iEntity, const iChannel, const szSound[ ] )
{
    if( 
pev_validiEntity ) )
    {
        for( 
0sizeof gDefaultStepSoundsi++ )
        {
            if( 
equaliszSoundgDefaultStepSounds] ) != -)
            {
                
emit_soundiEntityiChannelgNewFootstepsrandom_num0charsmaxgNewFootsteps ) ) ], VOL_NORMATTN_NORM0PITCH_NORM );
        
                return 
FMRES_SUPERCEDE;    
            }
        }
    }
    
    return 
FMRES_IGNORED;


doesnt work
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2011 , 17:58   Re: Replace footsteps sounds with other sounds
Reply With Quote #2

You have to hook PM_IDontRememberWhat with orpheu PM_PlaySound or PM_StepSound, block and replace with whatever the system you want.
Look at some anticheat from IDontRemeberWho, may be OT, this system is already used.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 11-17-2011 , 19:29   Re: Replace footsteps sounds with other sounds
Reply With Quote #3

Useful threads:

http://forums.alliedmods.net/showthr...light=footstep
http://forums.alliedmods.net/showthr...light=footstep
http://forums.alliedmods.net/showthr...light=footstep
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
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 08:25.


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