Hook Entity Removal/Deletion/Killing
Is there any method to hook the moment when an entity is deleted from the game/map ?
|
Re: Hook Entity Removal/Deletion/Killing
The forward passes the entity index.
|
Re: Hook Entity Removal/Deletion/Killing
Updated, also
1. is there any empty field on entities to store strings ? like pev_iuser1 ? 2. is there any other way to hook all weapons on Ham_ItemDeploy/Ham_ItemKill than hooking each one of them one by one or with a loop ? |
Re: Hook Entity Removal/Deletion/Killing
Quote:
PHP Code:
|
Re: Hook Entity Removal/Deletion/Killing
1. It really depends on the entity, but I am pretty sure there are some unused string fields, like pev_noise1,2,3 (I know that doors definetely use those fields), pev_message.
|
Re: Hook Entity Removal/Deletion/Killing
I was thinking about pev_noise but im not sure if they are unused.. i guess i will have to find out..
Hams, i remember somewhere you were explaining us how to retrieve the weapon entity index from within the weaponbox in FM_SetModel forward, but i don't remember where.. Could you please tell me again how i can retrieve it ? |
Re: Hook Entity Removal/Deletion/Killing
Quote:
|
Re: Hook Entity Removal/Deletion/Killing
Quote:
Quote:
PHP Code:
This means that the while() loop is not really needed and the simplified code will be like: PHP Code:
|
Re: Hook Entity Removal/Deletion/Killing
Thanks Hams
|
Re: Hook Entity Removal/Deletion/Killing
Quote:
|
| All times are GMT -4. The time now is 23:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.