GM:OnEntityCreated
Description
Called as soon as the entity is created. Very little of the entity's properties will be initialized at this stage. (keyvalues, classname, flags, anything), especially on the serverside.
Removing the created entity during this event can lead to unexpected problems. Use SafeRemoveEntityDelayed( entity, 0 ) to safely remove the entity.
Arguments
Example
When a prop spawns it yells.
Example
Adds all props and ragdolls into a list. More efficient alternative to looping over ents.GetAll.
Garry's Mod
Rust
Steamworks
Wiki Help