Question Chams isn't working

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

mPulse

Coder
Full Member
Nobleman
Jun 19, 2013
106
733
0
Any errors? Maybe add some picture more easier to help =)
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
Hmm I mean he is using " DirectX 9.0 Sdk Summer 2004" and it didnt work for me that good as well,
thatwhy Im using "Microsoft DirectX SDK (June 2010)" just as suggestion.
Did you just copy his code and compiled it without errors and it simply doesnt show up ?

Pretty hard to say what went wrong there, I gues there are 3 problems which could be the reasons:
>Chams Thread is not called
>Models are wrong in the source code
>Buggy DX SDK

May you just try to learn it in a updated game for dx like csgo, etc :)
 

Attachments

zoratz

Jr.Coder
Dank Tier Donator
Nobleman
Jul 22, 2013
81
908
2
I found out what happened.. The thing is that I downloaded the CHAMS file from the CHAMS tutorial and well, it isnt working...
When I tryed out the CHAMS file from the TRIGGERBOT tutorial it worked.. However I don't have the working code..
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
hmm seems that there is something buggy in the chams tut source if its not working for you, only the triggerbot one >.<
anyways its not good to write into the d3d files as fleep did there, because for some ppl its just confusing like it was for me ..

thatswhy its better to import its functions

MainIncludes of Win&&DX9
C++:
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NON_CONFORMING_SWPRINTFS
#include <Windows.h>
#include <cstdio>
#include <time.h>
#include <d3d9.h>
#include <d3dx9.h>

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
Imports
C++:
typedef HRESULT(__stdcall* DrawIndexedPrimitive_t)(IDirect3DDevice9*, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
typedef HRESULT(__stdcall* Reset_t)(IDirect3DDevice9*, D3DPRESENT_PARAMETERS*);
Call the funcs && needed declares

C++:
bool DIPInit = true;

wchar_t DllPath[512];
wchar_t PathBuffer[512];

IDirect3DTexture9* RedTexture;
IDirect3DTexture9* GreenTexture;

HRESULT __stdcall DrawIndexedPrimitiveHook(IDirect3DDevice9* Device, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
	if (DIPInit)
	{	
		//just put your colors here into the texture defines eg the following		
		swprintf(PathBuffer, 512, L"%s\\RedTex.png", DllPath);
		D3DXCreateTextureFromFileEx(Device, PathBuffer, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0, NULL, NULL, &RedTexture);	
                swprintf(PathBuffer, 512, L"%s\\GreenTex.png", DllPath);
		D3DXCreateTextureFromFileEx(Device, PathBuffer, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0, NULL, NULL, &GreenTexture);
		
		DIPInit = false;
	}

	if (LOGS)
	{
		Device->SetRenderState(D3DRS_ZENABLE, false);
		Device->SetTexture(0, GreenTexture);		
		OrigDrawIndexedPrimitive(Device, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
		Device->SetRenderState(D3DRS_ZENABLE, true);
		Device->SetTexture(0, RedTexture);		
	}

	return OrigDrawIndexedPrimitive(Device, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}

HRESULT __stdcall ResetHook(IDirect3DDevice9* Device, D3DPRESENT_PARAMETERS* Params)
{
	if (!DIPInit)
	{
		RedTexture->Release();
		GreenTexture->Release();
		RedShader->Release();
		GreenShader->Release();
	}
	DIPInit = true;
	return OrigReset(Device, Params);
}
and the final thread for calling

C++:
DWORD WINAPI HookThread(void)
{
	GetDir(MyInstance, DllPath, 512);

	D3d9Base = (DWORD) GetModuleHandle(L"d3d9.dll");
	while (!D3d9Base)
	{		
		D3d9Base = (DWORD) GetModuleHandle(L"d3d9.dll");
		Sleep(100);
	}


	DWORD TempAdd = FindPattern(D3d9Base, 0x128000, (BYTE*) "\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
	while (!TempAdd)
	{		
		TempAdd = FindPattern(D3d9Base, 0x128000, (BYTE*) "\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
		Sleep(100);
	}
	
	D3d9VTable = (DWORD*) *(DWORD*)(TempAdd+2);
	
	OrigDrawIndexedPrimitive = (DrawIndexedPrimitive_t) DetourFunc((BYTE*) D3d9VTable[82], (BYTE*) DrawIndexedPrimitiveHook, 5);
	OrigReset = (Reset_t) DetourFunc((BYTE*) D3d9VTable[16], (BYTE*) ResetHook, 5);
	

	while (true)
	{
		Sleep(1000);
	}
	return 0;
}
NOTICE:
I do not want anyone to just lazy copy/paste the code, so here is the main stuff. You can just take this and put this together with parts of the tutorial of fleep.
Well, thats the way how many ppl do their chams, I dont set any Texture on my private source, I set Pixelshaders etc If you want learn it, you gonna take this, research all you need and figure it out.(google is your friend) Hard way but thats the best way to learn it.

and one last thing are the LOGS in the loop, in the following I just give you an examble thatfor, but that are NOT the models of cod.

C++:
#define LOG_0 (NumVertices == 3210 && PrimitiveCount == 4503)
#define LOG_1 (NumVertices == 2292 && PrimitiveCount == 3015)
#define LOG_2 (NumVertices == 1488 && PrimitiveCount == 1819)
#define LOG_3 (NumVertices == 554 && PrimitiveCount == 509)
#define LOG_4 (NumVertices == 408 && PrimitiveCount == 344)
#define LOG_5 (NumVertices == 835 && PrimitiveCount == 899)
#define LOG_6 (NumVertices == 3265 && PrimitiveCount == 5015)
#define LOG_7 (NumVertices == 1510 && PrimitiveCount == 1871)
#define LOG_8 (NumVertices == 873 && PrimitiveCount == 986)
#define LOG_9 (NumVertices == 563 && PrimitiveCount == 590)
#define LOG_10 (NumVertices == 368 && PrimitiveCount == 377)

#define LOGS (LOG_0 || LOG_1 || LOG_2 || LOG_3 || LOG_4 || LOG_5|| LOG_6|| LOG_7|| LOG_8|| LOG_9|| LOG_10)

I gave you here 70% of your work, 30% you need to do on your own by research and study, good luck.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods