How would I do a check here...if i want to cehck if the entity func_breakable has spawnflags set to 1 ??
Code:
#include <amxmodx>
#include <fakemeta>
new const PLUGIN_NAME[] = "Remove Breakable Stuff & Hostages"
new const PLUGIN_AUTHOR[] = "Cheap_Suit"
new 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)
register_event("HLTV", "event_hltv", "a", "1=0", "2=0")
}
public event_hltv()
{
remove_entity_by_classname("func_breakable")
remove_entity_by_classname("hostage_entity")
remove_entity_by_classname("scientist_entity")
remove_entity_by_classname("func_door_rotating")
remove_entity_by_classname("func_door")
}
stock remove_entity_by_classname(const classname[])
{
new ent = -1
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", classname)))
//I NEED TO ADD HERE TO CHECK IF spawnflags = 1 for func_breakable ??
//IF spawnflags = 1 then return...else remove entity
engfunc(EngFunc_RemoveEntity, ent)
}