Raised This Month: $ Target: $400
 0% 

Hooking bots hurt


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-24-2009 , 19:01   Hooking bots hurt
Reply With Quote #1

Does any one a way to hook if a bot is hurt.

Ham dosent work so is there another way more efficient then this

PHP Code:
public Event_Damageid )
{
 new 
weaponbodypart
 
new attacker get_user_attackeridweaponbodypart )
 
 if ( !
is_user_aliveid ) || !is_user_aliveattacker ) )
  return 
PLUGIN_CONTINUE
 
 
if ( weapon != CSW_KNIFE )
  return 
PLUGIN_CONTINUE
 
 
new iHealth get_user_healthid )
 new 
iDamage floatroundfloatread_data(2) ) * get_cvar_float"ncb_knife_damage" ) )
 if ( 
iHealth iDamage 
  
fakedamageid"weapon_knife"floatiDamage ), read_data) )
 else
 {
  
user_silentkillid )
  
make_deathmsgattackerid0"knife" )
 }
 
set_user_frags(attackerget_user_frags(attacker)+1)
 
 return 
PLUGIN_CONTINUE

Doc-Holiday is offline
 


Thread Tools
Display Modes

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:42.


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