How to make a weapon to show damage?
Hello. Most weapons i have on my ZM server show damage dealt to zombies. However, I have some weapons (extra items) that deal damage, but don't show the numbers of damage.
This is the flamethrower weapon I added as an extra item to the server: https://pastebin.com/hJVQNeag It deals damage, but it doesn't show the numbers of dealt damage. Yes, my server already has a plugin that shows you how much damage you deal to your enemy while you are damaging your enemy. In case you want to know, this is the Bullet Damage plugin i use: https://forums.alliedmods.net/showthread.php?p=789735 If you add the code needed to make the flamethrower weapon to show damage, please, also mention what codes you added and where exactly you added them, so I can learn how to make weapons to show damage, because i have several more weapons that don't show damage, and i want to make them to show damage. Thanks. NOTE: Flamehtrower's code is uploaded on another hosting because AlliedModders doesn't accept codes that are too large. |
Re: How to make a weapon to show damage?
Your bullet damage plugin usses the "Damage" event to detect damage.
Your weapon uses the custom_weapon_dmg() function that calls only the client_damage() forward. This means that the bullet damage plugin cannot detect the damage because it doesn't use the same callback. You need to include the client_damage() function in your bullet damage plugin just like the "Damage" one is used. Code:
|
Re: How to make a weapon to show damage?
Quote:
|
| All times are GMT -4. The time now is 11:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.