Garry's Mod Wiki


  boolean GM:OnPhysgunFreeze( Entity weapon, PhysObj physobj, Entity ent, Player ply )


Called when a player freezes an entity with the physgun.

This is not called for players or NPCs being held with the physgun.

Issue Tracker: 723


1 Entity weapon
The weapon that was used to freeze the entity.
2 PhysObj physobj
Physics object of the entity.
3 Entity ent
The target entity.
4 Player ply
The player who tried to freeze the entity.


1 boolean
Allows you to override whether the player can freeze the entity


Only allows admins to freeze things.

hook.Add( "OnPhysgunFreeze", "PhysFreeze", function( weapon, phys, ent, ply ) if not ply:IsAdmin() then return false end end )