Garry's Mod Wiki

GM:PhysgunPickup

boolean GM:PhysgunPickup( Player player, Entity entity )
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.

Description

Called to determine if a player should be able to pick up an entity with the Physics Gun.

See GM:OnPhysgunPickup for a hook which is called when a player has successfully picked up an entity.

Arguments

1 Player player
The player that is picking up using the Physics Gun.
2 Entity entity
The entity that is being picked up.

Returns

1 boolean
Returns whether the player can pick up the entity or not.

Example

Allows Admins to pick up players.

hook.Add( "PhysgunPickup", "AllowPlayerPickup", function( ply, ent ) if ( ply:IsAdmin() and ent:IsPlayer() ) then return true end end )

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 3
Generate Html 11
SaveChanges (1) 8
Render Body 0
Render Sidebar 12