Raised This Month: $ Target: $400
 0% 

Help with KeyValues (I'm n00b)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 07-02-2018 , 07:12   Help with KeyValues (I'm n00b)
Reply With Quote #1

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(kvsound_directorytrue))
    {
        
KvGetString(kv"sound_name"sank_sound_name64"");
    }

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"
}

Last edited by kratoss1812; 07-02-2018 at 07:17.
kratoss1812 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode