Garry's Mod Wiki

ENTITY:GravGunPunt

boolean ENTITY:GravGunPunt( Player ply )

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 GM:GravGunPunt is not overridden.

Arguments

1 Player ply
The player pressing left-click with the gravity gun at an entity

Returns

1 boolean
Return true or false to enable or disable punting respectively.

Example

Enables a scripted entity to be punted even when frozen.

function ENT:GravGunPunt( ply ) self:GetPhysicsObject():EnableMotion( true ) return true end

Page Links


Special Pages


Wikis

?

Render Time: 102ms

Session 0
DB GetPage 25
Generate Html 9
SaveChanges 54
Render Body 0
Render Sidebar 12