Raised This Month: $ Target: $400
 0% 

Protect player from he grenade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-18-2014 , 12:57   Re: Protect player from he grenade
Reply With Quote #2

PHP Code:
#define DMG_HE (1<<24)

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_TakeDamage"player""Damage")
}

public 
Damage(victinfatkFloat:damagedmgb)
{
    if(
dmgb DMG_HE |/*ooor the other way*/inf == CSW_HEGRENADE)
        
SetHamParamFloat(4damage*0)
    

This code sets the damage from grenades to 0, in other words, not a single damage caused by grenade. If you want it to be in some special conditions, I advise you to use a boolean.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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 09:40.


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