In
Hawk's Tutorial on Dynamic/Fake Natives, he provides the below example of usage.
My question is how to use the function that serves as the code for the native
within this base plugin.
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
register_plugin("Dynamic Native Test - Handler","1.0","Hawk552")
public plugin_natives()
{
register_library("dyn_test")
register_native("half_user_hp","_half_user_hp")
}
public _half_user_hp(iPlugin,iParams)
{
if(iParams != 1)
return PLUGIN_CONTINUE
new id = get_param(1)
if(!id)
return PLUGIN_CONTINUE
set_user_health(id,get_user_health(id) / 2)
return PLUGIN_HANDLED
}
How would I use _half_user_hp() within this plugin itself? The main question is
how can I get the 'id' parameter to it from within this plugin?
For example, if I wanted to make every user cut his hp in half when he spawned,
Code:
public event_ResetHUD( id ) {
_half_user_hp(......); // What goes in the brackets?
}
__________________