Raised This Month: $12 Target: $400
 3% 

Solved No Fall Demage Code Problem!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-26-2020 , 18:41   No Fall Demage Code Problem!
Reply With Quote #1

Hello guys,
I have small problem i want help.
My question is: I was want to add no fall damage to bb mod and i have added some codes to plugin but nothing happening so where is the problem in those codes.

This is the defult
PHP Code:
public ham_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{
    if (!
is_valid_ent(victim) || !g_isAlive[victim] || !is_user_connected(attacker))
        return 
HAM_IGNORED
        
    
if(g_boolCanBuild || g_boolRoundEnded || g_boolPrepTime)
        return 
HAM_SUPERCEDE;

    if (
victim == attacker)
        return 
HAM_SUPERCEDE;
        
    if (
g_iSupercut)
    {
        
damage*=99.0
    
}
        
    
SetHamParamFloat(4damage)
    return 
HAM_HANDLED

What i did:
PHP Code:
public ham_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{
    if (!
is_valid_ent(victim) || !g_isAlive[victim] || !is_user_connected(attacker))
        return 
HAM_IGNORED
        
    
if(g_boolCanBuild || g_boolRoundEnded || g_boolPrepTime)
        return 
HAM_SUPERCEDE;

    if (
victim == attacker)
        return 
HAM_SUPERCEDE;
        
    if(
damagebits DMG_FALL)
        return 
HAM_SUPERCEDE;
        
    if (
g_iSupercut)
    {
        
damage*=99.0
    
}
        
    
SetHamParamFloat(4damage)
    return 
HAM_HANDLED

I added this but it's not work, can i get help ?
PHP Code:
if(damagebits DMG_FALL)
        return 
HAM_SUPERCEDE

Last edited by Supremache; 07-27-2020 at 16:47.
Supremache 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 23:26.


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