Raised This Month: $ Target: $400
 0% 

Tag mismatch (Falldmg reducer)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-20-2010 , 07:14   Tag mismatch (Falldmg reducer)
Reply With Quote #1

Hello guys,

I try to reduce the fall damage of a player by a procent. (in this example 10%)

Here is my code:

PHP Code:
public fwTakeDamage(iVictimiInflictoriAttackerFloat:flDamageiDamage_type
{
    if(
iDamage_type DMG_FALL && iVictim <= 32 && iVictim >= 1)
    {
        switch(
dmglevel[iVictim])
        {
            case 
1:
            {
                new 
float:procent 10.0 // get the procent
                
new float:bDamage flDamage 100.0 // damage / 100
                
new float:aDamage bDamage procent // then multiply * procent to get the 10% of the damage
                
new dmg flDamage aDamage // remove the 10% from the real damage
                
SetHamParamFloat(4dmg); // set the damage
            
            
}
       }

but i get tag mismatches
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 07-20-2010 at 07:18.
mottzi is offline
Send a message via MSN to mottzi
 



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 07:03.


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