- 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.
Direct3D hacking programming reversing
You are Unregistered, please register to gain Full access.
Chams Not Working
06-15-2010, 02:41 PM
#1 Join Date: Dec 2009
Posts: 68
Reputation: 384 Rep Power: 31
Last Achievements Chams Not Working
Hello.
I am trying to make chams for Combat Arms.
They are not working
I dont crash or anything like that, they just dont work!
this is my DIP:
PHP Code:
HRESULT WINAPI nDrawIndexedPrimitive ( LPDIRECT3DDEVICE9 pDevice , D3DPRIMITIVETYPE PrimType , INT BaseVertexIndex , UINT MinVertexIndex , UINT NumVertices , UINT startIndex , UINT primCount )
{
LPDIRECT3DVERTEXBUFFER9 StreamData ;
UINT Offset = 0 ;
UINT m_Stride = 0 ;
if( pDevice -> GetStreamSource ( 0 ,& StreamData ,& Offset ,& m_Stride ) == D3D_OK )
StreamData -> Release ();
if( chams )
{
if ( Strides )
{
pDevice -> SetTexture ( 0 , Green );
pDevice -> SetRenderState ( D3DRS_ZENABLE , D3DZB_FALSE );
pDevice -> SetRenderState ( D3DRS_ZFUNC , D3DCMP_NEVER );
oDrawIndexedPrimitive ( pDevice , PrimType , BaseVertexIndex , MinVertexIndex , NumVertices , startIndex , primCount );
pDevice -> SetRenderState ( D3DRS_ZENABLE , D3DZB_TRUE );
pDevice -> SetRenderState ( D3DRS_ZFUNC , D3DCMP_LESSEQUAL );
pDevice -> SetTexture ( 0 , Red );
}
}
return oDrawIndexedPrimitive ( pDevice , PrimType , BaseVertexIndex , MinVertexIndex , NumVertices , startIndex , primCount );
}
I also have used Az's GenerateTexture function.
and i have put this in endscene
(this is where i thinkk ive stuffed up)
PHP Code:
GenerateTexture ( pDevice , & Green , 0xFF483D8B );
GenerateTexture ( pDevice , & Red , 0xFFFF4500 );
and globals:
PHP Code:
LPDIRECT3DTEXTURE9 Green , Red ;
Can somebody please tell me what im doing wrong?
Just a little note. I am not using any base and i am not getting any compile errors
Thanks,
acid_buRn
acid_buRn is offline
06-15-2010, 02:43 PM
#2 Guest
Check if your hook even works ( looks outdated )
Edit: fuxin laggin forum
06-15-2010, 02:46 PM
#3 Senior Member Join Date: Sep 2008
Posts: 85
Reputation: 311 Rep Power: 46
Last Achievements Do they inject? Do they show up when there not behind a wall?
Also i beleive its suppose to be arranged into this order Im not 100% sure.
please correct me if im wrong(which i prolly am lol)
Code:
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
//change the texture color after you turn off zenabler
pDevice->SetTexture(0,Green);
oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
Last edited by SgtDrew; 06-15-2010 at 02:50 PM .
SgtDrew is offline
06-15-2010, 03:58 PM
#4 Join Date: Jul 2009
Posts: 1,068
Reputation: 49844 Rep Power: 551
You are calling GenerateTexture( ... ) once only?
Don't call it every single endscene for the same texture.
Also, FF483D8B looks blue to me.
umm...
__________________
Shad0w_'s Alter Ego
Last edited by disavow; 06-15-2010 at 04:02 PM .
disavow is online now
06-15-2010, 04:05 PM
#5 Join Date: Nov 2009
Location: Box.
Posts: 190
Reputation: 1978 Rep Power: 49
Last Achievements Quote:
Originally Posted by
stickleback You are calling GenerateTexture( ... ) once only?
Don't call it every single endscene for the same texture.
Also, FF483D8B looks blue to me.
I'm not so sure that's the issue.. if he was creating a texture every frame, then his game would probably lag like a *****.
Check your model recognition and uh...
Code:
HRESULT WINAPI nDrawIndexedPrimitive ( LPDIRECT3DDEVICE9 pDevice , D3DPRIMITIVETYPE PrimType , INT BaseVertexIndex , UINT MinVertexIndex , UINT NumVertices , UINT startIndex , UINT primCount )
{
LPDIRECT3DVERTEXBUFFER9 StreamData ;
UINT Offset = 0 ;
UINT m_Stride = 0 ;
if( pDevice -> GetStreamSource ( 0 ,& StreamData ,& Offset ,& m_Stride ) == D3D_OK )
StreamData -> Release ();
.. . That really don't look correct... check your placement.
(may want to try the starterkit?)
And yea, make sure you're generating your textures one time, in a render that you're absolutely sure works (test with text, or exits).
rev0lt is offline
06-15-2010, 08:26 PM
#6 Join Date: May 2010
Posts: 13
Reputation: -1350 Rep Power: 0
First of all why are you calling oDrawIndexedPrimitive twice, its already being called
Why are you putting Green, Red in your main global?. How did you hook LPDIRECT3DTEXTURE9?
Should be:
Code:
LPDIRECT3DTEXTURE9 * pD3DCurrTex = NULL; I fixed a few lines for you:
Code:
HRESULT WINAPI nDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
LPDIRECT3DVERTEXBUFFER9 StreamData;
UINT Offset = 0;
UINT m_Stride = 0;
if(pDevice->GetStreamSource(0,&StreamData,&Offset,&m_Stride) == D3D_OK)
StreamData->Release();
if(chams)
{
if (Strides)
{
pDevice->SetTexture(0,Green);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
nDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetTexture(0,Red);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE; //Should be false instead, if not, enable depending on how you prefer.
nDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
}
}
return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
} If not, try this:
Code:
HRESULT WINAPI nDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
LPDIRECT3DVERTEXBUFFER9 StreamData;
UINT Offset = 0;
UINT m_Stride = 0;
if(pDevice->GetStreamSource(0,&StreamData,&Offset,&m_Stride) == D3D_OK)
StreamData->Release();
int player = PlayerCrC(pD3D9CurrTex->m_CrC32);
if(chams && pD3D9CurrTex != NULL)
{
if (Strides)
if (player == 1)
{
for pDevice->SetTexture(0,Green);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
nDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
else if (player == 2)
for pDevice->SetTexture(0,Red);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE; //Should be false instead, if not, enable depending on how you prefer.
nDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
}
}
return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
} Ask if you need any more help.
DaRkGunZ is offline
06-16-2010, 02:08 AM
#7 n00bie Join Date: Nov 2009
Posts: 11
Reputation: 10 Rep Power: 27
lawl hi acid
why is ur settexture in front of ur zbuffer altering lines?? it obviously wont paint a thing =,=
falzarex is offline
06-16-2010, 03:44 AM
#8 Join Date: Feb 2005
Posts: 5,035
Reputation: 92245 Rep Power: 1108
Code:
LPDIRECT3DVERTEXBUFFER9 StreamData;
UINT Offset = 0;
UINT m_Stride = 0;
if(pDevice->GetStreamSource(0,&StreamData,&Offset,&m_Stride) == D3D_OK)
StreamData->Release(); Not sure why you copied that into your code, you're not putting it to use unless it is referenced in Strides as part of a macro. Code:
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER); Why bother, you disable the z-buffer before so changing that state will do nothing. Code:
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetTexture(0,Green); You might want to try doing it that way. Quote:
Originally Posted by stikleback
umm... Indeed. Quote:
Originally Posted by
DaRkGunZ First of all why are you calling oDrawIndexedPrimitive twice
Because he is mean't to, and you didn't fix anything, you just implemented three syntax errors and two instances of infinite recursion which would cause a CTD.
__________________
I've learned that something constructive comes from every defeat.
Sometimes i say things i shouldn't, and sometimes i say what other people are thinking.
Real programmer's don't document, if it was hard to write, it should be hard to understand.
First learn computer science and all the theory, next develop a programming style, then forget all that and just hack. Roverturbo is online now
06-16-2010, 12:08 PM
#9 Join Date: Jul 2009
Posts: 1,068
Reputation: 49844 Rep Power: 551
Acid, pretty sure from your snippet now that this is your problem rover highlighted.
Quote:
Originally Posted by
Roverturbo Not sure why you copied that into your code, you're not putting it to use unless it is referenced in Strides as part of a macro.
Considering you said it just don't work, I would really check your model rec or at least post more code so that we can confirm you error. Otherwise everyone is just guessing the issue.
Also don't take any advice from the post that DarkGunz made.
Quote:
Originally Posted by Revolt
That really don't look correct... check your placement.
Nothing wrong with the placement, it's the exact same placement as rover used here:
Direct3D9 Interface Hooking It's just that he didn't use the same value in the model check.
__________________
Shad0w_'s Alter Ego
disavow is online now
06-16-2010, 12:28 PM
#10
Threadstarter Join Date: Dec 2009
Posts: 68
Reputation: 384 Rep Power: 31
Last Achievements Hmm. Thanks for your help guys but its still not working!
What other part of the code would you like to see?
I dont have a model rec.
Btw, it doesnt work at all.
players are as if there where no chams at all.
Its injecting fine becuase all my other hacks work, its the chams thats not.
acid_buRn is offline
06-16-2010, 02:23 PM
#11 Level 3
Join Date: May 2005
Posts: 1,103
Reputation: 38964 Rep Power: 494
Quote:
Originally Posted by
acid_buRn Hmm. Thanks for your help guys but its still not working!
What other part of the code would you like to see?
I dont have a model rec.
Btw, it doesnt work at all.
players are as if there where no chams at all.
Its injecting fine becuase all my other hacks work, its the chams thats not.
I dont have a model rec.
try strides of 32,40,44
fatboy88 is online now
06-16-2010, 02:39 PM
#12 Join Date: Nov 2009
Location: Box.
Posts: 190
Reputation: 1978 Rep Power: 49
Last Achievements Quote:
I dont have a model rec.
Btw, it doesnt work at all.
players are as if there where no chams at all.
You sir, have just made my day.
Lets break this down a bit for you buddy...
Model -
Recognition
Model being each player, or model item...
Recognition may not be in your vocabulary just yet, but it means - a way to recognize a certain object, or occurrence.
Now you explain to me kind sir, how the hell do you expect to see any changed models, without first pointing it to the correct model?
Code:
#define smPlayer (m_Stride == 44);
#define smHeads (m_Stride == 36);
#define smGuns (m_Stride == 32);
#define Hands (m_Stride == 40 && nNumVertices == 18 && nPrimitiveCount == 11);
#define SpecialistViper {( m_Stride == 40 && nNumVertices == 647 && nPrimitiveCount == 826 ) ;
( m_Stride == 40 && nNumVertices == 82 && nPrimitiveCount == 105 ) ;}
#define SpecialistScorpion {( m_Stride == 40 && nNumVertices == 210 && nPrimitiveCount == 386 ) ;
( m_Stride == 40 && nNumVertices == 295 && nPrimitiveCount == 171 ) ;
( m_Stride == 40 && nNumVertices == 133 && nPrimitiveCount == 162 );
( m_Stride == 40 && nNumVertices == 166 && nPrimitiveCount == 198 );
( m_Stride == 40 && nNumVertices == 203 && nPrimitiveCount == 227 ) ;
( m_Stride == 40 && nNumVertices == 81 && nPrimitiveCount == 72 ) ;
( m_Stride == 40 && nNumVertices == 60 && nPrimitiveCount == 62 ) ;
( m_Stride == 40 && nNumVertices == 10 && nPrimitiveCount == 8 ) ;
( m_Stride == 40 && nNumVertices == 17 && nPrimitiveCount == 10 );}
#define PlayerBody ( smPlayer || smHeads || smGuns || SpecialistViper || SpecialistScorpion );
#define Walls (m_Stride == 24); Have fun. (I logged some of this, but credits are needed, just don't remember where i got it from)
rev0lt is offline
06-18-2010, 07:05 AM
#13
Threadstarter Join Date: Dec 2009
Posts: 68
Reputation: 384 Rep Power: 31
Last Achievements its still not working!
this is what m using now
PHP Code:
if( chams ) { if( m_Stride == 20 || m_Stride == 32 || m_Stride == 36 || m_Stride == 44 || ( m_Stride == 40 && NumVertices == 436 )) { pDevice -> SetTexture ( 0 , Green ); pDevice -> SetRenderState ( D3DRS_ZENABLE , false ); pDevice -> SetRenderState ( D3DRS_FILLMODE , D3DFILL_SOLID ); pDevice -> SetRenderState ( D3DRS_LIGHTING , true ); oDrawIndexedPrimitive ( pDevice , PrimType , BaseVertexIndex , MinVertexIndex , NumVertices , startIndex , primCount ); pDevice -> SetRenderState ( D3DRS_ZENABLE , true ); pDevice -> SetRenderState ( D3DRS_FILLMODE , D3DFILL_SOLID ); pDevice -> SetRenderState ( D3DRS_LIGHTING , true ); pDevice -> SetTexture ( 0 , Red ); } } return oDrawIndexedPrimitive ( pDevice , PrimType , BaseVertexIndex , MinVertexIndex , NumVertices , startIndex , primCount ); }
NOTHING is happening at all.
Does anyone have any other ideas?
acid_buRn is offline
06-18-2010, 07:32 AM
#14 hm...
Join Date: Jun 2008
Posts: 129
Reputation: 4029 Rep Power: 87
Last Achievements is your hooked DrawIndexedPrimitive function even called? try to enable only wallhack and see what happens when you go ingame
Code:
HRESULT WINAPI nDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
Gordon` is offline
06-18-2010, 08:07 AM
#15 Donator
Join Date: Nov 2007
Posts: 1,494
Reputation: 72055 Rep Power: 802
I have never dealt with hackshield but don't they remove your hooks?
__________________
[22:22] monster64: yo dawg i heard u like chams so i put chams in your chams so you can see through shit while you see through shit
[09:07] Tally: grab your ak47 and put on your bomb jacket.... its gonna be a long morning
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
raiders is offline
06-18-2010, 08:13 AM
#16 hm...
Join Date: Jun 2008
Posts: 129
Reputation: 4029 Rep Power: 87
Last Achievements Quote:
Originally Posted by
raiders I have never dealt with hackshield but don't they remove your hooks?
Yes. The first time hackshield restores the hooks without kicking you. If you rehook hackshield will kick you.
Gordon` is offline
06-18-2010, 08:32 AM
#17 A Legend Join Date: Dec 2009
Posts: 255
Reputation: 6698 Rep Power: 97
Last Achievements yes i have an idea
U NEED TO BYPASS HS
frantic is offline
06-18-2010, 09:00 AM
#18 Super Moderator
Join Date: Jan 2008
Location: New Zealand
Posts: 2,550
Reputation: 73932 Rep Power: 840
Or find away about going around it...
__________________
"Those who seek revenge must dig two graves, one for his enemy and another for himself." On the internet I will - in no shape or form - take personal offence to peoples comments, idea's or views, I assume the people who I reply to won't either.
Kiwinz is online now
06-18-2010, 09:38 AM
#19
Threadstarter Join Date: Dec 2009
Posts: 68
Reputation: 384 Rep Power: 31
Last Achievements Well i have just found out, DiP isnt even getting called D:
I added a messagebox to come up when i turn on chams.
No messagebox.
I only tested this in login
Does that mean that HS is removing my hook?
NOTE: Everything else works fine. Menu, Hacks, Crosshair, Border
Its the chams that dont work.
Last edited by acid_buRn; 06-18-2010 at 09:52 AM .
acid_buRn is offline
06-18-2010, 10:36 AM
#20 hm...
Join Date: Jun 2008
Posts: 129
Reputation: 4029 Rep Power: 87
Last Achievements Quote:
Originally Posted by
acid_buRn Well i have just found out, DiP isnt even getting called D:
I added a messagebox to come up when i turn on chams.
No messagebox.
I only tested this in login
Does that mean that HS is removing my hook?
NOTE: Everything else works fine. Menu, Hacks, Crosshair, Border
Its the chams that dont work.
DIP does not get called at the login screen. It gets called ingame or when you go to the "My character" tab where it shows/renders your character.
Gordon` 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 07:09 AM .