When player press E he gets +2 hp example:
Code:
#include <amxmodx>
public plugin_init() {
register_plugin(...)
register_forward(FM_PlayerPrethink, "prethink")
}
public prethink(id) {
new button = pev(id, pev_button)
if(button == IN_USE) {
set_user_health(id, get_user_health(id)+2)
}
return PLUGIN_CONTINUE
}