Get 'Owner' of other third entity
Hi, I haven't touched anything Pawn in many years and I'm a little green.
I want to get the owner of a third entity such as a bazooka. The plugin works like this: 1-You buy the Item, you receive a flag. 2-If the victim receives 500HP of damage from a Player (the player receives another flag). 3-If the victim dies, all the attackers that inflicted a damage of 500HP, will also die. So far everything works fine, the problem comes when we handle third entities, such as the famous plugins of: 1-ZP Bazooka. 2-ZP Taun Cannon. 3-ZP Plasma Rifle. 4-Other entities that cause harm to the victim "Player". I have tried everything and searched but without success, I do not handle the issue of entities well. PHP Code:
|
Re: Get 'Owner' of other third entity
It depends on how youre actually dealing the damage in the third party plugins such as custom weapons etc...
|
Re: Get 'Owner' of other third entity
I think as long as the entity deal damage via ExecuteHamB TakeDamge with correct attacker and victim input, it should work.
The attacker from those entity should be get from pev_owner PHP Code:
ExecuteHam also won't pass though takedamage forward, must be ExecuteHamB |
Re: Get 'Owner' of other third entity
Quote:
PHP Code:
PHP Code:
|
Re: Get 'Owner' of other third entity
PHP Code:
Because of that, it only Execute Ham_TakeDamage when people is about to dead when taking that damage => Quote:
(look at the highlight part and compare with your code)
Spoiler
The plugin "does damage" by setting player health though pev so it won't go through TakeDamage forward. You should replace it with this: PHP Code:
|
Re: Get 'Owner' of other third entity
Quote:
|
Re: Get 'Owner' of other third entity
Quote:
-If the victim is damaged with damage greater than her life, the bug reoccurs, even if other attackers damage the victim and obtain a flag. If the first / third attacker kills the victim with a single hit (only one), the bug occurs, and does not call the other functions. My Code (Sweet Revenge) PHP Code:
PHP Code:
|
Re: Get 'Owner' of other third entity
Celena luna
What is 2 suppose to mean in Execution of ham_TakeDamage Code:
ExecuteHamB(Ham_TakeDamage, id , 2, attacker, float(damage), DMG_GENERIC); For the topic author id suggest to organize your code more often. |
Re: Get 'Owner' of other third entity
Quote:
|
Re: Get 'Owner' of other third entity
I already know you didn't write the code infact it was taken from someone on the forums lets not get into who wrote it and who didn't the number 2 is a player index since entities with id numbers from 1 - 32 are reserved for players/clients
|
All times are GMT -4. The time now is 15:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.