EmitSoundEntry Function

Emits a sound or game sound to a list of clients using the latest version of the engine sound interface. This native is only available in engines that are greater than or equal to Portal 2.

void EmitSoundEntry(const int[] clients, int numClients, const char[] soundEntry, const char[] sample, int entity, int channel, int level, int seed, int flags, float volume, int pitch, int speakerentity, const float origin[3], const float dir[3], bool updatePos, float soundtime, any ...)

Parameters

const int[] clients

Array of client indexes.

int numClients

Number of clients in the array.

const char[] soundEntry

Sound entry name.

const char[] sample

Sound file name relative to the "sounds" folder.

int entity

Entity to emit from.

int channel

Channel to emit with.

int level

Sound level.

int seed

Sound seed.

int flags

Sound flags.

float volume

Sound volume.

int pitch

Sound pitch.

int speakerentity

Unknown.

const float[3] origin

Sound origin.

const float[3] dir

Sound direction.

bool updatePos

Unknown (updates positions?)

float soundtime

Alternate time to play sound for.

any ...

Optional list of Float[3] arrays to specify additional origins.

Errors

Invalid client index.