Garry's Mod Wiki

Revision Difference

ENTITY:PostEntityPaste#514633

<function name="PostEntityPaste" parent="ENTITY" type="hook">⤶ <ishook>yes</ishook>⤶ <description>⤶ Called after the <page>duplicator</page> pastes the entity, after the bone/entity modifiers have been applied to the entity.⤶ ⤶ This hook is called after <page>ENTITY:OnDuplicated</page>.⤶ </description>⤶ <realm>Server</realm>⤶ <predicted>No</predicted>⤶ <args>⤶ <arg name="ply" type="Player">The player who pasted the entity.&#xA;&#xA;&lt;warning&gt;This may not be a valid player in some circumstances. For example, when a save is loaded from the main menu, this hook will be called before the player is spawned. This argument will be a NULL entity in that case.&lt;/warning&gt;&#xA;&lt;bug pull=&quot;1408&quot;&gt;This will be nil for invalid players.&lt;/bug&gt;</arg>⤶ <arg name="ent" type="Entity">The entity itself. Same as &#x27;self&#x27;.</arg>⤶ <arg name="createdEntities" type="table">All entities that are within the placed dupe. &lt;note&gt;The keys of each value in this table are the original entity indexes when the duplication was created. This can be utilized to restore entity references that don&#x27;t get saved in duplications.&lt;/note&gt;</arg>⤶ </args>⤶ </function>⤶ ⤶