Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-06-2010 , 15:41   Ham_TakeDamage problem
Reply With Quote #1

PHP Code:
public _Ham_TakeDamage(id,Inflictor,Attacker,Float:Damage,DamageBits)
{
    if(
get_pcvar_num(p_On) && is_user_alive(id) && is_user_alive(Attacker) && (g_Countdown[id] > || (g_Dueling[id] != Attacker && g_Dueling[id]) || (!g_Dueling[id] && g_Dueling[Attacker]) || (get_pcvar_num(p_OnlyDuel) && !g_Dueling[id] && !g_Dueling[Attacker])))
        
SetHamParamFloat(4,0.0)
    
    
    if(
g_Dueling[id] && g_Dueling[Attacker])
    {
        new 
health get_user_healthid )
        if ( (
health Damage) < )
        {
            
set_user_health(id1)
            
            
            new 
Other g_Dueling[id]
            
g_Dueling[id] = 0
            g_Dueling
[Other] = 0
            
            
new NameAtt[32], NameVic[32]
            
get_user_name(AttackerNameAtt31)
            
get_user_name(idNameVic31)
            
            
            
Render(id,0,Float:{255.0,255.0,255.0})
            
            
ForwardPlayerPostThink(id)
            
            new 
Health get_user_health(Attacker)
            
client_print(id,print_chat,"[ARP] %s te porazil v duelu s %d zbyvajicimi zivoty.",NameAtt,Health)
            
client_print(Attacker,print_chat,"[ARP] Porazil jsi %s se %d zbyvajicimi zivoty.",NameVic,Health)
            
            
client_cmd(Attacker"say /me porazil %s v duelu!"NameVic)
            
            
Render(Attacker,0,Float:{255.0,255.0,255.0})
    
        }
        
    }

return 
HAM_IGNORED

Why the code above always blocks any damage? I don't know how to work with returns in HamSandwich, but I think it's caused by them.
Backstabnoob 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 05:22.


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