Raised This Month: $ Target: $400
 0% 

[fw_TakeDamage] Incredible Numbers !


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MPKiller545
Junior Member
Join Date: Aug 2011
Old 06-24-2012 , 12:24   [fw_TakeDamage] Incredible Numbers !
Reply With Quote #1

Hi there !

I have a problem with my code. I wanted to make an ability that 50% of your damage absorbs to your health. (100 damage = 50 additional health)

PHP Code:
public fwTakeDamage(victiminflictorattackerFloat:damage)
{
        if(
siekiera[attacker] == 1)
    {
        
set_user_health(attacker, (get_user_health(attacker) + damage/2))
        
        if(
get_user_health(attacker) > 100)
        
set_user_health(attacker,100)
        
        
set_hudmessage(25500, -1.0, -1.006.012.0)
        
show_hudmessage(attacker"Wartosc leczenia: %i"damage/2)
        return 
HAM_HANDLED
    

The problem is, that message "Wartosc leczenia:" shows me the number like 12471329 when I shoot someone, and I heal with that value. But when I make an ability (for example: You have 30% that you will attack with double damage), It works fine!

Last edited by MPKiller545; 06-24-2012 at 12:24.
MPKiller545 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 06:13.


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