diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 2fa27761..dcc3c70c 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -188,7 +188,7 @@ void CreateMove() return; #if ENABLE_VISUALS - if (target_entity->m_Type() != ENTITY_PLAYER) + if (target_entity->m_Type() == ENTITY_PLAYER) { static effect_chams::EffectChams Effectchams; hacks::shared::esp::SetEntityColor(target_entity, colors::pink); diff --git a/src/hooks/DispatchUserMessage.cpp b/src/hooks/DispatchUserMessage.cpp index d967809e..ae5becf2 100644 --- a/src/hooks/DispatchUserMessage.cpp +++ b/src/hooks/DispatchUserMessage.cpp @@ -46,7 +46,20 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, } int loop_index, s, i, j; char *data, c; - + if (type == 5) + if (buf.GetNumBytesLeft() > 35) + { + std::string message_name{}; + for (int i = 0; i < buf.GetNumBytesLeft(); i++) + { + int byte = buf.ReadByte(); + if ( byte == 0) + break; + message_name.push_back(byte); + } + if (message_name.find("TF_Autobalance_TeamChangePending") != std::string::npos) + logging::Info("test, %d %d", int(message_name[0]), (CE_GOOD(LOCAL_E) ? LOCAL_E->m_IDX : -1)); + } if (type == 4) { loop_index = 0; @@ -61,7 +74,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, std::string message; for (i = 0; i < 3; i++) { - while ((c = data[j++]) && (loop_index < 128)) + while ((c = data[j++]) && (loop_index < 150)) { loop_index++; if (clean_chat) @@ -120,6 +133,8 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, } for (char i : name1) { + if (i == ' '); + continue; if (iii == 2) { iii = 0; @@ -136,6 +151,8 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, iii = 0; for (char i : name1) { + if (i == ' '); + continue; if (iii == 3) { iii = 0; @@ -171,6 +188,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, } std::string message2 = message; boost::to_lower(message2); + boost::replace_all(message2, " ", ""); boost::replace_all(message2, "4", "a"); boost::replace_all(message2, "3", "e"); boost::replace_all(message2, "0", "o"); diff --git a/src/online/Online.cpp b/src/online/Online.cpp index 6addb4a6..b71574da 100644 --- a/src/online/Online.cpp +++ b/src/online/Online.cpp @@ -35,13 +35,13 @@ static bool identify_stale{ false }; static std::string api_key{}; static CatCommand login("online_login", "Login", [](const CCommand &args) { - if (args.ArgC() != 3) + if (args.ArgC() != 2) { - logging::Info("\nUsage: online_login \"\"\nKey will " + logging::Info("\nUsage: online_login \nKey will " "be saved in your data folder"); return; } - std::string host(args.Arg(2)); + std::string host("cathook-online.inkcat.net:8000"); logging::Info("[CO] Host = %s", host.c_str()); try {