Raised This Month: $ Target: $400
 0% 

Jump sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 02-02-2010 , 01:16   Jump sound
Reply With Quote #1

How can I block jump sound? Im using
PHP Code:
set_user_footsteps(id1
to block user step sounds but I can still hear jump sound.
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
BannedUser!
BANNED
Join Date: Feb 2010
Old 02-02-2010 , 03:57   Re: Jump sound
Reply With Quote #2

Quote:
Originally Posted by benamo6 View Post
How can I block jump sound? Im using
PHP Code:
set_user_footsteps(id1
to block user step sounds but I can still hear jump sound.
In prethink
set_pev(id, pev_flTimeStepSound, STEPTIME_SILENT)

(NEEDED FAKEMETA)
BannedUser! is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-02-2010 , 12:52   Re: Jump sound
Reply With Quote #3

Fakemeta is the same, stay with fun.
You should use orpheu in order to block jump sounds.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 02-02-2010 , 13:20   Re: Jump sound
Reply With Quote #4

I never used orpheu before, Ive been reading but I cant get it could you give me a hand?
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-02-2010 , 13:31   Re: Jump sound
Reply With Quote #5

No sorry, i have no idea how to use that module.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-02-2010 , 15:51   Re: Jump sound
Reply With Quote #6

Quote:
Originally Posted by benamo6 View Post
How can I block jump sound? Im using
PHP Code:
set_user_footsteps(id1
to block user step sounds but I can still hear jump sound.
Probably done client-side. You can't block it with a server-side module/plugin.

All the PM_* we can hook, like PM_PlayStepSound() which plays the player's step sound, we can't block it because the same code is running on the client and because of the client prediction we can't block the function. The native set flTimeStepSound to a hight value (999) in a prethink function so PM_UpdateStepSound() will abort because there is a check "flTimeStepSound > 0 return". Now, the problem is PM_PlayStepSound() is called directly in PM_Jump() ( so when do a jump ). I will try a trick.
__________________

Last edited by Arkshine; 02-02-2010 at 16:01.
Arkshine is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 12-16-2010 , 12:32   Re: Jump sound
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
Probably done client-side. You can't block it with a server-side module/plugin.

All the PM_* we can hook, like PM_PlayStepSound() which plays the player's step sound, we can't block it because the same code is running on the client and because of the client prediction we can't block the function. The native set flTimeStepSound to a hight value (999) in a prethink function so PM_UpdateStepSound() will abort because there is a check "flTimeStepSound > 0 return". Now, the problem is PM_PlayStepSound() is called directly in PM_Jump() ( so when do a jump ). I will try a trick.
B.U.M.P.
lazarev is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-01-2011 , 00:15   Re: Jump sound
Reply With Quote #8

bump
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
lazarev
Veteran Member
Join Date: Sep 2008
Old 07-01-2011 , 07:37   Re: Jump sound
Reply With Quote #9

PHP Code:
#include < amxmodx >
#include < hlsdk_const >
#include < orpheu_stocks >

#define STEP_CONCRETE   0
#define STEP_METAL      1
#define STEP_DIRT    2
#define STEP_VENT    3       
#define STEP_GRATE      4       
#define STEP_TILE    5
#define STEP_SLOSH      6
#define STEP_WADE    7       
#define STEP_LADDER     8      
#define STEP_SNOW    9  
#define STEP_GRASS      10    

new const VERSION[] = "0.0.1";

new 
OrpheuStruct:pmove;
static 
iPlayer;
static 
g_iTeam33 ], bool:g_bPlayJumpStep33 ];

new 
footsteps_team;
new 
footsteps_jump_team;

public 
plugin_init() 
{
    
register_plugin"[ORPHEU] Footsteps"VERSION"Juice" );
    
    
footsteps_team register_cvar"footsteps_team""0" );
    
footsteps_jump_team register_cvar"footsteps_jump_team""1" );
    
    
register_messageget_user_msgid"TeamInfo" ), "msg_TeamInfo" );
    
    
OrpheuRegisterHookOrpheuGetDLLFunction"pfnPM_Move","PM_Move" ), "OnPM_Move" );
    
OrpheuRegisterHookOrpheuGetFunction"PM_PlayStepSound" ), "onPM_PlayStepSound" );
    
    if( 
get_pcvar_numfootsteps_team ) || get_pcvar_numfootsteps_jump_team ) )
    {
        
server_cmd"mp_footsteps 0" );
    }
}

public 
OrpheuHookReturn:OnPM_MoveOrpheuStruct:ppmoveserver )
{
    
pmove ppmove;
    
iPlayer OrpheuGetStructMemberppmove"player_index" ) + 1;
    
    
g_bPlayJumpStepiPlayer ] = 
    (    
OrpheuGetStructMember(OrpheuStruct:OrpheuGetStructMember(ppmove"cmd"), "buttons" ) & IN_JUMP)
    &&     
OrpheuGetStructMember(ppmove"onground") != -1
    
&&     ~(OrpheuGetStructMember(ppmove"oldbuttons") & IN_JUMP
    &&     ( 
        
get_pcvar_numfootsteps_jump_team ) == 
    
||     get_pcvar_numfootsteps_jump_team ) < && g_iTeamiPlayer ] == get_pcvar_numfootsteps_jump_team 
        )
    ? 
true false;
    
    return 
OrpheuIgnored;
}

// http://forums.alliedmods.net/showthread.php?t=123097/
// http://cs-sdk.googlecode.com/svn/trunk/pm_shared.c/
public OrpheuHookReturn:onPM_PlayStepSoundstepFloat:fvol )
{
    if( !
g_bPlayJumpStepiPlayer ] )
    {
        if
        ( !
get_pcvar_numfootsteps_team )
        ||
get_pcvar_numfootsteps_team ) < && get_pcvar_numfootsteps_team ) != g_iTeamiPlayer 
        )
        return 
OrpheuIgnored;
    }
    static 
iSkipStepirand;
    
irand random_num(0,1) + (OrpheuGetStructMemberpmove"iStepLeft" ) * 2);
    
    switch ( 
step )
    {
        case 
STEP_METAL:
        {
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_metal1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_metal3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_metal2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_metal4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        case 
STEP_DIRT:
        {
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_dirt1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_dirt3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_dirt2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_dirt4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        
        case 
STEP_VENT:
        {
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_duct1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_duct3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_duct2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_duct4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        
        case 
STEP_GRATE:
        {
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_grate1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_grate3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_grate2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_grate4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        case 
STEP_TILE:
        {
            if ( !
random_num(0,4) ) 
                
irand 4;
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_tile1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_tile3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_tile2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_tile4.wav"fvolATTN_NORM0PITCH_NORM );
                case 
4emit_soundiPlayerCHAN_BODY"player/pl_tile5.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        case 
STEP_SLOSH:
        {
            switch(
irand)
            {    
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_slosh1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_slosh3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_slosh2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_slosh4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        case 
STEP_WADE:
        {
            if ( 
iSkipStep == )
                
iSkipStep++;
            
            if ( 
iSkipStep++ == )
                
iSkipStep 0;
            
            switch(
irand)
            {
                
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_wade1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_wade2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_wade3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_wade4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        case 
STEP_LADDER:
        {
            switch(
irand)
            {                
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_ladder1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_ladder3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_ladder2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_ladder4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        default:
        {
            switch(
irand)
            {
                case 
0emit_soundiPlayerCHAN_BODY"player/pl_step1.wav"fvolATTN_NORM0PITCH_NORM );
                case 
1emit_soundiPlayerCHAN_BODY"player/pl_step3.wav"fvolATTN_NORM0PITCH_NORM );
                case 
2emit_soundiPlayerCHAN_BODY"player/pl_step2.wav"fvolATTN_NORM0PITCH_NORM );
                case 
3emit_soundiPlayerCHAN_BODY"player/pl_step4.wav"fvolATTN_NORM0PITCH_NORM );
            }
        }
        
    }
    
    return 
OrpheuIgnored;
}

public 
msg_TeamInfomsg_idmsg_dest )
{
    if ( 
msg_dest != MSG_ALL && msg_dest != MSG_BROADCAST )
        return;
    
    static 
idteam];
    
id get_msg_arg_int);
    
get_msg_arg_string2team);
    
    switch( 
team[0] )
    {
        case 
'T'g_iTeam[id] = 1;
        case 
'C'g_iTeam[id] = 2;
        
//case 'S': g_iTeam[id] = 3;
        
default:  g_iTeam[id] = 0;
    }

lazarev is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-01-2011 , 12:07   Re: Jump sound
Reply With Quote #10

Does that completely block the jumping sounds or just play a sound over it?
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
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 07:27.


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