FM_Spawn is called when entitiy spawns, not when it is triggered. :/
EDIT: btw I was thinking of a Plugin which allows you to have new entities.
For example amx_trigger_countdown where you have a key value for time
and all those for how and where the hudmessage shall appear and what shall
be triggered if time is up but abort the countdown if the entity is triggered again.
With your words I sadly cannot create more than this:
Code:
/* Entity Addon by Silencer.
** Allows you to do more in game.
** You need to copy the following lines to the end of your *.fgd's:
--- To do: Add new entities for *.fgd here ---
** STOP COPYING ONE LINE ABOVE HERE +++ STOP COPYING ONE LINE ABOVE HERE +++ STOP COPYING ONE LINE ABOVE HERE **/
#include <amxmodx>
#include <fakemeta>
#define VERSION "1.0"
new all_entities[65][33]
new position
new bool:fatal_error
public plugin_init()
{
register_plugin("Entity Addon",VERSION,"Silencer")
register_forward(FM_Spawn,"EA_Check")
}
public EA_Check(ent)
{
new classname[32]
pev(ent,pev_classname,classname)
if(equali(classname,"amx_trigger_countdown"))
{
if(position>=64)
{
server_print("[ENTITY ADDON] Error: Map is using more than 64 'Entity Addon' Entities!")
fatal_error=true
}
else
{
all_entities[position][32]=classname[31]
position+=1
}
}
}
__________________