Garry's Mod Wiki

Revision Difference

GM:EntityKeyValue#511352

<function name="EntityKeyValue" parent="GM" type="hook">⤶ <ishook>yes</ishook>⤶ <description>⤶ Called when a key-value pair is set on an entity, either by the engine (for example when map spawns) or <page>Entity:SetKeyValue</page>.⤶ ⤶ See <page>ENTITY:KeyValue</page> for a hook that works for scripted entities.⤶ ⤶ ⤶ See <page>WEAPON:KeyValue</page> for a hook that works for scripted weapons.⤶ </description>⤶ <realm>Shared</realm>⤶ <predicted>No</predicted>⤶ <args>⤶ <arg name="ent" type="Entity">Entity that the keyvalue is being set on</arg>⤶ <arg name="key" type="string">Key of the key/value pair</arg>⤶ <arg name="value" type="string">Value of the key/value pair</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="string">If set, the value of the key-value pair will be overridden by this string.</ret>⤶ </rets>⤶ </function>⤶ ⤶