Thread: [Solved] No Fall Demage Code Problem!
View Single Post
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