Raised This Month: $ Target: $400
 0% 

healing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 05-19-2005 , 11:20  
Reply With Quote #2

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
Belsebub is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode