Gets the unique entity index of an entity.
-1 for clientside-only or 0 for serverside-only entities.
Demonstrates the use of this function.