Você está na página 1de 7

#include "cBase.

h"
extern int ter;
extern int iValue;
//int CoLOR;
bool bInit = false;
bool InitGame = false;

#define POS(Y) 70+19*Y

char cfg[320];

void ColorSelect(string Text, int x, int y, cMenu* me, int &R, int &G, int &B)
{

me->add(new CSlider(Text, x, y, 0, 255, &R));


me->add(new CSlider("", x, y+12, 0, 255, &G));
me->add(new CSlider("", x, y+24, 0, 255, &B));
me->add(new CSelectColor(x+90, y-12, &R, &G, &B));
}

void Close(cControlManager* control)


{
cMenu* menu = control->parent;
MenuManager.setForcedTopMenu(NULL);
MenuManager.rem(menu);
}

extern int cFunVisColorRs, cFunVisColorGs, cFunVisColorBs, cFunNotVisColorRs,


cFunNotVisColorGs, cFunNotVisColorBs;

extern float FastWrap, KnifeWrap, FastKnWrap, FireWrap;


extern int SuperKill, LongKnife, Knife360, FastKnife, speedfires, NoRecoillll;
extern DWORD EspSkelet,ESPline;
void cMenuManager::initialize()
{

if (this->initialized) return;

cMenu* mainMenu = new cMenu("STUX HACK [V.1.0]", 10, 100, 450,


400,STYLE_CLOSE | STYLE_MINIMIZE);
cControlManager* mainTabControl = new CTab(6, 6);

cMenu* WeaponTab = new cMenu("�������", -1, -1, 300, 160, NULL);


WeaponTab->add(new CGroupBox("", 6, 35, 437, 360));
WeaponTab->add(new CCheckbox("Fast Aim", 30, POS(0), &SuperKill));
WeaponTab->add(new CFSlider("��������� �������", 30, POS(2), 0.f, 3.5f,
&FastWrap));
WeaponTab->add(new CCheckbox("��������� ����������������", 30, POS(3),
&speedfires));
WeaponTab->add(new CFSlider("��������� ����������������", 30, POS(5), 0.f,
1.5f, &FireWrap));
WeaponTab->add(new CCheckbox("��� ������", 30, POS(6), &NoRecoillll));
WeaponTab->add(new CCheckbox("��� ������", 30, POS(7), &EspSkelet));
///
WeaponTab->add(new CCheckbox("������ ���", 230, POS(0), &LongKnife));
WeaponTab->add(new CFSlider("��������� ����� ����", 230, POS(2), 0.f, 1.0f,
&KnifeWrap));
WeaponTab->add(new CCheckbox("������� ���", 230, POS(3), &FastKnife));
WeaponTab->add(new CFSlider("��������� �������� ����", 230, POS(5), 0.f, 6.f,
&FastKnWrap));
WeaponTab->add(new CCheckbox("��� 360�", 230, POS(6), &Knife360));
WeaponTab->add(new CCheckbox("��� �����", 230, POS(7), &ESPline));

ColorSelect("�������", 30, POS(9), WeaponTab, cFunNotVisColorRs,


cFunNotVisColorGs, cFunNotVisColorBs);
ColorSelect("���������", 230, POS(9), WeaponTab, cFunVisColorRs,
cFunVisColorGs, cFunVisColorBs);
/*WeaponTab->add(new CCheckbox("����������", 30, POS(0),
&cFunRecoil.iValue));
WeaponTab->add(new CCheckbox("��������", 30, POS(1), &cFunAccuraty.iValue));
WeaponTab->add(new CCheckbox("��������� �������", 30, POS(2),
&cFunFrizHeir.iValue));
WeaponTab->add(new CCheckbox("������ ����� �����", 30, POS(3),
&cFunRapidChange.iValue));
WeaponTab->add(new CCheckbox("���������[���]", 30, POS(4),
&cFunSpeedKnifeL.iValue));
WeaponTab->add(new CCheckbox("���������[���]", 30, POS(5),
&cFunSpeedKnifeR.iValue));
WeaponTab->add(new CCheckbox("����������", 30, POS(6),
&cFunSlidebolt.iValue));
WeaponTab->add(new CCheckbox("�������", 30, POS(7), &cFunZoomMod.iValue));
WeaponTab->add(new CCheckbox("����������", 30, POS(8),
&cFunSkorostrel.iValue));
WeaponTab->add(new CCheckbox("���� ������", 30, POS(9),
&cFunUvodStvola.iValue));
WeaponTab->add(new CCheckbox("��������� �������", 30, POS(10),
&cFunOneShot.iValue));
// WeaponTab->add(new CSlider("���� ������(��)", 30, POS(12), 5, 1000,
&cFunTimeAutoF.iValue));
WeaponTab->add(new CFSlider("�������������", 30, POS(13), 0.f, 4.5f,
&teeeeestddsgsdg));*/

/* cMenu* OtherTab = new cMenu("INFO", -1, -1, 300, 160, NULL);


OtherTab->add(new CGroupBox("Other Hack", 6, 35, 437, 360));

ColorSelect("���� �������", 220, POS(4), OtherTab, cFunXhairColorR.iValue,


cFunXhairColorG.iValue, cFunXhairColorB.iValue);
cControlManager* DropXhair = new CDropDown("", 220, POS(7) ,
&cFunDxXhair.iValue);
DropXhair->addChoice("������: ����");
DropXhair->addChoice(" Basic");
DropXhair->addChoice(" Circle");
DropXhair->addChoice(" Dot");
DropXhair->addChoice(" Cross");
DropXhair->addChoice(" MixH");
OtherTab->add(DropXhair);*/
cMenu* AboutTab = new cMenu("INFO", -1, -1, 300, 160, NULL);
AboutTab->add(new CGroupBox("Info", 6, 35, 437, 360));

AboutTab->add(new CLabel("Code by: N1ceBoy", 30, POS(1), DT_LEFT));


AboutTab->add(new CLabel("��������� ����������:", 30, POS(2),
DT_LEFT));
AboutTab->add(new CLabel(__DATE__, 30, POS(3), DT_LEFT));
AboutTab->add(new CLabel(__TIME__, 30, POS(4), DT_LEFT));
AboutTab->add(new CLabel("Official site: WWW.WAR-GAMER.ORG", 30, POS(5),
DT_LEFT));
AboutTab->add(new CLabel(Render.FPS(), 30, POS(6), DT_LEFT));
// Render.render_String(2, 2, Color(255, 255, 0, 0),
DT_LEFT,Render.FPS());

this->add(mainMenu);
mainTabControl->addTab(WeaponTab);

//mainTabControl->addTab(OtherTab);

mainTabControl->addTab(AboutTab);
mainMenu->add(mainTabControl);
// this->add(radMenu);

this->setMainMenu(mainMenu);
this->setForegroundMenu(mainMenu);
this->centerMenu(mainMenu);

this->initialized = true;
}

enum XhairType
{
Basic,
Circle,
Dot,
Cross,
MixH
};
void Xhair(XhairType Type, Color color)
{
int CenterX = Render.m_ViewPort.Width / 2;
int CenterY = Render.m_ViewPort.Height / 2;

switch (Type)
{
case Basic:
Render.render_Box(CenterX - 7, CenterY, 14, 1, color);
Render.render_Box(CenterX, CenterY - 7, 1, 14, color);
break;
case Circle:
Render.render_Circle(CenterX, CenterY, 8, true, 8, color);
break;
case Dot:
Render.render_Box(CenterX - 1, CenterY - 1, 1, 1, color);
break;
case Cross:
Render.render_Line(CenterX + 7, CenterY + 7, CenterX - 7, CenterY - 7,
color);
Render.render_Line(CenterX - 7, CenterY + 7, CenterX + 7, CenterY - 7,
color);
break;
case MixH:
Render.render_Circle(CenterX, CenterY, 8, true, 8, color);
Render.render_Box(CenterX - 17, CenterY, 10, 1, color);
Render.render_Box(CenterX + 9, CenterY, 10, 1, color);
Render.render_Box(CenterX, CenterY - 17, 1, 10, color);
Render.render_Box(CenterX, CenterY + 9, 1, 10, color);
Render.render_Box(CenterX, CenterY, 1, 1, Color(255, 255, 0, 0));
break;
}
}
extern DWORD CShell, oNoSpread1, oNoSpread2;
void RenderFrames()
{
DWORD dwRenderState = 0;
gDevice->GetRenderState(D3DRS_ZFUNC, &dwRenderState);
gDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
Render.Initialize(gDevice, "Tahoma", 8);

if (!bInit)
{
MenuManager.initialize();
bInit = true;
}

Render.FontRestore();

// if (MenuManager.menuOpen && cFunSelectString.iValue == TRUE)


// Render.render_GetTextBox(5, 15);

MenuManager.perform();

//if (cFunDxXhair.iValue == 1)Xhair(Basic, Color(255,


cFunXhairColorR.iValue, cFunXhairColorG.iValue, cFunXhairColorB.iValue));
//if (cFunDxXhair.iValue == 2)Xhair(Circle, Color(255,
cFunXhairColorR.iValue, cFunXhairColorG.iValue, cFunXhairColorB.iValue));
//if (cFunDxXhair.iValue == 3)Xhair(Dot, Color(255,
cFunXhairColorR.iValue, cFunXhairColorG.iValue, cFunXhairColorB.iValue));
//if (cFunDxXhair.iValue == 4)Xhair(Cross, Color(255,
cFunXhairColorR.iValue, cFunXhairColorG.iValue, cFunXhairColorB.iValue));
//if (cFunDxXhair.iValue == 5)Xhair(MixH, Color(255,
cFunXhairColorR.iValue, cFunXhairColorG.iValue, cFunXhairColorB.iValue));

// Render.render_String(2, 10, Color(255, 255, 0, 0), DT_LEFT, "0x%X",


(DWORD)(oNoSpread1 - CShell));
// Render.render_String(2, 25, Color(255, 255, 0, 0), DT_LEFT, "0x%X",
(DWORD)(oNoSpread2 - CShell));
Render.FontReset();
gDevice->SetRenderState(D3DRS_ZFUNC, dwRenderState);
}

CreateHook chPresent;
typedef HRESULT(WINAPI*D3D9CREATEEXPROC)(UINT, IDirect3D9Ex**);
HRESULT WINAPI myPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect, CONST
RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
{
chPresent.Unhook();
gDevice = pDevice;
RenderFrames();

///

/* Hack->FindPatterns();
Hack->SuperKills();
Hack->LongKnifeF();
Hack->Knife360F();
Hack->FastKnifeF();
Hack->NoRecoilF();

Esp->ESP_main(pDevice);*/
///

HRESULT r_Present = pDevice->Present(pSourceRect, pDestRect,


hDestWindowOverride, pDirtyRegion);
chPresent.Rehook();
return r_Present;
}

bool Interface()
{
HMODULE hD3D9 = NULL;
bool bResult = false;
char szPath[256];
SHGetFolderPathA(NULL, CSIDL_SYSTEM, NULL, SHGFP_TYPE_CURRENT, szPath);
strcat_s(szPath, "\\d3d9.dll");

if (hD3D9 = GetModuleHandleA(szPath))
{
D3D9CREATEEXPROC CreateEx = (D3D9CREATEEXPROC)GetProcAddress(hD3D9,
"Direct3DCreate9Ex");
if (CreateEx)
{
HRESULT hr = D3D_OK;
LPDIRECT3D9EX d3d9ex = nullptr;
if (SUCCEEDED(hr = CreateEx(D3D_SDK_VERSION, &d3d9ex)))
{
D3DPRESENT_PARAMETERS dp;
ZeroMemory(&dp, sizeof(dp));
dp.Windowed = 1;
dp.SwapEffect = D3DSWAPEFFECT_FLIP;
dp.BackBufferFormat = D3DFMT_A8R8G8B8;
dp.BackBufferCount = 1;
dp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;

IDirect3DDevice9Ex *mDevice = nullptr;


if (SUCCEEDED(hr = d3d9ex-
>CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_NULLREF, NULL,
D3DCREATE_HARDWARE_VERTEXPROCESSING, &dp, NULL, &mDevice)))
{
bResult = true;
UPARAM * vtbl = *(UPARAM**)mDevice;
chPresent.Hook((FARPROC)*(vtbl + 17),
(FARPROC)myPresent);
mDevice->Release();
chPresent.Rehook();
}
d3d9ex->Release();
}
}
}
return bResult;
}

DWORD WINAPI MyThread(HANDLE hThread)


{
while (!Interface())
Sleep(200);
return 0;
}
static bool meme;
static bool validversion = CheckVersion();
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hModule);
if (dwReason == DLL_PROCESS_ATTACH) {
if (validversion) {

ExitProcess(0);
}

else {
meme = CheckLicense();
if (!meme)
{
ExitProcess(0);
}
else
{

string str(GetSerial());
str.append(" - STUX Hack for RUCF"); //�� ini

if (FindWindow(NULL, str.c_str()))// XorStr("HUNTER Hack


for RUCF")))
{

CreateThread(NULL, NULL, &MyThread, NULL, NULL, NULL);


}
}
}
}
return TRUE;
}

Você também pode gostar