Try this
Code:
#include < amxmodx >
#include < engine >
enum _:GlowTypes {
Glow_Dropped,
Glow_Planted
};
new g_pCvar;
public plugin_init( ) {
register_plugin( "Bomb Glow", "1.0", "xPaw" );
g_pCvar = register_cvar( "bomb_glow", "3" ); // 0 - Dropped | 1 - Planted | 2 - Both
if( !find_ent_by_class( FM_NULLENT, "func_bomb_target" )
&& !find_ent_by_class( FM_NULLENT, "info_bomb_target" ) )
pause( "a" );
register_logevent( "BombDropped", 3, "2=Dropped_The_Bomb" );
register_logevent( "BombPlanted", 3, "2=Planted_The_Bomb" );
}
public BombDropped( )
if( IsEnabled( Glow_Dropped ) )
SetBombRender( find_ent_by_model( FM_NULLENT, "weaponbox", "models/w_backpack.mdl" ) );
public BombPlanted( )
if( IsEnabled( Glow_Planted ) )
SetBombRender( find_ent_by_model( FM_NULLENT, "grenade", "models/w_c4.mdl" );
SetBombRender( const iEntity ) {
if( !is_valid_ent( iEntity ) )
return;
// Your render code
}
bool:IsEnabled( const iType ) {
new iCvar = get_pcvar_num( g_pCvar );
return bool:( iCvar & iType );
}
__________________