EmitSoundToClient

Last Updated2021-06-24
Created At2007-07-07

Wrapper to emit sound to one client.

stock void EmitSoundToClient(int client, const char[] sample, int entity = -2, int channel = SNDCHAN_AUTO, int level = SNDLEVEL_NORMAL, int flags = SND_NOFLAGS, float volume = 1.000000, int pitch = 100, int speakerentity = -1, const float origin[3] = NULL_VECTOR, const float dir[3] = NULL_VECTOR, bool updatePos = true, float soundtime = 0.000000)

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.

Return Value

void

Error

Invalid client index or client not in game.