EmitGameSoundToClient Function

Wrapper to emit a game sound to one client.

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 EmitGameSoundToClient(int client, const char[] gameSound, int entity, int flags, int speakerentity, const float origin[3], const float dir[3], bool updatePos, float soundtime)

Parameters

int client

Client index.

const char[] gameSound

Name of game sound.

int entity

Entity to emit from.

int flags

Sound flags.

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.

Return Value

No description.

Errors

Invalid client index.