FindEntityByClassname Function

Searches for an entity by classname.

int FindEntityByClassname(int startEnt, const char[] classname)


int startEnt

The entity index after which to begin searching from. Use -1 to start from the first entity.

const char[] classname

Classname of the entity to find.

Return Value

Entity index >= 0 if found, -1 otherwise.


Lack of mod support.