In order to make an entity you have to do something like this.
PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < engine >
new const ClassName[ ] = "SaveDataFix" /*this will be the entity class name*/
public plugin_init ( ) {
new iEntity
iEntity = create_entity ( "info_target" )
set_pev( iEntity, pev_classname, ClassName );
set_pev( iEntity, pev_nextthink, get_gametime( ) + 0.3 );
register_forward( FM_Think, "fm_Think" );
}
public fm_Think ( iEntity ) {
if ( ! pev_valid ( iEntity ) ) // check if ent is invalid
return; //if so stop the function
set_pev( iEnt, pev_nextthink, get_gametime( ) + 1.0 ) //set a new think
/*
your block of code that the entity will do
*/
}