I wanted to make a bool that get a song directory from .cfg file and then emit to all clients on an evnt, similar to quake sounds.
I tried using key values for a better & easier configuration.. But I can't understant keyvalues.. maybe I have a problem XD
PHP Code:
bool GetSank(const char[] directory, const char[] quake_sound_name)
{
KeyValues kv = new KeyValues("Sound List");
if(KvJumpToKey(kv, sound_directory, true))
{
KvGetString(kv, "sound_name", sank_sound_name, 64, "");
}
}
Usage of the bool (I hope is correct) :
Code:
GetSound(directory, sound_name);
The string "directory" and "sound_name" form second code is already created..
I hope someone will have time for me. Thanks!
The .cfg file:
Code:
"Sank_List"
{
"file" "sound/kratos/kill.mp3"
"name" "kill"
}