Sou muito noob ainda...quando add os hacks está dando muitos erros. Alguem add por favor, só essas duas funções.
/*Nubzgetkillz Base, Credits: Solify for Original base*/
/*pDevice -> Edited Base*/
#include "stdafx.h"
#include "Menu.h"
#include "Hook.h"
#include <time.h>
#include "Files.h"
int menuX = 20;
int menuY = 100;
char sFPS[20] ="xxx Fps";
INT menux = 130;
INT menuy = 69;
INT menuxx = -49;
INT menuyy = 50;
INT MenuX = 90;
BOOL bFont;
INT Close, Tab3, Tab4, Tab5, Tab6, Tab7, Tab8;
int Hacks;
int FPScounter = 0;
float FPSfLastTickCount = 0.0f;
float FPSfCurrentTickCount;
void FPScheck(char *str, char *format)
{
FPSfCurrentTickCount = clock() * 0.001f;
FPScounter++;
if((FPSfCurrentTickCount - FPSfLastTickCount) > 1.0f) {
FPSfLastTickCount = FPSfCurrentTickCount;
sprintf(str,format,FPScounter);
FPScounter = 0;
}
}
VOID Comando(CONST CHAR *Command)
{
DWORD LTC = LTClientEXE;
__asm {
PUSH Command
CALL LTC
ADD ESP, 0x4
}
}
HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS *Parametri)
{
Directx_Font->OnLostDevice();
HRESULT hTorna = oReset(pDevice, Parametri);
if(SUCCEEDED(hTorna))
{
Directx_Font->OnResetDevice();
}
return hTorna;
}
HRESULT WINAPI hkPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
if(Directx_Font)
{
Directx_Font->Release();
Directx_Font = NULL;
bFont = FALSE;
}
if(!bFont)
{
D3DXCreateFont(pDevice, 14, 6, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx_Font);
bFont = TRUE;
}
if(GetAsyncKeyState(VK_INSERT)&1) Show = !Show;
if(Show)
{
DrawBox(menuxx+90,menuyy+ 20,309, 20, 1, D3DCOLOR_ARGB(150, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), pDevice);
DrawString(menuxx+330, menuyy+23, Red, Directx_Font, "D3D FPS:", pDevice);
DrawString(menuxx+380, menuyy+23, Red, Directx_Font, sFPS);
DrawString(menuxx + 90, menuyy+ 23 ,Gold ,Directx_Font," Nubzgetkillz Base Edited By pDevice", pDevice);
DrawTabButton(menuxx + 90, menuyy + 44, 85, 20, Tab3, " Visuals", pDevice);
DrawTabButton(menuxx + 90, menuyy + 67, 85, 20, Tab4, " Removers", pDevice);
DrawTabButton(menuxx + 90, menuyy + 90, 85, 20, Tab5, " Weapon", pDevice);
DrawTabButton(menuxx + 90, menuyy + 113, 85, 20, Tab6, " Player", pDevice);
DrawTabButton(menuxx + 90, menuyy + 136, 85, 20, Tab7, " Semi-VIP", pDevice);
DrawTabButton(menuxx + 90, menuyy + 159, 85, 20, Tab8, " VIP", pDevice);
if(Close){Tab3 = 0; Tab4 = 0; Tab5 = 0; Tab6 = 0; Tab7 = 0; Tab8 = 0;Close = 0;}
if(Tab3 || Tab4 || Tab5 || Tab6 || Tab7 || Tab8) DrawBox(menux, menuy + 25, + 220, 135, 1, TBlack, White, pDevice);
if(Tab3)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "NX Chams", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Name Tags", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
//DrawCheckBox(menux + 11, menuy + 95, Hacks, "Hacks4", pDevice);
//DrawCheckBox(menux + 11, menuy + 115, Hacks, "Hacks5", pDevice);
}
if(Tab4)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "Hacks1", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Hacks2", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
//DrawCheckBox(menux + 11, menuy + 95, Hacks, "Hacks4", pDevice);
}
if(Tab5)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "Hacks1", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Hacks2", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
//DrawCheckBox(menux + 11, menuy + 95, Hacks, "Hacks4", pDevice);
//DrawCheckBox(menux + 11, menuy + 115, Hacks, "Hacks5", pDevice);
//DrawCheckBox(menux + 11, menuy + 135, Hacks, "Hacks6", pDevice);
//DrawCheckBox(menux + 120, menuy + 35, Hacks, "Hacks7", pDevice);
}
if(Tab6)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "Hacks1", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Hacks2", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
}
if(Tab7)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "Hacks1", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Hacks2", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
//DrawCheckBox(menux + 11, menuy + 95, Hacks, "Hacks4", pDevice);
//DrawCheckBox(menux + 11, menuy + 115, Hacks, "Hacks5", pDevice);
}
if(Tab8)
{
DrawCheckBox(menux + 11, menuy + 35, Hacks, "Hacks1", pDevice);
DrawCheckBox(menux + 11, menuy + 55, Hacks, "Hacks2", pDevice);
//DrawCheckBox(menux + 11, menuy + 75, Hacks, "Hacks3", pDevice);
//DrawCheckBox(menux + 11, menuy + 95, Hacks, "Hacks4", pDevice);
//DrawCheckBox(menux + 11, menuy + 115, Hacks, "Hacks5", pDevice);
}
DrawMouse(Red,pDevice);
}
FPScheck(sFPS,"%d");
return oPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
DWORD* FindDevice(VOID)
{
DWORD Base = (DWORD)LoadLibraryW(L"d3d9.dll");
for(DWORD i = 0; i < 0x128000; i++ )
{
if ( (*(BYTE *)(Base+i+0x00))==0xC7
&& (*(BYTE *)(Base+i+0x01))==0x06
&& (*(BYTE *)(Base+i+0x06))==0x89
&& (*(BYTE *)(Base+i+0x07))==0x86
&& (*(BYTE *)(Base+i+0x0C))==0x89
&& (*(BYTE *)(Base+i+0x0D))==0x86 )
return (DWORD *)(Base + i + 2);
}
return NULL;
}
DWORD WINAPI Hook(LPVOID lpArgs)
{
DWORD dwD3D9 = 0;
do
{
dwD3D9 = (DWORD)GetModuleHandleA("d3d9.dll");
Sleep(10);
}
while(!dwD3D9);
DWORD* VtablePtr = FindDevice();
DWORD* VTable;
*(DWORD*)&VTable = *(DWORD*)VtablePtr;
if(VtablePtr)
{
oReset = (tReset) DetourCreate (( BYTE* )VTable[16], (PBYTE) &hkReset, 5);
oPresent = (tPresent)DetourCreate (( BYTE* )VTable[17], (PBYTE) &hkPresent, 5);
}
return FALSE;
}