Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "oxygen"
new g_HostageEnt
new const g_sRemoveEntities[][] =
{
"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"
}
new const MAX_REMOVED_ENTITIES = sizeof(g_sRemoveEntities);
public plugin_precache()
{
register_forward(FM_Spawn, "fwdSpawn", 0)
new allocHostageEntity = engfunc(EngFunc_AllocString, "hostage_entity")
do
{
g_HostageEnt = engfunc(EngFunc_CreateNamedEntity, allocHostageEntity)
}
while( !pev_valid(g_HostageEnt) )
engfunc(EngFunc_SetOrigin, g_HostageEnt, Float:{0.0, 0.0, -55000.0})
engfunc(EngFunc_SetSize, g_HostageEnt, Float:{-1.0, -1.0, -1.0}, Float:{1.0, 1.0, 1.0})
dllfunc(DLLFunc_Spawn, g_HostageEnt)
}
public fwdSpawn(ent)
{
if( !pev_valid(ent) || ent == g_HostageEnt )
{
return FMRES_IGNORED;
}
new sClass[32];
pev(ent, pev_classname, sClass, 31);
for( new i = 0; i < MAX_REMOVED_ENTITIES; i++ )
{
if( equal(sClass, g_sRemoveEntities[i]) )
{
engfunc(EngFunc_RemoveEntity, ent);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}