Es entcreate

From EventScripts Community Encyclopedia


Overview

Syntax: es_entcreate <userid> <entityname>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xentcreate

Description

Creates an entity where a player is looking.

Parameters

  • userid - Userid of player to use when creating entity
  • entityname - Name of an entity to give to the player, such as env_explosion.


Examples

 // Create an env_explosion where a player is looking
 es_entcreate event_var(userid) env_explosion


Notes

  • Unlike es_give, es_entcreate does not modify the target player's ammo in CS:S.
  • Many entities such as env_explosion have outputs that can be modified using es_fire.
  • es_entcreate sets eventscripts_lastgive to contain the entity index of the entity given.


See also

blog comments powered by Disqus