Raised This Month: $ Target: $400
 0% 

[Help] Is there a way 2 block damage from a Weapon?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-16-2011 , 11:39   Re: [Help] Is there a way 2 block damage from a Weapon?
Reply With Quote #1

An example to explain :

Code:
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers ) new g_iMaxPlayers RegisterHam( Ham_TakeDamage , "player" , "fwTakeDamage" ) g_iMaxPlayers = get_maxplayers() public fwTakeDamage( victim , inflictor , attacker , Float:damage , damage_bits ) {      if( IsPlayer( attacker ) && is_user_alive( attacker ) && inflictor == attacker && ( get_user_weapon(attacker) == CSW_AWP || get_user_weapon(attacker) == CSW_DEAGLE ) )      {           return HAM_SUPERCEDE;      }      return HAM_IGNORED; }
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Reply



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 23:28.


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