PHP Code:
#include <amxmodx>
#include <fakemeta>
new g_iEntity
new g_iSolid
public plugin_init()
{
register_plugin( "Entity Remover at Plugin Start", "1.0", "Alucard" )
new iEnt = FM_NULLENT
new szModel[4]
while( (iEnt = engfunc(EngFunc_FindEntityByString, iEnt, "classname", "func_breakable")) )
{
pev(iEnt, pev_model, szModel, charsmax(szModel))
if( equal(szModel, "*1") )
{
g_iEntity = iEnt
g_iSolid = pev(g_iEntity, pev_solid)
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
Event_HLTV_New_Round()
}
}
}
public Event_HLTV_New_Round()
{
remove_task( g_iEntity )
if( pev_valid( g_iEntity ) )
{
set_pev(g_iEntity, pev_effects, pev(g_iEntity, pev_effects) & ~EF_NODRAW)
set_pev(g_iEntity, pev_solid, g_iSolid)
set_task(5.0, "Hide_Entity", g_iEntity)
}
}
public Hide_Entity( iEnt )
{
if( pev_valid(iEnt) )
{
set_pev(g_iEntity, pev_effects, pev(g_iEntity, pev_effects) | EF_NODRAW)
set_pev(g_iEntity, pev_solid, SOLID_NOT)
}
}
__________________