Quote:
Originally Posted by Silvers
How can it be done in this plugin? How do I determine if I should be reading an int or string etc? When calling DHookGetParamObjectPtrVar for an int the server will crash if it's supposed to be a string.
|
Hi sorry I am not well versed in dhooks, I just tried using it last week.
But you could try this: I don't know if the offset should be divided by sizeof(int).
int fieldtype = DHookGetParamObjectPtrVar(hParams, 4, offset_of_fieldType, ObjectValueType_Int),
then check if fieldtype == FIELD_STRING or FIELD_INTEGER or some other type here:
https://github.com/ValveSoftware/sou.../datamap.h#L28
__________________