Hi , can anyone help me adding cvar to this code i want to turn it on off sometimes this is powered by : Bugsy
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#define MAX_PLAYERS 32
#define DMG_GRENADE (1<<24)
#define IsPlayer(%1) (1<=%1<=MAX_PLAYERS)
public plugin_init()
{
RegisterHam( Ham_TakeDamage , "player" , "TakeDamage" );
}
public TakeDamage( Victim , Inflictor , Attacker , Float:fDamage , DmgBits )
{
return ( IsPlayer( Attacker ) && !( DmgBits & DMG_GRENADE ) && ( get_user_weapon( Attacker ) == CSW_KNIFE ) ) ? HAM_SUPERCEDE : HAM_IGNORED;
}