Es.give

From EventScripts Community Encyclopedia
You cannot use this command with build 224 (ES 2.0) since there are problems in Python with it!


This article is a stub. Please help by adding to it.



Method: give

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

Gives the player a named entity.

This is the Python equivalent of: http://www.eventscripts.com/pages/es_give

Arguments

  • userid - UserID of player to give the entity to.
  • entityname - Name of an entity to give to the player, such as weapon_awp.


Examples

es.give(ev['userid'], weapon_awp)

Notes

You cannot use this command with build 224 (EventScripts 2.0) since there are problems in Python with it. You have to use old ESS cmd call. Example:

es.server.cmd('es_xgive %s %s' % (<userid variable>, <entity variable>))

  • Due to a bug in CS:S's dynamic weapon pricing this command refills the target player's ammo. When creating an entity that doesn't need to be given to a player, use es.entcreate.
  • Many entities such as env_explosion have outputs that can be modified using es.fire.
  • es.give sets eventscripts_lastgive to contain the entity index of the entity given.

See Also

http://python.eventscripts.com/pages/Es.entcreate
http://python.eventscripts.com/pages/Es.fire
http://python.eventscripts.com/pages/Es.remove
http://www.eventscripts.com/pages/Eventscripts_lastgive

blog comments powered by Disqus