EmitSoundToClient Function

Wrapper to emit sound to one client.

void EmitSoundToClient(int client, const char[] sample, int entity, int channel, int level, int flags, float volume, int pitch, int speakerentity, const float origin[3], const float dir[3], bool updatePos, float soundtime)

Parameters

int client

Client index.

const char[] sample

Sound file name relative to the "sound" folder.

int entity

Entity to emit from.

int channel

Channel to emit with.

int level

Sound level.

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.

Errors

Invalid client index or client not in game.