lvl 100 boss
Начинающий
-
Автор темы
- #1
heres the cursor fix for the pasters.
ps: it has a little of anti pasta.
hint: G :: menuon;)
1.go to renderer.h and find
then hook LockCursor (also dont forget to include lockcursor.h in hooks pasters)
hooks.cpp
lockcursor.h
ps: it has a little of anti pasta.
hint: G :: menuon;)
1.go to renderer.h and find
Код:
hkWndProc [/ code] and replace with this:
[code] LRESULT __stdcall hkWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_LBUTTONDOWN:
G :: PressedKeys [VK_LBUTTON] = true;
break;
case WM_LBUTTONUP:
G :: PressedKeys [VK_LBUTTON] = false;
break;
case WM_RBUTTONDOWN:
G :: PressedKeys [VK_RBUTTON] = true;
break;
case WM_RBUTTONUP:
G :: PressedKeys [VK_RBUTTON] = false;
break;
case WM_KEYDOWN:
G :: PressedKeys [wParam] = true;
break;
case WM_KEYUP:
G :: PressedKeys [wParam] = false;
break;
default:
break;
}
static bool isDown = false;
static bool isClicked = false;
if (G :: PressedKeys [VK_INSERT]) {
isClicked = false;
isDown = true;
}
else if (!G::PressedKeys[VK_INSERT] && isDown) {
isClicked = true;
isDown = false;
}
else {
isClicked = false;
isDown = false;
}
if (isClicked) {
g_Options.Menu.Opened = !g_Options.Menu.Opened;
static auto cl_mouseenable = g_CVar->FindVar("cl_mouseenable");
cl_mouseenable->SetValue(!g_Options.Menu.Opened);
}
if (is_renderer_active && G::menuon && ImGui_ImplDX9_WndProcHandler(window, message_type, w_param, l_param))
return true;
return CallWindowProc(G::menuon, hWnd, uMsg, wParam, lParam);
}
hooks.cpp
Код:
surface.hook_index(67, hkUnlockCursor);
Код:
#pragma once
#include "SDK.h"
typedef void(__thiscall* UnlockCursor)(void*);
void __stdcall hkUnlockCursor()
{
static auto ofunc = hooks::surface.get_original<UnlockCursor>(67);
if (g_Options.Menu.Opened) {
g_Surface->UnlockCursor();
}
else
ofunc(g_Surface);
}