Es getentityindex

From EventScripts Community Encyclopedia


Overview

Syntax: es_getentityindex <variable> <entity-name>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xgetentityindex

Description

Gets the index of the first entity-name and stores it in variable


Parameters

  • variable - name of the variable where you want to save the entity index.
  • entity-name - name of the entity for which you want to find the first index.


Examples

// Get the index of the first AK47 and store it in variable "ak47index"
es_getentityindex ak47index weapon_ak47


Notes

  • This command only gets the index of the first named entity.
  • The index is for use in es_getindexprop and es_setindexprop.


See also

blog comments powered by Disqus