EmitGameSoundToAll

Last Updated2014-07-04
Created At2014-07-04

Wrapper to emit game sound to all 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.

stock bool EmitGameSoundToAll(const char[] gameSound, int entity = -2, int flags = SND_NOFLAGS, int speakerentity = -1, const float origin[3] = NULL_VECTOR, const float dir[3] = NULL_VECTOR, bool updatePos = true, float soundtime = 0.000000)

Parameters

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

bool

Error

Invalid client index.