I dont know why but the string from "owner" or from "group"
PHP Code:
char g_szOwnerLink[128], g_szGrupLink[128];
public void OnPluginStart()
{
RegConsoleCmd("sm_owner", OWNER);
RegConsoleCmd("sm_grup", GRUP);
RegConsoleCmd("sm_group", GRUP);
RegConsoleCmd("sm_reloadlinks", OnReload, "", ADMFLAG_GENERIC);
}
public void OnMapStart()
{
LoadConfig();
}
public Action OnReload(int Client, int Args)
{
LoadConfig();
}
void LoadConfig()
{
char Configfile[1024];
BuildPath(Path_SM, Configfile, 1024, "configs/tz_plugins/teaze_core.cfg");
if(!FileExists(Configfile))
SetFailState("Can not find config file \"%s\"!", Configfile);
KeyValues hKV = CreateKeyValues("CORE");
hKV.ImportFromFile(Configfile);
char sName[1024];
hKV.GetSectionName(sName, sizeof(sName));
if (strcmp(sName, "Links") == 0)
{
hKV.GetString("owner", g_szOwnerLink, sizeof(g_szOwnerLink));
hKV.GetString("group", g_szGrupLink, sizeof(g_szGrupLink));
}
else hKV.GotoNextKey()
hKV.Rewind();
delete hKV;
}
public Action OWNER(int client, int args)
{
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x09 %s", g_szOwnerLink);
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x09 USE THIS LINK TO ADD THE OWNER");
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x09 SHIFT + TAB >> WEB BROWSER >> PASTE THE LINK");
PrintToChat(client, " * \x02 =========================================");
}
public Action GRUP(int client, int args)
{
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x03 %s", g_szGrupLink);
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x03 USE THIS LINK TO JOIN THE STEAM GROUP");
PrintToChat(client, " * \x02 =========================================");
PrintToChat(client, " * \x03 SHIFT + TAB >> WEB BROWSER >> PASTE THE LINK");
PrintToChat(client, " * \x02 =========================================");
}
PHP Code:
"CORE"
{
"QuakeSounds"
{
"nadekill_file" "qs/allahuakbar.mp3"
"dom_file" "qs/dominating.mp3"
"doublekill_file" "qs/doublekill.mp3"
"firekill_file" "qs/firegirl.mp3"
"firstblood_file" "qs/firstblood.mp3"
"godlike_file" "qs/female/godlike.mp3"
"knifekill_file" "qs/humiliation.mp3"
"rampage_file" "qs/rampage.mp3"
"unstoppable_file" "qs/unstopable.mp3"
"humilition_file" "qs/humiliation.mp3"
}
"Links"
{
"owner" "https://steamcommunity.com/id/kratos1812/"
"group" "https://steamcommunity.com/groups/kratoscsgoservergroup"
}
}
__________________