Code:
#include <amxmodx>
public plugin_natives()
{
register_natives("hat", "_hat");
}
public _hat(plugin_id, parameters)
{
return random_num(0, 1000);
}
// End of one plugin
/* Include file */
if #defined _hat_included
#endinput
#endif
#define _hat_included
native hat();
// end of include file
#include <amxmodx>
#include <hat>
public plugin_init()
{
server_print("Random Number [%d]", hat());
}
That how you make a native and call that native. There a tutorial about dynamic natives in the tutorial section if you want to read any more about it.
__________________