Raised This Month: $ Target: $400
 0% 

leech bullets


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-19-2009 , 03:55   Re: leech bullets
Reply With Quote #2

Did you mean if i shoot you and you have 50hp, my hp will be set to 50 ?
Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> public plugin_init()     RegisterHam( Ham_TakeDamage, "player", "ham_takedamage" );     public ham_takedamage( victim, inflictor, attacker, Float:damage, damagebits ) {     if( ! ( damagebits & DMG_BULLET ) )         return HAM_IGNORED;             static fHealth;     pev( victim, pev_health, fHealth );         if( pev( attacker, pev_health ) != fHealth )         set_pev( attacker, pev_health, fHealth );             return HAM_IGNORED; }
If you want to add your hp to mine
Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> public plugin_init()     RegisterHam( Ham_TakeDamage, "player", "ham_takedamage" );     public ham_takedamage( victim, inflictor, attacker, Float:damage, damagebits ) {     if( ! ( damagebits & DMG_BULLET ) )         return HAM_IGNORED;             static f_vHealth, f_aHealth;     pev( victim, pev_health, f_vHealth );     pev( attacker, pev_health, f_aHealth );         set_pev( attacker, pev_health,  f_aHealth+f_vHealth );             return HAM_IGNORED; }
__________________

anakin_cstrike 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 17:06.


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