Raised This Month: $ Target: $400
 0% 

Help Admin Double damage least some weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iloadding
Member
Join Date: Jul 2013
Old 01-19-2014 , 20:30   Help Admin Double damage least some weapons
Reply With Quote #1

Hello people,
good'm trying to create it not give double damage on certain weapons

I'm doing this:

PHP Code:
new bool:g_Enabled[33];

#define NO_DAMAGE (1<<2 | 1<<CSW_KNIFE | 1<<CSW_HEGRENADE) 
PHP Code:

RegisterHam 
Ham_TakeDamage"player""fw_TakeDamage" ); 
PHP Code:
public fw_TakeDamage victiminflictorattackerFloat:damage) {
    if ( ! ( 
g_Enabled[attacker] == true ) )
    return 
PLUGIN_HANDLED;
    new 
Weapon[20];
    
    for ( new 
=CSW_P228<=CSW_P90i++ ) {
        if ( ! ( 
NO_DAMAGE & (1<<i)) && get_weaponname(iWeaponcharsmax(Weapon))) {
            
            if ( 
is_user_connected attacker ) && is_user_alive attacker ) ) {
                
SetHamParamFloat 4damage );
            }
        }
    }
    return 
PLUGIN_CONTINUE;

he is running fine except that it does not removing the double damage of the weapons defined in NO_DAMAGE,
could someone help me?

Sorry for English
iloadding 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 10:04.


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