Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Hit hook issue
8 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
![cs2d lua hook](img/i_codehelp.png)
the original damage that will be caused is a parameter of the hit hook (hpdmg)! so you can use that value. downside: this already calculates how much armor weakens the damage. you might want that to happen but maybe you don't want armors to have any effect in your script.
in the latter case you can use the weapon parameter and the
![cs2d lua cmd](img/i_codehelp.png)
![user](img/i_friend.png)
in the latter case you can use the weapon parameter and the
itemtype command with parameter "dmg" to get the damage of that weapon. downside there: only works properly with the primary attack damage (ignoring zoomed damage and stuff).
![cs2d lua cmd](img/i_codehelp.png)
But the damage caused by explosions / buildings / entities, they don't appear in this function so they should be registered in a table when you can't get the damage through this command.
I'll add an additional parameter which contains the damage without armor calculations.
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)