Es getplayerprop

From EventScripts Community Encyclopedia


Overview

Syntax: es_getplayerprop <variable> <userid> "<property>"

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_xgetplayerprop

Description

Get the value of a class property from the player.

Parameters

  • variable - Variable to assign the player property to.
  • userid - Userid of the user to get the property from.
  • property - Direct name of the variable from source, i.e. CBaseEntity.vecOrigin (location of the player in the map)


Examples

 es_xsetinfo player_loc 0
 es_getplayerprop player_loc event_var(userid) "CBaseEntity.m_vecOrigin"
 es_msg Player event_var(es_username) is located at: server_var(player_loc)
 
//possible output:
//Player Pwner is located at: -144.248990,1234.812397,12.123091 


Notes

  • Class which contains the source variable name may not always be CBaseEntity, although this is the superclass of all other source entity classes. Other subclasses may have their own variables, such as CCSPlayer, which contains information such as m_iAccount, for how much money a player has.


See also

blog comments powered by Disqus