As an example of using this inc i use it just for curiostiy to see wich one is called faster, plugin_natives() / CFg / Precahe and Init with the following code:
PHP Code:
#include <amxmodx>
#include <debug>
public plugin_init( )
debug_log( 1, DEBUG_SERVER_CONSOLE, "Plugin Init" );
public plugin_precache()
debug_log( 1, DEBUG_SERVER_CONSOLE, "Precahe" );
public plugin_cfg( )
debug_log( 1, DEBUG_SERVER_CONSOLE, "Plguin Cfg" );
public plugin_natives( )
debug_log( 1, DEBUG_SERVER_CONSOLE, "Plugin Natives" );
Output:
Code:
L 05/26/2017 - 08:32:11: -------- Mapchange to de_dust2 --------
[Map: de_dust2, Time: 8:32] Plugin Natives
[Map: de_dust2, Time: 8:32] Precahe
[Map: de_dust2, Time: 8:32] Plugin Init
[Map: de_dust2, Time: 8:32] Plguin Cfg
Another think was to make a plugin that anytime i touch an entity to print me a message with its classsanem and index, i used FM_Touch to detect any kind of entity because i wanne see about all of them:
PHP Code:
#include <amxmodx>
#include <debug>
#include <fakemeta>
public plugin_init( )
{
register_forward(FM_Touch,"fwd_touch")
}
public fwd_touch( ent,id )
{
if( !pev_valid(ent) || !id )
return PLUGIN_HANDLED;
new classname[32];
pev(ent, pev_classname, classname, charsmax(classname) );
debug_log( 1, DEBUG_PLAYERS_CHAT, "Classname: %s | Index: %i", classname, ent );
return PLUGIN_CONTINUE;
}