More progess for discord rpc
BIN
resource/rpc/31.jpg
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
resource/rpc/32.jpg
Normal file
After Width: | Height: | Size: 569 KiB |
BIN
resource/rpc/33.jpg
Normal file
After Width: | Height: | Size: 307 KiB |
BIN
resource/rpc/34.jpg
Normal file
After Width: | Height: | Size: 294 KiB |
BIN
resource/rpc/35.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
resource/rpc/drive.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
resource/rpc/sa1.jpg
Normal file
After Width: | Height: | Size: 137 KiB |
BIN
resource/rpc/sa2.jpg
Normal file
After Width: | Height: | Size: 170 KiB |
BIN
resource/rpc/sa3.jpg
Normal file
After Width: | Height: | Size: 162 KiB |
BIN
resource/rpc/sa4.jpg
Normal file
After Width: | Height: | Size: 187 KiB |
BIN
resource/rpc/sa5.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
resource/rpc/vc1.jpg
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
resource/rpc/vc2.jpeg
Normal file
After Width: | Height: | Size: 175 KiB |
BIN
resource/rpc/vc3.jpg
Normal file
After Width: | Height: | Size: 183 KiB |
BIN
resource/rpc/vc4.jpg
Normal file
After Width: | Height: | Size: 197 KiB |
BIN
resource/rpc/vc5.jpg
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
resource/rpc/walk.png
Normal file
After Width: | Height: | Size: 42 KiB |
@ -103,6 +103,7 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
|
|||||||
if (gameVer == BY_GAME(NULL, GAME_10EN, GAME_10EN))
|
if (gameVer == BY_GAME(NULL, GAME_10EN, GAME_10EN))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
SetDllDirectory(PLUGIN_PATH((char*)"CheatMenu/dlls/"));
|
||||||
CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr);
|
CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
14
src/rpc.cpp
@ -8,7 +8,10 @@
|
|||||||
char asciitolower(char in)
|
char asciitolower(char in)
|
||||||
{
|
{
|
||||||
if (in <= 'Z' && in >= 'A')
|
if (in <= 'Z' && in >= 'A')
|
||||||
|
{
|
||||||
return in - ('Z' - 'z');
|
return in - ('Z' - 'z');
|
||||||
|
}
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,7 +21,8 @@ void RPC::Shutdown()
|
|||||||
|
|
||||||
void RPC::Init()
|
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;
|
bInit = result == discord::Result::Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,8 +34,8 @@ void RPC::Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::string detailsText, stateText, smallImg, smallImgText, largeImg, largeImgText;
|
static std::string detailsText, stateText, smallImg, smallImgText, largeImg, largeImgText;
|
||||||
static size_t curImage = 1;
|
static size_t curImage = Random(1, 5);
|
||||||
static size_t timer = 0;
|
static size_t timer = CTimer::m_snTimeInMilliseconds;
|
||||||
static size_t startTime = CTimer::m_snTimeInMilliseconds;
|
static size_t startTime = CTimer::m_snTimeInMilliseconds;
|
||||||
|
|
||||||
CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus];
|
CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus];
|
||||||
@ -92,7 +96,7 @@ void RPC::Process()
|
|||||||
stateText = TEXT("RPC.Busted");
|
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);
|
largeImg = std::format("{}{}", BY_GAME("sa", "vc", "3"), curImage);
|
||||||
|
|
||||||
discord::Activity activity{};
|
discord::Activity activity{};
|
||||||
@ -114,7 +118,7 @@ void RPC::Process()
|
|||||||
});
|
});
|
||||||
pCore->RunCallbacks();
|
pCore->RunCallbacks();
|
||||||
|
|
||||||
if (curTimer - timer > 60000)
|
if (curTimer - timer > 5*60000)
|
||||||
{
|
{
|
||||||
curImage++;
|
curImage++;
|
||||||
|
|
||||||
|
@ -40,9 +40,14 @@ workspace "CheatMenu"
|
|||||||
"d3d11",
|
"d3d11",
|
||||||
"Pdh",
|
"Pdh",
|
||||||
"urlmon",
|
"urlmon",
|
||||||
|
"delayimp",
|
||||||
"discord_game_sdk"
|
"discord_game_sdk"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
linkoptions {
|
||||||
|
"/DELAYLOAD:discord_game_sdk.dll"
|
||||||
|
}
|
||||||
|
|
||||||
project "depend"
|
project "depend"
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
|