Get entity killer.
How can I hook the death of an entity and get its attacker? I've tried
PHP Code:
Is ham really the only way to do this? I've looks at some other examples on here but none of them work at all. At least this one can detect monster killed even tho it results in a crash. |
Re: Get entity killer.
Show your Killed() function.
|
Re: Get entity killer.
PHP Code:
|
Re: Get entity killer.
Try
PHP Code:
|
Re: Get entity killer.
Nope. Still crashes.
|
Re: Get entity killer.
It stills happens with the unofficial version of Ham ?
It might crash because in TFC Killed could has different params count. But it's most likely not the case. Is there a crash only when hooking on "func_wall" ? Or it crashes for all, "player", etc. ? |
Re: Get entity killer.
Crash happens with any entity.
|
Re: Get entity killer.
Checked and it's actually one param in more: Killed(entvars_s *, entvars_s *, int). if it crashes it's most likely because it uses the wrong handler (HL uses (entvars_s *, int)). Will fix that tomorrow. I would need to add a specific constant Ham_TFC_Killed.
|
Re: Get entity killer.
2 Attachment(s)
Tell me if it works. You have to use Ham_TFC_Killed. Updated include is provided.
|
Re: Get entity killer.
L 03/05/2013 - 16:50:24: [AMXX] Plugin ("MosterKiller.amxx") is setting itself as failed.
L 03/05/2013 - 16:50:24: [AMXX] Plugin says: Function tfc_killed is not configured in hamdata.ini. L 03/05/2013 - 16:50:24: [AMXX] Displaying debug trace (plugin "MosterKiller.amxx") L 03/05/2013 - 16:50:24: [AMXX] Run time error 1: forced exit L 03/05/2013 - 16:50:24: [AMXX] [0] hamsandwich.inc::__fatal_ham_error (line 376) |
| All times are GMT -4. The time now is 21:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.