native

rg_create_entity

Syntax

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

Description

Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper.

Parameters

classname Entity classname
useHashTable Use this only for known game entities

Note

: Do not use this if you plan to change custom classname an entity after creation,
otherwise it will never be release from hash table even if an entity was destroyed,
and that to lead table to inflate/memory leaks

Return

Index of the created entity or 0 otherwise