AmbientSHook Typedef

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.

typedef AmbientSHook = function Action(char sample[], int& entity, float& volume, int& level, int& pitch, float pos[3], int& flags, float& delay)

Tags

sample

Sound file name relative to the "sound" folder.

entity

Entity index associated to the sound.

volume

Volume (from 0.0 to 1.0).

level

Sound level (from 0 to 255).

pitch

Pitch (from 0 to 255).

pos

Origin of sound.

flags

Sound flags.

delay

Play delay.