Resolved Knife Damage multiplier

Coding Help/Re-API Supported
Post Reply
neverminddw
Member
Member
Posts: 30
Joined: 2 Years Ago
Has thanked: 0
Been thanked: 2 times
Contact:

Knife Damage multiplier

#1

Post by neverminddw » 1 Month Ago

Hi. Can anyone show me how do I convert this to work with HamSandwich..

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.
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4.  
  5. new g_pCvarDamage
  6.  
  7. public plugin_init() {
  8.     register_plugin("Knife Damage Multiplier", "1.0", "Nevermind")
  9.    
  10.     RegisterHam(Ham_TakeDamage, "player", "Fw_TakeDamage_Post", 1)
  11.    
  12.     g_pCvarDamage = register_cvar("knife_damage_multiplier", "2")
  13. }
  14.  
  15. public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
  16. {
  17.     if (!is_user_alive(iVictim) || !is_user_alive(iAttacker))
  18.         return PLUGIN_CONTINUE // return HC_CONTINUE
  19.    
  20.     if (get_user_weapon(iAttacker) == CSW_KNIFE))
  21.     {
  22.         SetHookChainArg(4 , ATYPE_FLOAT, fDamage * get_pcvar_float(g_pCvarDamage))
  23.         return PLUGIN_CONTINUE // return HC_CONTINUE
  24.     }
  25.    
  26.     return PLUGIN_CONTINUE // return HC_CONTINUE
  27. }

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 209
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#2

Post by sPe3doN » 1 Month Ago


neverminddw
Member
Member
Posts: 30
Joined: 2 Years Ago
Has thanked: 0
Been thanked: 2 times
Contact:

#3

Post by neverminddw » 1 Month Ago

Forget it. I've solved the problem.

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 209
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#4

Post by sPe3doN » 1 Month Ago

okay

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest