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

Accessing EHANDLE member


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teh ORiON
Member
Join Date: Sep 2011
Location: Denmark
Old 06-09-2014 , 09:48   Accessing EHANDLE member
Reply With Quote #1

Hi,

Im in need of retrieving an entity which is stored as an EHANDLE, however it doesn't seem possible to retrieve it with get_pdata_ent() (returns -1) as it doesn't handle the conversion back to CBase, get_pdata_int() returns what seems like a pointer however.

So I need a method for converting an EHANDLE back to a CBaseEntity pointer and then getting the entity index. This is otherwise handled by these functions in CBase:

CBase
teh ORiON is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-09-2014 , 09:54   Re: Accessing EHANDLE member
Reply With Quote #2

https://github.com/alliedmodders/amx...emeta.inc#L385
__________________
Arkshine is offline
teh ORiON
Member
Join Date: Sep 2011
Location: Denmark
Old 06-09-2014 , 10:37   Re: Accessing EHANDLE member
Reply With Quote #3

Ah I see had missed that. It still doesn't work for me however, the EHANDLE is supposed to store a CBasePlayer, I get returned -1 still.
teh ORiON is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-09-2014 , 11:06   Re: Accessing EHANDLE member
Reply With Quote #4

It works, it has been tested. You probably did not read documentation enough, like offset is byte-based.
__________________
Arkshine is offline
teh ORiON
Member
Join Date: Sep 2011
Location: Denmark
Old 06-09-2014 , 11:43   Re: Accessing EHANDLE member
Reply With Quote #5

Ah yes, thanks works, got a bit confused!
teh ORiON 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 19:59.


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