Raised This Month: $ Target: $400
 0% 

Fall Damage on event_damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-07-2012 , 10:11   Fall Damage on event_damage
Reply With Quote #1

I'm trying to cut out execution if fall damage happened to the client with the following code. But it never catches the fall damage. I've tried a number of ways including get_param(3) & DMG_FALL but nothing works. Am i making a mistake or does event_damage really not work like that?

PHP Code:
        register_event("Damage""Event_Damage""be""2!0")

public 
Event_Damage(victimID)
{
    if(!
is_user_alive(victimID) || !is_user_connected(victimID)) 
        return 
PLUGIN_CONTINUE
        
    
new attackerID get_user_attacker(victimID)
    
    if(!(
attackerID <= g_maxPlayers && attackerID == victimID
        || 
get_param(3) & DMG_FALL 
        
|| !is_user_alive(attackerID
        || 
get_user_weapon(attackerID) != CSW_KNIFE 
        
|| hasBrass(attackerID) == 0)
        return 
PLUGIN_CONTINUE
// more code 
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 08:18.


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