From Garry's Mod
Called whenever a player picks up an entity with the Physgun.
|NOTE||This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.|
The player that is picking up using the phys gun.
The entity that is being picked up.
Returns whether the player can pick up the entity or not.
Allows Admins to pick up players.
local function PlayerPickup(ply, ent) if ( ply:IsAdmin() and ent:GetClass():lower() == "player" ) then return true end end hook.Add("PhysgunPickup", "Allow Player Pickup", PlayerPickup)