hi,
i made this ( from just capture the flag plugin ) to remove some entities from maps like:
new const g_szRemoveEntities[][] =
{
"func_buyzone",
"func_bomb_target",
"info_bomb_target",
"player_weaponstrip",
"hostage_entity"
}
but doesnt work,
may somebody fix it? (i want to remove player_weaponstrip from maps)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
new gHook_EntSpawn
new const g_szRemoveEntities[][] =
{
"func_buyzone",
"func_bomb_target",
"info_bomb_target",
"player_weaponstrip",
"hostage_entity"
}
public plugin_precache()
{
gHook_EntSpawn = register_forward(FM_Spawn, "ent_spawn")
}
public ent_spawn(ent)
{
if(!is_valid_ent(ent))
return FMRES_IGNORED
static szClass[32]
entity_get_string(ent, EV_SZ_classname, szClass, charsmax(szClass))
for(new i = 0; i < sizeof g_szRemoveEntities; i++)
{
if(equal(szClass, g_szRemoveEntities[i]))
{
remove_entity(ent)
return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED
}
public plugin_init()
{
unregister_forward(FM_Spawn, gHook_EntSpawn)
}
__________________