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

Setting damage to weapons doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
!Morte
Veteran Member
Join Date: May 2010
Old 05-22-2015 , 19:02   Setting damage to weapons doesn't work
Reply With Quote #1

I'm trying to set 'x' damage to some weapons, something that I thought that it would be easy, but i don't know why the damage doesn't change.

This is the code:

PHP Code:
new Float:g_damage[ ] =
{
    
2.0,
    
3.0,
    
4.0
};

//on takedamage forward
    
for( new 0THE_WEAPONSi++ )
    {
        if( !
g_Weaponsattacker ][ ] )
            continue;
            
        
damage *= g_damage]
    }
    
    
SetHamParamFloat4damage ); 
I check with a print if i was getting correctly the values of the damage and it does, but the damage doesn't set.

I think this may have a really stupid solution because i think i'm forgetting something
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
Old 05-23-2015, 07:52
HamletEagle
This message has been deleted by HamletEagle. Reason: Wrong
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-23-2015 , 07:59   Re: Setting damage to weapons doesn't work
Reply With Quote #2

No, you don't need to return something.
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-23-2015 , 08:30   Re: Setting damage to weapons doesn't work
Reply With Quote #3

In Ham_TakeDamage I've experienced issues when not returning HAM_HANDLED, damage refused to be applyed, even if it was read correctly. I have to test myself again, maybe you are right(this happened some time ago, not sure to remember well, will see).

Edit: Just tested, you are right. Sorry for saying bullshit, don't know why it was not working without it before.
__________________

Last edited by HamletEagle; 05-23-2015 at 08:49.
HamletEagle is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-23-2015 , 08:35   Re: Setting damage to weapons doesn't work
Reply With Quote #4

Without the full code we can't tell for sure what's wrong.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Old 05-23-2015, 08:37
Jhob94
This message has been deleted by Jhob94. Reason: he was faster
!Morte
Veteran Member
Join Date: May 2010
Old 05-23-2015 , 13:26   Re: Setting damage to weapons doesn't work
Reply With Quote #5

Forget it, i solved the problem, thanks
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
Reply



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 02:01.


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