Retrieves the entity index from a reference or validates an entity index.
The input ref is checked that it is still valid and refers to the same entity.
native int EntRefToEntIndex(int ref)
Parameters
int ref
Entity reference or index.
Return Value
int Entity index or returns INVALID_ENT_REFERENCE if ref is invalid.