VIPERR
-
Автор темы
- #1
Код:
\x8B\x40\x00\xFF\xD0\x84\xC0\x74\x0B\x8B\x06\x8B\xCE
xx?xxxxxxxxxx
typedef bool(__thiscall *ShouldDrawCrosshair_t)(void *pThis);
ShouldDrawCrosshair_t pShouldDrawCrosshair;
bool __fastcall Hook_ShouldDrawCrosshair(void *pEcx, void *pEdx) //28
{
if ((uintptr_t)_ReturnAddress() == 0x0)
{
//take a look at the link below
//if (GetCSWpnData().m_WeaponType == WEAPONTYPE_SNIPER_RIFLE)
//backup m_WeaponType
//set m_WeaponType to something new
//DrawCrosshair
//...
return false;
}
return pShouldDrawCrosshair(pEcx);
}
void DrawCrosshair()
{
typedef void(__thiscall *pfnDrawCrosshair)(void*);
CallVirtual< pfnDrawCrosshair >(this, 393)(this);
}
GetCSWpnData().m_WeaponType = 0xC8
Код:
ConVar* crosshair1 = Interfaces::GetConVar()->FindVar("weapon_debug_spread_show");
crosshair1->SetValue(1);
ConVar* crosshair2 = Interfaces::GetConVar()->FindVar("weapon_debug_spread_gap");
crosshair2->SetValue(999999999);
Последнее редактирование: