Garry's Mod Wiki

util.IsValidPhysicsObject

  boolean util.IsValidPhysicsObject( Entity ent, number physobj )

Description

Checks whether the given numbered physics object of the given entity is valid or not. Most useful for ragdolls.

Arguments

1 Entity ent
The entity to take.
2 number physobj
Number of the physics object to test.

Returns

1 boolean
true that's valid, false otherwise.