you can use get_user_aiming
from the amxmodx.inc:
/* If player doesn't hit at anything function returns 0.0,
* in other case the distance between hit point and player is returned.
* If player is aiming at another player then the id and part of body are set. */
native Float:get_user_aiming(index,&id,&body,dist=99 99);
maybe can do it something like this:
Code:
public heal(id) {
new targetid, body, distance
get_user_aiming(id, targetid, body, distance)
if (targetid && distance <= 100) {
set_user_health(targetid, get_user_health(targetid) + 3)
}
return PLUGIN_HANDLED
}
and add a check so the player cant heal over 100 hp