- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Combat Arms hacks cheats tutorials downloads source code
You are Unregistered, please register to gain Full access.
Chams
03-07-2010, 10:33 PM
#1 n00bie Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
Chams Hey, I am trying to make chams well i m nub but i got friend helping me and i dont know what's wrong. Is it with the code or idk. I get 0 errors, 0 warnings. soo..
Code:
Quote:
//=====================================================================================
// Roverturbo | www.uc-forum.com
#include <windows.h>
#include <d3d9.h>
#pragma comment(lib, "d3d9.lib")
#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")
#include <time.h>
#include <stdlib.h>
#include <fstream>
#include <vector>
#include <D3dx9tex.h>
#include <stdio.h>
#include <time.h>
#include <tchar.h>
#include <iostream>
#pragma warning(disable:4996)//to disable the sprintf warning in VC++ 2008
//-----------//
bool fCall = true;
bool Chams = false;
//----------//
//=====================================================================================
typedef HRESULT (WINAPI* CreateDevice_Prototype) (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
typedef HRESULT (WINAPI* Reset_Prototype) (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
typedef HRESULT (WINAPI* EndScene_Prototype) (LPDIRECT3DDEVICE9);
typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
CreateDevice_Prototype CreateDevice_Pointer = NULL;
Reset_Prototype Reset_Pointer = NULL;
EndScene_Prototype EndScene_Pointer = NULL;
DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;
HRESULT WINAPI Direct3DCreate9_VMTable (VOID);
HRESULT WINAPI CreateDevice_Detour (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
HRESULT WINAPI Reset_Detour (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
HRESULT WINAPI EndScene_Detour (LPDIRECT3DDEVICE9);
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching(LPVOID);
PDWORD Direct3D_VMTable = NULL;
//=====================================================================================
BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstModule);
if(Direct3DCreate9_VMTable() == D3D_OK)
return TRUE;
}
return FALSE;
}
//=====================================================================================
HRESULT WINAPI Direct3DCreate9_VMTable(VOID)
{
LPDIRECT3D9 Direct3D_Object = Direct3DCreate9(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[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
{
*(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[16];
*(PDWORD)&Direct3D_VMTable[16] = (DWORD)CreateDevice_Detour;
if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
return D3DERR_INVALIDCALL;
}
else
return D3DERR_INVALIDCALL;
return D3D_OK;
}
//=====================================================================================
HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D9 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow,
DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters,
LPDIRECT3DDEVICE9* Returned_Device_Interface)
{
HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags,
PresentationParameters, Returned_Device_Interface);
DWORD dwProtect;
if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
{
*(PDWORD)&Direct3D_VMTable[16] = *(PDWORD)&CreateDevice_Pointer;
CreateDevice_Pointer = NULL;
if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
return D3DERR_INVALIDCALL;
}
else
return D3DERR_INVALIDCALL;
if(Returned_Result == D3D_OK)
{
Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;
*(PDWORD)&Reset_Pointer = (DWORD)Direct3D_VMTable[16];
*(PDWORD)&EndScene_Pointer = (DWORD)Direct3D_VMTable[42];
*(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[82];
if(CreateThread(NULL, 0, VirtualMethodTableRepatchingLoopToCounterExtensionRepatching, NULL, 0, NULL) == NULL)
return D3DERR_INVALIDCALL;
}
return Returned_Result;
}
//=====================================================================================
HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
{
return Reset_Pointer(Device_Interface, PresentationParameters);
}
//=====================================================================================
HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
{
return EndScene_Pointer(Device_Interface);
}
//=====================================================================================
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type, INT BaseIndex,
UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;
if(Device_Interface->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
if ( GetAsyncKeyState ( VK_NUMPAD1 ) &1 )
{
Chams = !Chams;
}
if(Chams && (Stride == 32))
{
DWORD dwOldZEnable = D3DZB_TRUE;
Device_Interface->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
Device_Interface->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
}
return DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
//=====================================================================================
DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching(LPVOID Param)
{
UNREFERENCED_PARAMETER(Param);
while(1)
{
Sleep(100);
*(PDWORD)&Direct3D_VMTable[42] = (DWORD)EndScene_Detour;
*(PDWORD)&Direct3D_VMTable[82] = (DWORD)DrawIndexedPrimitive_Detour;
*(PDWORD)&Direct3D_VMTable[16] = (DWORD)Reset_Detour;
}
return 1;
}
//=====================================================================================
He was saying that it maybe my computer or my graphics card or something. Like shadder or something.
I dont know what wrong, i need help....
__________________ ~ too big ~
Kush2692 is offline
03-07-2010, 11:12 PM
#2 Level 3
Join Date: Nov 2007
Location: msdn
Posts: 528
Reputation: 22916 Rep Power: 291
VirtualMethodTableRepatchingLoopToCounterExtension lol
__________________
Gellin is offline
03-07-2010, 11:21 PM
#3 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
huh? What u mean
__________________ ~ too big ~
Kush2692 is offline
03-07-2010, 11:27 PM
#4 Hax 101
Join Date: Jan 2008
Posts: 355
Reputation: 5711 Rep Power: 114
Last Achievements Do you inject at the start of the game? not in the middle, cause createdevice might not be getting called ..
|KungFuPenguin| is offline
03-07-2010, 11:29 PM
#5 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
I inject it @ Start of the game.
__________________ ~ too big ~
Kush2692 is offline
I hope it help you =)
03-08-2010, 12:23 AM
#6 Join Date: Jan 2010
Posts: 56
Reputation: 1434 Rep Power: 41
I hope it help you =)
PHP Code:
if( Chams && ( Stride == 32 ))
{
DWORD dwOldZEnable = D3DZB_TRUE ;
Device_Interface -> GetRenderState ( D3DRS_ZENABLE , & dwOldZEnable );
Device_Interface -> SetRenderState ( D3DRS_ZENABLE , D3DZB_FALSE );
DrawIndexedPrimitive_Pointer ( Device_Interface , Type , BaseIndex , MinIndex , NumVertices , StartIndex , PrimitiveCount );
Device_Interface -> SetRenderState ( D3DRS_ZENABLE , dwOldZEnable );
}
How would you like to create chams, if you don't change texture color, with settexture ???
To make this u should:
1) Define a textures for chams:
PHP Code:
LPDIRECT3DTEXTURE9 White , Purple ;
2) Create SetTexture function:
PHP Code:
void SetTextureColor ( IDirect3DTexture9 ** ppD3Dtex , DWORD colour32 )
{
D3DLOCKED_RECT d3dlr ;
(* ppD3Dtex )-> LockRect ( 0 , & d3dlr , 0 , 0 );
DWORD * pDst16 = ( DWORD *) d3dlr . pBits ;
for( int xy = 0 ; xy < 8 * 8 ; xy ++)
* pDst16 ++ = colour32 ;
(* ppD3Dtex )-> UnlockRect ( 0 );
}
3) create textures and set colors:
PHP Code:
Device_Interface -> CreateTexture ( 8 , 8 , 1 , 0 , D3DFMT_X8R8G8B8 , D3DPOOL_MANAGED , & White , 0 );
Device_Interface -> CreateTexture ( 8 , 8 , 1 , 0 , D3DFMT_X8R8G8B8 , D3DPOOL_MANAGED , & Purple , 0 );
SetTextureColor (& White , 0xFFFFFFFF );
SetTextureColor (& Purple , 0xFFFF00FF );
4) In drawindexed primitive u should post:
PHP Code:
Device_Interface -> SetRenderState ( D3DRS_ZENABLE , D3DZB_FALSE );
Device_Interface -> SetRenderState ( D3DRS_LIGHTING , false );
Device_Interface -> SetRenderState ( D3DRS_ZFUNC , D3DCMP_NEVER );
Device_Interface -> SetTexture ( 0 , White ); // if user is false(behind a wall) show white.
DrawIndexedPrimitive_Pointer ( Device_Interface , Type , BaseIndex , MinIndex , NumVertices , StartIndex , PrimitiveCount ); // Point to dip
Device_Interface -> SetRenderState ( D3DRS_ZENABLE , D3DZB_TRUE );
Device_Interface -> SetRenderState ( D3DRS_ZFUNC , D3DCMP_LESSEQUAL );
Device_Interface -> SetTexture ( 0 , Purple ); // if user is true(can see them directly) then show in Purple .
Good luck =)
Last edited by rax0r; 03-08-2010 at 12:25 AM .
rax0r is offline
03-08-2010, 01:21 AM
#7 n00bie Join Date: Jun 2009
Posts: 19
Reputation: -11 Rep Power: 0
Last Achievements Ok I was helping him out and the reason why the code needed to actually make chams is gone is because I am thinking his graphics card doesn't support shader's ( the full source used pixel shading ). Though even with it removed ( what Kush posted ) it still closes the game on start. It works for me but not for him. So I don't know whats wrong.
Nitr0 is online now
03-08-2010, 10:10 PM
#8 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
Hmmm, I tried wireframs and same thing with wireframs.
__________________ ~ too big ~
Kush2692 is offline
03-08-2010, 10:47 PM
#9 Join Date: Jul 2009
Posts: 122
Reputation: 1214 Rep Power: 46
Quote:
Originally Posted by
Kush2692 Hmmm, I tried wireframs and same thing with wireframs.
to WireFrame use = WireframeModels 1
PHP Code:
bool wire = false ; if( GetAsyncKeyState ( VK_NUMPAD5 )< 0 ){ if( wire ){ PushToConsole ( "WireframeModels 0" ); wire = false ; } else { PushToConsole ( "WireframeModels 1" ); wire = true ; } }
is more easy.
combatarmshacks is offline
03-08-2010, 11:39 PM
#10 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
I dont get it, it just cras$hes what ever i do, i m using perX injector. And i inject start CA And it just crashes and it creates stupid 2 dump files.
__________________ ~ too big ~
Kush2692 is offline
03-08-2010, 11:52 PM
#11 s0beit's bitch
Join Date: Dec 2007
Posts: 342
Reputation: 15059 Rep Power: 207
crashing? or getting detected?
hackshield give no detection messages, it just closes the game if something found, and idk how its at others but i cant hook DIP or endscene without getting kicked
NeoIII is online now
03-09-2010, 05:26 AM
#12 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
Its same like black screen comes up and then it sends me back to desktop and in ca folder there b 2 dump files.
__________________ ~ too big ~
Kush2692 is offline
03-09-2010, 05:33 AM
#13 Join Date: Oct 2008
Posts: 125
Reputation: 1628 Rep Power: 58
Quote:
Originally Posted by
Kush2692 Its same like black screen comes up and then it sends me back to desktop and in ca folder there b 2 dump files.
Then it's most likely detected.
Mack R is offline
03-09-2010, 06:06 AM
#14 Join Date: Jan 2009
Posts: 318
Reputation: 1550 Rep Power: 58
Yep, if the code at current in OP is what you're using, it will be detected.
iExclusive is offline
03-09-2010, 05:09 PM
#15 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
So, which code is undetected. Also, i need to make a menu and not hotkeys. So, if you can tell me how to add menu and chams in it. please Thanks.
[Auto Merged - 18:53:20 UTC]
This is my Debug file:
Code:
2010/3/9 ----- 18:55:51 - CombatArms Debug Start!
Exception code: C0000005
Fault address: 00000100 7934DE8:07910178 Û
EAX:00000100
EBX:0012F230
ECX:0556BE68
EDX:00450007
ESI:0012F354
EDI:0012EEC0
CS:EIP:001B:00000100
SS:ESP:0023:0012EB9C EBP:0012EC34
DS:0023 ES:0023 FS:003B GS:0000
Flags:00210206
Call stack:
Address Frame Logical addr Module
Call_Static[0]: 00000100 0012EC34 0000:00000000
Call_Static[1]: 00000100 0012ED60 0000:00000000
Call_Static[2]: 00000100 0012EFAC 0000:00000000
Call_Static[3]: 00000100 0012F1FC 0000:00000000
Call_Static[4]: 00000100 0012F958 0000:00000000
Client_Version:
Player uID: 0
CPUSpeed: 1795 MHz
Identifier: x86 Family 6 Model 15 Stepping 13
ProcessType: Intel Pentium (II/Pro)
VideoCard:
System_Memory
Total: 2136043520
Use: 1035296768
[debug_info_end]
2010/3/9 ----- 18:55:52 - CombatArms Debug End
__________________ ~ too big ~
Last edited by Kush2692; 03-09-2010 at 05:23 PM .
Kush2692 is offline
03-10-2010, 09:41 AM
#16 Join Date: Jan 2009
Posts: 318
Reputation: 1550 Rep Power: 58
What and when does the crash occur?
And why is anyone having to give you "undetected code", that's for you to figure. Well, make a menu then, there are plenty of sources available and information in regards around the forum. You also should start to learn C++ and Direct3D to be able to progress and not mooch off.
iExclusive is offline
03-10-2010, 07:09 PM
#17 s0beit's bitch
Join Date: Dec 2007
Posts: 342
Reputation: 15059 Rep Power: 207
try to look for gellins CA base, there is a mneu added as i know and it show you how all is done, but that doesnt mean you are undetected by that way.
NeoIII is online now
03-10-2010, 10:06 PM
#18 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
Well, i see his Base.cpp
But my menu that i designed in photoshop is this: nvm
__________________ ~ too big ~
Last edited by Kush2692; 03-10-2010 at 10:16 PM .
Kush2692 is offline
03-10-2010, 10:17 PM
#19 Gathering Stories
Join Date: Mar 2009
Location: University
Posts: 4,440
Reputation: 84245 Rep Power: 966
Why should people here help you make stuff for your payhacks?
__________________
The skyline was beautiful on fire. --------------------------------------------------------------
disco is offline
03-11-2010, 07:35 PM
#20 n00bie
Threadstarter Join Date: Nov 2009
Location: Arlington,Texas
Posts: 21
Reputation: -353 Rep Power: 0
What the ----- are u trying to say.
__________________ ~ too big ~
Kush2692 is offline
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 06:34 AM .