PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >
#define PLUGIN_NAME "New-Plugin"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "x"
#define MAX_CLIENTS 32
new Float:g_flFastShot[ MAX_CLIENTS +1 ];
public plugin_init()
{
register_plugin
(
PLUGIN_NAME,
PLUGIN_VERSION,
PLUGIN_AUTHOR
);
RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_awp", "CBaseWeapon_SecondaryAttack_Pre", .Post = false );
RegisterHam( Ham_Killed, "player", "CBasePlayer_Killed_Pre", .Post = false );
}
public CBaseWeapon_SecondaryAttack_Pre( pEntity )
{
if( pev_valid( pEntity ) != 2 )
{
return HAM_IGNORED;
}
g_flFastShot[ get_pdata_cbase( pEntity , 41 , 4 ) ] = get_gametime( ) + 1.0;
return HAM_IGNORED;
}
public CBasePlayer_Killed_Pre( pVictim, pKiller )
{
if( !is_user_alive( pKiller ) )
return HAM_IGNORED;
if( g_flFastShot[ pKiller ] >= get_gametime( ) )
{
client_print( 0, print_chat, "Fast Shot.." );
}
return HAM_IGNORED;
}
__________________