EmitGameSound Function

Emits a game sound to a list of clients.

Game sounds are found in a game's scripts/game_sound.txt or other files referenced from it

Note that if a game sound has a rndwave section, one of them will be returned at random.

bool EmitGameSound(const int[] clients, int numClients, const char[] gameSound, int entity, int flags, int speakerentity, const float origin[3], const float dir[3], bool updatePos, float soundtime)


const int[] clients

Array of client indexes.

int numClients

Number of clients in the array.

const char[] gameSound

Name of game sound.

int entity

Entity to emit from.

int flags

Sound flags.

int speakerentity


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.

Return Value

True if the sound was played successfully, false if it failed


Invalid client index.