Hello everybody,
I've got this code here :
PHP Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#define PLUGIN "Remove Map Objectives"
#define AUTHOR ""
#define VERSION "1.0.0"
new const g_szObjectives[][] =
{
"func_bomb_target",
"info_bomb_target",
"hostage_entity",
"monster_scientist",
"func_hostage_rescue",
"info_hostage_rescue",
"info_vip_start",
"func_vip_safetyzone",
"func_escapezone"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_Spawn,"fw_SpawnPost",1)
}
public fw_SpawnPost( iEntity )
{
new szClassname[ 32 ];
pev( iEntity, pev_classname, szClassname, charsmax( szClassname ) );
for( new i = 0; i < sizeof g_szObjectives; i++ )
{
if( equali( szClassname, g_szObjectives[ i ] ) )
{
remove_entity( iEntity );
break;
}
}
}
It should remove the Map objectives, but it doesn't work. Any idea why?
__________________