WarRock EU - Code Snippets

12/20/2010 21:29 Eragon5555#601
hier mal die drawbox funktion( ich weiß nich ob des geht denke aber schon...):

Quote:
void D3DMenu::DrawFillBox(LPDIRECT3DDEVICE9 pDevice, int x, int y, int w, int h, D3DCOLOR col)
{
struct QuadVertex {
float x,y,z,rhw;
DWORD dwColor;
};
QuadVertex qV[4];

qV[0].dwColor = qV[1].dwColor = qV[2].dwColor = qV[3].dwColor = col;
qV[0].z = qV[1].z = qV[2].z = qV[3].z = 0.0f;
qV[0].rhw = qV[1].rhw = qV[2].rhw = qV[3].rhw = 0.0f;

qV[0].x = (float)x;
qV[0].y = (float)(y + h);
qV[1].x = (float)x;
qV[1].y = (float)y;
qV[2].x = (float)(x + w);
qV[2].y = (float)(y + h);
qV[3].x = (float)(x + w);
qV[3].y = (float)y;

m_pD3Ddev->SetRenderState(D3DRS_ZENABLE , FALSE);
m_pD3Ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, FALSE);
m_pD3Ddev->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,qV,sizeof(Q uadVertex));
m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, TRUE);
}
12/20/2010 21:45 joki4444#602
Da kommt immer ein Fehler :-(
könnt ihr mir helfen
error C2470: "D3DMenu": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
12/21/2010 11:28 .xD1997™#603
Quote:
Originally Posted by Eragon5555 View Post
joki ich bin noch nicht fertig ich schau gleich mal intensiv nach^^

Aber ich hätte mal eine Frage

Funktioniert Mineview so etwa in der Art?:
Nope benutzt einfach Vehicle Chams, dann werden die Minen auch Bunt :D Das könntest du nicht einbauen, weil du einen Bypass brauchst.

Kommen wir mal zu den Verzeichnissen mit den D3D Includes.

Du gehts in die Program Files

Code:
C:\Program Files (x86)\Microsoft Visual C++ 2010
Da suchst du dir den Ordner "Includes" und kopierst die Includes von dem DirectX SDK darein, und tade es müsste gehen

PS: Sorry, dass ich jetzt nicht den ganzen File angeben kann, bin am Laptop, da hab ich das nicht drauf :awesome:
12/21/2010 12:29 dsgreha#604
Hab mal versucht einen Menü Hack zu machen mithilfe dieses Tutorials: [Only registered and activated users can see links. Click Here To Register...]
Mein Code:
Jedoch bekomme ich immer diese Fehler:
Wie kann ich die beheben?
12/21/2010 13:32 xxfabbelxx#605
Quote:
Originally Posted by dsgreha View Post
Hab mal versucht einen Menü Hack zu machen mithilfe dieses Tutorials: [Only registered and activated users can see links. Click Here To Register...]
Mein Code:
Jedoch bekomme ich immer diese Fehler:
Wie kann ich die beheben?

Du hast irgendwo eine Endscene benutzt. Soweit ich weiß muss man die in C++ Extra adden
12/21/2010 14:50 Eragon5555#606
mhhhhhh

ich hab mir jetzt fast 3 stunden bei google etwas angeguckt, wie man diesen fehler behebt(die error meldungen kommen gleich), doch ich bin noch nicht zu einem ergebnis gekommen wie ich diese errors beheben könnte:

Quote:
1>------ Erstellen gestartet: Projekt: TheTestVersion, Konfiguration: Debug Win32 ------
1>LINK : error LNK2001: Nicht aufgelöstes externes Symbol "__DllMainCRTStartup@12".
1>C:\Users\Andre\documents\visual studio 2010\Projects\TheTestVersion\Debug\TheTestVersion. dll : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
12/21/2010 15:43 joki4444#607
Quote:
Hab mal versucht einen Menü Hack zu machen mithilfe dieses Tutorials: Link
Mein Code:
Spoiler:
Code:

#include "stdafx.h"
#include "D3DHack.h"
#include <windows.h>
#include <cstdio>
#include <d3d9.h>
#include <d3dx9.h>
const D3DCOLOR txtPink = D3DCOLOR_ARGB(255, 255, 0, 255); // Alpha, Rot, Grün, Blau
HRESULT hkEndScene(LPDIRECT3DDEVICE9 pDevice);
void DrawRect (LPDIRECT3DDEVICE9 Device_t, int X, int Y, int L, int H, D3DCOLOR color);
void *DetourFunc(BYTE *src, const BYTE *dst, const int len);
void InitHook(){
LPDIRECT3DDEVICE9 pDevice;
HMODULE hModule = NULL;
while( !hModule ){
hModule = GetModuleHandleA( "d3d9.dll" ); // Handle zur DLL holen
Sleep( 100 ); // 100ms warten
}
pEndScene = ( EndScene_t )DetourFunc((PBYTE) 0x4FDD71B0,(PBYTE)hkEndScene, 5);
HRESULT __stdcall EndScene(LPDIRECT3DDEVICE9 pDevice);
typedef HRESULT(__stdcall* EndScene_t)(LPDIRECT3DDEVICE9);
EndScene_t pEndScene;
DrawRect ( pDevice, 10, 10, 200, 200, txtPink);
}
int WINAPI DllMain(HINSTANCE hInst,DWORD reason,LPVOID reserved){
switch(reason){
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE) InitHook, 0, 0, 0);
break;
}
return true;
}
void *DetourFunc(BYTE *src, const BYTE *dst, const int len){
BYTE *jmp = (BYTE*)malloc(len+5);
DWORD dwback;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
memcpy(jmp, src, len); jmp += len;
jmp[0] = 0xE9;
*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
src[0] = 0xE9;
*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
VirtualProtect(src, len, dwback, &dwback);
return (jmp-len);
}
HRESULT hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
return pEndScene(pDevice);
}
void DrawRect (LPDIRECT3DDEVICE9 Device_t, int X, int Y, int L, int H, D3DCOLOR color)
{
D3DRECT rect = {X, Y, X+L, Y+H};
Device_t->Clear(1, &rect, D3DCLEAR_TARGET, color, 0, 0); // bei Google gibt’s näheres
}


Jedoch bekomme ich immer diese Fehler:
Spoiler:
Code:

1>.\D3DHack.cpp(18) : error C2065: 'pEndScene': nichtdeklarierter Bezeichner
1>.\D3DHack.cpp(18) : error C2065: 'EndScene_t': nichtdeklarierter Bezeichner
1>.\D3DHack.cpp(18) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'DetourFunc'
1>.\D3DHack.cpp(46) : error C3861: "pEndScene": Bezeichner wurde nicht gefunden.


Wie kann ich die beheben?
du musst einfach :

typedef HRESULT(__stdcall* EndScene_t)(LPDIRECT3DDEVICE9); // typedef
EndScene_t pEndScene;

direkt unter die Includes machen ;-D
pls thx nciht vergessen wenns geht also bei mir gings so
12/21/2010 16:25 kilgut12#608
ich hab mal hier no menü hack erstellt keine fehler aber wenn ich ihn starte dann kommt nachtich detect patchC/~
Code:
Quote:
#include <windows.h>
#include <stdio.h>

//Addy für eure hacks//

#define ADR_PTR_PLAYERPOINTER 0x00D45310 /// ADDYS SIND UNTEN !!!!!!!!!!!!!
#define ADR_PTR_SERVERPOINTER 0x00C41938
#define ADR_OFS_Z 0x00102D8
#define ADR_OFS_Y 0x00102DC
#define ADR_OFS_X 0x00102D4
#define ADR_OFS_NFD 0x00103A8
#define ADR_OFS_5SLOT 0x001021A4
#define ADR_MEM_NOSPREAD 0x00BC78E8
#define ADR_OFS_NORECOIL1 0x001C
#define ADR_OFS_NORECOIL2 0x0020
#define ADR_OFS_NORECOIL3 0x0024
#define ADR_MEM_FULLBRIGHT1 0x00BCD728
#define ADR_MEM_FULLBRIGHT2 0x00BCD724
#define ADR_MEM_FULLBRIGHT3 0x00BCD720
#define ARD_NearFog 0x000BCD7D4
#define ARD_FarFog 0x00BCD7D8

float posiX;
float posiY;
float posiZ;

//Ende der liste//

//lasst das einfach so //

DWORD *ingame= (DWORD*)ADR_PTR_PLAYERPOINTER;
DWORD *outgame= (DWORD*)ADR_PTR_SERVERPOINTER;

//Ende HackThread//

//Hier gibt ihr eure hacks Void´s ein//

void superjump () //super jump
{
if(GetAsyncKeyState(VK_CONTROL) &1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PTR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+ADR_OFS_Z) = 1000;
}
}
}

void No_Spread () //no spread
{
*(float*) No_Spread = 0;
}

void Slots5 ()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PTR_SERVERPOINTER;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr+ADR_OFS_5SLOT) = 1;
}
}

void fullbright () //fullbright
{
*(int*)(ADR_MEM_FULLBRIGHT1) = 1092779973;
*(int*)(ADR_MEM_FULLBRIGHT2) = 1092779973;
*(int*)(ADR_MEM_FULLBRIGHT3) = 1092779973;
}

void nfd () //NFD
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PTR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+ADR_OFS_NFD) = -20000;
}
}

void norecoil () //norecoil
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PTR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+ADR_OFS_NORECOIL1) = 0;
*(float*)(dwPlayerPtr+ADR_OFS_NORECOIL2) = 0;
*(float*)(dwPlayerPtr+ADR_OFS_NORECOIL3) = 0;
}
}

void Teleport ()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PTR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
if (GetAsyncKeyState(VK_F2))
{
posiX = *(float*)(dwPlayerPtr+ADR_OFS_X);
posiY = *(float*)(dwPlayerPtr+ADR_OFS_Y);
posiZ = *(float*)(dwPlayerPtr+ADR_OFS_Z);
}
if (GetAsyncKeyState(VK_F3))
{
*(float*)(dwPlayerPtr+ADR_OFS_X) = posiX;
*(float*)(dwPlayerPtr+ADR_OFS_Y) = posiY;
*(float*)(dwPlayerPtr+ADR_OFS_Z) = posiZ;
}
}
}

void nofog () //no fog
{
*(float*)ARD_NearFog = 1166127104;//far fog address
*(float*)ARD_FarFog = 0; //nearfog addres
}

//Ende Der Hack Void´s//

// Hier gebt ihr alle funktionen an die euer Hack hat

void TheHacks()
{
for(;;)
{
nfd();
superjump();
Slots5() ;
No_Spread() ;
norecoil() ;
Teleport() ;
fullbright() ;
nofog() ;
/////////// jeden hack den ihr hinzufügt müsst ihr hier reinschreiben.
Sleep(50); // Das nicht wegmachen
}
}



BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
MessageBoxA(NULL, "made by kilgut", "Credits!!!", MB_OK);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)TheHacks , 0, 0, 0);

break;
case 2:

break;
}
return TRUE;
}
hab schon mit mehreren Injector versucht über all kommt diese nachricht detect!
12/21/2010 16:27 dsgreha#609
Geht schon fast, kommen nur noch 2 Warnings:
Code:
1>c:\users\jantimon\desktop\d3dhack\d3dhack\d3dhack.cpp(22) : warning C4700: Die nicht initialisierte lokale Variable "pDevice" wurde verwendet.
1>c:\Users\JanTimon\Desktop\D3DHack\D3DHack\D3DHack.cpp : warning C4747: Aufruf von "_DllMain@12" (verwaltet): Verwalteter Code darf nicht unter der Loadersperre, einschließlich des DLL-Einstiegspunkts und Aufrufen, die vom DLL-Einstiegspunkt eingehen, ausgeführt werden.
12/21/2010 16:36 Eragon5555#610
Quote:
Originally Posted by kilgut12 View Post
ich hab mal hier no menü hack erstellt keine fehler aber wenn ich ihn starte dann kommt nachtich detect patchC/~
Code:

hab schon mit mehreren Injector versucht über all kommt diese nachricht detect!
ehhhm hasste schon neue addys rein?^^
ich sehe beim überfliegen grad keinen fehler werde mir das aber später mal genauer anschauen, nur muss ich zu meinem problem endlich eine lösung finden xD
12/21/2010 16:37 xxfabbelxx#611
Eragon schreib mal oben:

#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
12/21/2010 17:03 Eragon5555#612
wo oben?
bei hackbase.cpp oder was?^^(ist halt mein name für die hackbase xD)

also wenn du das so meinst dann gehts nich...

es kommen immernoch diese komischen fehler:

Quote:
1>------ Erstellen gestartet: Projekt: TheTestVersion, Konfiguration: Debug Win32 ------
1>LINK : error LNK2001: Nicht aufgelöstes externes Symbol "__DllMainCRTStartup@12".
1>C:\Users\Andre\documents\visual studio 2010\Projects\TheTestVersion\Debug\TheTestVersion. dll : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========


mhhhhhh ich schau mal weiter ob ich was finde etc.
12/21/2010 17:46 joki4444#613
Hab ein problem gelöst und schon ist das nächste da "-_-

Pls Help me

void DrawBox(IDirect3DDevice9 *pD3Ddev, int x, int y, int w, int h, D3DCOLOR col)
{
struct QuadVertex {
float x,y,z,rhw;
DWORD dwColor;
};
IDirect3DVertexBuffer9 *pVertexBuffer = NULL;
QuadVertex qV[4];
BYTE *pVertexData = NULL;

if (pD3Ddev->CreateVertexBuffer((4*sizeof(QuadVertex)),(D3DUSA GE_WRITEONLY|D3DUSAGE_DYNAMIC),(D3DFVF_XYZRHW|D3DF VF_DIFFUSE),D3DPOOL_DEFAULT,&pVertexBuffer)<0) return;

pD3Ddev->SetRenderState(D3DRS_ZENABLE , FALSE);
pD3Ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
pD3Ddev->SetRenderState(D3DRS_LIGHTING, FALSE);

pVertexBuffer->Lock(0,0,&pVertexData,D3DLOCK_NOSYSLOCK | D3DLOCK_DISCARD);
if(pVertexData)
{
qV[0].dwColor = qV[1].dwColor = qV[2].dwColor = qV[3].dwColor = col;
qV[0].z = qV[1].z = qV[2].z = qV[3].z = 0.0f;
qV[0].rhw = qV[1].rhw = qV[2].rhw = qV[3].rhw = 0.0f;

qV[0].x = (float)x;
qV[0].y = (float)(y + h);
qV[1].x = (float)x;
qV[1].y = (float)y;
qV[2].x = (float)(x + w);
qV[2].y = (float)(y + h);
qV[3].x = (float)(x + w);
qV[3].y = (float)y;

memcpy(pVertexData,qV,sizeof(QuadVertex)*4);
pVertexBuffer->Unlock();
pVertexData = NULL;

pD3Ddev->SetStreamSource(0,pVertexBuffer, sizeof(QuadVertex));
pD3Ddev->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
pD3Ddev->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2 );
}
if (pVertexBuffer) {
pVertexBuffer->Release();
pVertexBuffer=NULL;
}
pD3Ddev->SetRenderState(D3DRS_LIGHTING, true);
}

Fehler:

1>c:\users\nico\documents\visual studio 2010\projects\manu\manu\d3dmenu.cpp(95): error C2660: 'IDirect3DDevice9::CreateVertexBuffer': Funktion akzeptiert keine 5 Argumente
1>c:\users\nico\documents\visual studio 2010\projects\manu\manu\d3dmenu.cpp(101): error C2664: 'IDirect3DVertexBuffer9::Lock': Konvertierung des Parameters 3 von 'BYTE **' in 'void **' nicht möglich
1> Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>c:\users\nico\documents\visual studio 2010\projects\manu\manu\d3dmenu.cpp(122): error C2660: 'IDirect3DDevice9::SetStreamSource': Funktion akzeptiert keine 3 Argumente
1>c:\users\nico\documents\visual studio 2010\projects\manu\manu\d3dmenu.cpp(123): error C2664: 'IDirect3DDevice9::SetVertexShader': Konvertierung des Parameters 1 von 'int' in 'IDirect3DVertexShader9 *' nicht möglich
1> Die Konvertierung eines ganzzahligen Typs in einen Zeigertyp erfordert ein reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat
12/21/2010 18:00 Eragon5555#614
Probier mal die ganze source:

Quote:
void DrawBox( int x, int y, int w, int h, D3DCOLOR Color,LPDIRECT3DDEVICE8 pDevice)
{

struct Vertex {
float x,y,z,ht;
DWORD Color;
};
Vertex V[4];
V[0].Color = V[1].Color = V[2].Color = V[3].Color = Color;
V[0].z = V[1].z = V[2].z = V[3].z = 0.0f;
V[0].ht = V[1].ht = V[2].ht = V[3].ht = 0.0f;

V[0].x = V[1].x = (float)x;
V[0].y = V[2].y = (float)(y + h);
V[1].y = V[3].y = (float)y;
V[2].x = V[3].x = (float)(x + w);

pDevice->SetTexture(0, NULL);
pDevice->SetVertexShader(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Ve rtex));
}

void DrawBox(IDirect3DDevice8 *pDevice, int x, int y, int w, int h, D3DCOLOR col)
{
struct QuadVertex {
float x,y,z,rhw;
DWORD dwColor;
};
IDirect3DVertexBuffer8 *pVertexBuffer = NULL;
QuadVertex qV[4];
BYTE *pVertexData = NULL;

if (pDevice->CreateVertexBuffer((4*sizeof(QuadVertex)),(D3DUSA GE_WRITEONLY|D3DUSAGE_DYNAMIC),(D3DFVF_XYZRHW|D3DF VF_DIFFUSE),D3DPOOL_DEFAULT,&pVertexBuffer)<0) return;

pDevice->SetRenderState(D3DRS_ZENABLE , FALSE);
pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);

pVertexBuffer->Lock(0,0,&pVertexData,D3DLOCK_NOSYSLOCK | D3DLOCK_DISCARD);
if(pVertexData)
{
qV[0].dwColor = qV[1].dwColor = qV[2].dwColor = qV[3].dwColor = col;
qV[0].z = qV[1].z = qV[2].z = qV[3].z = 0.0f;
qV[0].rhw = qV[1].rhw = qV[2].rhw = qV[3].rhw = 0.0f;

qV[0].x = (float)x;
qV[0].y = (float)(y + h);
qV[1].x = (float)x;
qV[1].y = (float)y;
qV[2].x = (float)(x + w);
qV[2].y = (float)(y + h);
qV[3].x = (float)(x + w);
qV[3].y = (float)y;

memcpy(pVertexData,qV,sizeof(QuadVertex)*4);
pVertexBuffer->Unlock();
pVertexData = NULL;

pDevice->SetStreamSource(0,pVertexBuffer, sizeof(QuadVertex));
pDevice->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
pDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2 );
}
if (pVertexBuffer)
{
pVertexBuffer->Release();
pVertexBuffer=NULL;
}
pDevice->SetRenderState(D3DRS_LIGHTING, true);
}
Now To Make It Easy Writable For The Menu! Heres One Last Fuction Then A Call!

Quote:
void DrawGuiBox(int x, int y, int w, int h,D3DCOLOR col1,D3DCOLOR col2,LPDIRECT3DDEVICE8 pDevice)
{
DrawBox(pDevice,x,y,w,h,col2);
DrawBox(pDevice,x,y,w,18,col2+0x10000000);
DrawBorder(x,y,w,h,1,col1,pDevice);
}
Now To Make It Portable With Your Folder Menu Find Your Menu Add Items!!!

And Where It Says Here


Quote:
MENU[MENU_noitems].type=menutype;
MENU_noitems++;
return(MENU_noitems-1);
THIS IS FOR HANS MENU SO MAKE SURE U KNOW WHAT YOUR DOING!!!!!!

now heres the good bit!!( diese source hier ( des mit add into...) ist halt nur für die base von hans^^


Quote:
Add Into Your Globals
int MenuSize;//global


Add AFTER MENU_noitems++;
MenuSize = (MENU_noitems*13)+20;
Now Call This In End Scene!!! Or Where You Draw Your Menu

Quote:
DrawGuiBox(X,Y,W,MenuSize,COLOR1(BOARDER),COLOR2(B ACKGROUND),pDevice);

#added ^^
12/21/2010 18:18 joki4444#615
Quote:
void DrawBox( int x, int y, int w, int h, D3DCOLOR Color,LPDIRECT3DDEVICE9 pDevice)
{

struct Vertex {
float x,y,z,ht;
DWORD Color;
};
Vertex V[4];
V[0].Color = V[1].Color = V[2].Color = V[3].Color = Color;
V[0].z = V[1].z = V[2].z = V[3].z = 0.0f;
V[0].ht = V[1].ht = V[2].ht = V[3].ht = 0.0f;

V[0].x = V[1].x = (float)x;
V[0].y = V[2].y = (float)(y + h);
V[1].y = V[3].y = (float)y;
V[2].x = V[3].x = (float)(x + w);

pDevice->SetTexture(0, NULL);
pDevice->SetVertexShader(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Ve rtex));
}

void DrawBox(IDirect3DDevice9 *pDevice, int x, int y, int w, int h, D3DCOLOR col)
{
struct QuadVertex {
float x,y,z,rhw;
DWORD dwColor;
};
IDirect3DVertexBuffer9 *pVertexBuffer = NULL;
QuadVertex qV[4];
BYTE *pVertexData = NULL;

if (pDevice->CreateVertexBuffer((4*sizeof(QuadVertex)),(D3DUSA GE_WRITEONLY|D3DUSAGE_DYNAMIC),(D3DFVF_XYZRHW|D3DF VF_DIFFUSE),D3DPOOL_DEFAULT,&pVertexBuffer)<0) return;

pDevice->SetRenderState(D3DRS_ZENABLE , FALSE);
pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);

pVertexBuffer->Lock(0,0,&pVertexData,D3DLOCK_NOSYSLOCK | D3DLOCK_DISCARD);
if(pVertexData)
{
qV[0].dwColor = qV[1].dwColor = qV[2].dwColor = qV[3].dwColor = col;
qV[0].z = qV[1].z = qV[2].z = qV[3].z = 0.0f;
qV[0].rhw = qV[1].rhw = qV[2].rhw = qV[3].rhw = 0.0f;

qV[0].x = (float)x;
qV[0].y = (float)(y + h);
qV[1].x = (float)x;
qV[1].y = (float)y;
qV[2].x = (float)(x + w);
qV[2].y = (float)(y + h);
qV[3].x = (float)(x + w);
qV[3].y = (float)y;

memcpy(pVertexData,qV,sizeof(QuadVertex)*4);
pVertexBuffer->Unlock();
pVertexData = NULL;

pDevice->SetStreamSource(0,pVertexBuffer, sizeof(QuadVertex));
pDevice->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
pDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2 );
}
if (pVertexBuffer)
{
pVertexBuffer->Release();
pVertexBuffer=NULL;
}
pDevice->SetRenderState(D3DRS_LIGHTING, true);
}
funtz noch immer nciht jetzt kommen die Fehler :

1>------ Erstellen gestartet: Projekt: Hacks, Konfiguration: Debug Win32 ------
1> base.cpp
1>c:\users\nico\desktop\hacks\hacks\base.cpp(113) : error C2664: 'IDirect3DDevice9::SetVertexShader': Konvertierung des Parameters 1 von 'int' in 'IDirect3DVertexShader9 *' nicht möglich
1> Die Konvertierung eines ganzzahligen Typs in einen Zeigertyp erfordert ein reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat
1>c:\users\nico\desktop\hacks\hacks\base.cpp(127) : error C2660: 'IDirect3DDevice9::CreateVertexBuffer': Funktion akzeptiert keine 5 Argumente
1>c:\users\nico\desktop\hacks\hacks\base.cpp(133) : error C2664: 'IDirect3DVertexBuffer9::Lock': Konvertierung des Parameters 3 von 'BYTE **' in 'void **' nicht möglich
1> Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>c:\users\nico\desktop\hacks\hacks\base.cpp(153) : error C2660: 'IDirect3DDevice9::SetStreamSource': Funktion akzeptiert keine 3 Argumente
1>c:\users\nico\desktop\hacks\hacks\base.cpp(154) : error C2664: 'IDirect3DDevice9::SetVertexShader': Konvertierung des Parameters 1 von 'int' in 'IDirect3DVertexShader9 *' nicht möglich
1> Die Konvertierung eines ganzzahligen Typs in einen Zeigertyp erfordert ein reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========