EntIndexToEntRef Function

Converts an entity index into a serial encoded entity reference.

int EntIndexToEntRef(int entity)

Parameters

int entity

Entity index.

Return Value

Entity reference or -1 on invalid entity.

Errors

Entity index >= GetMaxEntities() or < 0