Raised This Month: $ Target: $400
 0% 

Double Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-11-2020 , 10:07   Re: Double Damage
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
You don't need CurWeapon. You can use "get_user_weapon" directly.
Awesome thanks for the info, this is what it's become. Will something like this work? Can't really test it on my own. and i don't have a proper bot plugin

PHP Code:
new const iWeapons[] =
{
    
CSW_AK47,
    
CSW_M4A1,
    
CSW_AWP
}; 
PHP Code:
public PreDoubleDamage(idiInflictoriAttackerFloat:iDamageiDamagebits)
{
    if(!
is_user_connected(iAttacker) || iAttacker != iInflictor || !bHasWeapon[iAttacker])
    {
        return 
HAM_IGNORED;
    }
    
    new 
iWeapon get_user_weapon(iAttacker)
    
    for(new 
isizeof(iWeapons); i++)
    {
        if(
iWeapon == iWeapons[i])
        {
            
SetHamParamFloat(4iDamage 2); 
        }
    }
    return 
HAM_HANDLED;

__________________

Last edited by Napoleon_be; 01-11-2020 at 10:28.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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:56.


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