diff --git a/src/hacks/ChatCommands.cpp b/src/hacks/ChatCommands.cpp index d3a6aeda..ed1c78be 100644 --- a/src/hacks/ChatCommands.cpp +++ b/src/hacks/ChatCommands.cpp @@ -117,10 +117,10 @@ static CatCommand chatcommands_add("chatcommands_add", "chatcommands_add ", [](const CCommand &args) { +static CatCommand chatcommands_file("chatcommands_file", "chatcommands_add ", [](const CCommand &args) { if (args.ArgC() != 3) { - g_ICvar->ConsoleColorPrintf(MENU_COLOR, "usage: chatcommands_add \n"); + g_ICvar->ConsoleColorPrintf(MENU_COLOR, "usage: chatcommands_add \n"); return; } std::string prefix = args.Arg(1); diff --git a/src/hacks/Misc.cpp b/src/hacks/Misc.cpp index a38e30c3..268ee662 100644 --- a/src/hacks/Misc.cpp +++ b/src/hacks/Misc.cpp @@ -383,7 +383,7 @@ void generate_schema() { std::ifstream in("tf/scripts/items/items_game.txt"); std::string outS((std::istreambuf_iterator(in)), std::istreambuf_iterator()); - std::ofstream out("/opt/cathook/data/items_game.txt"); + std::ofstream out(DATA_PATH "/items_game.txt"); std::regex a("\"equip_regions?\".*?\".*?\""); std::regex b("\"equip_regions?\"\\s*?\\n\\s*?\\{[\\s\\S\\n]*?\\}"); outS = std::regex_replace(outS, a, ""); @@ -400,7 +400,7 @@ void Schema_Reload() static auto BInitTextBuffer = reinterpret_cast(gSignatures.GetClientSignature("55 89 E5 57 56 53 8D 9D ? ? ? ? 81 EC ? ? ? ? 8B 7D ? 89 1C 24 ")); void *schema = (void *) ((unsigned) GetItemSchema() + 0x4); - FILE *file = fopen("/opt/cathook/data/items_game.txt", "r"); + FILE *file = fopen(DATA_PATH "/items_game.txt", "r"); if (!file || ferror(file) != 0) { logging::Info("Error loading file");