FindSendPropInfo Function

Given a ServerClass name, finds a networkable send property offset. This information is cached for future calls.

int FindSendPropInfo(const char[] cls, const char[] prop, PropFieldType& type, int& num_bits, int& local_offset, int& array_size)

Parameters

const char[] cls

Classname.

const char[] prop

Property name.

PropFieldType& type

Optional parameter to store the type.

int& num_bits

Optional parameter to store the number of bits the field uses, if applicable (otherwise 0 is stored). The number of bits varies for integers and floats, and is always 0 for strings.

int& local_offset

Optional parameter to store the local offset, as FindSendPropOffs() would return.

int& array_size

Optional parameter to store array size, 0 if not an array.

Return Value

On success, returns an absolutely computed offset. If no offset is available, 0 is returned. If the property is not found, -1 is returned.