Raised This Month: $ Target: $400
 0% 

damage multiplier


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-23-2012 , 08:09   damage multiplier
Reply With Quote #1

How to make 3x damage for hegren and knife and for other weapons 5x?

PHP Code:
            switch( get_user_weaponattacker ) )
            {
                case 
CSW_HEGRENADESetHamParamFloat4damage 3.5 );
                case 
CSW_KNIFESetHamParamFloat4damage 3.5 );
            } 
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-23-2012 , 08:23   Re: damage multiplier
Reply With Quote #2

Isn't it ?

PHP Code:
SetHamParamFloat(4damage 5.0); 
Torge is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-23-2012 , 08:59   Re: damage multiplier
Reply With Quote #3

Quote:
Originally Posted by Torge View Post
Isn't it ?

PHP Code:
SetHamParamFloat(4damage 5.0); 

You mean ?

PHP Code:
switch( get_user_weaponattacker ) )
{
    case 
CSW_HEGRENADESetHamParamFloat4damage 3.5 );
    case 
CSW_KNIFESetHamParamFloat4damage 3.5 );
}  
SetHamParamFloat(4damage 5.0); 
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-23-2012 , 09:06   Re: damage multiplier
Reply With Quote #4

No, if you want it for AK47, here's a example:

PHP Code:
switch (get_user_weapon(attacker))
{
           case 
CSW_AK47SetHamParamFloat(4damage 5.0);

           
// And so on ..

Torge is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-23-2012 , 09:31   Re: damage multiplier
Reply With Quote #5

i need *5 damage for all weapons not only for ak.
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-23-2012 , 09:33   Re: damage multiplier
Reply With Quote #6

Use default in your switch statement then
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-23-2012 , 10:28   Re: damage multiplier
Reply With Quote #7

Is this will work?

PHP Code:
switch( get_user_weaponattacker ) )
{
    case 
CSW_HEGRENADESetHamParamFloat4damage 3.5 );
    case 
CSW_KNIFESetHamParamFloat4damage 3.5 );
    default 
SetHamParamFloat(4damage 5.0);  

__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-23-2012 , 10:37   Re: damage multiplier
Reply With Quote #8

default: SetHamParamFloat(4, damage * 5.0);


That should work
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-23-2012 , 10:41   Re: damage multiplier
Reply With Quote #9

Also make sure that your hook to Ham_TakeDamage is hooked as "pre".
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-23-2012 , 11:53   Re: damage multiplier
Reply With Quote #10

ok thanks guys.

I have one more question about damage. When i attack my team mate (friendlyfire is off) i get message that i make more damage for him how to block it?

PHP Code:
public fwHam victiminflictorattackerFloat:damagedmgbits )
{
    if ( !
enable || victim == attacker || cs_get_user_teamvictim ) == cs_get_user_teamattacker ) )
        return 
PLUGIN_HANDLED
doesn't block the message.
PHP Code:
cs_get_user_teamvictim ) == cs_get_user_teamattacker 
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
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 05:47.


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