AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook when an entity is destroyed (https://forums.alliedmods.net/showthread.php?t=314239)

eat1k 02-09-2019 14:15

Hook when an entity is destroyed
 
Is there any way to hook when an entity is destroyed? Example: a player has a weapon and we remove it, at this moment we need to do something (disable some hooks). Is it possible to hook this moment?

CrazY. 02-09-2019 14:39

Re: Hook when an entity is destroyed
 
FM_OnFreeEntPrivateData, Ham_Item_Kill, Ham_RemovePlayerItem, Ham_Killed.

eat1k 02-09-2019 15:29

Re: Hook when an entity is destroyed
 
FM_OnFreeEntPrivateData is also called when map starts. Ham_Item_Kill/Ham_RemovePlayerItem/Ham_Killed doesn't work but thanks.

It works with FM_RemoveEntity (thanks to voed).


All times are GMT -4. The time now is 07:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.