hi guys, i am trying to do a "no pickup sound" when u pickup a weapon... i used all code of SchlumPF* plugin .. (weapon utilitys) but the plugin dont work :S
PHP Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"
new g_iBlockSound[33];
new g_iCvar[1];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_iCvar[0] = register_cvar( "weapons_blocksound", "1" );
register_forward( FM_EmitSound, "fwdEmitSound" );
}
public fwdEmitSound( plr, channel, const sound[] )
{
if( equali( sound, "items/gunpickup2.wav" ) )
{
if( get_pcvar_num( g_iCvar[0] ) && g_iBlockSound[plr] )
{
g_iBlockSound[plr]--;
return FMRES_SUPERCEDE;
}
if( get_pcvar_num( g_iCvar[0] ) == 0 )
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
public client_connect( plr )
{
g_iBlockSound[plr] = 0;
}
what is wrong in the code?