GM:OnPhysgunFreeze

From Garry's Mod
Jump to: navigation, search
 GM:OnPhysgunFreeze( )

Contents

Description

Called when a player freezes an entity with the Physgun.

Arguments

Entity weapon

The weapon that was used to freeze the entity.

Arguments

PhysObj physobj

PhysObj of the entity.

Arguments

Entity ent

The target entity.

Arguments

Player ply

The player who tried to freeze the entity.

Returns

boolean

Allows you to override whether the player can freeze the entity

Examples

Example

Only allows admins to freeze things.

hook.Add( "OnPhysgunFreeze", "PhysFreeze", function( weapon, phys, ent, ply )

  	if ( !ply:IsAdmin() ) then

		return false

	end

end )


Personal tools
Navigation