Garry's Mod Wiki

DropEntityIfHeld

  DropEntityIfHeld( Entity ent )

Description

We advise against using this. It may be changed or removed in a future update. You really should be using Entity:ForcePlayerDrop, which does the same thing.

Drops the specified entity if it is being held by any player with Gravity Gun, Physics Gun or +use pickup.

See also Player:DropObject and Entity:ForcePlayerDrop.

Arguments

1 Entity ent
The entity to drop.