native

get_pdata_ent

Syntax

native get_pdata_ent(_index, _offset, _linuxdiff=20, _macdiff=20);

Description

Tries to retrieve an edict (entity encapsulation) pointer from an entity's private data.

This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4,
get_pdata_end searches in increments of 1.

Parameters

_index Entity index.
_offset Offset to search.
_linuxdiff Linux difference.
_macdiff Mac OS X difference.

Return

-2 if an invalid entity was found.
-1 if an empty entity was found.
Otherwise, an entity index is returned.