Es setindexprop
From EventScripts Community Encyclopedia
|
[edit] OverviewSyntax: 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_xsetindexprop [edit] DescriptionSet the value of a class property from the entity defined by index. [edit] Parameters
[edit] ExamplesExample: (Silence all dropped m4's) //populate a database 'm4list' with information //about all m4's on the map or in player's hands es_xcreateentitylist m4list weapon_m4a1 //for each m4 in the database, if it's not held by a player, set it's silencer to 1: es_foreachkey m4index in m4list "es_xdoblock script/silence" block silence { es_xsetinfo held_by_player 0 es_getindexprop held_by_player server_var(m4index) "CBaseCombatWeapon.m_hOwner" //if the weapon has been dropped, it's owner is set to -1 if (server_var(held_by_player) == -1) then es_setindexprop server_var(m4index) "CWeaponM4A1.m_bSilencerOn" 1 }
[edit] Notes
[edit] See also |
|
