View Single Post
Author Message
extrospect
Member
Join Date: Aug 2009
Old 05-01-2012 , 14:19   [EntProps] Array Ent Prop Has No Offset Value?
Reply With Quote #1

I'm trying to access the data stored to CTFPlayer detailing the buildings an engineer has built - from using dtwatchent it's become apparent that this information is being stored to the "player_object_array" ent prop:

Console output from dtwatchent when deploying a dispenser:
Code:
+ DT_TFPlayer m_nNewSequenceParity, DPT_Int, index 480, bits 3, value 5
+ DT_TFPlayer 003, DPT_Int, index 217, bits 10, value 100
+ DT_TFPlayer m_nResetEventsParity, DPT_Int, index 481, bits 3, value 5
+ DT_TFPlayer m_hLastWeapon, DPT_Int, index 253, bits 21, value 1303554
+ DT_TFPlayer m_hActiveWeapon, DPT_Int, index 489, bits 21, value 1403908
+ DT_TFPlayer m_flFirstPrimaryAttack, DPT_Float, index 422, bits 32, value 56.245
= 276 bits (35 bytes)

+ DT_TFPlayer "player_object_array", DPT_Array, index 441, bits 24, value Array

+ DT_TFPlayer m_flNextAttack, DPT_Float, index 449, bits 32, value 56.245
delta entity: 1
+ DT_TFPlayer m_nTickBase, DPT_Int, index 4, bits 32, value 3709
= 54 bits (7 bytes)
+ DT_TFPlayer m_flSimulationTime, DPT_Int, index 15, bits 8, value 8
delta entity: 1
+ DT_TFPlayer m_iBuildingsBuilt, DPT_Int, index 351, bits 10, value 1
+ DT_TFPlayer m_nTickBase, DPT_Int, index 4, bits 32, value 3713
+ DT_TFPlayer m_iBuildingsBuilt, DPT_Int, index 371, bits 10, value 1
Relevant area of CTFPlayer from sm_dump_netprops:
Code:
  -Member: m_nPlayerCondEx (offset 180) (type integer) (bits 15)
 -Member: m_hItem (offset 6796) (type integer) (bits 21)
  Sub-Class Table (2 Deep): DT_TFLocalPlayerExclusive
  -Member: m_vecOrigin (offset 724) (type 3) (bits 0)
  -Member: m_vecOrigin[2] (offset 732) (type float) (bits 0)
  -Member: player_object_array_element (offset 0) (type integer) (bits 21)

  -Member: "player_object_array" (offset 0) (type array) (bits 0)

  -Member: m_angEyeAngles[0] (offset 6856) (type float) (bits 8)
  -Member: m_bIsCoaching (offset 6545) (type integer) (bits 1)
  -Member: m_hCoach (offset 6548) (type integer) (bits 21)
  -Member: m_hStudent (offset 6552) (type integer) (bits 21)
  Sub-Class Table (2 Deep): DT_TFNonLocalPlayerExclusive
  -Member: m_vecOrigin (offset 724) (type 3) (bits 0)
The problem I'm facing is I cannot seem to find any sourcemod method which will actually return me a valid offset for either the "player_object_array" or the player_object_array_element properties. Both FindSendPropOffs and FindSendPropInfo return a value of 0.

I'm hoping someone who knows more about this than I do can at least point me in the right direction or tell me if it's even currently possible, as I would love to be able to at least read from this array even if I can't modify the data (which is my ultimate aim).

Thanks for any info or help anyone can provide
extrospect is offline