AmbientSHook

Last Updated2018-07-08
Created At2007-12-02

Called when an ambient sound is about to be emitted to one or more clients. NOTICE: all parameters can be overwritten to modify the default behavior.

Action (char sample[PLATFORM_MAX_PATH], int& entity, float& volume, int& level, int& pitch, float pos[3], int& flags, float& delay)

Parameters

char sample[PLATFORM_MAX_PATH]
int& entity
Entity index associated to the sound.
float& volume
Volume (from 0.0 to 1.0).
int& level
Sound level (from 0 to 255).
int& pitch
Pitch (from 0 to 255).
float pos[3]
int& flags
Sound flags.
float& delay
Play delay.

Return Value

Action Plugin_Continue to allow the sound to be played, Plugin_Stop to block it, Plugin_Changed when any parameter has been modified.