Revision Difference
ENTITY:GravGunPunt#552811
<function name="GravGunPunt" parent="ENTITY" type="hook">
<ishook>yes</ishook>⤶
<description>
Called when this entity is about to be punted with the gravity gun (primary fire).
Only works in Sandbox derived gamemodes and only if <page>GM:GravGunPunt</page> is not overridden.
</description>
<realm>Shared</realm>
<predicted>No</predicted>⤶
<args>
<arg name="ply" type="Player">The player pressing left-click with the gravity gun at an entity</arg>
</args>
<rets>
<ret name="" type="boolean">Return true or false to enable or disable punting respectively.</ret>
</rets>
</function>
<example>
<description>Enables a scripted entity to be punted even when frozen.</description>
<code>
function ENT:GravGunPunt( ply )
self:GetPhysicsObject():EnableMotion( true )
return true
end
</code>
</example>