Author Topic: some questions find help,please come MrMedic  (Read 701 times)

0 Members and 1 Guest are viewing this topic.

bysnoby

  • Cheater Apprentice
  • *
  • Posts: 18
    • View Profile
some questions find help,please come MrMedic
« on: June 02, 2015, 11:06:50 am »
i have a wallhack ,it workd well but chams dosen't work . and this wallhack seems very crappy :icon_biggrin2.i want to know how to distinguish what model is a player and what's the others?

i try to find this ,but I failed. so does anyone can give me a way to do it. my idea may be wrong ,because I 've been looking for rendering differences between the characters and scenes.

Code: [Select]
HRESULT WINAPI HkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 m_Device, D3DPRIMITIVETYPE type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
HRESULT result = S_OK;
IDirect3DVertexBuffer9* pStreamData = NULL;
UINT  iOffsetInBytes,iStride;
if (m_Device->GetStreamSource(0, &pStreamData, &iOffsetInBytes, &iStride) == D3D_OK)
pStreamData->Release();

if (ModleConfirm == TRUE)
{
m_Device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
return Orginal_DrawIndexedPrimitive(m_Device, type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    return result;
}


ULONG_PTR GetDrawIndexedPrimitiveaddss()
{
HANDLE Is_hwnd = GetModuleHandle(L"d3d9.dll");
if (Is_hwnd != INVALID_HANDLE_VALUE)
return NULL;
return (ULONG_PTR)Is_hwnd + 0x27651;  // just windows server 2008
}

bool HookDrawIndexedPrimitive()
{
ULONG_PTR addss = GetDrawIndexedPrimitiveaddss();
jmpback = addss + 5;
DWORD odProtect = 0;
if (VirtualProtect((LPVOID)address, 5, PAGE_EXECUTE_READWRITE, &odProtect))
{
DWORD value = (DWORD)HkDrawIndexedPrimitive - addss - 5;
_asm
{
mov eax, addss
mov byte ptr[eax], 0xe9
add eax, 1
mov ebx, value
mov dword ptr[eax], ebx
}
VirtualProtect((LPVOID)addss, 5, odProtect, &odProtect);
}
return true;


this is part of my code , it can work in windows 2008 , bool ModleConfirm  is used to identify the player model ,so can you help me how to do it . thank you :icon_rolleyes2

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: some questions find help,please come MrMedic
« Reply #1 on: June 02, 2015, 11:31:03 pm »
set some kind of check sum on the models , a good fast way is read a few bytes out of the texture after you lock it and multiply it by the prim so it makes a unique value then you can pick out different textures at will.

or use prims on their own or take it off the stack ..etc etc etc its basically what method you prefare

what i do is usualy grab a few bytes from the actual texture somewhere in the first block , it usually gives you a very good way of distinguishing against other textures and you can cham , skin , color whatever one you want..

most new game programmers have become lazy and draw all active models ie players bullets guns in the same stride and tell the engine to distinguish , so strides in the latest games are a bit useless as a way in general but basically its entirely up to you which method you chose , you could use shaders as well if your card supports it but them who's cards dont it wont work for.
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

bysnoby

  • Cheater Apprentice
  • *
  • Posts: 18
    • View Profile
Re: some questions find help,please come MrMedic
« Reply #2 on: June 03, 2015, 06:41:01 am »
thank you Mrmedic,I 'll try to do it as you say,yeah,in my code,"Setexture" can't work! but i switched to a shader,it's workd,BUT...........it has become very slow.each frame is very slow,only I create a new shader,it became good. :icon_biggrin2thank you for your help ,Mrmedic :icon_thumbsup