Garry's Mod Wiki

Entity:SetShouldPlayPickupSound

  Entity:SetShouldPlayPickupSound( boolean playsound = false )

Description

Sets whether or not the entity should make a physics contact sound when it's been picked up by a player.

Arguments

1 boolean playsound = false
True to play the pickup sound, false otherwise.

Example

Enable pickup sound on all entities.

function GM:OnEntityCreated(ent) ent:SetShouldPlayPickupSound(true) end