Raised This Month: $ Target: $400
 0% 

no pickup sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 07-22-2008 , 09:32   Re: no pickup sound
Reply With Quote #2

i just use the variable g_iBlockSound to block the pickupsound just when somebody is using the /weapons cmd in my plugin which increases the value by one for each weapon the palyer gets. in fwdEmitSound() it checks whether the sound should be blocked or not.
any way this shoudl work for you:
PHP Code:
#include <amxmodx>
#include <fakemeta>

#pragma semicolon 1

#define PLUGIN "Block Weaponpickup Sound"
#define AUTHOR "SchlumPF"
#define VERSION "1.0"

new g_iCvar;

public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
g_iCvar register_cvar"weaponpickup_sound""1" );
    
register_forwardFM_EmitSound"fwdEmitSound_Pre");
}

public 
fwdEmitSound_Preplrchannel, const sound[] )
{        
    if( 
equalsound"items/gunpickup2.wav" ) )
    {
        if( 
get_pcvar_numg_iCvar ) )
        {
            return 
FMRES_SUPERCEDE;
        }
    }
    
    return 
FMRES_IGNORED;

__________________

Last edited by SchlumPF*; 07-22-2008 at 13:17.
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
 



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 05:35.


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