Is this the proper way?
Code:
new const cMyEntities[ ] =
{
"func_bomb_target",
"info_bomb_target",
"hostage_entity",
"monster_scientist",
"func_hostage_rescue",
"info_hostage_rescue",
"info_vip_start",
"func_vip_safetyzone",
"func_escapezone",
"armoury_entity",
"game_player_equip",
"player_weaponstrip"
}; new g_iSpawn;
public plugin_precache( )
g_iSpawn = register_forward( FM_Spawn, "Spawn" );
public plugin_init( )
unregister_forward( FM_Spawn, g_iSpawn );
public Spawn( E )
{
if( pev_valid( E ) )
{
static C[ 32 ], I;
pev( E, pev_classname, C, 32 );
for( I = 0; I < sizeof( cMyEntities ); I++ ) {
if( equal( cMyEntities[ I ], C ) ) {
engfunc( EngFunc_RemoveEntity, E ); break; }
}
}
}