Raised This Month: $51 Target: $400
 12% 

Hooking Entity Spawn/Entities Created Through Other Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 09-01-2016 , 12:03   Hooking Entity Spawn/Entities Created Through Other Plugins
Reply With Quote #1

I am trying to hook entity spawn of various classnames but the hook is not called for entities created by other plugins. One of the classnames is info_target, yet I can't seem to find a method to hook their creation or spawn. Is there any forward that will always fire regardless of what plugin creates it or how an entity is created?
PartialCloning is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 09-02-2016 , 06:26   Re: Hooking Entity Spawn/Entities Created Through Other Plugins
Reply With Quote #2

It might work if you capture one of the entities and use RegisterHamFromEntity. If that's still not working, then I would guess the entities are not necessarily calling DLLFunc_Spawn. I'm not sure if entities created by EngFunc_CreateEntity spawn automatically or not, but in the case of an info_target they may not need to, in which case you would probably want to use the broader Fakemeta forward FM_CreateEntity/NamedEntity.
__________________

Last edited by Bad_Bud; 09-02-2016 at 06:30.
Bad_Bud is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-02-2016 , 07:20   Re: Hooking Entity Spawn/Entities Created Through Other Plugins
Reply With Quote #3

If they are created by AMXX, you can't use FM_CreateNamedEntity to hook that. It's the same thing as models precached by plugins not triggering FM_PrecacheModel. IIRC, if you hook them with orpheu(and you won't need to use signature of bytes, since functions are exported) it will work.
__________________
HamletEagle is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:24.


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