Raised This Month: $ Target: $400
 0% 

A way to make No fall damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-31-2009 , 07:21   Re: A way to make No fall damage
Reply With Quote #2

create a global variable that handles if players are immuned or not about fall damage, change that variable when a player buy no fall damage, or die or whatever.

PHP Code:
const MAX_PLAYERS 32

new g_bNoFallDamage[MAX_PLAYERS+1]

public 
plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""Ham_CBasePlayer_TakeDamage_Pre")
}

public 
Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType )
{
    if( 
iDamageType == DMG_FALL && g_bNoFallDamage[id] )
    {
    
//    SetHamParamFloat(4, 0.0)
        
SetHamReturnInteger(0)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 04:12.


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