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