native

rg_find_ent_by_class

Syntax

native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTable = false);

Description

Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper.

Parameters

start_index Entity index to start searching from. -1 to start from the first entity
classname Classname to search for
useHashTable Use this only for known game entities

Note

: Do not use this if you use a custom classname

Return

Entity index > 0 if found, 0 otherwise