GetEntityClassname Function

Retrieves the classname of an entity. This is like GetEdictClassname(), except it works for ALL entities, not just edicts.

bool GetEntityClassname(int entity, char[] clsname, int maxlength)

Parameters

int entity

Index of the entity.

char[] clsname

Buffer to store the classname.

int maxlength

Maximum length of the buffer.

Return Value

True on success, false if there is no classname set.