AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   increase bullet damage (https://forums.alliedmods.net/showthread.php?t=187703)

smdevilz 06-16-2012 19:03

increase bullet damage
 
I'm running a jailbreak server, anyway I want to increase the bullet damage on the deagle to 100% for CTs and Ts on a select day. What is AMX code exactly needed to do this?

I looked into the HAM #define DMG_BULLET but not quite sure that is it.

I am new to AMX coding but get the general idea of what to do.

Neeeeeeeeeel.- 06-16-2012 21:37

Re: increase bullet damage
 
PHP Code:

#include <amxmodx>
#include <hamsandwich>

const DAY_YOU_WANT_TO_INCREASE_DAMAGE 5;

public 
plugin_init( ) 
{
    
RegisterHamHam_TakeDamage"player""fw_TakeDamage" );
}

public 
fw_TakeDamagevictiminflictorattackerFloat:damagedamage_type )
{
    if( 
is_user_aliveattacker ) && get_user_weaponattacker ) == CSW_DEAGLE && get_jailbreak_day( ) == DAY_YOU_WANT_TO_INCREASE_DAMAGE )
    {
        
damage *= 2;
        
SetHamParamFloat4damage );
    }
}

public 
get_jailbreak_day( ) // just to make an example
    
return current_day


smdevilz 06-16-2012 21:43

Re: increase bullet damage
 
Thanks for taking the time to write up a script to help me out. I'll tweak it however necessary to get it to work with my current code. If there are any issues I will make another post.


All times are GMT -4. The time now is 06:11.

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