Removing buyzone :
Code:
#include < amxmodx >
#include < engine >
#include < fakemeta >
new const info_map_parameters[ ] = "info_map_parameters";
new g_hSpawn;
public plugin_precache( )
{
new iEntity = create_entity( info_map_parameters );
DispatchKeyValue( iEntity, "buying", "3" );
DispatchSpawn( iEntity );
g_hSpawn = register_forward( FM_Spawn, "FwdSpawn" );
}
public FwdSpawn( iEntity )
{
static szClassname[ 32 ];
entity_get_string( iEntity, EV_SZ_classname, szClassname, 31 );
if( equal( szClassname, info_map_parameters ) )
{
remove_entity( iEntity );
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
public plugin_init( )
{
if( g_hSpawn > 0 )
{
unregister_forward( FM_Spawn, g_hSpawn );
}
}