GetGameSoundParams

Last Updated2018-07-08
Created At2014-07-04

Retrieves the parameters for a game sound. 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.

native bool GetGameSoundParams(const char[] gameSound, int& channel, int& soundLevel, float& volume, int& pitch, char[] sample, int maxlength, int entity = -2)

Parameters

const char[] gameSound
Name of game sound.
int& channel
Channel to emit with.
int& soundLevel
float& volume
Sound volume.
int& pitch
Sound pitch.
char[] sample
Sound file name relative to the "sound" folder.
int maxlength
Maximum length of sample string buffer.
int entity
Entity the sound is being emitted from.

Return Value

bool True if the sound was successfully retrieved, false if it was not found