How do I make this work? SetHookChainArg ????
NOTE: This is not the original plugin, I got these from ze_vip_features.sma and modified as much as I knew... but need some help now.
- #include <amxmodx>
- #include <amxmisc>
- #include <hamsandwich>
- new g_pCvarDamage
- public plugin_init() {
- register_plugin("Knife Damage Multiplier", "1.0", "Nevermind")
- RegisterHam(Ham_TakeDamage, "player", "Fw_TakeDamage_Post", 1)
- g_pCvarDamage = register_cvar("knife_damage_multiplier", "2")
- }
- public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
- {
- if (!is_user_alive(iVictim) || !is_user_alive(iAttacker))
- return PLUGIN_CONTINUE // return HC_CONTINUE
- if (get_user_weapon(iAttacker) == CSW_KNIFE))
- {
- SetHookChainArg(4 , ATYPE_FLOAT, fDamage * get_pcvar_float(g_pCvarDamage))
- return PLUGIN_CONTINUE // return HC_CONTINUE
- }
- return PLUGIN_CONTINUE // return HC_CONTINUE
- }