General > Developers Corner
How can I get the weapon used when you damage someone.
Deathtitan77:
How can I do that?
Megiddo:
There's an OnDamage hook that gives you this information.
Deathtitan77:
Are you talking about this? http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index7801.html
Megiddo:
This one: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexedfa.html
Deathtitan77:
Well, I have a question for you. In this example: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexe50a.html using dmginfo:GetInflictor():GetClass() prints 'player', any idea why?
It also says here: Entity Inflictor(usually a weapon)
Navigation
[0] Message Index
[#] Next page
Go to full version