Nice job! here two things... add it if you like.
How to remove properly the BuyZones in the map:
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_precache()
{
register_plugin("How", "are", "you?");
// If i am not wrong, this must be made in plugin_precache( )
new iEnt;
iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_map_parameters") );
SetKeyValue(iEnt, "buying", "3", "info_map_parameters");
dllfunc(DLLFunc_KeyValue, iEnt, 0);
}
SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
set_kvd(0, KV_ClassName, szClassName);
set_kvd(0, KV_KeyName, szKey);
set_kvd(0, KV_Value, szValue);
set_kvd(0, KV_fHandled, 0);
dllfunc(DLLFunc_KeyValue, iEnt, 0);
}
How to remove properly an entity in the map:
Code:
#include <amxmodx>
#include <fakemeta>
new const g_RemoveEntity[] = "func_push";
public plugin_precache()
{
register_plugin("Fine", "and", "you?");
// Remember to do this in plugin_precache, if you
// do this in plugin_init( ) this will not work!
register_forward(FM_Spawn, "HookFmSpawn", 1);
}
public HookFmSpawn(iEntity)
{
if(!pev_valid(iEntity) )
return FMRES_IGNORED;
new szClassName[32];
pev(iEntity, pev_classname, szClassName, 31);
if(equali(szClassName, g_RemoveEntity) )
{
engfunc(EngFunc_RemoveEntity, iEntity);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
Sry for my english!
__________________