Revision Difference
Entity:EntIndex#518532
<function name="EntIndex" parent="Entity" type="classfunc">
<description>
Gets the unique entity index of an entity.
<note>Entity indices are marked as unused after deletion, and can be reused by newly-created entities</note>
</description>
<realm>Shared</realm>
<rets>
<ret name="" type="number">The index of the entity.&lt;br /&gt;
&lt;br /&gt;-1 for clientside-only or serverside-only entities.</ret>
<ret name="" type="number">The index of the entity.<br />
<br />-1 for clientside-only or serverside-only entities.</ret>
</rets>
</function>
<example>
<description>Demonstrates the use of this function.</description>
<code>print( player.GetAll()[1]:EntIndex() )</code>
<output>1</output>
</example>