[Source] Combat Arms Chams

Posts 1–15 of 55 · Page 1 of 4
[Source] Combat Arms Chams
Code:
} #define charbody m==char Stridenum[44];
unsigned int m_Stride;
unsigned int NumVertices;
unsigned int primCount;
int Stridelogger = false;
int stri = 0;
int numvert = 0;
int primcnt = 0;



CD3DFont *pD3DFont;

LPDIRECT3DTEXTURE9 texRed;
LPDIRECT3DTEXTURE9 texBlue;
LPDIRECT3DTEXTURE9 texYellow;
LPDIRECT3DTEXTURE9 texGreen;
LPDIRECT3DTEXTURE9 texWhite;
LPDIRECT3DTEXTURE9 texAqua;
//LPDIRECT3DTEXTURE9 texDarkBlue;
//LPDIRECT3DTEXTURE9 texPink;
//LPDIRECT3DTEXTURE9 texOrange;
LPDIRECT3DTEXTURE9 texPurple;
const BYTE bRed[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x00, 0x00, 0x00
};
const BYTE bBlue[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
};

const BYTE bGreen[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x9E, 0x00, 0x00, 0x00, 0x00
};
const BYTE bYellow[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
};
const BYTE bAqua[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00
};
const BYTE bPurple[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0xFF, 0x00
};
.r{}
const BYTE bWhite[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x00
};

#define D3DHOOK_TEXTURES
HRESULT CD3DManager::Initialize()
{
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bRed, 60, &texRed);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bBlue, 60, &texBlue);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bGreen, 60, &texGreen);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bYellow, 60, &texYellow);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bWhite, 60, &texWhite);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bAqua, 60, &texAqua);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bPurple, 60, &texPurple);

pD3DFont = new CD3DFont("Comic Sans MS", 12);
pD3DFont->InitDeviceObjects(m_pD3Ddev);
pD3DFont->RestoreDeviceObjects();
return S_OK;
}


HRESULT CD3DManager::PreReset()
{

return S_OK;
}


HRESULT CD3DManager::PostReset()
{
return S_OK;
}

HRESULT CD3DManager::Release()
{
delete pD3DFont;
texRed->Release();
texBlue->Release();
texGreen->Release();
texWhite->Release();
texAqua->Release();
texYellow->Release();
texPurple->Release();
return S_OK;
}




in DIP
-------

if(GetAsyncKeyState(VK_F1)&1)
{
Stridelogger=!Stridelogger;
}

if(Stridelogger)
{
if(GetAsyncKeyState(VK_NUMPAD7)&1)stri ;
if(GetAsyncKeyState(VK_NUMPAD1)&1)stri--;
if(GetAsyncKeyState(VK_NUMPAD8)&1)numvert ;
if(GetAsyncKeyState(VK_NUMPAD2)&1)numvert--;
if(GetAsyncKeyState(VK_NUMPAD9)&1)primcnt ;
if(GetAsyncKeyState(VK_NUMPAD3)&1)primcnt--;
}

if(m_Stride == stri)
{
m_pD3Ddev->SetTexture(0,texRed);
return m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex,
MinVertexIndex, NumVertices, startIndex, primCount);
}

if(NumVertices == numvert)
{
m_pD3Ddev->SetTexture(0,texBlue);
return m_pD3Ddev->DrawIndexedPrimitive
(Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
}

if(primCount == primcnt)
{
m_pD3Ddev->SetTexture(0,texGreen);
return m_pD3Ddev->DrawIndexedPrimitive (Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
}

if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
stri=0;
numvert=0;
primcnt=0;
}

if(GetAsyncKeyState(VK_NUMPAD4)&1)
{
add_log("Player Stride:%i",stri);
}

if(GetAsyncKeyState(VK_NUMPAD5)&1)
{
add_log("Stride:%i",stri);
add_log("NumVertices:%i",numvert);
add_log("primCount:%i",primcnt);
}
TY ALOT !!!
Nice nice nice.
Nice, I'll try this out sometime.
This won't work. Hackshield blocks D3DX functions and you will crash if you use them. Also, with this source, you will only get 1 color chams that don't show through walls. Basically like modded mini-chams.
Quote Originally Posted by mmbob View Post
This won't work. Hackshield blocks D3DX functions and you will crash if you use them. Also, with this source, you will only get 1 color chams that don't show through walls. Basically like modded mini-chams.
That only applies if you're just going to copy and paste this.

This is sort of chams, it's a stride logger. You're going to have to fix it up to make it like chams.

[php]
HRESULT My_DIP(Params)
{
if(stride == yourstride)
{
device->SetRenderState(D3DRS_ZENABLE,false);
device->SetTexture(&Red); //forgot the parameters

CallRealDIP(Params);

device->SetRenderState(D3DRS_ZENABLE,true);
device->SetTexture(&Blue);
}
}
[/php]

For this to work you also have to hook SetStreamSource. An alternative is to call GetStreamSource in every iteration of DIP but that would slow the crap out of the game.


Note: I posted a full stride logger source code in the C++ section, if anyone wants full code.
the main problem with chams is the lag. i dont know how to get rid of that.
scimmyboy.
you could possibly use
DoOnce_loop.
that way your only drawin the texture as needed,
and arent adding 12+frames every second

12 FPS = lagg
4 FPS + DoOnce_loop = less lagg, more effective chams.
thats true. i wasnt really thinking about the efficiency of the chams when i was writing it. it could reduce the copy and pasters if u know what i mean
You wrote that up there?
with the help of some friends and tutorials, yes. most of it is mine
Good job, thanks got sharing.
hmmmm

Posted in Oct 2009

[php]
#define charbody m==char Stridenum[44];
unsigned int m_Stride;
unsigned int NumVertices;
unsigned int primCount;
int Stridelogger = false;
int stri = 0;
int numvert = 0;
int primcnt = 0;
CD3DFont *pD3DFont;
LPDIRECT3DTEXTURE9 texRed;
LPDIRECT3DTEXTURE9 texBlue;
LPDIRECT3DTEXTURE9 texYellow;
LPDIRECT3DTEXTURE9 texGreen;
LPDIRECT3DTEXTURE9 texWhite;
LPDIRECT3DTEXTURE9 texAqua;
//LPDIRECT3DTEXTURE9 texDarkBlue;
//LPDIRECT3DTEXTURE9 texPink;
//LPDIRECT3DTEXTURE9 texOrange;
LPDIRECT3DTEXTURE9 texPurple;
const BYTE bRed[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x00, 0x00, 0x00
};
const BYTE bBlue[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
};

const BYTE bGreen[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x9E, 0x00, 0x00, 0x00, 0x00
};
const BYTE bYellow[60] =
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
};
const BYTE bAqua[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00
};
const BYTE bPurple[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0xFF, 0x00
};
.r{}
const BYTE bWhite[58] =
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x00
};
#define D3DHOOK_TEXTURES
HRESULT CD3DManager::Initialize()
{
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bRed, 60, &texRed);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bBlue, 60, &texBlue);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bGreen, 60, &texGreen);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bYellow, 60, &texYellow);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bWhite, 60, &texWhite);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bAqua, 60, &texAqua);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bPurple, 60, &texPurple);

pD3DFont = new CD3DFont("Comic Sans MS", 12);
pD3DFont->InitDeviceObjects(m_pD3Ddev);
pD3DFont->RestoreDeviceObjects();
return S_OK;
}
HRESULT CD3DManager::PreReset()
{
return S_OK;
}
HRESULT CD3DManager::PostReset()
{
return S_OK;
}
HRESULT CD3DManager::Release()
{
delete pD3DFont;
texRed->Release();
texBlue->Release();
texGreen->Release();
texWhite->Release();
texAqua->Release();
texYellow->Release();
texPurple->Release();
return S_OK;
}
in DIP
-------
if(GetAsyncKeyState(VK_F1)&1)
{
Stridelogger=!Stridelogger;
}
if(Stridelogger)
{
if(GetAsyncKeyState(VK_NUMPAD7)&1)stri ;
if(GetAsyncKeyState(VK_NUMPAD1)&1)stri--;
if(GetAsyncKeyState(VK_NUMPAD8)&1)numvert ;
if(GetAsyncKeyState(VK_NUMPAD2)&1)numvert--;
if(GetAsyncKeyState(VK_NUMPAD9)&1)primcnt ;
if(GetAsyncKeyState(VK_NUMPAD3)&1)primcnt--;
}
if(m_Stride == stri)
{
m_pD3Ddev->SetTexture(0,texRed);
return m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex,
MinVertexIndex, NumVertices, startIndex, primCount);
}
if(NumVertices == numvert)
{
m_pD3Ddev->SetTexture(0,texBlue);
return m_pD3Ddev->DrawIndexedPrimitive
(Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
}
if(primCount == primcnt)
{
m_pD3Ddev->SetTexture(0,texGreen);
return m_pD3Ddev->DrawIndexedPrimitive (Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
}
if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
stri=0;
numvert=0;
primcnt=0;
}
if(GetAsyncKeyState(VK_NUMPAD4)&1)
{
add_log("Player Stride:%i",stri);
}
if(GetAsyncKeyState(VK_NUMPAD5)&1)
{
add_log("Stride:%i",stri);
add_log("NumVertices:%i",numvert);
add_log("primCount:%i",primcnt);
}
[/php]

Credits offered (IMHO)

If it's yours , good job.
Posts 1–15 of 55 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us