Raised This Month: $ Target: $400
 0% 

Hook Prop_Dynamic_Override Creation?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ktm
Member
Join Date: Aug 2012
Old 09-18-2013 , 18:21   Hook Prop_Dynamic_Override Creation?
Reply With Quote #1

Hey all. I'm to figure out how to hook the creation of a Prop_Dynamic_Override that is spawned by the CreateEntityByName method. Can you hook the creation of an entity? If so, how?
__________________
My Plugins:
Zombie Fortress Redux
ktm is offline
Taz532
Senior Member
Join Date: Jul 2011
Location: Michigan
Old 09-18-2013 , 19:02   Re: Hook Prop_Dynamic_Override Creation?
Reply With Quote #2

sdkhooks has

forward OnEntityCreated(entity, const String:classname[]);

Does that not work for entities you spawn yourself?
Taz532 is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 09-18-2013 , 20:55   Re: Hook Prop_Dynamic_Override Creation?
Reply With Quote #3

Well, if you spawn them yourself, you can easily store entity references after you create them.
If not, sdkhooks works just fine.
PHP Code:
#include <sdkhooks>

public OnEntityCreated(entity, const String:classname[]) {

    if (
StrEqual(classname"prop_dynamic_override"false)) {
        
// entity is the index of Prop_Dynamic_Override
    
}


Last edited by xf117; 09-18-2013 at 20:56.
xf117 is offline
Send a message via ICQ to xf117
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 07:52.


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