diff --git a/resource/rpc/31.jpg b/resource/rpc/31.jpg new file mode 100644 index 0000000..5927207 Binary files /dev/null and b/resource/rpc/31.jpg differ diff --git a/resource/rpc/32.jpg b/resource/rpc/32.jpg new file mode 100644 index 0000000..79525dc Binary files /dev/null and b/resource/rpc/32.jpg differ diff --git a/resource/rpc/33.jpg b/resource/rpc/33.jpg new file mode 100644 index 0000000..84c4247 Binary files /dev/null and b/resource/rpc/33.jpg differ diff --git a/resource/rpc/34.jpg b/resource/rpc/34.jpg new file mode 100644 index 0000000..5aeece4 Binary files /dev/null and b/resource/rpc/34.jpg differ diff --git a/resource/rpc/35.jpg b/resource/rpc/35.jpg new file mode 100644 index 0000000..ce70a4c Binary files /dev/null and b/resource/rpc/35.jpg differ diff --git a/resource/rpc/drive.png b/resource/rpc/drive.png new file mode 100644 index 0000000..424d04c Binary files /dev/null and b/resource/rpc/drive.png differ diff --git a/resource/rpc/sa1.jpg b/resource/rpc/sa1.jpg new file mode 100644 index 0000000..a6ff6a8 Binary files /dev/null and b/resource/rpc/sa1.jpg differ diff --git a/resource/rpc/sa2.jpg b/resource/rpc/sa2.jpg new file mode 100644 index 0000000..0e9458b Binary files /dev/null and b/resource/rpc/sa2.jpg differ diff --git a/resource/rpc/sa3.jpg b/resource/rpc/sa3.jpg new file mode 100644 index 0000000..cff95e6 Binary files /dev/null and b/resource/rpc/sa3.jpg differ diff --git a/resource/rpc/sa4.jpg b/resource/rpc/sa4.jpg new file mode 100644 index 0000000..d9362da Binary files /dev/null and b/resource/rpc/sa4.jpg differ diff --git a/resource/rpc/sa5.jpg b/resource/rpc/sa5.jpg new file mode 100644 index 0000000..3d271de Binary files /dev/null and b/resource/rpc/sa5.jpg differ diff --git a/resource/rpc/vc1.jpg b/resource/rpc/vc1.jpg new file mode 100644 index 0000000..3d6647b Binary files /dev/null and b/resource/rpc/vc1.jpg differ diff --git a/resource/rpc/vc2.jpeg b/resource/rpc/vc2.jpeg new file mode 100644 index 0000000..bf50812 Binary files /dev/null and b/resource/rpc/vc2.jpeg differ diff --git a/resource/rpc/vc3.jpg b/resource/rpc/vc3.jpg new file mode 100644 index 0000000..61d6363 Binary files /dev/null and b/resource/rpc/vc3.jpg differ diff --git a/resource/rpc/vc4.jpg b/resource/rpc/vc4.jpg new file mode 100644 index 0000000..11234f2 Binary files /dev/null and b/resource/rpc/vc4.jpg differ diff --git a/resource/rpc/vc5.jpg b/resource/rpc/vc5.jpg new file mode 100644 index 0000000..7f16cf2 Binary files /dev/null and b/resource/rpc/vc5.jpg differ diff --git a/resource/rpc/walk.png b/resource/rpc/walk.png new file mode 100644 index 0000000..c34cc99 Binary files /dev/null and b/resource/rpc/walk.png differ diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 6d64036..86a62ea 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -103,6 +103,7 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved) if (gameVer == BY_GAME(NULL, GAME_10EN, GAME_10EN)) #endif { + SetDllDirectory(PLUGIN_PATH((char*)"CheatMenu/dlls/")); CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr); } else diff --git a/src/rpc.cpp b/src/rpc.cpp index a015d5f..d125573 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -8,7 +8,10 @@ char asciitolower(char in) { if (in <= 'Z' && in >= 'A') + { return in - ('Z' - 'z'); + } + return in; } @@ -18,7 +21,8 @@ void RPC::Shutdown() void RPC::Init() { - discord::Result result = discord::Core::Create(951199292981403669, DiscordCreateFlags_Default, &pCore); + discord::ClientId Id = BY_GAME(951199292981403669, 951448264195059712, 951457540573655080); + discord::Result result = discord::Core::Create(Id, DiscordCreateFlags_Default, &pCore); bInit = result == discord::Result::Ok; } @@ -30,8 +34,8 @@ void RPC::Process() } static std::string detailsText, stateText, smallImg, smallImgText, largeImg, largeImgText; - static size_t curImage = 1; - static size_t timer = 0; + static size_t curImage = Random(1, 5); + static size_t timer = CTimer::m_snTimeInMilliseconds; static size_t startTime = CTimer::m_snTimeInMilliseconds; CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus]; @@ -92,7 +96,7 @@ void RPC::Process() stateText = TEXT("RPC.Busted"); } - largeImgText = std::format("{}: {} / {} {}: {} / {}", TEXT("Player.Armour"), pPed->m_fArmour, BY_GAME(pInfo->m_nMaxArmour, pInfo->m_nMaxArmour, 100), TEXT("Player.Health"), int(pPed->m_fHealth), BY_GAME(int(pPed->m_fMaxHealth), 100, 100)); + largeImgText = std::format("{}: {} - {}: {}", TEXT("Player.Armour"), pPed->m_fArmour, TEXT("Player.Health"), int(pPed->m_fHealth)); largeImg = std::format("{}{}", BY_GAME("sa", "vc", "3"), curImage); discord::Activity activity{}; @@ -114,7 +118,7 @@ void RPC::Process() }); pCore->RunCallbacks(); - if (curTimer - timer > 60000) + if (curTimer - timer > 5*60000) { curImage++; diff --git a/tools/premake5.lua b/tools/premake5.lua index eece33f..522e0b0 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -40,9 +40,14 @@ workspace "CheatMenu" "d3d11", "Pdh", "urlmon", + "delayimp", "discord_game_sdk" } + linkoptions { + "/DELAYLOAD:discord_game_sdk.dll" + } + project "depend" kind "StaticLib"