With that you can remove all defined ents from a map:
Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
static const PLUGIN_NAME[] = "Remove_Ents";
static const PLUGIN_AUTHOR[] = "regalis";
static const PLUGIN_VERSION[] = "1.0";
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_cvar(PLUGIN_NAME, PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
remove_door();
}
public remove_door()
{
new ent;
// Remove all rotating doors
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", "func_door_rotating")) != 0)
{
if(!pev_valid(ent)) return FMRES_IGNORED;
engfunc(EngFunc_RemoveEntity, ent);
}
// Remove all doors
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", "func_door")) != 0)
{
if(!pev_valid(ent)) return FMRES_IGNORED;
engfunc(EngFunc_RemoveEntity, ent);
}
// Remove all breakables
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", "func_breakable")) != 0)
{
if(!pev_valid(ent)) return FMRES_IGNORED;
engfunc(EngFunc_RemoveEntity, ent);
}
return FMRES_IGNORED;
}
__________________