andrehks
Tipo de Conteúdo
Perfis
Fóruns
Atualizações
Quizzes
Store
Posts postados por andrehks
-
-
por favor alguem criaria um loader para mim preciso fazer um loader wallhack para o game soldier front 2, e um forum americano que acompanho tbm eles postaram alguns code para o game, porem eu nao sei como criar um alguem ai poderia me ajuda ?
-
Bom esta navegando na net tentando estudar um pouco sobre linguagem e programaçao mais nao consigo entender bem. :P
Quero fazer um simple wallhacker para soldier front 2, e achei alguns pointer e offset em um forum ingles e gostaria da ajuda de um programador para fazer esse wallhack para mim.
- Source
- GAME VERSION
------------
SF2 EU (S.K.I.L.L)
File Version: 1.0.58528.0
Engine: Unreal Engine 3
MEMORY ADDRESSES
----------------
OBJECTS:
POINTER: 141E350
SIGNATURE: A1 ? ? ? ? 8B 04 ? 8B ? ? 25 00 02 00 00
REF: 8919D5
NAMES:
POINTER: 141E308
SIGNATURE: 8B ? 8B 0D ? ? ? ? 8B 04 81
REF: 48B876
PROCESSEVENT:
FUNCTION LOCATION: 45CBB0
SIGNATURE: 74 ? 83 C0 07 83 E0 F8 E8 ? ? ? ? 8B C4
VTABLE INDEX: 68
TABLE REF: 403048
-
- Code
- Soldier front 2
Code:
RAW DATA DUMPS
---------------
OBJECT DUMP [ 4th Object (0xC) ]:
0: c0 83 0e 01
4: 03 00 00 00
8: 00 42 10 00
c: 04 00 00 00
10: 00 00 00 00
14: 00 00 00 00
18: 00 00 00 00
1c: 00 00 00 00
20: ff ff ff ff
24: 01 00 00 00
28: 00 c0 0f 13
2c: 51 08 00 00
30: 00 00 00 00
34: 00 fe 99 0e
38: 00 00 00 00
3c: 00 00 00 00
-----------------------------------------------------------------------------------------------------------------------------------
Main.cppCode:#include "stdafx.h"using namespace std;#include <iostream>//==================================Defines============================================#define ForceRecon (nNumVertices == 83 && nPrimitiveCount == 137 || nNumVertices == 79 && nPrimitiveCount == 105 || nNumVertices == 142 && nPrimitiveCount == 174 || nNumVertices == 278 && nPrimitiveCount == 462 || nNumVertices == 263 && nPrimitiveCount == 290 || nNumVertices == 316 && nPrimitiveCount == 556)#define ForceReconAddons (nNumVertices == 432 && nPrimitiveCount == 354 || nNumVertices == 144 && nPrimitiveCount == 136 || nNumVertices == 299 && nPrimitiveCount == 311 || nNumVertices == 167 && nPrimitiveCount == 252 || nNumVertices == 298 && nPrimitiveCount == 506 || nNumVertices == 168 && nPrimitiveCount == 254 || nNumVertices == 860 && nNumVertices == 778 || nNumVertices == 648 && nPrimitiveCount == 710 || nNumVertices == 113 && nPrimitiveCount == 189 || nNumVertices == 142 && nPrimitiveCount == 172 || nNumVertices == 87 && nPrimitiveCount == 90 || nNumVertices == 79 && nPrimitiveCount == 105 || nNumVertices == 84 && nPrimitiveCount == 110 || nNumVertices == 70 && nPrimitiveCount == 70 || nNumVertices == 860 && nPrimitiveCount == 778 || nNumVertices == 85 && nPrimitiveCount == 137)#define Mulan (nNumVertices == 118 && nPrimitiveCount == 126|| nNumVertices == 121 && nPrimitiveCount == 180|| nNumVertices == 124 && nPrimitiveCount == 126|| nNumVertices == 295 && nPrimitiveCount == 482|| nNumVertices == 299 && nPrimitiveCount == 452|| nNumVertices == 474 && nPrimitiveCount == 728)#define MulanAddons (nNumVertices == 162 && nPrimitiveCount == 200|| nNumVertices == 120 && nPrimitiveCount == 188|| nNumVertices == 167 && nPrimitiveCount == 276|| nNumVertices == 108 && nPrimitiveCount == 198|| nNumVertices == 512 && nPrimitiveCount == 728|| nNumVertices == 790 && nPrimitiveCount == 881|| nNumVertices == 619 && nPrimitiveCount == 800|| nNumVertices == 399 && nPrimitiveCount == 532|| nNumVertices == 402 && nPrimitiveCount == 580|| nNumVertices == 102 && nPrimitiveCount == 170|| nNumVertices == 125 && nPrimitiveCount == 98|| nNumVertices == 116 && nPrimitiveCount == 128|| nNumVertices == 160 && nPrimitiveCount == 174)//=====================================================================================================================================================================================================================================================================================================================//#pragma warning(disable:4305)//=====================================================================================int nofog;int XQZ;int m_Stride;int FullBright;int texnum;int nNumVertices;int nPrimitiveCount;LPDIRECT3DTEXTURE8 texRed,texGreen,texYellow,texOrange,texBlue,texCyan,texPink,texPurple,texWhite,texBlack,texSteelBlue,texBrown,texTeal,texLightSteelBlue,texLightBlue,texSalmon,texLime,texElectricLime,texGold,texOrangeRed,texGreenYellow,texAquaMarine,texSkyBlue,texSlateBlue,texCrimson,texDarkOliveGreen,texPaleGreen,texDarkGoldenRod,texFireBrick,texDarkBlue,texDarkerBlue,texDarkYellow,texLightYellow;float ScreenCenterX = 0.0f;float ScreenCenterY = 0.0f;int xhair;int chams;bool Color = true;D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );int NoSmoke;int NoFlash;int WhiteWalls;int AsusWalls;int GlassWalls;int ClearScope;int Red;int Orange;int Green;int Yellow;int Blue;int Cyan;int Pink;int Purple;int White;int Black;int SteelBlue;int LightSteelBlue;int Brown;int Teal;int LightBlue;int Salmon;int Lime;int ElectricLime;int Gold;int OrangeRed;int GreenYellow;int AquaMarine;int SkyBlue;int SlateBlue;int Crimson;int DarkOliveGreen;int PaleGreen;int DarkGoldenRod;int FireBrick;int DarkBlue;int DarkerBlue;int DarkYellow;int LightYellow;int Red2;int Orange2;int Green2;int Yellow2;int Blue2;int Cyan2;int Pink2;int Purple2;int White2;int Black2;int SteelBlue2;int LightSteelBlue2;int Brown2;int Teal2;int LightBlue2;int Salmon2;int Lime2;int ElectricLime2;int Gold2;int OrangeRed2;int GreenYellow2;int AquaMarine2;int SkyBlue2;int SlateBlue2;int Crimson2;int DarkOliveGreen2;int PaleGreen2;int DarkGoldenRod2;int FireBrick2;int DarkBlue2;int DarkerBlue2;int DarkYellow2;int LightYellow2;//=====================================================================================HRESULT GenerateTexture(IDirect3DDevice8 *pD3Ddev, IDirect3DTexture8 **ppD3Dtex, DWORD colour32){if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex)) )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;}//=====================================================================================typedef HRESULT (WINAPI* CreateDevice_Prototype) (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);typedef HRESULT (WINAPI* Reset_Prototype) (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);typedef HRESULT (WINAPI* EndScene_Prototype) (LPDIRECT3DDEVICE8);typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);typedef HRESULT (WINAPI* SetViewport_Prototype) (LPDIRECT3DDEVICE8 ,CONST D3DVIEWPORT8*);CreateDevice_Prototype CreateDevice_Pointer ;Reset_Prototype Reset_Pointer ;EndScene_Prototype EndScene_Pointer ;DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer ;SetViewport_Prototype SetViewport_Pointer ;HRESULT WINAPI Direct3DCreate8_VMTable (VOID);HRESULT WINAPI CreateDevice_Detour (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);HRESULT WINAPI Reset_Detour (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);HRESULT WINAPI EndScene_Detour (LPDIRECT3DDEVICE8);HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);HRESULT WINAPI SetViewport_Detour (LPDIRECT3DDEVICE8 ,CONST D3DVIEWPORT8*);PDWORD Direct3D_VMTable = NULL;//=====================================================================================BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved){if(dwReason == DLL_PROCESS_ATTACH){DisableThreadLibraryCalls(hinstModule);if(Direct3DCreate8_VMTable() == D3D_OK)return TRUE;}return FALSE;}//=====================================================================================//=====================================================================================CD3DFont *pFont=NULL;void PreReset(LPDIRECT3DDEVICE8 Device_Interface){if (pFont) {pFont->InvalidateDeviceObjects();pFont->DeleteDeviceObjects();pFont = NULL;}}void PostReset(LPDIRECT3DDEVICE8 Device_Interface){pFont = new CD3DFont("Arial", 10, D3DFONT_BOLD);if (pFont) {pFont->InitDeviceObjects(Device_Interface);pFont->RestoreDeviceObjects();}}//=====================================================================================//=====================================================================================HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters){PreReset(Device_Interface);return Reset_Pointer(Device_Interface, PresentationParameters);}//=====================================================================================HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE8 Device_Interface){if(Color){GenerateTexture(Device_Interface, &texGreen , D3DCOLOR_ARGB(255,0,255,0));GenerateTexture(Device_Interface, &texRed , D3DCOLOR_ARGB(255,255,0,0));GenerateTexture(Device_Interface, &texBlue , D3DCOLOR_ARGB(255,0,0,255));GenerateTexture(Device_Interface, &texOrange , D3DCOLOR_ARGB(255,255,165,0));GenerateTexture(Device_Interface, &texYellow , D3DCOLOR_ARGB(255,255,255,0));GenerateTexture(Device_Interface, &texPink , D3DCOLOR_ARGB(255,255,192,203));GenerateTexture(Device_Interface, &texCyan , D3DCOLOR_ARGB(255,0,255,255));GenerateTexture(Device_Interface, &texPurple , D3DCOLOR_ARGB(255,160,32,240));GenerateTexture(Device_Interface, &texBlack , D3DCOLOR_ARGB(255,0,0,0));GenerateTexture(Device_Interface, &texWhite , D3DCOLOR_ARGB(255,255,255,255));GenerateTexture(Device_Interface, &texSteelBlue , D3DCOLOR_ARGB(255,33,104,140));GenerateTexture(Device_Interface, &texLightSteelBlue, D3DCOLOR_ARGB(255,201,255,255));GenerateTexture(Device_Interface, &texLightBlue , D3DCOLOR_ARGB(255,26,140,306));GenerateTexture(Device_Interface, &texSalmon , D3DCOLOR_ARGB(255,196,112,112));GenerateTexture(Device_Interface, &texBrown , D3DCOLOR_ARGB(255,168,99,20));GenerateTexture(Device_Interface, &texTeal , D3DCOLOR_ARGB(255,38,140,140));GenerateTexture(Device_Interface, &texLime , D3DCOLOR_ARGB(255,50,205,50));GenerateTexture(Device_Interface, &texElectricLime , D3DCOLOR_ARGB(255,204,255,0));GenerateTexture(Device_Interface, &texGold , D3DCOLOR_ARGB(255,255, 215, 0));GenerateTexture(Device_Interface, &texOrangeRed , D3DCOLOR_ARGB(255,255,69,0));GenerateTexture(Device_Interface, &texGreenYellow , D3DCOLOR_ARGB(255,173,255,47));GenerateTexture(Device_Interface, &texAquaMarine , D3DCOLOR_ARGB(255,127,255,212));GenerateTexture(Device_Interface, &texSkyBlue , D3DCOLOR_ARGB(255,0,191,255));GenerateTexture(Device_Interface, &texSlateBlue , D3DCOLOR_ARGB(255,132, 112, 255));GenerateTexture(Device_Interface, &texCrimson , D3DCOLOR_ARGB(255,220,20,60));GenerateTexture(Device_Interface, &texDarkOliveGreen, D3DCOLOR_ARGB(255,188,238,104 ));GenerateTexture(Device_Interface, &texPaleGreen , D3DCOLOR_ARGB(255,154,255, 154));GenerateTexture(Device_Interface, &texDarkGoldenRod , D3DCOLOR_ARGB(255,255, 185, 15 ));GenerateTexture(Device_Interface, &texFireBrick , D3DCOLOR_ARGB(255,255,48,48));GenerateTexture(Device_Interface, &texDarkBlue , D3DCOLOR_ARGB(255,0,0,204));GenerateTexture(Device_Interface, &texDarkerBlue , D3DCOLOR_ARGB(255,0,0,153));GenerateTexture(Device_Interface, &texDarkYellow , D3DCOLOR_ARGB(255,255,204,0));GenerateTexture(Device_Interface, &texLightYellow , D3DCOLOR_ARGB(255,255,255,153));Color=false;}if(xhair){D3DRECT rec4 = {ScreenCenterX-35, ScreenCenterY, ScreenCenterX+ 35, ScreenCenterY+1};D3DRECT rec5 = {ScreenCenterX, ScreenCenterY-35, ScreenCenterX+ 1,ScreenCenterY+35};Device_Interface->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0, 0 );//purpleDevice_Interface->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0, 0 );D3DRECT rec6 = {ScreenCenterX-30, ScreenCenterY, ScreenCenterX+ 30, ScreenCenterY+1};D3DRECT rec7 = {ScreenCenterX, ScreenCenterY-30, ScreenCenterX+ 1,ScreenCenterY+30};Device_Interface->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0, 0 );//blueDevice_Interface->Clear( 1, &rec7, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0, 0 );D3DRECT rec8 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1};D3DRECT rec9 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25};Device_Interface->Clear( 1, &rec8, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0, 0 );//cyanDevice_Interface->Clear( 1, &rec9, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0, 0 );D3DRECT rec10 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+1};D3DRECT rec11 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 1,ScreenCenterY+20};Device_Interface->Clear( 1, &rec10, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0, 0 );// greenDevice_Interface->Clear( 1, &rec11, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0, 0 );D3DRECT rec12 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1};D3DRECT rec13 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15};Device_Interface->Clear( 1, &rec12, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0, 0 );// yellowDevice_Interface->Clear( 1, &rec13, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0, 0 );D3DRECT rec14 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};D3DRECT rec15 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};Device_Interface->Clear( 1, &rec14, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0, 0 );// orangeDevice_Interface->Clear( 1, &rec15, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0, 0 );D3DRECT rec16 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+ 5, ScreenCenterY+1};D3DRECT rec17 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+ 1,ScreenCenterY+5};Device_Interface->Clear( 1, &rec16, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );//redDevice_Interface->Clear( 1, &rec17, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );}/*if (GetAsyncKeyState(VK_F8)&1) // if we click f8{ xhair = !xhair; } // xhair = onif (GetAsyncKeyState(VK_F1)&1) // if we click f1{ chams = !chams; } // chams = onif (GetAsyncKeyState(VK_F2)&1) // if we click f2{ //thennofog = !nofog; //nofog = on} //end of thenif (GetAsyncKeyState(VK_F3)&1) // if we click f1{ XQZ = !XQZ; } // XQZ = on*/if (pFont==NULL)PostReset(Device_Interface); // Create fontelseDoMenu(Device_Interface);return EndScene_Pointer(Device_Interface);}//=====================================================================================void DrawBox(LPDIRECT3DDEVICE8 Device_Interface, int x, int y, int w, int h, D3DCOLOR col){struct {float x,y,z,rhw;DWORD dwColor;} qV[4] = { { (float)x , (float)(y+h), 0.0f, 0.0f, col},{ (float)x , (float)y , 0.0f, 0.0f, col},{ (float)(x+w), (float)(y+h), 0.0f, 0.0f, col},{ (float)(x+w), (float)y , 0.0f, 0.0f, col} };Device_Interface->SetPixelShader(NULL);Device_Interface->SetRenderState(D3DRS_ALPHABLENDENABLE,true);Device_Interface->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);Device_Interface->SetTexture(0, NULL);Device_Interface->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,qV,sizeof(qV[0]));}//=====================================================================================HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE pType,UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount){if(nofog){Device_Interface->SetRenderState(D3DRS_FOGENABLE, false); // Disable the Fog}LPDIRECT3DVERTEXBUFFER8 Stream_Data;UINT Stride = 40;if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)Stream_Data->Release();if(chams){texnum = (nNumVertices*100000)+nPrimitiveCount;if(Stride == 40 &&(texnum==34900580)|| // Delta Force Head(texnum==36100604)|| // Spetsnaz Head(texnum==38000658)|| // Spetsnaz Legs(texnum==18300268)|| // Spetsnaz Body(texnum==36200604)|| // GIGN Head(texnum==21200306)|| // GIGN Body(texnum==35500568)|| // GSG9 Head(texnum==2200024)|| // GSG9 Bangs(texnum==8800105)|| // GSG9 Feet(texnum==36900650)|| // GSG9 Legs(texnum==19600314)|| // GSG9 Body(texnum==36700612)|| // SAS Head(texnum==8500105)|| // SAS Feet(texnum==37000650)|| // SAS Legs(texnum==18000274)|| // SAS Body(texnum==35300556)|| // KSF Head(texnum==7500121)|| // KSF Arms(texnum==9200115)|| // KSF Feet(texnum==12400168)|| // KSF Hands(texnum==30100522)|| // KSF Legs(texnum==18700288)|| // KSF Body(texnum==40900594)|| // ARTC Head(texnum==11700190)|| // ARTC Arms(texnum==9100118)|| // ARTC Feet(texnum==12500170)|| // ARTC Hands(texnum==37000634)|| // ARTC Legs(texnum==41700516)|| // ARTC Body(texnum==19400260)|| // ROKMC Body(texnum==37900592)|| // ROKMC Head(texnum==36500642)|| // ROKMC Legs(texnum==44800776)|| // SRG Head(texnum==15900200)|| // SRG Left Arm(texnum==10500168)|| // SRG Right Arm(texnum==80401016)|| // SRG Body(texnum==10000121)|| // SRG Feet(texnum==13200180)|| // SRG Hands(ForceRecon)|| // ForceRecon(Mulan)||(texnum==33800534)|| // SRG Leg(texnum==13200212)|| // Delta Force Helmet(texnum==13200212)|| // Delta Force Helmet 2(texnum==34700538)|| // Delta Force Gas Mask(texnum==19500352)|| // Delta Force Balaclava(texnum==84900778)|| // Delta Force Clan BDU(texnum==27500442)|| // Delta Force Body Armor(texnum==42800576)|| // Delta Force Body Armor 2(texnum==52100658)|| // Delta Force Tactical Vest(texnum==12200196)|| // Spetsnaz Helmet(texnum==27100464)|| // Spetsnaz Gas Mask(texnum==33600552)|| // Spetsnaz Body Armor(texnum==44100646)|| // Spetsnaz Tactical Vest(texnum==17800292)|| // GIGN Red Bandana(texnum==21300290)|| // GIGN Helmet(texnum==2800036)|| // GIGN Helmet Lens(texnum==35700558)|| // GIGN Gas Mask(texnum==22100396)|| // GIGN Balaclava(texnum==29700492)|| // GIGN Body Armor(texnum==11200188)|| // ROKMC Beret(texnum==12000194)|| // ROKMC Helmet(texnum==29800450)|| // ROKMC Gas Mask(texnum==27100394)|| // ROKMC Body Armor(texnum==28700374)|| // ROKMC X Harness(texnum==34700470)|| // ROKMC X Harness(texnum==5100056)|| // ROKMC Pouch(texnum==9900163)|| // ROKMC Left Arm(texnum==18300163)|| // ROKMC Right Arm(texnum==16400266)|| // GSG9 Red Bandana(texnum==16200243)|| // GSG9 Helmet(texnum==31900466)|| // GSG9 Gas Mask(texnum==19300342)|| // GSG9 Balaclava(texnum==83600752)|| // GSG9 Clan BDU(texnum==33400477)|| // GSG9 Body Armor(texnum==10500163)|| // GSG9 Rolled Up Sleeves(texnum==38100666)|| // GSG9 Tactical Knee Pads(texnum==9600172)|| // SAS Boonie Hat(texnum==14200236)|| // SAS Helmet(texnum==37800552)|| // SAS Gas Mask(texnum==28100486)|| // SAS Balaclava(texnum==62400752)|| // SAS Clan BDU(texnum==27900456)|| // SAS Body Armor(texnum==45700654)|| // SAS Tactical Vest(texnum==39800532)|| // SAS Tactical Vest 2(texnum==9200100)|| // SAS Holster(texnum==4800040)|| // SAS Magazine Pouch(texnum==4000044)|| // SAS Pouch(texnum==6500110) || // KSF Boonie Hat(texnum==12900208)|| // KSF Helmet(texnum==29600448)|| // KSF Gas Mask(texnum==31100398)|| // KSF Sunglasses(texnum==84700776)|| // KSF Clan BDU(texnum==600004)|| // KSF Clan BDU Logo(texnum==36500606)|| // KSF Body Armor(texnum==63100646)|| // KSF Tactical Vest(texnum==19800163)|| // KSF Rolled Up Sleeves(texnum==7000066)|| // KSF Holster(texnum==10400190)|| // SRG Beret(texnum==23800294)|| // SRG Deer Head(texnum==11600180)|| // SRG NIJ IIIA Helmet(texnum==17100278)|| // SRG Red Bandana(texnum==14600198)|| // SRG Battle Cap(texnum==18200266)|| // SRG Helmet(texnum==19100106)|| // SRG Gas Mask(texnum==54300350)|| // SRG Sunglasses(texnum==30800380)|| // SRG Mid Class Sunglasses(texnum==79300995)|| // SRG Clan BDU 1(texnum==13300138)|| // SRG Clan BDU 2(texnum==300001)|| // SRG Clan BDU 3(texnum==1200012)|| // SRG Clan BDU Logo(texnum==10900110)|| // SRG Bulletproof Vest(texnum==6200064)|| // SRG Holster(ForceReconAddons)||(MulanAddons)||(texnum==22700250)) // SRG Pouch{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);if(Red){Device_Interface->SetTexture(0, texRed);}if(Green){Device_Interface->SetTexture(0, texGreen);}if(Orange){Device_Interface->SetTexture(0, texOrange);}if(Yellow){Device_Interface->SetTexture(0, texYellow);}if(Blue){Device_Interface->SetTexture(0, texBlue);}if(Cyan){Device_Interface->SetTexture(0, texCyan);}if(Pink){Device_Interface->SetTexture(0, texPink);}if(Purple){Device_Interface->SetTexture(0, texPurple);}if(White){Device_Interface->SetTexture(0, texWhite);}if(Black){Device_Interface->SetTexture(0, texBlack);}if(LightSteelBlue){Device_Interface->SetTexture(0, texLightSteelBlue);}if(SteelBlue){Device_Interface->SetTexture(0, texSteelBlue);}if(LightBlue){Device_Interface->SetTexture(0, texLightBlue);}if(Brown){Device_Interface->SetTexture(0, texBrown);}if(Teal){Device_Interface->SetTexture(0, texTeal);}if(Salmon){Device_Interface->SetTexture(0, texSalmon);}if(Lime){Device_Interface->SetTexture(0, texLime);}if(ElectricLime){Device_Interface->SetTexture(0, texElectricLime);}if(Gold){Device_Interface->SetTexture(0, texGold);}if(OrangeRed){Device_Interface->SetTexture(0, texOrangeRed);}if(GreenYellow){Device_Interface->SetTexture(0, texGreenYellow);}if(AquaMarine){Device_Interface->SetTexture(0, texAquaMarine);}if(SkyBlue){Device_Interface->SetTexture(0, texSkyBlue);}if(SlateBlue){Device_Interface->SetTexture(0, texSlateBlue);}if(Crimson){Device_Interface->SetTexture(0, texCrimson);}if(DarkOliveGreen){Device_Interface->SetTexture(0, texDarkOliveGreen);}if(PaleGreen){Device_Interface->SetTexture(0, texPaleGreen);}if(DarkGoldenRod){Device_Interface->SetTexture(0, texDarkGoldenRod);}if(FireBrick){Device_Interface->SetTexture(0, texFireBrick);}if(DarkBlue){Device_Interface->SetTexture(0, texDarkBlue);}if(DarkerBlue){Device_Interface->SetTexture(0, texDarkerBlue);}if(LightYellow){Device_Interface->SetTexture(0, texLightYellow);}if(DarkYellow){Device_Interface->SetTexture(0, texDarkYellow);}Device_Interface->SetRenderState(D3DRS_LIGHTING, false);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);if(Red2){Device_Interface->SetTexture(0, texRed);}if(Green2){Device_Interface->SetTexture(0, texGreen);}if(Orange2){Device_Interface->SetTexture(0, texOrange);}if(Yellow2){Device_Interface->SetTexture(0, texYellow);}if(Blue2){Device_Interface->SetTexture(0, texBlue);}if(Cyan2){Device_Interface->SetTexture(0, texCyan);}if(Pink2){Device_Interface->SetTexture(0, texPink);}if(Purple2){Device_Interface->SetTexture(0, texPurple);}if(White2){Device_Interface->SetTexture(0, texWhite);}if(Black2){Device_Interface->SetTexture(0, texBlack);}if(LightSteelBlue2){Device_Interface->SetTexture(0, texLightSteelBlue);}if(SteelBlue2){Device_Interface->SetTexture(0, texSteelBlue);}if(LightBlue2){Device_Interface->SetTexture(0, texLightBlue);}if(Brown2){Device_Interface->SetTexture(0, texBrown);}if(Teal2){Device_Interface->SetTexture(0, texTeal);}if(Salmon2){Device_Interface->SetTexture(0, texSalmon);}if(Red){Device_Interface->SetTexture(0, texRed);}if(Green){Device_Interface->SetTexture(0, texGreen);}if(Orange){Device_Interface->SetTexture(0, texOrange);}if(Yellow){Device_Interface->SetTexture(0, texYellow);}if(Blue){Device_Interface->SetTexture(0, texBlue);}if(Cyan){Device_Interface->SetTexture(0, texCyan);}if(Pink){Device_Interface->SetTexture(0, texPink);}if(Purple){Device_Interface->SetTexture(0, texPurple);}if(White){Device_Interface->SetTexture(0, texWhite);}if(Black){Device_Interface->SetTexture(0, texBlack);}if(LightSteelBlue){Device_Interface->SetTexture(0, texLightSteelBlue);}if(SteelBlue){Device_Interface->SetTexture(0, texSteelBlue);}if(LightBlue){Device_Interface->SetTexture(0, texLightBlue);}if(Brown){Device_Interface->SetTexture(0, texBrown);}if(Teal){Device_Interface->SetTexture(0, texTeal);}if(Salmon){Device_Interface->SetTexture(0, texSalmon);}if(Lime2){Device_Interface->SetTexture(0, texLime);}if(ElectricLime2){Device_Interface->SetTexture(0, texElectricLime);}if(Gold2){Device_Interface->SetTexture(0, texGold);}if(OrangeRed2){Device_Interface->SetTexture(0, texOrangeRed);}if(GreenYellow2){Device_Interface->SetTexture(0, texGreenYellow);}if(AquaMarine2){Device_Interface->SetTexture(0, texAquaMarine);}if(SkyBlue2){Device_Interface->SetTexture(0, texSkyBlue);}if(SlateBlue2){Device_Interface->SetTexture(0, texSlateBlue);}if(Crimson2){Device_Interface->SetTexture(0, texCrimson);}if(DarkOliveGreen2){Device_Interface->SetTexture(0, texDarkOliveGreen);}if(PaleGreen2){Device_Interface->SetTexture(0, texPaleGreen);}if(DarkGoldenRod2){Device_Interface->SetTexture(0, texDarkGoldenRod);}if(FireBrick2){Device_Interface->SetTexture(0, texFireBrick);}if(DarkBlue2){Device_Interface->SetTexture(0, texDarkBlue);}if(DarkerBlue2){Device_Interface->SetTexture(0, texDarkerBlue);}if(LightYellow2){Device_Interface->SetTexture(0, texLightYellow);}if(DarkYellow2){Device_Interface->SetTexture(0, texDarkYellow);}}if (nNumVertices == 213 && nPrimitiveCount == 174) // M67 Grenade =============== //{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texRed);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texGreen);}if (nNumVertices == 158 && nPrimitiveCount == 131) // Flashbang =============== //{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texRed);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texGreen);}if (nNumVertices == 171 && nPrimitiveCount == 143) // Smoke Grenade =============== //{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texRed);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texBlue);}if (nNumVertices == 271 && nPrimitiveCount == 257) // VX Grenade =============== //{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texRed);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texBlue);}if (nNumVertices == 338 && nPrimitiveCount == 339) // RGD-5 Grenade =============== //{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texRed);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texYellow);}if (Stride==40 && // Guns =============== //(texnum==187200968)|| // GALIL(texnum==187200968)|| // GALIL 2(texnum==149701124)|| // UZI(texnum==193701304)|| // M249(texnum==232501431)|| // SIG551(texnum==161500751)|| // FA-MAS(texnum==107400724)|| // FR-F2(texnum==141600900)|| // AN94(texnum==145900805)|| // G36C(texnum==42200339)|| // K1(texnum==23400116)|| // K1 2(texnum==17500073)|| // K1 3(texnum==3200012)|| // K1 4(texnum==2300012)|| // K1 5(texnum==71900459)|| // MP5(texnum==1800008)|| // MP5 2(texnum==20300084)|| // MP5 3(texnum==16700083)|| // MP5 4(texnum==79100469)|| // M4A1(texnum==12000044)|| // M4A1 2(texnum==16800062)|| // M4A1 3(texnum==2400008)|| // M4A1 4(texnum==600002)|| // M4A1 5(texnum==12800050)|| // M4A1 6(texnum==2600010)|| // M4A1 7(texnum==4200014)|| // M4A1 8(texnum==1400008)|| // M4A1 9(texnum==80600442)|| // M16A2(texnum==13400052)|| // M16A2 2(texnum==17600066)|| // M16A2 3(texnum==5400018)|| // M16A2 4(texnum==46200348)|| // STEYR_AUG(texnum==27000133)|| // STEYR_AUG 2(texnum==4100025)|| // STEYR_AUG 3(texnum==1200006)|| // STEYR_AUG 4(texnum==400002)|| // STEYR_AUG 5(texnum==46800367)|| // PSG-1(texnum==9600042)|| // PSG-1 2(texnum==18800092)|| // PSG-1 3(texnum==16900071)|| // PSG-1 4(texnum==3400012)|| // PSG-1 5(texnum==800004)|| // PSG-1 6(texnum==40500383)|| // K2(texnum==15800089)|| // K2 2(texnum==2200012)|| // K2 3(texnum==7000034)|| // K2 4(texnum==60700349)|| // P90(texnum==5500033)|| // P90 2(texnum==47700227)|| // P90 3(texnum==10300047)|| // P90 4(texnum==3800014)|| // P90 5(texnum==50300349)|| // AK-74(texnum==14700071)|| // AK-74 2(texnum==13100061)|| // AK-74 3(texnum==194501145)|| // MG36(texnum==116000670)|| // DESERT EAGLE(texnum==182101089)|| // MR73(texnum==62500454)|| // REMINGTON M870(texnum==95200571)|| // BENELLI M1(texnum==40700334)|| // GLOCK 23(texnum==71500449)|| // BERETTA M92F(texnum==11000044)|| // BERETTA M92F 2(texnum==16500075)|| // BERETTA M92F 3(texnum==4400020)|| // BERETTA M92F 4(texnum==2800014)|| // BERETTA M92F 5(texnum==92000543)|| // COLT 45(texnum==239001276)) // DRAGONUV{Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetTexture(0,texBlue);DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetTexture(0,texOrange);}}//============================================================================================================if(XQZ){texnum = (nNumVertices*100000)+nPrimitiveCount;if(Stride == 40 &&(texnum==34900580)|| // Delta Force Head(texnum==36100604)|| // Spetsnaz Head(texnum==38000658)|| // Spetsnaz Legs(texnum==18300268)|| // Spetsnaz Body(texnum==36200604)|| // GIGN Head(texnum==21200306)|| // GIGN Body(texnum==35500568)|| // GSG9 Head(texnum==2200024)|| // GSG9 Bangs(texnum==8800105)|| // GSG9 Feet(texnum==36900650)|| // GSG9 Legs(texnum==19600314)|| // GSG9 Body(texnum==36700612)|| // SAS Head(texnum==8500105)|| // SAS Feet(texnum==37000650)|| // SAS Legs(texnum==18000274)|| // SAS Body(texnum==35300556)|| // KSF Head(texnum==7500121)|| // KSF Arms(texnum==9200115)|| // KSF Feet(texnum==12400168)|| // KSF Hands(texnum==30100522)|| // KSF Legs(texnum==18700288)|| // KSF Body(texnum==40900594)|| // ARTC Head(texnum==11700190)|| // ARTC Arms(texnum==9100118)|| // ARTC Feet(texnum==12500170)|| // ARTC Hands(texnum==37000634)|| // ARTC Legs(texnum==41700516)|| // ARTC Body(texnum==19400260)|| // ROKMC Body(texnum==37900592)|| // ROKMC Head(texnum==36500642)|| // ROKMC Legs(texnum==44800776)|| // SRG Head(texnum==15900200)|| // SRG Left Arm(texnum==10500168)|| // SRG Right Arm(texnum==80401016)|| // SRG Body(texnum==10000121)|| // SRG Feet(texnum==13200180)|| // SRG Hands(ForceRecon)|| // ForceRecon(Mulan)||(texnum==33800534)) // SRG Leg{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (nNumVertices == 213 && nPrimitiveCount == 174) // M67 Grenade =============== //{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (nNumVertices == 158 && nPrimitiveCount == 131) // Flashbang =============== //{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (nNumVertices == 171 && nPrimitiveCount == 143) // Smoke Grenade =============== //{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (nNumVertices == 271 && nPrimitiveCount == 257) // VX Grenade =============== //{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (nNumVertices == 338 && nPrimitiveCount == 339) // RGD-5 Grenade =============== //{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (Stride==40 && // Equipment =============== //(texnum==13200212)|| // Delta Force Helmet(texnum==13200212)|| // Delta Force Helmet 2(texnum==34700538)|| // Delta Force Gas Mask(texnum==19500352)|| // Delta Force Balaclava(texnum==84900778)|| // Delta Force Clan BDU(texnum==27500442)|| // Delta Force Body Armor(texnum==42800576)|| // Delta Force Body Armor 2(texnum==52100658)|| // Delta Force Tactical Vest(texnum==12200196)|| // Spetsnaz Helmet(texnum==27100464)|| // Spetsnaz Gas Mask(texnum==33600552)|| // Spetsnaz Body Armor(texnum==44100646)|| // Spetsnaz Tactical Vest(texnum==17800292)|| // GIGN Red Bandana(texnum==21300290)|| // GIGN Helmet(texnum==2800036)|| // GIGN Helmet Lens(texnum==35700558)|| // GIGN Gas Mask(texnum==22100396)|| // GIGN Balaclava(texnum==29700492)|| // GIGN Body Armor(texnum==11200188)|| // ROKMC Beret(texnum==12000194)|| // ROKMC Helmet(texnum==29800450)|| // ROKMC Gas Mask(texnum==27100394)|| // ROKMC Body Armor(texnum==28700374)|| // ROKMC X Harness(texnum==34700470)|| // ROKMC X Harness(texnum==5100056)|| // ROKMC Pouch(texnum==9900163)|| // ROKMC Left Arm(texnum==18300163)|| // ROKMC Right Arm(texnum==16400266)|| // GSG9 Red Bandana(texnum==16200243)|| // GSG9 Helmet(texnum==31900466)|| // GSG9 Gas Mask(texnum==19300342)|| // GSG9 Balaclava(texnum==83600752)|| // GSG9 Clan BDU(texnum==33400477)|| // GSG9 Body Armor(texnum==10500163)|| // GSG9 Rolled Up Sleeves(texnum==38100666)|| // GSG9 Tactical Knee Pads(texnum==9600172)|| // SAS Boonie Hat(texnum==14200236)|| // SAS Helmet(texnum==37800552)|| // SAS Gas Mask(texnum==28100486)|| // SAS Balaclava(texnum==62400752)|| // SAS Clan BDU(texnum==27900456)|| // SAS Body Armor(texnum==45700654)|| // SAS Tactical Vest(texnum==39800532)|| // SAS Tactical Vest 2(texnum==9200100)|| // SAS Holster(texnum==4800040)|| // SAS Magazine Pouch(texnum==4000044)|| // SAS Pouch(texnum==6500110) || // KSF Boonie Hat(texnum==12900208)|| // KSF Helmet(texnum==29600448)|| // KSF Gas Mask(texnum==31100398)|| // KSF Sunglasses(texnum==84700776)|| // KSF Clan BDU(texnum==600004)|| // KSF Clan BDU Logo(texnum==36500606)|| // KSF Body Armor(texnum==63100646)|| // KSF Tactical Vest(texnum==19800163)|| // KSF Rolled Up Sleeves(texnum==7000066)|| // KSF Holster(texnum==10400190)|| // SRG Beret(texnum==23800294)|| // SRG Deer Head(texnum==11600180)|| // SRG NIJ IIIA Helmet(texnum==17100278)|| // SRG Red Bandana(texnum==14600198)|| // SRG Battle Cap(texnum==18200266)|| // SRG Helmet(texnum==19100106)|| // SRG Gas Mask(texnum==54300350)|| // SRG Sunglasses(texnum==30800380)|| // SRG Mid Class Sunglasses(texnum==79300995)|| // SRG Clan BDU 1(texnum==13300138)|| // SRG Clan BDU 2(texnum==300001)|| // SRG Clan BDU 3(texnum==1200012)|| // SRG Clan BDU Logo(texnum==10900110)|| // SRG Bulletproof Vest(texnum==6200064)|| // SRG Holster(ForceReconAddons)||(MulanAddons)||(texnum==22700250)) // SRG Pouch{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}if (Stride==40 && // Guns =============== //(texnum==187200968)|| // GALIL(texnum==187200968)|| // GALIL 2(texnum==149701124)|| // UZI(texnum==193701304)|| // M249(texnum==232501431)|| // SIG551(texnum==161500751)|| // FA-MAS(texnum==107400724)|| // FR-F2(texnum==141600900)|| // AN94(texnum==145900805)|| // G36C(texnum==42200339)|| // K1(texnum==23400116)|| // K1 2(texnum==17500073)|| // K1 3(texnum==3200012)|| // K1 4(texnum==2300012)|| // K1 5(texnum==71900459)|| // MP5(texnum==1800008)|| // MP5 2(texnum==20300084)|| // MP5 3(texnum==16700083)|| // MP5 4(texnum==79100469)|| // M4A1(texnum==12000044)|| // M4A1 2(texnum==16800062)|| // M4A1 3(texnum==2400008)|| // M4A1 4(texnum==600002)|| // M4A1 5(texnum==12800050)|| // M4A1 6(texnum==2600010)|| // M4A1 7(texnum==4200014)|| // M4A1 8(texnum==1400008)|| // M4A1 9(texnum==80600442)|| // M16A2(texnum==13400052)|| // M16A2 2(texnum==17600066)|| // M16A2 3(texnum==5400018)|| // M16A2 4(texnum==46200348)|| // STEYR_AUG(texnum==27000133)|| // STEYR_AUG 2(texnum==4100025)|| // STEYR_AUG 3(texnum==1200006)|| // STEYR_AUG 4(texnum==400002)|| // STEYR_AUG 5(texnum==46800367)|| // PSG-1(texnum==9600042)|| // PSG-1 2(texnum==18800092)|| // PSG-1 3(texnum==16900071)|| // PSG-1 4(texnum==3400012)|| // PSG-1 5(texnum==800004)|| // PSG-1 6(texnum==40500383)|| // K2(texnum==15800089)|| // K2 2(texnum==2200012)|| // K2 3(texnum==7000034)|| // K2 4(texnum==60700349)|| // P90(texnum==5500033)|| // P90 2(texnum==47700227)|| // P90 3(texnum==10300047)|| // P90 4(texnum==3800014)|| // P90 5(texnum==50300349)|| // AK-74(texnum==14700071)|| // AK-74 2(texnum==13100061)|| // AK-74 3(texnum==194501145)|| // MG36(texnum==116000670)|| // DESERT EAGLE(texnum==182101089)|| // MR73(texnum==62500454)|| // REMINGTON M870(texnum==95200571)|| // BENELLI M1(texnum==40700334)|| // GLOCK 23(texnum==71500449)|| // BERETTA M92F(texnum==11000044)|| // BERETTA M92F 2(texnum==16500075)|| // BERETTA M92F 3(texnum==4400020)|| // BERETTA M92F 4(texnum==2800014)|| // BERETTA M92F 5(texnum==92000543)|| // COLT 45(texnum==239001276)) // DRAGONUV{Device_Interface->SetRenderState(D3DRS_LIGHTING, false);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}}if(FullBright){if(Stride == 40){Device_Interface->SetRenderState(D3DRS_LIGHTING, false);}}if(NoSmoke){if(nPrimitiveCount=4){return D3D_OK;}}if(NoFlash){if(nNumVertices == 158 && nPrimitiveCount == 131){return D3D_OK;}}if(ClearScope){if(texnum==40200000 && Stride == 28){return D3D_OK;}}if(AsusWalls){if(Stride == 40){Device_Interface->SetRenderState( D3DRS_SRCBLEND, 3 );Device_Interface->SetRenderState( D3DRS_DESTBLEND, 4 );Device_Interface->SetRenderState( D3DRS_ALPHABLENDENABLE, true );}}if(WhiteWalls){if(Stride == 40){Device_Interface->SetTexture(0, texWhite);}}if(GlassWalls){if(Stride == 40){return D3D_OK;}}return DrawIndexedPrimitive_Pointer(Device_Interface, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);}//=====================================================================================//========================================================================================HRESULT WINAPI SetViewport_Detour(LPDIRECT3DDEVICE8 Device_Interface,CONST D3DVIEWPORT8* pViewport){ScreenCenterX = ( float )pViewport->Width / 2;ScreenCenterY = ( float )pViewport->Height / 2;return SetViewport_Pointer(Device_Interface,pViewport);}//=====================================================================================//=====================================================================================char sFPS[20]="xxx Fps";int CH_back = 2; // 40%// group statesint CH_cheats = 1;int CH_Chams = 0;int CH_Chams2 = 0;// item states// none standard optionschar *opt_Grp[] = { "+","-" };char *opt_OffOn[] = { "Off","On" };char *opt_Stamina[] = { "Off","Stealth","Full" };char *opt_Back[] = { "Off","20%","40%","60%","80%","Solid" };D3DMenu *pMenu=NULL;// Change this to make your own menuvoid RebuildMenu(void){pMenu->AddItem("Background" , &CH_back , opt_Back, 6);pMenu->AddText("Framerate", sFPS);pMenu->AddGroup("[Cham Colors 1]" , &CH_Chams, opt_Grp);pMenu->AddGroup("[Cham Colors 2]" , &CH_Chams2, opt_Grp);pMenu->AddGroup("[Cheats]" , &CH_cheats, opt_Grp);if (CH_cheats){pMenu->AddItem("Chams" , &chams , opt_OffOn);pMenu->AddItem("XQZ" , &XQZ , opt_OffOn);pMenu->AddItem("NoFog" , &nofog , opt_OffOn);pMenu->AddItem("Rainbow Crosshair" , &xhair , opt_OffOn);pMenu->AddItem("FullBright" , &FullBright , opt_OffOn);pMenu->AddItem("NoSmoke" , &NoSmoke , opt_OffOn);pMenu->AddItem("NoFlash" , &NoFlash , opt_OffOn);pMenu->AddItem("ClearScope" , &ClearScope , opt_OffOn);pMenu->AddItem("AsusWallHack" , &AsusWalls , opt_OffOn);pMenu->AddItem("GlassWalls" , &GlassWalls , opt_OffOn);pMenu->AddItem("WhiteWalls" , &WhiteWalls , opt_OffOn);}if (CH_Chams){pMenu->AddItem("Red" , &Red , opt_OffOn);pMenu->AddItem("Yellow" , &Yellow , opt_OffOn);pMenu->AddItem("Orange" , &Orange , opt_OffOn);pMenu->AddItem("Green" , &Green , opt_OffOn);pMenu->AddItem("Blue" , &Blue , opt_OffOn);pMenu->AddItem("Cyan" , &Cyan , opt_OffOn);pMenu->AddItem("Pink" , &Pink , opt_OffOn);pMenu->AddItem("Purple" , &Purple , opt_OffOn);pMenu->AddItem("White" , &White , opt_OffOn);pMenu->AddItem("Black" , &Black , opt_OffOn);pMenu->AddItem("SteelBlue" , &SteelBlue , opt_OffOn);pMenu->AddItem("LightSteelBlue" , &LightSteelBlue , opt_OffOn);pMenu->AddItem("LightBlue" , &LightBlue , opt_OffOn);pMenu->AddItem("Salmon" , &Salmon , opt_OffOn);pMenu->AddItem("Teal" , &Teal , opt_OffOn);pMenu->AddItem("Brown" , &Brown , opt_OffOn);pMenu->AddItem("Lime" , &Lime , opt_OffOn);pMenu->AddItem("ElectricLime" , &ElectricLime , opt_OffOn);pMenu->AddItem("Gold" , &Gold , opt_OffOn);pMenu->AddItem("OrangeRed" , &OrangeRed , opt_OffOn);pMenu->AddItem("GreenYellow" , &GreenYellow , opt_OffOn);pMenu->AddItem("AquaMarine" , &AquaMarine , opt_OffOn);pMenu->AddItem("SkyBlue" , &SkyBlue , opt_OffOn);pMenu->AddItem("SlateBlue" , &SlateBlue , opt_OffOn);pMenu->AddItem("Crimson" , &Crimson , opt_OffOn);pMenu->AddItem("DarkOliveGreen" , &DarkOliveGreen , opt_OffOn);pMenu->AddItem("PaleGreen" , &PaleGreen , opt_OffOn);pMenu->AddItem("DarkGoldenRod" , &DarkGoldenRod , opt_OffOn);pMenu->AddItem("FireBrick" , &FireBrick , opt_OffOn);pMenu->AddItem("DarkBlue" , &DarkBlue , opt_OffOn);pMenu->AddItem("DarkerBlue" , &DarkerBlue , opt_OffOn);pMenu->AddItem("DarkYellow" , &DarkYellow , opt_OffOn);pMenu->AddItem("LightYellow" , &LightYellow , opt_OffOn);}if (CH_Chams2){pMenu->AddItem("Red" , &Red2 , opt_OffOn);pMenu->AddItem("Yellow" , &Yellow2 , opt_OffOn);pMenu->AddItem("Orange" , &Orange2 , opt_OffOn);pMenu->AddItem("Green" , &Green2 , opt_OffOn);pMenu->AddItem("Blue" , &Blue2 , opt_OffOn);pMenu->AddItem("Cyan" , &Cyan2 , opt_OffOn);pMenu->AddItem("Pink" , &Pink2 , opt_OffOn);pMenu->AddItem("Purple" , &Purple2 , opt_OffOn);pMenu->AddItem("White" , &White2 , opt_OffOn);pMenu->AddItem("Black" , &Black2 , opt_OffOn);pMenu->AddItem("SteelBlue" , &SteelBlue2 , opt_OffOn);pMenu->AddItem("LightSteelBlue" , &LightSteelBlue2 , opt_OffOn);pMenu->AddItem("LightBlue" , &LightBlue2 , opt_OffOn);pMenu->AddItem("Salmon" , &Salmon2 , opt_OffOn);pMenu->AddItem("Teal" , &Teal2 , opt_OffOn);pMenu->AddItem("Brown" , &Brown2 , opt_OffOn);pMenu->AddItem("Lime" , &Lime2 , opt_OffOn);pMenu->AddItem("ElectricLime" , &ElectricLime2 , opt_OffOn);pMenu->AddItem("Gold" , &Gold2 , opt_OffOn);pMenu->AddItem("OrangeRed" , &OrangeRed2 , opt_OffOn);pMenu->AddItem("GreenYellow" , &GreenYellow2 , opt_OffOn);pMenu->AddItem("AquaMarine" , &AquaMarine2 , opt_OffOn);pMenu->AddItem("SkyBlue" , &SkyBlue2 , opt_OffOn);pMenu->AddItem("SlateBlue" , &SlateBlue2 , opt_OffOn);pMenu->AddItem("Crimson" , &Crimson2 , opt_OffOn);pMenu->AddItem("DarkOliveGreen" , &DarkOliveGreen2 , opt_OffOn);pMenu->AddItem("PaleGreen" , &PaleGreen2 , opt_OffOn);pMenu->AddItem("DarkGoldenRod" , &DarkGoldenRod2 , opt_OffOn);pMenu->AddItem("FireBrick" , &FireBrick2 , opt_OffOn);pMenu->AddItem("DarkBlue" , &DarkBlue2 , opt_OffOn);pMenu->AddItem("DarkerBlue" , &DarkerBlue2 , opt_OffOn);pMenu->AddItem("DarkYellow" , &DarkYellow2 , opt_OffOn);pMenu->AddItem("LightYellow" , &LightYellow2 , opt_OffOn);}}// --- simple FPS vars and functionint 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;}}// Draw a backgroundvoid DrawGui(LPDIRECT3DDEVICE8 Device_Interface, DWORD col){if (CH_back==5) // solidcol|=0xff000000;elsecol|=CH_back*0x30000000; // transparencyDrawBox(Device_Interface,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->totheight+4 ,col);DrawBox(Device_Interface,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->titleheight+1,col|0xff000000);}// called with every EndScenevoid DoMenu(LPDIRECT3DDEVICE8 Device_Interface){if (pMenu==0) { // first time , create the menupMenu = new D3DMenu("== DarkApallow ==",100,160); // title, maxitems,widthpMenu->visible=1; // make it visiblepMenu->col_title=0xffffffff; // change title color to white} else {FPScheck(sFPS,"%d Fps");if (pMenu->noitems==0) RebuildMenu();if (pMenu->visible && CH_back) DrawGui(Device_Interface,0x000000); // black backgroundpMenu->Show(pFont);pMenu->Nav();}}//=======================================================================================HRESULT WINAPI Direct3DCreate8_VMTable(VOID){LPDIRECT3D8 Direct3D_Object = Direct3DCreate8(D3D_SDK_VERSION);if(Direct3D_Object == NULL)return D3DERR_INVALIDCALL;Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;Direct3D_Object->Release();DWORD dwProtect;if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0){*(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[15];*(PDWORD)&Direct3D_VMTable[15] = (DWORD)CreateDevice_Detour;if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)return D3DERR_INVALIDCALL;}elsereturn D3DERR_INVALIDCALL;return D3D_OK;}//=====================================================================================HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D8 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow,DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters,LPDIRECT3DDEVICE8* Returned_Device_Interface){HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags,PresentationParameters, Returned_Device_Interface);DWORD dwProtect;if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0){*(PDWORD)&Direct3D_VMTable[15] = *(PDWORD)&CreateDevice_Pointer;CreateDevice_Pointer = NULL;if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)return D3DERR_INVALIDCALL;}elsereturn D3DERR_INVALIDCALL;if(Returned_Result == D3D_OK){Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;*(PDWORD)&Reset_Pointer = (DWORD)Direct3D_VMTable[14];*(PDWORD)&EndScene_Pointer = (DWORD)Direct3D_VMTable[35];*(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[71];*(PDWORD)&SetViewport_Pointer = (DWORD)Direct3D_VMTable[40];*(PDWORD)&Direct3D_VMTable[14] = (DWORD)Reset_Detour;*(PDWORD)&Direct3D_VMTable[35] = (DWORD)EndScene_Detour;*(PDWORD)&Direct3D_VMTable[71] = (DWORD)DrawIndexedPrimitive_Detour;*(PDWORD)&Direct3D_VMTable[40] = (DWORD)SetViewport_Detour;}return Returned_Result;}d3dfont8.hCode://-----------------------------------------------------------------------------// File: D3DFont.h// Desc: Texture-based font class// Copyright © 1999-2001 Microsoft Corporation. All rights reserved.//-----------------------------------------------------------------------------#ifndef D3DFONT_H#define D3DFONT_H#include <tchar.h>#include <d3d8.h>// Font creation flags#define D3DFONT_BOLD 0x0001#define D3DFONT_ITALIC 0x0002#define D3DFONT_ZENABLE 0x0004// Font rendering flags#define D3DFONT_CENTERED 0x0001#define D3DFONT_TWOSIDED 0x0002#define D3DFONT_FILTERED 0x0004#define D3DFONT_RIGHT 0x0008 // non standard#define D3DFONT_SHADOW 0x0010 // non standard//-----------------------------------------------------------------------------// Name: class CD3DFont// Desc: Texture-based font class for doing text in a 3D scene.//-----------------------------------------------------------------------------class CD3DFont{TCHAR m_strFontName[80]; // Font propertiesDWORD m_dwFontHeight;DWORD m_dwFontFlags;LPDIRECT3DDEVICE8 m_pd3dDevice; // A D3DDevice used for renderingLPDIRECT3DTEXTURE8 m_pTexture; // The d3d texture for this fontLPDIRECT3DVERTEXBUFFER8 m_pVB; // VertexBuffer for rendering textDWORD m_dwTexWidth; // Texture dimensionsDWORD m_dwTexHeight;FLOAT m_fTextScale;FLOAT m_fTexCoords[128-32][4];DWORD m_dwSpacing; // Character pixel spacing per side// Stateblocks for setting and restoring render statesDWORD m_dwSavedStateBlock;DWORD m_dwDrawTextStateBlock;public:// 2D and 3D text drawing functionsHRESULT DrawText( FLOAT x, FLOAT y, DWORD dwColor,TCHAR* strText, DWORD dwFlags=0L );// Function to get extent of textHRESULT GetTextExtent( TCHAR* strText, SIZE* pSize );// Initializing and destroying device-dependent objectsHRESULT InitDeviceObjects( LPDIRECT3DDEVICE8 pd3dDevice );HRESULT RestoreDeviceObjects();HRESULT InvalidateDeviceObjects();HRESULT DeleteDeviceObjects();// Constructor / destructorCD3DFont( TCHAR* strFontName, DWORD dwHeight, DWORD dwFlags=0L );~CD3DFont();};#endifCode:menu2.h// Project : Basic D3D Menu v1.4// Author : Hans211// Date : 11 April 2009#ifndef _D3DMENU_H#define _D3DMENU_H#include "Soldierfront.h"#ifndef D3DFONT_RIGHT#define D3DFONT_RIGHT 0x0008#endif#ifndef D3DFONT_SHADOW#define D3DFONT_SHADOW 0x0010#endif#define MENUGROUP 1#define MENUTEXT 2#define MENUITEM 3#define MCOLOR_TITLE 0xffff1111#define MCOLOR_CURRENT 0xffff0000#define MCOLOR_GROUP 0xffffff00#define MCOLOR_TEXT 0xffe0e0e0#define MCOLOR_OFF 0xffa0a0a0#define MCOLOR_ON 0xfffffffftypedef struct {int typ; // type of menuline, folder, itemchar *txt; // text to showchar **opt; // array of optionsint *var; // variable containing current statusint maxval; // maximumvalue, normally 1 gives 0=off 1=on} tMENU;class D3DMenu{public:D3DMenu(char *Name=0, int maxentries=99, int maxwidth=160){title=Name;maxitems=maxentries;cur=noitems=visible=0;x=y=15;totwidth=ofs=maxwidth;height=15;titleheight=totheight=height+4;col_title =MCOLOR_TITLE;col_group =MCOLOR_GROUP;col_text =MCOLOR_TEXT;col_off =MCOLOR_OFF;col_on =MCOLOR_ON;col_current=MCOLOR_CURRENT;// allocate menu arrayMENU=(tMENU **)malloc(4*maxitems);for (int i=0; i<maxitems; i++) MENU=(tMENU *)malloc(sizeof(tMENU));}~D3DMenu() {for (int i=0; i<maxitems; i++) free(MENU);free(MENU);}// colorsDWORD col_title;DWORD col_group;DWORD col_text;DWORD col_off;DWORD col_on;DWORD col_current;// position and sizesint x,y; // current position of the menuint totwidth,totheight; // total width and height of menuint height; // height of 1 menulineint titleheight; // some extra height for a titleint ofs; // offset for option text// menu varschar *title; // some menu titleint cur; // current highlighted menuitemint noitems; // number of menu itemsint visible; // 1 = menu is visibletMENU **MENU;void AddItem (char *txt, int *var, char **opt, int maxvalue=2, int typ=MENUITEM);void AddGroup(char *txt, int *var, char **opt, int maxvalue=2);void AddText (char *txt, char *opt="");void Show(CD3DFont *pFont);void Nav(void);private:int maxitems;};#endifSoldierfront.hCode:#include "menu2.h"#include "stdafx.h"extern CD3DFont *pFont;void DrawBox(LPDIRECT3DDEVICE8 pDevice, int x, int y, int w, int h, D3DCOLOR color);void PreReset (LPDIRECT3DDEVICE8 pDevice);void PostReset(LPDIRECT3DDEVICE8 pDevice);extern int noFPS;void RebuildMenu(void);void DoMenu(LPDIRECT3DDEVICE8 pDevice);stdafx.hCode:// stdafx.h : include file for standard system include files,// or project specific include files that are used frequently, but// are changed infrequently//#pragma once#include "targetver.h"#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers// Windows Header Files:#include <windows.h>#include <d3d8.h>#pragma comment(lib, "d3d8.lib")#include <d3dx8.h>#include "d3dfont8.h"#pragma comment(lib, "d3dx8.lib")#include "menu2.h"#include "d3dfont8.h"#include "Soldierfront.h"#include <stdio.h>#include <time.h>#include <mmsystem.h>#include <stdio.h>#include <fstream>#pragma comment(lib, "winmm.lib")#include <iostream>// TODO: reference additional headers your program requires hereMenu2.cppCode:#include "stdafx.h"#include "menu2.h"// Adding items, group, text to the menuvoid D3DMenu::AddItem(char *txt, int *var, char **opt, int maxval, int typ){if (noitems>=(maxitems-1)) return;MENU[noitems]->typ=typ;MENU[noitems]->txt=txt;MENU[noitems]->opt=opt;MENU[noitems]->var=var;MENU[noitems]->maxval=maxval;noitems++;totheight=(noitems*height)+titleheight;}void D3DMenu::AddGroup(char *txt, int *var, char **opt, int maxval){AddItem(txt, var, opt, maxval, MENUGROUP);}void D3DMenu::AddText(char *txt, char *opt){AddItem(txt,0,(char **)opt,0,MENUTEXT);}// Show the Menuvoid D3DMenu::Show(CD3DFont *pFont){int i,val,cy;DWORD color;if (!visible) return;cy=y;if (title) {pFont->DrawText((float)(x+totwidth/2), (float)cy+1, col_title,title,D3DFONT_SHADOW|D3DFONT_CENTERED);cy+=titleheight;}for (i=0; i<noitems; i++) {if (MENU->typ==MENUTEXT) {pFont->DrawText((float)x, (float)cy, col_text,MENU->txt,D3DFONT_SHADOW);if (MENU->opt) {pFont->DrawText((float)(x+ofs), (float)cy, col_text,(char *)MENU->opt, D3DFONT_RIGHT|D3DFONT_SHADOW);}} else {val=(MENU->var)?(*MENU->var):0;// determine colorif (i==cur)color=col_current;else if (MENU->typ==MENUGROUP)color=col_group;elsecolor=(val)?col_on:col_off;pFont->DrawText((float)x, (float)cy, color,MENU->txt,D3DFONT_SHADOW);if (MENU->opt) {pFont->DrawText((float)(x+ofs), (float)cy, color,(char *)MENU->opt[val],D3DFONT_RIGHT|D3DFONT_SHADOW);}}cy+=height;}}// check for Menu navigation keysvoid D3DMenu::Nav(void){if (GetAsyncKeyState(VK_INSERT)&1) visible=(!visible);if (!visible) return;if (GetAsyncKeyState(VK_CONTROL) ) {if (GetAsyncKeyState(VK_UP)&1 ) y-=10;if (GetAsyncKeyState(VK_DOWN)&1 ) y+=10;if (GetAsyncKeyState(VK_LEFT)&1 ) x-=10;if (GetAsyncKeyState(VK_RIGHT)&1) x+=10;} else {if (GetAsyncKeyState(VK_UP)&1) {do {cur--;if (cur<0) cur=noitems-1;} while (MENU[cur]->typ==MENUTEXT); // skip textitems} else if (GetAsyncKeyState(VK_DOWN)&1) {do {cur++;if (cur==noitems) cur=0;} while (MENU[cur]->typ==MENUTEXT); // skip textitems} else if (MENU[cur]->var) {int dir=0;// bugfix: thx to Dxt-Wieter20if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[cur]->var > 0 ) dir=-1;if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[cur]->var < (MENU[cur]->maxval-1)) dir=1;if (dir) {*MENU[cur]->var += dir;if (MENU[cur]->typ==MENUGROUP) noitems=0; // change on menufolder, force a rebuild}}}}d3dfont8.cppCode:// -----------------------------------------------------------------------------// File: D3DFont.cpp// Desc: Texture-based font class// Copyright © 1999-2001 Microsoft Corporation. All rights reserved.//// Changes by Hans211// - Added D3D_FONT_RIGHT// - Stripped not needed functions// -----------------------------------------------------------------------------#include"stdafx.h"#include<windows.h>#include<d3d8.h>#pragmacomment(lib, "d3d8.lib")#include<d3dx8.h>#pragmacomment(lib, "d3dx8.lib")#include<stdio.h>#include"menu2.h"#include"d3dfont8.h"#include<time.h>#include"Soldierfront.h"#include<mmsystem.h>#include<stdio.h>#include<fstream>#pragmacomment(lib, "winmm.lib")//-----------------------------------------------------------------------------// Custom vertex types for rendering text//-----------------------------------------------------------------------------#define MAX_NUM_VERTICES 50*6struct FONT2DVERTEX { D3DXVECTOR4 p; DWORD color; FLOAT tu, tv; };struct FONT3DVERTEX { D3DXVECTOR3 p; D3DXVECTOR3 n; FLOAT tu, tv; };#define D3DFVF_FONT2DVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)#define D3DFVF_FONT3DVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1)inline FONT2DVERTEX InitFont2DVertex( const D3DXVECTOR4& p, D3DCOLOR color,FLOAT tu, FLOAT tv ){FONT2DVERTEX v; v.p = p; v.color = color; v.tu = tu; v.tv = tv;return v;}inline FONT3DVERTEX InitFont3DVertex( const D3DXVECTOR3& p, const D3DXVECTOR3& n,FLOAT tu, FLOAT tv ){FONT3DVERTEX v; v.p = p; v.n = n; v.tu = tu; v.tv = tv;return v;}//-----------------------------------------------------------------------------// Name: CD3DFont()// Desc: Font class constructor//-----------------------------------------------------------------------------CD3DFont::CD3DFont( TCHAR* strFontName, DWORD dwHeight, DWORD dwFlags ){strcpy( m_strFontName, strFontName );m_dwFontHeight = dwHeight;m_dwFontFlags = dwFlags;m_pd3dDevice = NULL;m_pTexture = NULL;m_pVB = NULL;m_dwSavedStateBlock = 0L;m_dwDrawTextStateBlock = 0L;}//-----------------------------------------------------------------------------// Name: ~CD3DFont()// Desc: Font class destructor//-----------------------------------------------------------------------------CD3DFont::~CD3DFont(){InvalidateDeviceObjects();DeleteDeviceObjects();}//-----------------------------------------------------------------------------// Name: InitDeviceObjects()// Desc: Initializes device-dependent objects, including the vertex buffer used// for rendering text and the texture map which stores the font image.//-----------------------------------------------------------------------------HRESULT CD3DFont::InitDeviceObjects( LPDIRECT3DDEVICE8 pd3dDevice ){HRESULT hr;// Keep a local copy of the devicem_pd3dDevice = pd3dDevice;// Establish the font and texture sizem_fTextScale = 1.0f; // Draw fonts into texture without scaling// Large fonts need larger texturesif( m_dwFontHeight > 40 )m_dwTexWidth = m_dwTexHeight = 1024;elseif( m_dwFontHeight > 20 )m_dwTexWidth = m_dwTexHeight = 512;elsem_dwTexWidth = m_dwTexHeight = 256;// If requested texture is too big, use a smaller texture and smaller font,// and scale up when rendering.D3DCAPS8 d3dCaps;m_pd3dDevice->GetDeviceCaps( &d3dCaps );if( m_dwTexWidth > d3dCaps.MaxTextureWidth ){m_fTextScale = (FLOAT)d3dCaps.MaxTextureWidth / (FLOAT)m_dwTexWidth;m_dwTexWidth = m_dwTexHeight = d3dCaps.MaxTextureWidth;}// Create a new texture for the fonthr = m_pd3dDevice->CreateTexture( m_dwTexWidth, m_dwTexHeight, 1,0, D3DFMT_A4R4G4B4,D3DPOOL_MANAGED, &m_pTexture );if( FAILED(hr) )return hr;// Prepare to create a bitmapDWORD* pBitmapBits;BITMAPINFO bmi;ZeroMemory( &bmi.bmiHeader, sizeof(BITMAPINFOHEADER) );bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);bmi.bmiHeader.biWidth = (int)m_dwTexWidth;bmi.bmiHeader.biHeight = -(int)m_dwTexHeight;bmi.bmiHeader.biPlanes = 1;bmi.bmiHeader.biCompression = BI_RGB;bmi.bmiHeader.biBitCount = 32;// Create a DC and a bitmap for the fontHDC hDC = CreateCompatibleDC( NULL );HBITMAP hbmBitmap = CreateDIBSection( hDC, &bmi, DIB_RGB_COLORS,(VOID**)&pBitmapBits, NULL, 0 );SetMapMode( hDC, MM_TEXT );// Create a font. By specifying ANTIALIASED_QUALITY, we might get an// antialiased font, but this is not guaranteed.INT nHeight = -MulDiv( m_dwFontHeight,(INT)(GetDeviceCaps(hDC, LOGPIXELSY) * m_fTextScale), 72 );DWORD dwBold = (m_dwFontFlags&D3DFONT_BOLD) ? FW_BOLD : FW_NORMAL;DWORD dwItalic = (m_dwFontFlags&D3DFONT_ITALIC) ? TRUE : FALSE;HFONT hFont = CreateFont( nHeight, 0, 0, 0, dwBold, dwItalic,FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY,VARIABLE_PITCH, m_strFontName );if( NULL==hFont )return E_FAIL;SelectObject( hDC, hbmBitmap );SelectObject( hDC, hFont );// Set text propertiesSetTextColor( hDC, RGB(255,255,255) );SetBkColor( hDC, 0x00000000 );SetTextAlign( hDC, TA_TOP );// Loop through all printable character and output them to the bitmap..// Meanwhile, keep track of the corresponding tex coords for each character.DWORD x = 0;DWORD y = 0;TCHAR str[2] = _T("x");SIZE size;// Calculate the spacing between characters based on line heightGetTextExtentPoint32( hDC, TEXT(" "), 1, &size );x = m_dwSpacing = (DWORD) ceil(size.cy * 0.3f);for( TCHAR c=32; c<127; c++ ){str[0] = c;GetTextExtentPoint32( hDC, str, 1, &size );if( (DWORD)(x+size.cx+1) > m_dwTexWidth ){x = m_dwSpacing;y += size.cy+1;}ExtTextOut( hDC, x+0, y+0, ETO_OPAQUE, NULL, str, 1, NULL );m_fTexCoords[c-32][0] = ((FLOAT)(x+0 -m_dwSpacing))/m_dwTexWidth;m_fTexCoords[c-32][1] = ((FLOAT)(y+0 +0 ))/m_dwTexHeight;m_fTexCoords[c-32][2] = ((FLOAT)(x+size.cx+m_dwSpacing))/m_dwTexWidth;m_fTexCoords[c-32][3] = ((FLOAT)(y+size.cy+0 ))/m_dwTexHeight;x += size.cx+(2 * m_dwSpacing);}// Lock the surface and write the alpha values for the set pixelsD3DLOCKED_RECT d3dlr;m_pTexture->LockRect( 0, &d3dlr, 0, 0 );BYTE* pDstRow = (BYTE*)d3dlr.pBits;WORD* pDst16;BYTE bAlpha; // 4-bit measure of pixel intensityfor( y=0; y < m_dwTexHeight; y++ ){pDst16 = (WORD*)pDstRow;for( x=0; x < m_dwTexWidth; x++ ){bAlpha = (BYTE)((pBitmapBits[m_dwTexWidth*y + x] & 0xff) >> 4);if (bAlpha > 0){*pDst16++ = (bAlpha << 12) | 0x0fff;}else{*pDst16++ = 0x0000;}}pDstRow += d3dlr.Pitch;}// Done updating texture, so clean up used objectsm_pTexture->UnlockRect(0);DeleteObject( hbmBitmap );DeleteDC( hDC );DeleteObject( hFont );return S_OK;}//-----------------------------------------------------------------------------// Name: RestoreDeviceObjects()// Desc://-----------------------------------------------------------------------------HRESULT CD3DFont::RestoreDeviceObjects(){HRESULT hr;// Create vertex buffer for the lettersif( FAILED( hr = m_pd3dDevice->CreateVertexBuffer( MAX_NUM_VERTICES*sizeof(FONT2DVERTEX),D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0,D3DPOOL_DEFAULT, &m_pVB ) ) ){return hr;}// Create the state blocks for rendering textfor( UINT which=0; which<2; which++ ){m_pd3dDevice->BeginStateBlock();m_pd3dDevice->SetTexture( 0, m_pTexture );if ( D3DFONT_ZENABLE & m_dwFontFlags )m_pd3dDevice->SetRenderState( D3DRS_ZENABLE, TRUE );elsem_pd3dDevice->SetRenderState( D3DRS_ZENABLE, FALSE );m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );m_pd3dDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );m_pd3dDevice->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE );m_pd3dDevice->SetRenderState( D3DRS_ALPHAREF, 0x08 );m_pd3dDevice->SetRenderState( D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL );m_pd3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );m_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );m_pd3dDevice->SetRenderState( D3DRS_STENCILENABLE, FALSE );m_pd3dDevice->SetRenderState( D3DRS_CLIPPING, TRUE );m_pd3dDevice->SetRenderState( D3DRS_EDGEANTIALIAS, FALSE );m_pd3dDevice->SetRenderState( D3DRS_CLIPPLANEENABLE, FALSE );m_pd3dDevice->SetRenderState( D3DRS_VERTEXBLEND, FALSE );m_pd3dDevice->SetRenderState( D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE );m_pd3dDevice->SetRenderState( D3DRS_FOGENABLE, FALSE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_POINT );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_POINT );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MIPFILTER, D3DTEXF_NONE );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0 );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE );m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE );m_pd3dDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE );if( which==0 )m_pd3dDevice->EndStateBlock( &m_dwSavedStateBlock );elsem_pd3dDevice->EndStateBlock( &m_dwDrawTextStateBlock );}return S_OK;}//-----------------------------------------------------------------------------// Name: InvalidateDeviceObjects()// Desc: Destroys all device-dependent objects//-----------------------------------------------------------------------------HRESULT CD3DFont::InvalidateDeviceObjects(){m_pVB->Release();// Delete the state blocksif( m_pd3dDevice ){if( m_dwSavedStateBlock )m_pd3dDevice->DeleteStateBlock( m_dwSavedStateBlock );if( m_dwDrawTextStateBlock )m_pd3dDevice->DeleteStateBlock( m_dwDrawTextStateBlock );}m_dwSavedStateBlock = 0L;m_dwDrawTextStateBlock = 0L;return S_OK;}//-----------------------------------------------------------------------------// Name: DeleteDeviceObjects()// Desc: Destroys all device-dependent objects//-----------------------------------------------------------------------------HRESULT CD3DFont::DeleteDeviceObjects(){m_pTexture->Release();m_pd3dDevice = NULL;return S_OK;}//-----------------------------------------------------------------------------// Name: GetTextExtent()// Desc: Get the dimensions of a text string//-----------------------------------------------------------------------------HRESULT CD3DFont::GetTextExtent( TCHAR* strText, SIZE* pSize ){if( NULL==strText || NULL==pSize )return E_FAIL;FLOAT fRowWidth = 0.0f;FLOAT fRowHeight = (m_fTexCoords[0][3]-m_fTexCoords[0][1])*m_dwTexHeight;FLOAT fWidth = 0.0f;FLOAT fHeight = fRowHeight;while( *strText ){TCHAR c = *strText++;if( c == _T('\n') ){fRowWidth = 0.0f;fHeight += fRowHeight;}if( (c-32) < 0 || (c-32) >= 128-32 )continue;FLOAT tx1 = m_fTexCoords[c-32][0];FLOAT tx2 = m_fTexCoords[c-32][2];fRowWidth += (tx2-tx1)*m_dwTexWidth - 2*m_dwSpacing;if( fRowWidth > fWidth )fWidth = fRowWidth;}pSize->cx = (int)fWidth;pSize->cy = (int)fHeight;return S_OK;}//-----------------------------------------------------------------------------// Name: DrawText()// Desc: Draws 2D text//-----------------------------------------------------------------------------HRESULT CD3DFont::DrawText( FLOAT sx, FLOAT sy, DWORD dwColor,TCHAR* strText, DWORD dwFlags ){if( m_pd3dDevice == NULL )return E_FAIL;// Setup renderstatem_pd3dDevice->CaptureStateBlock( m_dwSavedStateBlock );m_pd3dDevice->ApplyStateBlock( m_dwDrawTextStateBlock );m_pd3dDevice->SetVertexShader( D3DFVF_FONT2DVERTEX );m_pd3dDevice->SetPixelShader( NULL );m_pd3dDevice->SetStreamSource( 0, m_pVB, sizeof(FONT2DVERTEX) );// Set filter statesif( dwFlags & D3DFONT_FILTERED ){m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR );}// Hans211: small adaption for right an centered alignmentif( dwFlags & D3DFONT_RIGHT ) {SIZE sz;GetTextExtent( strText, &sz );sx -= (FLOAT)sz.cx;} elseif( dwFlags & D3DFONT_CENTERED ) {SIZE sz;GetTextExtent( strText, &sz );sx -= (FLOAT)sz.cx/2.0f;}// Adjust for character spacingsx -= m_dwSpacing;FLOAT fStartX = sx;// Fill vertex bufferFONT2DVERTEX* pVertices = NULL;DWORD dwNumTriangles = 0;m_pVB->Lock( 0, 0, (BYTE**)&pVertices, D3DLOCK_DISCARD );while( *strText ){TCHAR c = *strText++;if( c == _T('\n') ){sx = fStartX;sy += (m_fTexCoords[0][3]-m_fTexCoords[0][1])*m_dwTexHeight;}if( (c-32) < 0 || (c-32) >= 128-32 )continue;FLOAT tx1 = m_fTexCoords[c-32][0];FLOAT ty1 = m_fTexCoords[c-32][1];FLOAT tx2 = m_fTexCoords[c-32][2];FLOAT ty2 = m_fTexCoords[c-32][3];FLOAT w = (tx2-tx1) * m_dwTexWidth / m_fTextScale;FLOAT h = (ty2-ty1) * m_dwTexHeight / m_fTextScale;if( c != _T(' ') ){*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+0-0.5f,sy+h-0.5f,0.9f,1.0f), dwColor, tx1, ty2 );*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+0-0.5f,sy+0-0.5f,0.9f,1.0f), dwColor, tx1, ty1 );*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+w-0.5f,sy+h-0.5f,0.9f,1.0f), dwColor, tx2, ty2 );*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+w-0.5f,sy+0-0.5f,0.9f,1.0f), dwColor, tx2, ty1 );*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+w-0.5f,sy+h-0.5f,0.9f,1.0f), dwColor, tx2, ty2 );*pVertices++ = InitFont2DVertex( D3DXVECTOR4(sx+0-0.5f,sy+0-0.5f,0.9f,1.0f), dwColor, tx1, ty1 );dwNumTriangles += 2;if( dwNumTriangles*3 > (MAX_NUM_VERTICES-6) ){// Unlock, render, and relock the vertex bufferm_pVB->Unlock();m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, dwNumTriangles );pVertices = NULL;m_pVB->Lock( 0, 0, (BYTE**)&pVertices, D3DLOCK_DISCARD );dwNumTriangles = 0L;}}sx += w - (2 * m_dwSpacing);}// Unlock and render the vertex bufferm_pVB->Unlock();if( dwNumTriangles > 0 )m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, dwNumTriangles );// Restore the modified renderstatesm_pd3dDevice->ApplyStateBlock( m_dwSavedStateBlock );return S_OK;}Credits to Hans for the menu, Roverturbo for the hook, and fatboy for the model rec. Thanks to anyone else who helped.Consists of :Chams(Player, Nades, Smoke, Flashbang, Special Nades, Guns)Adjustable Cham Colors(More than the usual)FullBright(Player, Guns, Throwing weapons)NoFogNoSmokeNoFlashAsusWallHackGlassWallsWhiteWallsXQZ Wallhack(Xray, players and guns)ClearScopeRainbow XhairOptional all through hans menuFeel Free to add WireFrame in there...Globals:int WireFrame;Dip:Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);Device_Interface->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);Device_Interface->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);Device_Interface->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);DrawIndexedPrimitive_Pointer(Device_Interface, Type,BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);Device_Interface->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);Device_Interface->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);Device_Interface->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);Device_Interface->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); - Source
-
Sabe qual o melhor bypass para ele ?
-
existe tutorial para aprender a burlar o H.S ? no meu caso o Xingcode 3
-
Tenho o vb 2013 e cheat engina,alguma dica de como posso começar a aprender ? Tenho em mente em fazer hack para Soldier front 2 Hackshield (Xingcode 3) que fazer um Wallhacker simples. como posso descobrir os pointters deles ?
aqui esta um resumo do que quero no hacker pra facilitar.
-
ah muito obrigado
-
Ola galera, estava tantando aprender a como criar alguns hacker, mas achei muito complicado, estou tentando fazer algum hacker para wolfteam mais nao entendo muito bem de programaçao, estava navegando por alguns foruns atras de algum hacker, e achei algumas souces codes que nao sei utilizar sera algum programador poderia me ajudar ?.
quem puder me ajudar entrar em contato por favor
-
Olá Estou aki para perrguntar se possivel alguem do forum criar um hacker para Soldier front 2 da aeriagames.
Servidor de zombie com level
em CS - Duvidas
Postado
Olá Galera gostaria de saber se alguem consegueria criar um servidor de zombie level com esses addons: