Es setplayerprop

From EventScripts Community Encyclopedia

Overview

Syntax: es_setplayerprop <userid> "<property>" <value>

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_xsetplayerprop

Description

Set the value of a class property for a player.

Parameters

  • userid - Userid of the user to assign the property to.
  • property - Direct name of the variable from source, i.e. CCSPlayer.m_iAccount (money that a CS:S player has)
  • value - Value to assign to the property.


Examples

//give a player $16000
es_setplayerprop event_var(userid) "CCSPlayer.m_iAccount" 16000


Notes

  • CBaseEntity is the base class of all entities and therefore all players. This contains basic entity properties such as m_vecOrigin.
  • Use with caution! - Improperly assigning a value to a player property can cause a server to crash.


See also

blog comments powered by Disqus