FindEntityByClassname Function

Searches for an entity by classname.

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

Parameters

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.

Errors

Lack of mod support.