Garry's Mod Wiki

Revision Difference

ENTITY:OnEntityCopyTableFinish#514617

<function name="OnEntityCopyTableFinish" parent="ENTITY" type="hook">⤶ <ishook>yes</ishook>⤶ <description>⤶ Called after duplicator finishes saving the entity, allowing you to modify the save data.⤶ ⤶ This is called after <page>ENTITY:PostEntityCopy</page>.⤶ </description>⤶ <realm>Server</realm>⤶ <predicted>No</predicted>⤶ <args>⤶ <arg name="data" type="table">The save &lt;page&gt;EntityCopyData&lt;/page&gt; that you can modify.</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Prevent this entity from being copied and subsequently pasted.</description>⤶ <code>⤶ function ENT:OnEntityCopyTableFinish( data )⤶ for k, v in pairs( data ) do data[ k ] = nil end⤶ end⤶ </code>⤶ ⤶ </example>