Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    SkyyModz's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Jorndel View Post
    Post your cods/snippets used for Modern Warfare 3



    How to keep this clean:
    First mark your thread with the language used. (Also name the title like: VB.Net - Write to Memory)
    Put the code in the: [code ] *Put code here* [/code ] (Without the space)

    Other post will be DELETED
    I have a source code for a mw3 mod menu. If anyone can turn it into a dll for me add my skype skyy.modz
    //================================
    #include <windows.h>
    #include <iostream>
    #include <mmsystem.h>
    #include <stdio.h>
    #include <fstream>
    #include <d3d9.h>
    #include <d3dx9.h>
    #include <time.h>
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    #pragma warning (disable:4996 4244)
    //================================

    #define HOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)hk##func,(DWORD)addy, Detour_Type_0xB8,7)//Quick Hook using CreateDetour *********
    #define UNHOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)o##func,(DWORD)addy,D etour_Type_0xB8,7)//Quick Unook using CreateDetour *********
    //================================
    #define ES 0
    #define DIP 1
    #define RES 2
    #define E8 2
    #define ZE 3
    #define DrawIndex 0x002B
    #define EndS 0x0023
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    //----------------------------------------------------------------------------------------------------------------------------------
    //----------------------------------------------------------------------------------------------------------------------------------
    LPD3DXFONT g_pFont = NULL;
    LPD3DXFONT g_pFont2 = NULL;
    D3DVIEWPORT9 g_ViewPort;
    //----------------------------------------------------------------------------------------------------------------------------------
    LPDIRECT3DDEVICE9 npDevice;
    LPDIRECT3DTEXTURE9 txHeader;
    LPD3DXSPRITE bbSprite;
    D3DXVECTOR3 pHeader;
    //----------------------------------------------------------------------------------------------------------------------------------
    bool CekHook=false;
    bool pertamax=true;
    int Comander = 0;
    int Rezpect = 0;
    int Comander1 = 0;
    int Rezpect1 = 0;
    int tandasilang = 0;
    int Tutor = 0;
    int wew = 1;
    int d3d = 1;
    int uyeh = 0;
    int player = 1;
    int fullhack = 0;
    int replace = 0;
    int baret = 0;
    int Charakter = 0;
    int rm = 0;
    int DC = 0;
    int info = 0;
    int group = 0;
    int Replaceeeeeeeeeeeeeeeee=0;
    int mp3 = 0;
    int memek=1;
    int MW3Hook=0;
    int braccio = 0;
    int crosshair = 0;
    int Hack3 = 0;
    int Hack4 = 0;
    int Hack5 = 0;
    int Hack6 = 0;
    int Hack7 = 0;
    int Hack8 = 0;
    int sniper = 0;
    int Hack10 = 0;
    int Hack11 = 0;
    int ChooperBox = 0;
    int Hack13 = 0;
    int teamblue = 0;
    int teamred = 0;
    int CH_PATEN = 0;
    int Minfo = 0;
    int azzzzz=0;
    int Kontoless=0;
    int chams=0;
    int norecoil =0;
    int fov = 0;
    int forceclass = 0;
    int uav = 0;
    int Steal = 0;
    int changeteam = 0;
    int w0t;
    bool BoxInfo;
    //----------------------------------------------------------------------------------------------------------------------------------
    #define BRACCIOs ((NumVertices == 964) || (NumVertices == 730))
    #define MANOs (NumVertices == 3039)
    #define TeamBlue ((NumVertices == 149 && primCount == 126) || (NumVertices == 135 && primCount == 96) || (NumVertices == 178 && primCount == 150) || (NumVertices == 146 && primCount == 130) || (NumVertices == 96 && primCount == 72) || (NumVertices == 140 && primCount == 110) || (NumVertices == 239 && primCount == 182) || (NumVertices == 91 && primCount == 78) || (NumVertices == 278 && primCount == 206) || (NumVertices == 128 && primCount == 120) || (NumVertices == 145 && primCount == 168) || (NumVertices == 195 && primCount == 196) || (NumVertices == 41 && primCount == 32) || (NumVertices == 169 && primCount == 220) || (NumVertices == 289 && primCount == 264) || (NumVertices == 133 && primCount == 102) || (NumVertices == 275 && primCount == 246) || (NumVertices == 28 && primCount == 12) || (NumVertices == 175 && primCount == 140) || (NumVertices == 78 && primCount == 72) || (NumVertices == 91 && primCount == 96) || (NumVertices == 280 && primCount == 190) || (NumVertices == 381 && primCount == 270) || (NumVertices == 394 && primCount == 212) || (NumVertices == 207 && primCount == 186) || (NumVertices == 44 && primCount == 34) || (NumVertices == 40 && primCount == 42) || (NumVertices == 113 && primCount == 102) || (NumVertices == 115 && primCount == 86) || (NumVertices == 195 && primCount == 162) || (NumVertices == 256 && primCount == 190))
    #define TeamRed ((NumVertices == 130 && primCount == 98) || (NumVertices == 68 && primCount == 60) || (NumVertices == 30 && primCount == 18) || (NumVertices == 174 && primCount == 122) || (NumVertices == 157 && primCount == 158) || (NumVertices == 115 && primCount == 146) || (NumVertices == 137 && primCount == 92) || (NumVertices == 152 && primCount == 104) || (NumVertices == 167 && primCount == 124) || (NumVertices == 52 && primCount == 54) || (NumVertices == 67 && primCount == 60) || (NumVertices == 55 && primCount == 58) || (NumVertices == 90 && primCount == 76) || (NumVertices == 43 && primCount == 24))
    #define Sniper ((NumVertices == 147 && primCount == 126) || (NumVertices == 82 && primCount == 90) || (NumVertices == 201 && primCount == 200) || (NumVertices == 61 && primCount == 40) || (NumVertices == 25 && primCount == 24) || (NumVertices == 129 && primCount == 86) || (NumVertices == 207 && primCount == 206) || (NumVertices == 325 && primCount == 184))
    //----------------------------------------------------------------------------------------------------------------------------------
    //----------------------------------------------------------------------------------------------------------------------------------
    #define PI 3.14159265
    ID3DXLine *g_pLine;
    //----------------------------------------------------------------------------------------------------------------------------------
    D3DRECT RectA;
    D3DRECT RectB;
    D3DVIEWPORT9
    Viewport;
    //----------------------------------------------------------------------------------------------------------------------------------
    D3DCOLOR
    HairColor = D3DCOLOR_ARGB(255, 255, 000, 000);
    using namespace std;
    ofstream infile;
    ofstream myfile;
    //----------------------------------------------------------------------------------------------------------------------------------
    #define MENUMAXITEMS 100
    #define MENUFOLDER 1
    #define ANJING 1
    #define MENUTEXT 2
    #define MENUITEM 3
    #define MENUWEWITEM 10
    #define MENUINFO 0
    //----------------------------------------------------------------------------------------------------------------------------------
    int Mpos=0; // current highlighted menuitem
    int Mmax=0; // number of menu items
    int Mxofs =160; // offset for option text
    int Mysize=15; // heigh of a menuline
    int Mvisible=1;
    //----------------------------------------------------------------------------------------------------------------------------------
    extern int Mpos;
    extern int Mmax;
    extern int Mxofs;
    extern int Mysize;
    extern int Mvisible;
    extern char Mtitle[];
    extern char *Moptfolder[];
    extern char *Moptonoff[];
    extern char *optColor1[11];
    extern char *optColor2[11];
    extern char *Secondary[4];
    //----------------------------------------------------------------------------------------------------------------------------------
    void MenuAddItem(char *txt, char **opt, int *var, int maxvalue, int typ);
    void MenuAddText (char *txt, char *opt="");
    void MenuShow(int x, int y, ID3DXFont* g_pFont);
    void MenuNav(void);
    //----------------------------------------------------------------------------------------------------------------------------------
    #define MCOLOR_TITLE D3DCOLOR_ARGB(255, 000, 255, 000)
    #define MCOLOR_CURRENT D3DCOLOR_ARGB(255, 000, 255, 000)
    #define MCOLOR_TEXT D3DCOLOR_ARGB(255, 000, 255, 000)
    #define MCOLOR_ACTIVE D3DCOLOR_ARGB(255, 000, 255, 000)
    #define MENUCOLOR_TITLE D3DCOLOR_ARGB(255, 255, 240, 0)
    #define MCOLOR_FOLDER D3DCOLOR_ARGB(255, 000, 255, 000)
    #define MCOLOR_INACTIVE D3DCOLOR_ARGB(255, 173, 173, 173)
    //----------------------------------------------------------------------------------------------------------------------------------
    bool Generate = true;
    #define MAROON D3DCOLOR_ARGB(255, 142, 30, 0)
    #define LGRAY D3DCOLOR_ARGB(255, 174, 174, 174)
    #define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
    #define RED D3DCOLOR_ARGB(255, 255, 000, 000)
    #define GREEN D3DCOLOR_ARGB(255, 000, 255, 000)
    #define BLUE D3DCOLOR_ARGB(255, 000, 000, 255)
    #define BLACK D3DCOLOR_ARGB(255, 000, 000, 000)
    #define mBLACK D3DCOLOR_ARGB(100, 000, 000, 205)
    #define PURPLE D3DCOLOR_ARGB(255, 125, 000, 255)
    #define GREY D3DCOLOR_ARGB(255, 128, 128, 128)
    #define YELLOW D3DCOLOR_ARGB(255, 255, 255, 000)
    #define ORANGE D3DCOLOR_ARGB(255, 255, 125, 000)
    #define PINK D3DCOLOR_ARGB(255, 255, 050, 250)
    #define CYAN D3DCOLOR_ARGB(255, 000, 255, 255)
    #define WHITE2 D3DCOLOR_ARGB(100, 255, 255, 255)
    #define RED2 D3DCOLOR_ARGB(100, 255, 000, 000)
    #define GREEN2 D3DCOLOR_ARGB(100, 000, 255, 000)
    #define BLUE2 D3DCOLOR_ARGB(100, 000, 000, 255)
    #define BLACK2 D3DCOLOR_ARGB(000, 000, 000, 000)
    #define PURPLE2 D3DCOLOR_ARGB(100, 125, 000, 255)
    #define GREY2 D3DCOLOR_ARGB(100, 128, 128, 128)
    #define YELLOW2 D3DCOLOR_ARGB(100, 255, 255, 000)
    #define ORANGE2 D3DCOLOR_ARGB(100, 255, 125, 000)
    #define PINK2 D3DCOLOR_ARGB(100, 255, 050, 250)
    #define CYAN2 D3DCOLOR_ARGB(100, 000, 255, 255)
    #define Biru D3DCOLOR_ARGB( 250, 25, 220, 251)
    #define Biru D3DCOLOR_ARGB( 250, 25, 220, 251)
    #define purple2 D3DCOLOR_ARGB(15, 125, 000, 255)
    #define LIGHTBLUE D3DCOLOR_ARGB(100, 173, 216, 230)
    #define RANDCOLOR D3DCOLOR_ARGB (255, (BYTE) (rand ()% 255),(BYTE) (rand ()% 255),(BYTE) (rand ()% 255))
    #define Turquoise D3DCOLOR_ARGB ( 100, 64, 224, 208 )
    #define DodgerBlue D3DCOLOR_ARGB ( 90, 30, 144, 255 )

    LPDIRECT3DTEXTURE9 White,Red,Green,Blue,Black,Purple,Grey,Yellow,Oran ge,Pink,Cyan;
    //----------------------------------------------------------------------------------------------------------------------------------
    LPDIRECT3DVERTEXBUFFER9 Stream_Data;
    UINT Offset = 0;
    UINT Stride = 0;
    UINT texnum = 0;
    //----------------------------------------------------------------------------------------------------------------------------------
    RECT rect;
    RECT rect2;
    RECT rect3;
    //----------------------------------------------------------------------------------------------------------------------------------
    struct{
    int *var;
    int maxvalue;
    int typ;
    char *txt;
    char **opt;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    MENU[MENUMAXITEMS];
    //----------------------------------------------------------------------------------------------------------------------------------
    void MenuAddItem(char *txt, char **opt, int *var, int maxvalue, int typ){
    MENU[Mmax].typ=typ;
    MENU[Mmax].txt=txt;
    MENU[Mmax].opt=opt;
    MENU[Mmax].var=var;
    MENU[Mmax].maxvalue=maxvalue;
    Mmax++;
    }

    void MenuAddText(char *txt, char *opt){
    MENU[Mmax].typ=MENUTEXT;
    MENU[Mmax].txt=txt;
    MENU[Mmax].opt=(char **)opt;
    MENU[Mmax].var=0;
    MENU[Mmax].maxvalue=0;
    Mmax++;
    }

    //----------------------------------------------------------------------------------------------------------------------------------
    void MenuShow(int x, int y, ID3DXFont *pFont){
    int i, val;

    DWORD color;
    SetRect( &rect, x+Mxofs/3, y, x+Mxofs /2 , y );
    if (!Mvisible) return;

    if (Mtitle[0]) {

    pFont->DrawText(NULL,Mtitle,-1,&rect,DT_NOCLIP | DT_TOP, MCOLOR_CURRENT);

    y+=Mysize;
    }

    for (i=0; i<Mmax; i++) {

    val=(MENU[i].var)?(*MENU[i].var):0;

    if (i==Mpos){
    color=BLUE;
    }
    else if (MENU[i].typ==MENUFOLDER)
    color=MCOLOR_FOLDER;
    else if (MENU[i].typ==ANJING)
    color=MCOLOR_INACTIVE;
    else if (MENU[i].typ==MENUTEXT)
    color=CYAN;
    else
    color=(val)?GREEN:WHITE;
    SetRect( &rect3, x, y, x , y );
    SetRect( &rect2, x+Mxofs, y, x+Mxofs , y );
    pFont->DrawText(NULL,MENU[i].txt,-1,&rect3, DT_NOCLIP,color);
    if (MENU[i].opt) {
    if (MENU[i].typ==MENUTEXT)
    pFont->DrawText(NULL,(char *)MENU[i].opt,-1,&rect2, DT_NOCLIP | DT_RIGHT, color);
    else
    pFont->DrawText(NULL,(char *)MENU[i].opt[val],-1,&rect2, DT_NOCLIP | DT_LEFT, color);
    }
    y+=Mysize;
    }
    }

    //------------------------------------------------------------------------------//
    void MenuNav(void){
    //------------------------------------------------------------------------------//
    if (GetAsyncKeyState(VK_F2)&1) Mvisible=(!Mvisible);
    if (!Mvisible) return;
    //------------------------------------------------------------------------------//
    if (GetAsyncKeyState(VK_UP)&1) {
    do {
    Mpos--;
    if (Mpos<0) Mpos=Mmax-1;
    } while (MENU[Mpos].typ==MENUTEXT);
    //------------------------------------------------------------------------------//
    } else if (GetAsyncKeyState(VK_DOWN)&1) {
    do {
    Mpos++;
    if (Mpos==Mmax) Mpos=0;
    } while (MENU[Mpos].typ==MENUTEXT);
    } else if (MENU[Mpos].var) {
    int dir=0;
    //------------------------------------------------------------------------------//
    if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos].var > 0 ) dir=-1;
    //------------------------------------------------------------------------------//
    if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) dir=1;
    if (dir) {
    *MENU[Mpos].var += dir;
    if (MENU[Mpos].typ==MENUFOLDER) Mmax=0;
    }
    }
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    #define Detour_Type_0xE9 1
    #define Detour_Type_0xB8 2
    #define Detour_Type_0x68 3
    DWORD CreateDetour(DWORD dwThread,DWORD dwAdress,DWORD dwType,DWORD dwSize)
    {
    DWORD dwDetour,dwProtect,i;
    if (dwAdress&&dwThread&&dwSize>= dwSize)
    {
    dwDetour = (DWORD)VirtualAlloc(0,dwSize+dwSize,0x1000,0x40);
    if (dwDetour&&VirtualProtect((VOID*)dwAdress,dwSize,0 x40,&dwProtect))
    {
    for (i=0;i<dwSize;i++)
    {
    *(BYTE*)(dwDetour+i)=*(BYTE*)(dwAdress+i);
    }
    switch (dwType)
    {
    case Detour_Type_0xE9:
    {
    *(BYTE*)(dwDetour+dwSize+0)=0xE9;
    *(DWORD*)(dwDetour+dwSize+1)=(dwAdress-dwDetour-dwSize);
    *(BYTE*)(dwAdress+0)=0xE9;
    *(DWORD*)(dwAdress+1)=(dwThread-dwAdress-dwSize);
    }
    break;
    case Detour_Type_0xB8:
    {
    *(BYTE*)(dwDetour+dwSize+0)=0xB8;
    *(DWORD*)(dwDetour+dwSize+1)=(dwAdress+dwSize);
    *(WORD*)(dwDetour+dwSize+5)=0xE0FF;
    *(BYTE*)(dwAdress+0)=0xB8;
    *(DWORD*)(dwAdress+1)=(dwThread);
    *(WORD*)(dwAdress+5)=0xE0FF;
    }
    break;
    case Detour_Type_0x68:
    {
    *(BYTE*)(dwDetour+dwSize+0)=0x68;
    *(DWORD*)(dwDetour+dwSize+1)=(dwAdress+dwSize);
    *(WORD*)(dwDetour+dwSize+5)=0xC3;
    *(BYTE*)(dwAdress+0)=0x68;
    *(DWORD*)(dwAdress+1)=(dwThread);
    *(WORD*)(dwAdress+5)=0xC3;
    }
    break;
    }
    VirtualProtect((VOID*)dwAdress,dwSize,dwProtect,&d wProtect);
    VirtualProtect((VOID*)dwDetour,dwSize+dwSize,0x20, &dwProtect);
    return dwDetour;
    }
    }
    Sleep(10);
    return (0);
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    typedef HRESULT (WINAPI* tEndScene)(LPDIRECT3DDEVICE9 pDevice);
    tEndScene oEndScene = NULL;
    //----------------------------------------------------------------------------------------------------------------------------------
    typedef HRESULT (WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
    tDrawIndexedPrimitive oDrawIndexedPrimitive = NULL;
    //----------------------------------------------------------------------------------------------------------------------------------
    typedef HRESULT(WINAPI* tReset)(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters);
    tReset oReset = NULL;
    //----------------------------------------------------------------------------------------------------------------------------------
    //----------------------------------------------------------------------------------------------------------------------------------
    void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
    D3DRECT rec = { x, y, x + w, y + h };
    pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color)
    {

    D3DXVECTOR2 Line[128];
    float Step = PI * 2.0 / numSides;
    int Count = 0;
    for (float a=0; a < PI*2.0; a += Step)
    {
    float X1 = radius * cos(a) + X;
    float Y1 = radius * sin(a) + Y;
    float X2 = radius * cos(a+Step) + X;
    float Y2 = radius * sin(a+Step) + Y;
    Line[Count].x = X1;
    Line[Count].y = Y1;
    Line[Count+1].x = X2;
    Line[Count+1].y = Y2;
    Count += 2;
    }
    g_pLine->Begin();
    g_pLine->Draw(Line,Count,Color);
    g_pLine->End();
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    char Megaze1(void* address, int* val, char bytes)
    {
    DWORD Comander, Rezpect;
    VirtualProtect(address, bytes, PAGE_EXECUTE_WRITECOPY, &Comander);
    memcpy(address, val, bytes);
    VirtualProtect(address,bytes,Comander,&Rezpect);
    return(0);
    }

    //----------------------------------------------------------------------------------------------------------------------------------
    char Mtitle [] = "";
    char *Moptfolder [] = {"OPEN", "CLOSE"};
    char *ValueFOV [7] = {"90","95","100","105","110"};
    char *Moptonoff [] = {"OFF", "ON"};
    char *optColor1 [11] = {"OFF","RED","BLUE","GREEN","YELLOW","PINK","WHITE ","BLACK","ORANGE","CYAN","PURPLE"};
    char *optColor2 [11] = {"OFF","RED","BLUE","GREEN","YELLOW","PINK","WHITE ","BLACK","ORANGE","CYAN","PURPLE"};
    char *Secondary [4] ={"OFF","IMMI UZZI","GLOCK 18","R.B 454 SS8M+S"};
    char *sonpo [7] ={"1","2","3","4","5","6","7"};
    //----------------------------------------------------------------------------------------------------------------------------------
    void RebuildMenu(void)
    {

    MenuAddText(" | F2 TO CLOSE |");
    if (memek)
    {
    MenuAddItem("APPLY CROSSHAIR",Moptonoff, &crosshair,2,MENUITEM);
    MenuAddText(" ~ MISC ~");
    MenuAddItem("WALLHACK",Moptonoff, &ChooperBox, 2, MENUITEM);
    MenuAddItem("NO RECOIL",Moptonoff, &norecoil, 2, MENUITEM);
    MenuAddItem("FOV",ValueFOV, &fov, 5, MENUITEM);
    MenuAddItem("UAV",Moptonoff, &uav, 2, MENUITEM);
    MenuAddItem("STEAL GUID",Moptonoff,&Steal,2,MENUITEM);
    MenuAddItem("CHANGE TEAM",Moptonoff,&changeteam,2,MENUITEM);
    MenuAddItem("FORCE CLASS",Moptonoff, &forceclass, 2, MENUITEM);
    MenuAddItem("INVERSE SCREEN",sonpo, &w0t, 7, MENUITEM);
    MenuAddText(" ~ CHAMS ~");
    MenuAddItem("ARM",Moptonoff, &braccio, 2, MENUITEM);
    MenuAddItem("AXIS",Moptonoff, &teamblue, 2, MENUITEM);
    MenuAddItem("ALLIES",Moptonoff, &teamred, 2, MENUITEM);
    MenuAddItem("SNIPER TEAM",Moptonoff, &sniper, 2, MENUITEM);
    }
    }

    //----------------------------------------------------------------------------------------------------------------------------------

    PBYTE HookVTableFunction( PDWORD* dwVTable, PBYTE dwHook, INT Index )
    {
    DWORD dwOld = 0;
    VirtualProtect((void*)((*dwVTable) + (Index) ), 0, PAGE_EXECUTE_READWRITE, &dwOld);

    PBYTE pOrig = ((PBYTE)(*dwVTable)[Index]);
    (*dwVTable)[Index] = (DWORD)dwHook;

    VirtualProtect((void*)((*dwVTable) + (Index)), 0, dwOld, &dwOld);

    return pOrig;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    HRESULT RaffiTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
    {
    if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
    return E_FAIL;

    WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
    |(WORD)(((colour32>>20)&0xF)<<8)
    |(WORD)(((colour32>>12)&0xF)<<4)
    |(WORD)(((colour32>>4)&0xF)<<0);


    D3DLOCKED_RECT d3dlr;
    (*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
    WORD *pDst16 = (WORD*)d3dlr.pBits;

    for(int xy=0; xy < 8*8; xy++)
    *pDst16++ = colour16;

    (*ppD3Dtex)->UnlockRect(0);

    return S_OK;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    PBYTE ProtectHook( PDWORD* dwVTable, PBYTE dwHook, INT Index )
    {
    DWORD d = 0;
    DWORD ds = 0;
    VirtualProtect((PVOID*)((*dwVTable) + (Index*4)), 4, PAGE_EXECUTE_READWRITE, &d);
    Sleep(-0);
    PBYTE pOrig = ((PBYTE)(*dwVTable)[Index]);
    (*dwVTable)[Index] = (DWORD)dwHook;
    memcpy(pOrig, dwVTable, ds);
    Sleep(-0);
    VirtualProtect((PVOID*)((*dwVTable) + (Index*4)), 4, d, &ds);
    Sleep(-0);
    VirtualProtect((void*)(dwVTable), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(pOrig,(void*)(pOrig), 4);
    VirtualProtect((void*)(dwHook), 4, d, &ds);
    return pOrig;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    #pragma warning(disable:4700)
    HMODULE dwD3D9 = GetModuleHandle("d3d9.dll");
    DWORD BaseD3D= NULL;
    //----------------------------------------------------------------------------------------------------------------------------------
    void DrawString(int x, int y, DWORD color, const char *fmt, ...)
    {
    RECT FontPos = { x, y, x + 30, y + 20 };
    char buf[1024] = {'\0'};
    va_list va_alist;

    va_start(va_alist, fmt);
    vsprintf(buf, fmt, va_alist);
    va_end(va_alist);

    g_pFont2->DrawText(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    void Jam(int x,int y,D3DCOLOR color)
    {
    static char FinalString[MAX_PATH];


    RECT FontPos = { x, y, x + 200, y + 16 };

    g_pFont->DrawTextA(NULL, FinalString, -1, &FontPos, DT_NOCLIP, color);
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    //----------------------------------------------------------------------------------------------------------------------------------

    void DrawRect(IDirect3DDevice9* pD3Ddev, int baseX, int baseY, int baseW, int baseH, D3DCOLOR Cor)
    {
    D3DRECT BarRect = { baseX, baseY, baseX + baseW, baseY + baseH };
    pD3Ddev->Clear(1, &BarRect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, Cor, 0, 0);
    }

    void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    FillRGB( x, (y + h - px), w, px, BorderColor, pDevice );
    FillRGB( x, y, px, h, BorderColor, pDevice );
    FillRGB( x, y, w, px, BorderColor, pDevice );
    FillRGB( (x + w - px), y, px, h, BorderColor, pDevice );
    }

    struct vertex
    {
    float x,y,z,t;
    DWORD Color;
    };

    void DrawBox5(float x, float y, float w, float h, DWORD color ,LPDIRECT3DDEVICE9 pDevice )
    {
    vertex q[4];

    q[0].Color = q[1].Color = q[2].Color = q[3].Color = color;

    q[0].z = q[1].z = q[2].z = q[3].z = 0;
    q[0].t = q[1].t = q[2].t = q[3].t = 0;

    q[0].x = q[2].x = x;
    q[0].y = q[1].y = y;
    q[1].x = q[3].x = x + w;
    q[2].y = q[3].y = y + h;

    pDevice -> SetTexture ( 0, NULL );
    pDevice -> SetPixelShader ( NULL );
    pDevice -> SetRenderState ( D3DRS_ALPHABLENDENABLE, TRUE );
    pDevice -> SetRenderState ( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    pDevice -> SetRenderState ( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    pDevice -> SetFVF ( D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1 );
    pDevice -> DrawPrimitiveUP ( D3DPT_TRIANGLESTRIP,2,q,sizeof(vertex));
    }

    int getClientGUID( int clientNumber )
    {
    return *( int* )( *( DWORD *)0x132C3A0 + 0x60 + ( 0x40 * clientNumber ) );
    }

    typedef struct
    {
    int Valid; //0x0 - [0x009FC748]
    char _0x0004[0x8]; //0x4 - [0x009FC74C]
    char Name[16]; //0xC - [0x009FC754]
    int Team; //0x1C - [0x009FC764]
    char _0x0020[0x4]; //0x20 - [0x009FC768]
    int Rank; //0x24 - [0x009FC76C]
    char _0x0028[0x10]; //0x28 - [0x009FC770]
    int Perk; //0x38 - [0x009FC780]
    char _0x003C[0x8]; //0x3C - [0x009FC784]
    int Score; //0x44 - [0x009FC78C]
    char _0x0048[0x458]; //0x48 - [0x009FC790]
    int Attacking; //0x4A0 - [0x009FBE8]
    char _0x04A4[0x4]; //0x4A4 - [0x009FBEC]
    int Zooming; //0x4A8 - [0x009FBF0]
    char _0x04AC[0xB8]; //0x4AC - [0x009FBF4]
    }ClientInfo_T;

    //======================== HACKS FUCTIONS ========================

    void DrawBox( int x, int y, int w, int h, D3DCOLOR BoxColor,D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    FillRGB( x, y, w, h, BoxColor, pDevice );
    DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
    }

    void DrawBox1( int x, int y, int w, int h, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
    }

    void DrawBox2( int x, int y, int w, int h, D3DCOLOR BoxColor, IDirect3DDevice9* pDevice )
    {
    FillRGB( x, y, w, h, BoxColor, pDevice );
    }

    void Chart()

    {
    for(int i=0;i<18;i++)
    {
    ClientInfo_T*Client[18];
    Client[i] = (ClientInfo_T*)(0x009FC748 + (i*0x560));;
    char buf[500];
    sprintf_s(buf,"%s - [ %X ]",Client[i]->Name,getClientGUID(i));
    DrawString(990,30+ (i * 17),BLACK,buf);
    }
    }

    void DrawPoint(int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice)
    {
    FillRGB((int)x, (int)y, (int)w, (int)h, color,pDevice);
    }


    HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
    {
    myfile << "EndScene Telah di Hook\n";
    __asm PUSHAD;
    while(!npDevice)
    {
    npDevice = pDevice;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    if(bbSprite == NULL)D3DXCreateSprite(pDevice, &bbSprite);

    if (Generate)
    {
    RaffiTexture(pDevice, &White, WHITE2);
    RaffiTexture(pDevice, &Red, RED2);
    RaffiTexture(pDevice, &Green, GREEN2);
    RaffiTexture(pDevice, &Blue, BLUE2);
    RaffiTexture(pDevice, &Black, BLACK2);
    RaffiTexture(pDevice, &Purple, purple2);
    RaffiTexture(pDevice, &Grey, GREY2);
    RaffiTexture(pDevice, &Yellow, YELLOW2);
    RaffiTexture(pDevice, &Orange, ORANGE2);
    RaffiTexture(pDevice, &Pink, PINK2);
    RaffiTexture(pDevice, &Cyan, CYAN2);
    Generate = false;
    }
    D3DVIEWPORT9 viewP;
    pDevice->GetViewport( &viewP );
    DWORD ScreenCenterX = viewP.Width / 2;
    DWORD ScreenCenterY = viewP.Height / 2;

    if ( crosshair == 1 )
    {
    D3DVIEWPORT9 Viewport1;
    pDevice->GetViewport(&Viewport1);
    DWORD ScreenX = Viewport1.Width / 2;
    DWORD ScreenY = Viewport1.Height / 2;
    FillRGB(ScreenX-5, ScreenY, 12, 2,WHITE,pDevice);
    FillRGB(ScreenX, ScreenY-5, 2, 12,WHITE,pDevice);
    }


    if ( ChooperBox == 1)
    {
    *(BYTE*)0x8FF110 = 16;
    *(BYTE*)0x01328D54 = 94;
    *(BYTE*)0x01328D55 = 48;
    *(BYTE*)0x01328D56 = 94;
    *(BYTE*)0x01328D57 = 02;
    *(BYTE*)0x01328D58 = 153;
    *(BYTE*)0x01328D59 = 153;
    }
    else
    if (ChooperBox == 0)
    {
    *(BYTE*)0x8FF110 = 0;
    *(BYTE*)0x01328D54 = 94;
    *(BYTE*)0x01328D55 = 48;
    *(BYTE*)0x01328D56 = 94;
    *(BYTE*)0x01328D57 = 02;
    *(BYTE*)0x01328D58 = 153;
    *(BYTE*)0x01328D59 = 153;
    }

    if(norecoil == 1)
    {
    *(BYTE*)0x54F8DD = 235;
    }
    else
    if ( norecoil == 0)
    {
    *(BYTE*)0x54F8DD = 116;
    }

    if( fov == 0)
    {
    *(BYTE*)0x059CE1A6 = 130;
    }

    if( fov == 1)
    {
    *(BYTE*)0x059CE1A6 = 148;
    }

    if( fov == 2)
    {
    *(BYTE*)0x059CE1A6 = 166;
    }

    if( fov == 3)
    {
    *(BYTE*)0x059CE1A6 = 185;
    }

    if( fov == 4)
    {
    *(BYTE*)0x059CE1A6 = 200;
    }

    if( fov == 5)
    {
    *(BYTE*)0x059CE1A6 = 218;
    }

    if( fov == 6)
    {
    *(BYTE*)0x059CE1A6 = 236;
    }

    if( fov == 7)
    {
    *(BYTE*)0x059CE1A6 = 254;
    }

    if(uav == 1)
    {
    *(BYTE*)0x59D3DF8 = 1;
    }
    else
    if(uav == 0)
    {
    *(BYTE*)0x59D3DF8 = 0;
    }
    if(w0t == 1)
    {
    *(BYTE*)0x10638A3 = 0;
    }

    if(w0t == 0)
    {
    *(BYTE*)0x10638A3 = 65;
    }
    if(w0t == 2)
    {
    *(BYTE*)0x10638A3 = 66;
    }
    if(w0t == 3)
    {
    *(BYTE*)0x10638A3 = 67;
    }
    if(w0t == 4)
    {
    *(BYTE*)0x10638A3 = 68;
    }
    if(w0t == 5)
    {
    *(BYTE*)0x10638A3 = 69;
    }
    if(w0t == 6)
    {
    *(BYTE*)0x10638A3 = 70;
    }


    //----------------------------------------------------------------------------------------------------------------------------------
    if(g_pFont == NULL) D3DXCreateFont(pDevice, 16, 0, FW_BOLD, 100, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Black", &g_pFont );
    if(g_pFont2 == NULL) D3DXCreateFont(pDevice, 16, 0, FW_BOLD, 100, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Black", &g_pFont2); //Create fonts
    if(g_pLine == NULL) D3DXCreateLine(pDevice, &g_pLine);
    pDevice->GetViewport(&g_ViewPort);
    pDevice->GetViewport(&g_ViewPort);
    //======================== HACKS FUCTIONS ========================
    #define ISHOOT 0xB3A008
    #define MYHEALTH 0x8FF29C
    #define MYHEALTH50 0x8FF29C
    #define ISINGAME2 0x08FFB38
    #define NOTIME 0x12FF6B0
    int* NoTime;
    int* IsInGame2;
    int* IShoot;
    int* MYHealth;
    int* MyHealth50;
    IShoot = (int*)ISHOOT;
    MYHealth = (int*)MYHEALTH;
    MyHealth50 = (int*)MYHEALTH50;
    IsInGame2 = (int*)ISINGAME2;
    NoTime = (int*)NOTIME;



    if(GetAsyncKeyState(VK_F7)&1) // axis - allies
    {
    *(BYTE*)0x06BCE720 = 0;
    *(BYTE*)0x148D0C8 = 6;
    *(BYTE*)0x148D0C9 = 0;
    *(BYTE*)0x148D0CA = 0;
    *(BYTE*)0x148D0CB = 0;

    *(BYTE*)0x148D018 = 0;
    *(BYTE*)0x148D019 = 0;
    *(BYTE*)0x148D01A = 0;
    *(BYTE*)0x148D01B = 0;

    *(BYTE*)0x58DAEBC = 124;
    *(BYTE*)0x58DAEBD = 208;
    *(BYTE*)0x58DAEBE = 72;
    *(BYTE*)0x58DAEBF = 1;

    *(BYTE*)0x58DAEC0 = 108;
    *(BYTE*)0x58DAEC1 = 184;
    *(BYTE*)0x58DAEC2 = 72;
    *(BYTE*)0x58DAEC3 = 1;

    *(BYTE*)0x1328D35 = 32;
    *(BYTE*)0x1328D36 = 32;
    *(BYTE*)0x1328D37 = 32;
    *(BYTE*)0x1328D38 = 32;
    *(BYTE*)0x1328D39 = 32;
    *(BYTE*)0x1328D3A = 94;
    *(BYTE*)0x1328D3B = 53;
    *(BYTE*)0x1328D3C = 78;
    *(BYTE*)0x1328D3D = 82;
    *(BYTE*)0x1328D3E = 32;
    *(BYTE*)0x1328D3F = 32;
    *(BYTE*)0x1328D40 = 32;
    *(BYTE*)0x1328D41 = 32;
    *(BYTE*)0x1328D42 = 32;
    *(BYTE*)0x1328D43 = 94;
    *(BYTE*)0x1328D44 = 54;
    *(BYTE*)0x1328D45 = 79;
    *(BYTE*)0x1328D46 = 119;
    *(BYTE*)0x1328D47 = 110;
    *(BYTE*)0x1328D48 = 0;

    }


    DrawBox(170,0, 1110, 20, BLACK, BLUE, pDevice);
    DrawString(165,2,BLUE," NR Bot v1.3");
    DrawString(245, 2, WHITE," || NAME :");
    char player[85];
    sprintf_s(player,"%s", 0x05A7B1B4);
    DrawString(315, 2, GREEN, player);
    DrawString(387,2,WHITE,"|| GUID:");
    char xuid[32];
    sprintf_s(xuid,"%X",*(int*)0x05A7B1D8);
    DrawString(436, 2,GREEN, xuid);
    DrawString(500,2,WHITE,"|| XNAA:");
    char XNAAddress[85];
    sprintf_s(XNAAddress,"%X",*(int*)0x00464A58);
    DrawString(555,2,GREEN,XNAAddress);
    DrawString(617,2,WHITE,"|| IP:");
    char IpPort[85];
    sprintf_s(IpPort,"%s", 0xBA29F8);
    DrawString(648,2, GREEN,IpPort);
    DrawString(787,2,WHITE,"|| SLOTS:");
    DrawString(866,2,GREEN,"/18");
    char hSlots[85];
    sprintf_s(hSlots, "%d",*(int*)0x1070AA8);
    DrawString(850,2,GREEN,hSlots);
    DrawString(895,2,WHITE,"|| DATE:");
    time_t t = time(0);
    DrawString(950,2,GREEN,ctime( &t ));
    DrawString(1125,2,BLUE,"TeknoMW3 2.7.3.5 ");

    if(*IsInGame2)
    {
    DrawString(999,405,WHITE," Score :");
    DrawString(999,420,WHITE," Kills :");
    DrawString(999,435,WHITE," HeadShots :");
    DrawString(999,450,WHITE," Assists :");
    DrawString(999,465,WHITE," Deaths :");

    DrawBox1(1080,400, 170,84, BLUE,pDevice);
    char ScorePoints[32];
    sprintf_s(ScorePoints,"%d",*(int*)0x01CDBC6C);
    DrawString(1175,405,BLUE,ScorePoints);
    char KillsPoints[32];
    sprintf_s(KillsPoints,"%d",*(int*)0x1CDBC94);
    DrawString(1175,420,BLUE,KillsPoints);
    char HeadShotsPoints[32];
    sprintf_s(HeadShotsPoints,"%d",*(int*)0x01CDBCA8);
    DrawString(1175,435,BLUE,HeadShotsPoints);
    char AssistsPoints[32];
    sprintf_s(AssistsPoints,"%d",*(int*)0x01CDBCA4);
    DrawString(1175,450,BLUE,AssistsPoints);
    char DeathsPoints[32];
    sprintf_s(DeathsPoints,"%d",*(int*)0x01CDBC9C);
    DrawString(1175,465,BLUE,DeathsPoints);
    }
    if (*MYHealth)
    {
    char hHealth[85];
    sprintf_s(hHealth, "%d",*(int*)0x8FF29C);
    DrawString(1182,638,WHITE,hHealth);
    }

    if(Mvisible == 1)
    if(*IsInGame2)
    {
    DrawBox5(10,30,195,241,DodgerBlue,pDevice);
    DrawBox1(10,30,195,241,BLUE,pDevice);
    }
    else if( Mvisible == 1)
    {
    DrawBox1(10,30,195,241,BLUE,pDevice);
    }

    if(Mvisible == 1)
    {
    *(BYTE*)0x59C177B = 0;
    }
    else
    if(Mvisible == 0)
    {
    *(BYTE*)0x59C177B = 63;
    }

    if (*MYHealth == 100 )
    {
    DrawBox2(1182,540,13,100,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 99)
    {
    DrawBox2(1182,541,13,99,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 98)
    {
    DrawBox2(1182,542,13,98,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 97)
    {
    DrawBox2(1182,543,13,97,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 96)
    {
    DrawBox2(1182,544,13,96,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 95)
    {
    DrawBox2(1182,545,13,95,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 94)
    {
    DrawBox2(1182,546,13,94,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 93)
    {
    DrawBox2(1182,547,13,93,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 92)
    {
    DrawBox2(1182,548,13,92,RED,pDevice); // larghezza, altezza
    }

    else if(*MYHealth == 91)
    {
    DrawBox2(1182,549,13,91,RED,pDevice); // larghezza, altezza
    }

    else if(*MYHealth == 90)
    {
    DrawBox2(1182,550,13,90,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 89)
    {
    DrawBox2(1182,551,13,89,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 88)
    {
    DrawBox2(1182,552,13,88,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 87)
    {
    DrawBox2(1182,553,13,87,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 86)
    {
    DrawBox2(1182,554,13,86,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 85)
    {
    DrawBox2(1182,555,13,85,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 84)
    {
    DrawBox2(1182,556,13,84,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 83)
    {
    DrawBox2(1182,557,13,83,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 82)
    {
    DrawBox2(1182,558,13,82,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 81)
    {
    DrawBox2(1182,559,13,81,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 80)
    {
    DrawBox2(1182,560,13,80,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 79)
    {
    DrawBox2(1182,561,13,79,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 78)
    {
    DrawBox2(1182,562,13,78,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 77)
    {
    DrawBox2(1182,563,13,77,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 76)
    {
    DrawBox2(1182,564,13,76,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 75)
    {
    DrawBox2(1182,565,13,75,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 74)
    {
    DrawBox2(1182,566,13,74,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 73)
    {
    DrawBox2(1182,567,13,73,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 72)
    {
    DrawBox2(1182,568,13,72,RED,pDevice); // larghezza, altezza
    }

    else if(*MYHealth == 71)
    {
    DrawBox2(1182,569,13,71,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 70)
    {
    DrawBox2(1182,570,13,70,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 69)
    {
    DrawBox2(1182,571,13,69,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 68)
    {
    DrawBox2(1182,572,13,68,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 67)
    {
    DrawBox2(1182,573,13,67,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 66)
    {
    DrawBox2(1182,574,13,66,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 65)
    {
    DrawBox2(1182,575,13,65,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 64)
    {
    DrawBox2(1182,576,13,64,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 63)
    {
    DrawBox2(1182,577,13,63,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 62)
    {
    DrawBox2(1182,578,13,62,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 61)
    {
    DrawBox2(1182,579,13,61,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 60)
    {
    DrawBox2(1182,580,13,60,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 59)
    {
    DrawBox2(1182,581,13,59,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 58)
    {
    DrawBox2(1182,582,13,58,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 57)
    {
    DrawBox2(1182,583,13,57,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 56)
    {
    DrawBox2(1182,584,13,56,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 55)
    {
    DrawBox2(1182,585,13,55,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 54)
    {
    DrawBox2(1182,586,13,54,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 53)
    {
    DrawBox2(1182,587,13,53,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 52)
    {
    DrawBox2(1182,588,13,52,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 51)
    {
    DrawBox2(1182,589,13,51,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 50)
    {
    DrawBox2(1182,590,13,50,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 49)
    {
    DrawBox2(1182,591,13,49,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 48)
    {
    DrawBox2(1182,592,13,48,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 47)
    {
    DrawBox2(1182,593,13,47,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 46)
    {
    DrawBox2(1182,594,13,46,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 45)
    {
    DrawBox2(1182,595,13,45,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 44)
    {
    DrawBox2(1182,596,13,44,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 43)
    {
    DrawBox2(1182,597,13,43,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 42)
    {
    DrawBox2(1182,598,13,42,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 41)
    {
    DrawBox2(1182,599,13,41,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 40)
    {
    DrawBox2(1182,600,13,40,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 39)
    {
    DrawBox2(1182,601,13,39,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 38)
    {
    DrawBox2(1182,602,13,38,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 37)
    {
    DrawBox2(1182,603,13,37,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 36)
    {
    DrawBox2(1182,604,13,36,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 35)
    {
    DrawBox2(1182,605,13,35,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 34)
    {
    DrawBox2(1182,606,13,34,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 33)
    {
    DrawBox2(1182,607,13,33,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 32)
    {
    DrawBox2(1182,608,13,32,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 31)
    {
    DrawBox2(1182,609,13,31,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 30)
    {
    DrawBox2(1182,610,13,30,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 29)
    {
    DrawBox2(1182,611,13,29,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 28)
    {
    DrawBox2(1182,612,13,28,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 27)
    {
    DrawBox2(1182,613,13,27,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 26)
    {
    DrawBox2(1182,614,13,26,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 25)
    {
    DrawBox2(1182,615,13,25,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 24)
    {
    DrawBox2(1182,616,13,24,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 23)
    {
    DrawBox2(1182,617,13,23,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 22)
    {
    DrawBox2(1182,618,13,22,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 21)
    {
    DrawBox2(1182,619,13,21,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 20)
    {
    DrawBox2(1182,620,13,20,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 19)
    {
    DrawBox2(1182,621,13,19,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 18)
    {
    DrawBox2(1182,622,13,18,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 17)
    {
    DrawBox2(1182,623,13,17,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 16)
    {
    DrawBox2(1182,624,13,16,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 15)
    {
    DrawBox2(1182,625,13,15,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 14)
    {
    DrawBox2(1182,626,13,14,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 13)
    {
    DrawBox2(1182,627,13,13,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 12)
    {
    DrawBox2(1182,628,13,12,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 11)
    {
    DrawBox2(1182,629,13,11,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 10)
    {
    DrawBox2(1182,630,13,10,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 9)
    {
    DrawBox2(1182,631,13,9,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 8)
    {
    DrawBox2(1182,632,13,8,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 7)
    {
    DrawBox2(1182,633,13,7,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 6)
    {
    DrawBox2(1182,634,13,6,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 5)
    {
    DrawBox2(1182,635,13,5,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 4)
    {
    DrawBox2(1182,636,13,4,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 3)
    {
    DrawBox2(1182,637,13,3,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 2)
    {
    DrawBox2(1182,618,13,2,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 1)
    {
    DrawBox2(1182,619,13,1,RED,pDevice); // larghezza, altezza
    }
    else if(*MYHealth == 0)
    {
    DrawBox2(1182,620,13,0,RED,pDevice); // larghezza, altezza
    }


    if(Steal == 1)
    if(*IsInGame2)
    if(Steal) Chart();

    if(Steal)
    if(*IsInGame2)
    {
    DrawBox5(883,22, 396, 329, BLACK2, pDevice);
    DrawBox1(883,22, 396, 329, BLUE, pDevice);
    DrawString(881,355,BLUE,"Steal Admin");
    DrawString(892, 30,BLUE,"Name / GUID : ");
    }





    if(*IShoot != 0)
    {
    DrawBox5(0,0,2000, 2000,purple2,pDevice);
    }

    int ciao;
    if(*IShoot != 0)
    {
    if ( ciao )
    {
    D3DVIEWPORT9 Viewport1;
    pDevice->GetViewport(&Viewport1);
    DWORD ScreenX = Viewport1.Width / 2;
    DWORD ScreenY = Viewport1.Height / 2;
    FillRGB(ScreenX-5, ScreenY, 12, 2,RED,pDevice);
    FillRGB(ScreenX, ScreenY-5, 2, 12,RED,pDevice);
    }
    }

    Jam(200,1,0xFF00FF00);
    if(uyeh == 0)
    {

    if (Mmax==0)
    RebuildMenu();
    MenuShow(15,30,g_pFont);
    MenuNav();
    }
    __asm POPAD;
    return oEndScene(pDevice);
    }
    //------------------------------------------------------------------------------------------------------------------------------------
    HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
    {
    myfile << "DIP is hooked\n";
    if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
    Stream_Data->Release();

    #define MYTEAM 0xB8080C
    int* myteam;
    myteam = (int*)MYTEAM;

    if ( braccio == 1 )
    if(*myteam != 1)
    if(BRACCIOs)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, false);
    pDevice->SetTexture(0, Red);
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState(D3DRS_ZENABLE, true);
    }

    if ( braccio == 1 )
    if(*myteam != 2)
    if(BRACCIOs)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, false);
    pDevice->SetTexture(0, Blue);
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState(D3DRS_ZENABLE, true);
    }

    if ( braccio == 1 )
    if(*myteam != 1)
    if(MANOs)
    {
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Red );
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, White);
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    }

    if ( braccio == 1 )
    if(*myteam != 2)
    if(MANOs)
    {
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Blue );
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, White);
    oDrawIndexedPrimitive(pDevice, PrimType,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    }

    if (teamblue==1)
    if(*myteam == 1)
    if(TeamBlue)
    {
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Red );
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, Red);
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    }

    if (teamblue==1)
    if(*myteam == 2)
    if(TeamBlue)
    {
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Green );
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, Green);
    oDrawIndexedPrimitive(pDevice,PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    }

    if( teamred == 1 )
    if(*myteam == 1)
    if (TeamRed)
    {
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Green );
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, Green);
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

    if( teamred == 1 )
    if(*myteam == 2)
    if (TeamRed)
    {
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Red );
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, Red);
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

    if( sniper == 1 )
    if( Sniper )
    {
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE,false );
    pDevice->SetTexture( 0, Yellow );
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    pDevice->SetRenderState( D3DRS_ZENABLE, true );
    pDevice->SetTexture( 0, Green);
    oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }
    return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
    {
    myfile << "Reset is hooked\n";
    if( g_pFont )
    g_pFont->OnLostDevice();

    if( g_pLine )
    g_pLine->OnLostDevice();

    HRESULT iReturnValue = oReset(pDevice, pPresentationParameters);

    if(iReturnValue == D3D_OK) {

    if( g_pFont )
    g_pFont->OnResetDevice();

    if( g_pLine )
    g_pLine->OnResetDevice();
    }

    return iReturnValue;
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    LRESULT CALLBACK MsgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam){return DefWindowProc(hwnd, uMsg, wParam, lParam);}
    void DX_Init(DWORD* table)
    {
    WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetMo duleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
    RegisterClassEx(&wc);
    HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100 ,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL );
    LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory( &d3dpp, sizeof(d3dpp) );
    d3dpp.Windowed = TRUE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
    LPDIRECT3DDEVICE9 pd3dDevice;
    pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hW nd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3 dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];
    table[ES] = pVTable[42];
    table[DIP] = pVTable[82];
    DestroyWindow(hWnd);
    }
    //----------------------------------------------------------------------------------------------------------------------------------
    bool hooked = false;
    DWORD WINAPI LoopFunction(LPVOID lpParam)
    {
    if( hooked == false) {
    DWORD VTable[3] = {0};

    while(LoadLibraryA("d3d9.dll")==NULL) {
    Sleep(100);
    }
    DX_Init(VTable);
    HOOK(EndScene,VTable[ES]); //Hook EndScene as a device discovery hook
    while(!npDevice) {
    Sleep(50);
    }
    UNHOOK(EndScene, VTable[ES]);
    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF50A4B[82]
    void* d3ES = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF19FEA[42]
    {
    int i;
    for (i = 0 ; i <= 0 ; i++){
    DWORD d,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3ES,(void*)(d3ES), 4);
    VirtualProtect((void*)(d3ES), 4, d, &ds);
    }
    }
    int C;
    for (C = 0 ; C <= 0 ; C++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3DIP,(void*)(d3DIP), 4);
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    //------------------//
    CreateDetour((DWORD)hkDrawIndexedPrimitive, (DWORD)d3DIP*C,Detour_Type_0xB8,7);
    CreateDetour((DWORD)hkEndScene, (DWORD)d3ES*C,Detour_Type_0xB8,7);


    *(PDWORD)&oDrawIndexedPrimitive = VTable[DIP];
    *(PDWORD)&oEndScene = VTable[ES];
    //-----------------//
    hooked = true;
    }
    Sleep(10);
    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF505B0[82]
    void* d3ES = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF50260[42]
    {
    DWORD Dark,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &Dark);
    memcpy((void*)d3ES, (const void*)d3ES, 4);
    VirtualProtect((void*)(d3ES), 4, Dark, &ds);
    }
    int i;
    for (i = 0 ; i <= 15 ; i++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy((void*)d3DIP, (const void*)d3DIP, 4);
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3DIP, (void *)d3DIP, 82) == 0 ) // Protect Hook Draw Indexed Primitive
    ProtectHook((LPDWORD*)npDevice, (PBYTE)d3DIP, 82);
    }

    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3ES, (void *)d3ES, 42) == 0 ) // Protect Hook End Scene
    ProtectHook((LPDWORD*)npDevice, (PBYTE)d3ES, 42);
    }
    {
    Sleep(100);
    }
    return 0;
    }
    /*_________________________________________________ ____________________________*/
    BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
    {
    if(dwReason == DLL_PROCESS_ATTACH) {
    CreateThread(0, 0,LoopFunction, 0, 0, 0);
    }
    return TRUE;
    }
    //------------------------------------------------------------------------------------------------------------------------------------

  2. #17
    mick167hack's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    Quote Originally Posted by rawr im a tiger View Post
    Time to revive this thread.

    Here's what I use for External ESP boxes in C#, you'll have to tweak the numbers for your code
    Code:
    private Pen friend;
    		private Pen enemy;
    		private Brush enemyb;
    		private Brush friendb;
    		private System.Drawing.Graphics gr;
    		private Font fnt;
    		
    		public overlay(Size siz)
    		{
    			this.Size = siz;
    			InitializeComponent();
    			gr = this.CreateGraphics();
    			enemy = new Pen(Color.Red, 3.0f);
    			friend = new Pen(Color.Green, 3.0f);
    			enemyb = new SolidBrush(Color.Red);
    			friendb = new SolidBrush(Color.Green);
    			fnt = new Font("Arial", 10.0f);
    		}
    		
    		private void DrawRect(Pen pn, float x, float y, float width, float height)
    		{
    			gr.DrawRectangle(pn, x, y, width, height);
    		}
    		
    		public void RefreshDraw()
    		{
    			gr.Clear(Color.White);
    		}
    		
    		private void DrawText(string s, Brush br, Font fnt, float x, float y)
    		{
    			gr.DrawString(s, fnt, br, x, y);
    		}
    		
    		public void DrawPlayer(string name, float x, float y, int status, float distance, bool friendly)
    		{
    			// Statuses: 
    			// 1: Stand
    			// 2: Crouch
    			// 3: Prone
    			
    			float height = 800.0f;
    			float width = 500.0f;
    			
    			switch (status) {
    				case 2:
    					height = 600.0f;
    					break;
    				case 3:
    					height = 300.0f;
    					break;
    			}
    			
    			height /= distance;
    			width /= distance;
    			
    			if (friendly) {
    				DrawRect(friend, x, y, width, height);
    				DrawText(name, friendb, fnt, x + (width / 2) - (name.Length * 2.5f), y - 20);
    			} else {
    				DrawRect(enemy, x, y, width, height);
    				DrawText(name, enemyb, fnt, x + (width / 2) - (name.Length * 2.5f), y - 20);
    			}
    		}
    SOLVED!!!!!!!
    Last edited by mick167hack; 12-27-2015 at 01:48 PM.

  3. #18
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    Basic red boxes/thermal :|


    noclip for all:
    Code:
    int Addy = 0x1C2CA0C;
    int Size = 0x38EC;
    
    public void NoclipToAll(bool OnOff)
    {
        int Value;
        if(OnOff)
            Value = 2;
        else Value = 0;
        
        for(int i = 0; i < 17; i++)//17 is max clients so it sets for all C:
            WriteInt(Addy + (i * Size),  Value)
    }
    Convery Client num to string(super easy) and you dont need host for this :|

    Code:
    int Addy = 0x9FA684;
    int Size = 0x190;
    
    
    ClientNumToString(int Client)
    {
         return ReadString(Addy + (Client * Size), 32);
    }
    New jump height

    Code:
    int Addy = 0x7E0AA0;
    void JumpHeight(float Height)
    {
         WriteFloat_Protected(Addy, Height);//this is super easy but addy was a lil hard to find
    }

    Credits semyel, ME
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



  4. #19
    AuT03x3C's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Location
    kernel32.dll
    Posts
    453
    Reputation
    11
    Thanks
    4,561
    My Mood
    Sleepy
    Quote Originally Posted by eithan1231 View Post
    noclip for all:
    Code:
    int Addy = 0x1C2CA0C;
    int Size = 0x38EC;
    Code:
    public void NoclipToAll(bool OnOff)
    {
        int Value;
        if(OnOff)
            Value = 2;
        else Value = 0;
        
        for(int i = 0; i < 17; i++)//17 is max clients so it sets for all C:
            WriteInt(Addy + (i * Size),  Value)
    }
    Not for all. MW3 has 18 players not 17.



    Why don't you just use/create a WriteByte function?
    Code:
    new byte[] { 16, }
    The "," is aids.

    Addresses and sizes should be constant.

    Read this:
    https://msdn.microsof*****m/en-us/library/ff926074.aspx

  5. The Following User Says Thank You to AuT03x3C For This Useful Post:

    Silent (05-12-2016)

  6. #20
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    Quote Originally Posted by AuT03x3C View Post
    Not for all. MW3 has 18 players not 17.
    0=player1
    1=player2
    2=player3
    ...
    16=player17
    17=player18

    I mite be wrong but im preaty sure its correct :|
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



  7. #21
    AuT03x3C's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Location
    kernel32.dll
    Posts
    453
    Reputation
    11
    Thanks
    4,561
    My Mood
    Sleepy
    Quote Originally Posted by eithan1231 View Post


    0=player1
    1=player2
    2=player3
    ...
    16=player17
    17=player18

    I mite be wrong but im preaty sure its correct :|
    That's correct but your for loop doesn't include 17

  8. #22
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    Quote Originally Posted by AuT03x3C View Post
    That's correct but your for loop doesn't include 17
    starts a 0 end at 17
    your mostlikely correct tho
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



  9. #23
    SnelFrikandel's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Where can i put this no clip for all in?

  10. #24
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    Quote Originally Posted by SnelFrikandel View Post
    Where can i put this no clip for all in?
    in a potato... no, just no
    if you dont know what it does google how to write memory in c# and if you still dont know what to do ehh idk look arround mpgh and after all that and still dont know what to do you wont be able to use it
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Patched] Post your Auth Codes here! (RSBots.net)
    By Ravallo in forum Runescape Hacks / Bots
    Replies: 220
    Last Post: 10-21-2011, 02:21 PM
  2. [Source Code] A useful Snippet you kiddos can use. POST yours here to!!
    By Nubzgetkillz in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 10
    Last Post: 03-13-2011, 01:49 PM
  3. Post your game name here
    By styx23 in forum WarRock - International Hacks
    Replies: 49
    Last Post: 07-17-2007, 08:47 PM
  4. Post Your Pictures
    By AthlaS in forum General
    Replies: 3
    Last Post: 02-21-2006, 09:39 PM