Raised This Month: $32 Target: $400
 8% 

Entity Parenting detection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benefitOfLaughing
Member
Join Date: Nov 2013
Old 03-14-2014 , 11:35   Entity Parenting detection
Reply With Quote #1

How can I detect a entity whether is parent to other child entity or not. Because I want a plugin delete weapons without delete zombie escape god weapon. The god weapon is a normal weapon tied with a child button.

Last edited by benefitOfLaughing; 03-14-2014 at 11:37.
benefitOfLaughing is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 03-14-2014 , 16:07   Re: Entity Parenting detection
Reply With Quote #2

try these datamap properties "m_hMoveChild", "m_hMoveParent"
blodia is offline
benefitOfLaughing
Member
Join Date: Nov 2013
Old 03-15-2014 , 01:52   Re: Entity Parenting detection
Reply With Quote #3

Thank you very much.

Success Code for others:
Code:
new childEntity = GetEntPropEnt(targetEntity, Prop_Data, "m_hMoveChild");
new parentEntity = GetEntPropEnt(targetEntity, Prop_Data, "m_hMoveParent");
if -1 means no entity found
otherwise true

Last edited by benefitOfLaughing; 03-15-2014 at 01:53.
benefitOfLaughing is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 03-15-2014 , 05:25   Re: Entity Parenting detection
Reply With Quote #4

Weird, I didn't really think that there would be a "child" datamap, as an entity can have more than just one child...
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 03-15-2014 , 08:18   Re: Entity Parenting detection
Reply With Quote #5

Yop, and it would be awesome to have something like FollowEntity() in sourcemod...

Last edited by KissLick; 03-15-2014 at 08:18.
KissLick is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 03-17-2014 , 08:33   Re: Entity Parenting detection
Reply With Quote #6

Quote:
Originally Posted by MasterOfTheXP View Post
Weird, I didn't really think that there would be a "child" datamap, as an entity can have more than just one child...


It's array?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Reply


Thread Tools
Display Modes

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 10:31.


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