Americas Army 2:How To Get CRC32 Values

From UnKnoWnCheaTs Game Hacking Wiki
Jump to: navigation, search

By: darkzangel


INTRODUCTION

You have some problem to find Crc32 value ? So read this thread, it should help you. First of all, you need to build your hack in TESTMODE (also, it could be a good idea to remove all the fprintf by putting "//" before because it make very very very big log file if you let them there [ about 200 mb / min depend on version of your hack ] ). Build it to make sure that they are no error in. At Next, it could be a great idea to add some code that I MADE to your hack.

The images that I have include in this post is very big, so just wait if you don't see them (about 100 kb / image).

PS : I remove also many others thing in test mode, so, if you see more information that me, you just have to search it in your hack and remove it or put "//" before, you can also use this "/* .... */" if you dont want to see them.

Ex.:

#ifdef TESTMODE
info_box_t NewBox;
NewBox.x = 10;
NewBox.y = 100;
NewBox.color = 0xFFFFFF00;
 
sprintf(NewBox.text, "iActive : %i\n", GameInfo.m_iActive);
sprintf(NewBox.text, "%sWeapon : %s\n", NewBox.text, GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].m_Name);
sprintf(NewBox.text, "%sAltWeapon: %s\n", NewBox.text, GameInfo.m_WeaponsList[GameInfo.m_StatusAltWeapon].m_Name);
sprintf(NewBox.text, "%sMouse : %4i %4i\n", NewBox.text, GameInfo.m_MousePositionX, GameInfo.m_MousePositionY);
sprintf(NewBox.text, "%sFireMode : %i\n", NewBox.text, GameInfo.m_StatusFireMode);
sprintf(NewBox.text, "%sMovement : %i\n", NewBox.text, GameInfo.m_StatusMovement);
sprintf(NewBox.text, "%sReloadC : %i\n", NewBox.text, GameInfo.m_ReloadTryCount);
sprintf(NewBox.text, "%sStepCount: %i\n", NewBox.text, GameInfo.m_TestCounter);
sprintf(NewBox.text, "%sMPDX  : %f\n", NewBox.text, GameInfo.m_MousePerDegreeX);
sprintf(NewBox.text, "%sMPDY  : %f\n", NewBox.text, GameInfo.m_MousePerDegreeY);
GameInfo.m_InfoBoxList.push_back(NewBox);
//DrawMatrix(10, 280, &GameInfo.m_Projection);
 
NewBox.color = 0xFFFFFF00;
GameInfo.m_InfoBoxList.push_back(NewBox);
//DrawMatrix(10, 280, &GameInfo.m_Projection);
#endif

Will become :

#ifdef TESTMODE
info_box_t NewBox;/*
NewBox.x = 10;
NewBox.y = 100;
NewBox.color = 0xFFFFFF00;
 
sprintf(NewBox.text, "iActive : %i\n", GameInfo.m_iActive);/*
sprintf(NewBox.text, "%sWeapon : %s\n", NewBox.text, GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].m_Name);
sprintf(NewBox.text, "%sAltWeapon: %s\n", NewBox.text, GameInfo.m_WeaponsList[GameInfo.m_StatusAltWeapon].m_Name);
sprintf(NewBox.text, "%sMouse : %4i %4i\n", NewBox.text, GameInfo.m_MousePositionX, GameInfo.m_MousePositionY);
sprintf(NewBox.text, "%sFireMode : %i\n", NewBox.text, GameInfo.m_StatusFireMode);
sprintf(NewBox.text, "%sMovement : %i\n", NewBox.text, GameInfo.m_StatusMovement);
sprintf(NewBox.text, "%sReloadC : %i\n", NewBox.text, GameInfo.m_ReloadTryCount);
sprintf(NewBox.text, "%sStepCount: %i\n", NewBox.text, GameInfo.m_TestCounter);
sprintf(NewBox.text, "%sMPDX  : %f\n", NewBox.text, GameInfo.m_MousePerDegreeX);
sprintf(NewBox.text, "%sMPDY  : %f\n", NewBox.text, GameInfo.m_MousePerDegreeY);
GameInfo.m_InfoBoxList.push_back(NewBox);*/
//DrawMatrix(10, 280, &GameInfo.m_Projection);
 
sprintf(NewBox.text, "-= TESTMODE ACTIVATED =-"); // BONUS CODE
if (GameInfo.m_StatusInMenu && GameInfo.m_StatusInMenu) // BONUS CODE
{ // BONUS CODE
    NewBox.x = (float)GameInfo.m_CurrentViewport.Width - strlen(NewBox.text)*10 - 20; // BONUS CODE
    NewBox.y = 10; // BONUS CODE
} // BONUS CODE
else // BONUS CODE
{
    NewBox.x = (float)GameInfo.m_CurrentViewport.Width / 2 - strlen(NewBox.text)*5; // BONUS CODE
    NewBox.y = 10; // BONUS CODE
} // BONUS CODE
NewBox.color = 0xFFFFFF00;
GameInfo.m_InfoBoxList.push_back(NewBox);
//DrawMatrix(10, 280, &GameInfo.m_Projection);
#endif

THIS IS BEING RELEASED DUE TO THE POOR PROVISIONS OF BLOCKING PRIVATE MATERIAL AT LOCAL WEBSITES. THE REASON IT'S BEING RELEASED IS TO GIVE CREDIT WHERE CREDIT IS DUE.

CREDIT FOR THIS RELEASE GOES TO ME AND EVILBERT FOR HIS EVILHACK.

I WROTE ALL INSTRUCTIONS UP AND ALL PICTURE ARE ORIGINALLY DONE BY ME.


STEP 1 : SOME CODE TO ADD TO YOUR HACK

Code to add to your hack :

In the file NewIDirect3DDevice8.cpp :

Search this :

  if (m_pCurrentTexture->m_Crc32 == 0x6FB53D29)
  {
   if (GameInfo.m_Settings.m_bNVNoGreen)
 return D3D_OK;
  }

#ifdef TESTMODE

Replace all thing in #ifdef TESTMODE by this one :

#ifdef TESTMODE
  if (GameInfo.m_iActive > 0)
  {
   info_box_t NewBox;
   NewBox.color = 0xFFFF0000;
   NewBox.x = 10;
   NewBox.y = 360;
   sprintf(NewBox.text, "iActive  : %i", GameInfo.m_iActive);
   GameInfo.m_InfoBoxList.push_back(NewBox);
  }
  if (GetAsyncKeyState(VK_NUMPAD6)) // Drop Grapped Texture
   GameInfo.m_LockOnTextureAmbient = 0x0;

  if (GameInfo.m_iHUD == GameInfo.m_iActive)
  {
   if (GetAsyncKeyState(VK_NUMPAD3)) // Grap Texture
 GameInfo.m_LockOnTextureAmbient =  m_pCurrentTexture->m_Crc32;
//   fprintf(GameInfo.m_pLogFile, "DrawPrimitive Selected | m_iHUD: %i m_pCurrentTexture: 0x%X Crc32: 0x%X Ambient: 0x%X\n", GameInfo.m_iHUD, m_pCurrentTexture, m_pCurrentTexture->m_Crc32, GameInfo.m_D3DRSAmbient);
   info_box_t NewBox;
   NewBox.color = 0xFFFF0000;
   NewBox.x = 10;
   NewBox.y = 360;
   sprintf(NewBox.text, "\nIndexed hTexture: 0x%X Crc32: 0x%X Ambient: 0x%X\nPrimitiveType  : %d\nStartVertex : %d\nPrimitiveCount : %d", m_pCurrentTexture, m_pCurrentTexture->m_Crc32, GameInfo.m_D3DRSAmbient, PrimitiveType, StartVertex, PrimitiveCount);
   //PrimitiveType, StartVertex
   GameInfo.m_InfoBoxList.push_back(NewBox);
   
   DWORD curState;
   GetRenderState(D3DRS_FILLMODE, &curState);
   SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
   Result = pD3DDevice8->DrawPrimitive(PrimitiveType, StartVertex, PrimitiveCount);
   SetRenderState(D3DRS_FILLMODE, curState);
   return Result;
  }
  else
#endif

Search this :

 HRESULT Result;
 if (GameInfo.m_bMasterSwitch)
 {
#ifdef TESTMODE

Replace all thing in #ifdef TESTMODE by this one :

#ifdef TESTMODE
  // LockOn Texture
  if (GameInfo.m_LockOnTexture != 0x0)
  {
   // Show information about the LockOnTexture :
   // m_pCurrentTexture->m_Crc32
   info_box_t NewBox;
   NewBox.color = 0xFFFF0000;
   NewBox.x = 10;
   NewBox.y = 50;
   sprintf(NewBox.text, "LockOn Texture : 0x%X", GameInfo.m_LockOnTexture);
   GameInfo.m_InfoBoxList.push_back(NewBox);
  }

  if (m_pCurrentTexture->m_Crc32 == GameInfo.m_LockOnTexture && GameInfo.m_LockOnTexture != 0x0)
  {
   DWORD curState;
   GetRenderState(D3DRS_FILLMODE, &curState);
   SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
   Result = pD3DDevice8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
   SetRenderState(D3DRS_FILLMODE, curState);
   return Result;
  }
  if (GameInfo.m_LockOnTexture2.min != 0 &&
   GameInfo.m_LockOnTexture2.num != 0 &&
   GameInfo.m_LockOnTexture2.count != 0)
  {
   // Show information about the LockOnTexture :
   // MinIndex, NumVertices, StartIndex, PrimitiveCount
   info_box_t NewBox;
   NewBox.color = 0xFFFF0000;
   NewBox.x = 10;
   NewBox.y = 50;
   sprintf(NewBox.text, "\nMinIndex    : %d\nNumVertices : %d\nStartIndex  : %d\nPrimitiveCount : %d", GameInfo.m_LockOnTexture2.min, GameInfo.m_LockOnTexture2.num, StartIndex, GameInfo.m_LockOnTexture2.count);
   GameInfo.m_InfoBoxList.push_back(NewBox);
  }
  if (GameInfo.m_LockOnTexture2.min == MinIndex &&
   GameInfo.m_LockOnTexture2.num == NumVertices &&
   GameInfo.m_LockOnTexture2.count == PrimitiveCount)
  {
   DWORD curState;
   GetRenderState(D3DRS_FILLMODE, &curState);
   SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
   Result = pD3DDevice8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
   SetRenderState(D3DRS_FILLMODE, curState);
   return Result;
  }
  if (GetAsyncKeyState(VK_NUMPAD4)) // Drop LockOn Texture
   GameInfo.m_LockOnTexture = 0x0;
  if (GetAsyncKeyState(VK_NUMPAD5)) // Drop LockOn Texture
  {
   GameInfo.m_LockOnTexture2.min = 0;
   GameInfo.m_LockOnTexture2.num = 0;
   GameInfo.m_LockOnTexture2.count = 0;
  }

  if (GameInfo.m_iObject == GameInfo.m_iActive)
  {
   if (GetAsyncKeyState(VK_NUMPAD1)) // LockOn Texture
 GameInfo.m_LockOnTexture = m_pCurrentTexture->m_Crc32;
   if (GetAsyncKeyState(VK_NUMPAD2)) // LockOn Texture
   {
 GameInfo.m_LockOnTexture2.min = MinIndex;
 GameInfo.m_LockOnTexture2.num = NumVertices;
 GameInfo.m_LockOnTexture2.count = PrimitiveCount;
   }
   info_box_t NewBox;
   NewBox.color = 0xFFFF0000;
   NewBox.x = 10;
   NewBox.y = 450;
   sprintf(NewBox.text, "\nIndexed hTexture: 0x%X Crc32: 0x%X Ambient: 0x%X\nMinIndex    : %d\nNumVertices : %d\nStartIndex  : %d\nPrimitiveCount : %d", m_pCurrentTexture, m_pCurrentTexture->m_Crc32, GameInfo.m_D3DRSAmbient, MinIndex, NumVertices, StartIndex, PrimitiveCount);
   GameInfo.m_InfoBoxList.push_back(NewBox);
   DWORD curState;
   GetRenderState(D3DRS_FILLMODE, &curState);
   SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
   Result = pD3DDevice8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
   SetRenderState(D3DRS_FILLMODE, curState);
   //fprintf(GameInfo.m_pLogFile, "*IndexedPrimitive: MinIndex %i NumVertices %i StartIndex %i PrimitiveCount %i Stride %i\n", MinIndex, NumVertices, StartIndex, PrimitiveCount, m_Stride);
   return Result;
  }
  //fprintf(GameInfo.m_pLogFile, "IndexedPrimitive: MinIndex %i NumVertices %i StartIndex %i PrimitiveCount %i\n", MinIndex, NumVertices, StartIndex, PrimitiveCount);
#endif

In the file GameInfo.h :

Search this :

 int m_iHUD;

#ifdef TESTMODE

Add this just after the line #ifdef TESTMODE :

 DWORD m_LockOnTexture;
 object_t m_LockOnTexture2;

In the file evilhack.cpp :

Search this :

 if (lpMsg->message == WM_KEYDOWN && lpMsg->wParam == VK_END && GameInfo.m_iActive > 0)
  GameInfo.m_iActive--;

And add this :

 if (GetAsyncKeyState(VK_NUMPAD7))
  GameInfo.m_iActive = 0;

That's all for the part 1, just hope that i dont forget anything. Just make build to make sure you have not make any error and past at step 2.

STEP 2 : HOW TO FIND CRC32 VALUE

To show how find this, i will use an exemple.

Exemple 1 ( there are no exemple 2, so dont search it ) :

Situation : We want to remove this van in assault team on sfarctic map :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image1.jpg


First of all, you need to know this :

|-> To increase iActive, use the key "Home"
|-> To decrease iActive, use the key "End"
|-> To reset iActive, use the key "Numpad7"
|-> To lock on a Crc32 texture use "Numpad1"
|-> To lock on a MNSP (MinIndex-NumVertices-StartIndex-PrimitiveCount) Object use "Numpad2"
|-> To drop the lock on a texture, use "Numpad4" for crc32 texture and "Numpad5" for object

Take a look at this screenshot :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image2.jpg

You can see three squares. The first square content iActive and in the second one, it show Primitive. When iActive is equal at GameInfo.m_iHUD, the information about Primitive is show. In the last square, the content is IndexedPrimitive. When iActive is egal at GameInfo.m_iObject, the information about IndexedPrimitive is show.

For the moment the only information that we will use is the Crc32 value of IndexedPrimitive.

Take a look at this second screenshot :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image3.jpg

You can see that for a same iActive, you can have information for Primitive and for IndexedPrimitive. In this screenshot, you can see the difference between Primitive and IndexedPrimitive. Primitive is for object that is NOT moving in your screen and dont make part of the 3d world like your health, your weapon status, etc.. (we can tell that is for 2d object only). IndexedPrimitive is for object that make part of the 3d world like players, tree, etc..

Well the code have been added, the action can now start. Use the key "Home" and "End" to get the same wireframed object that show on this screenshot (PS : the iActive should not be the same, but it can be) :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image4.jpg

|
|->Your first Crc32 value : 0x48e78069  !!!!

Do the same thing for the others screen shot :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image5.jpg

|
|->Crc32 value : 0x5baae82c

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image6.jpg

|
|->Crc32 value : 0x48e78069 (yes, it's true. It's the same thing that last last one)

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image7.jpg

|
|->Crc32 value : 0xfd171e32

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image8.jpg

|
|->Crc32 value : 0xa2c44d76

Here is the first problem that we get because if we use the crc32 value, we will get something like that (just press Numpad1 and after press Numpad7 to get the same thing) :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image8a.jpg

You can see that the snow on the mountain is also wireframed, so we can't use crc32 value. Lets take a look a others value that it give :

 MinIndex : 213
 NumVertices : 213
 StartIndex : 783 (rarely used)
 PrimitiveCount : 261

The value of StartIndex is useless, so we forget this value. Now press Numpad4 and search again with "Home" and "End" key to get the snow on the van fireframed. When you get it, press Numpad2 and just after press Numpad7 :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image8b.jpg

It's working !!! Only the snow on the van is wireframed.

 MinIndex : 213
 NumVertices : 213
 PrimitiveCount : 261

Ok, so continue with this one :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image9.jpg

|
|->Crc32 value : 0x277dee26

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image10.jpg

|
|->Crc32 value : 0x277dee26 (It's again the same thing that the last one)

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image11.jpg

|
|->Crc32 value : 0x277dee26 (It's again the same thing that the last one)

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image12.jpg

|
|->Crc32 value : 0x10c804b9


I think that i got them all.

STEP 3 : TIME TO ADD YOUR FOUND TO YOUR HACK

What we got :

Crc32 value : {0x48e78069, 0x5baae82c, 0xfd171e32, 0x277dee26, 0x10c804b9} MNSP value : Template:MinIndex = 213, NumVertices = 213, PrimitiveCount = 261

Now go in the source of your evilhack and search this in the file NewIDirect3DDevice8.cpp :

if (GameInfo.m_Settings.m_bNoBlackouts)
  {

And add our new code :

   if (m_pCurrentTexture->m_Crc32 == 0x48e78069 ||
 m_pCurrentTexture->m_Crc32 == 0x5baae82c ||
 m_pCurrentTexture->m_Crc32 == 0xfd171e32 ||
 m_pCurrentTexture->m_Crc32 == 0x277dee26 ||
 m_pCurrentTexture->m_Crc32 == 0x10c804b9 ||
 (MinIndex == 213 &&
 NumVertices == 213 &&
 PrimitiveCount == 261))
 return D3D_OK; // D3D_OK = 0 // We want to remove it, so we make a return.

Go try it !!!!!!!!!!

You should get the same thing that is on this screenshot, no more van

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image13.jpg

Now take a look at others vans :

http://members.lycos.co.uk/darkzangel/tutorial_crc32/crc32_image14.jpg

They are also gone!! But the snow is still on. To remove it on all vans, just replace with this :

(MinIndex == 213 && NumVertices == 213 && PrimitiveCount == 261)

By this :

(NumVertices == 213 && PrimitiveCount == 261)

Now try to use only MNSP value, you will see that only one van is gone (there are some exceptions here, some part of other van is exacly the same and have also the same texture. Just remember that Crc32 is for texture and MNSP is for object so it's possible to see two object that are the same and have also the same texture).

if ((MinIndex == 4078 &&
 NumVertices == 4078 &&
 StartIndex == 8223 &&
 PrimitiveCount == 2741) ||
 (MinIndex == 2340 &&
 NumVertices == 260 &&
 PrimitiveCount == 216) ||
 (MinIndex == 10710 &&
 NumVertices == 1190 &&
 PrimitiveCount == 62) ||
 (MinIndex == 4806 &&
 NumVertices == 534 &&
 PrimitiveCount == 648) ||
 (MinIndex == 213 &&
 NumVertices == 213 &&
 PrimitiveCount == 261) ||
 (MinIndex == 0 &&
 NumVertices == 9 &&
 PrimitiveCount == 7) ||
 (MinIndex == 0 &&
 NumVertices == 11 &&
 PrimitiveCount == 9) ||
 (MinIndex == 0 &&
 NumVertices == 28 &&
 PrimitiveCount == 24) ||
 (MinIndex == 1926 &&
 NumVertices == 1926 &&
 PrimitiveCount == 668))
 return D3D_OK; // D3D_OK = 0

End of Tutorial !! Well I thing that it was time to finish it.


made by darkzangel

Update:

To help you to find large range of crc value, I put here my old screenshot system . It log an entire scene with a pointer on the iActive value.

This will allow you to take a new type of screen shot. It will log a complete Scene. Use the key NUMPAD_MINUS or NUMPAD_PLUS to take a 2th generation screen shot. ;-) I suggest you to remove every other fprintf by putting "//" before each one before use this one. If the file evilhack.cpp Search this :

    else if (lpMsg->message == WM_LBUTTONUP && ExtraInfo != AUTOFIRE && GameInfo.m_StatusWeapon < NADE_START )
    {
        KillTimer(NULL, pTimer);
        pTimer = NULL;
    }
    break;
}

Add this after :

#ifdef TESTMODE
    if (lpMsg->message == WM_KEYDOWN && lpMsg->wParam == VK_ADD)
        GameInfo.AskDirectXVectorShotDrawIndexedPrimitive = true;
    if (lpMsg->message == WM_KEYDOWN && lpMsg->wParam == VK_SUBTRACT)
        GameInfo.AskDirectXVectorShotDrawPrimitive = true;
#endif

In the file GameInfo.cpp Search this :

void CGameInfo::OnBeginScene()
{

Add this after

#ifdef TESTMODE
    if (DirectXVectorShotDrawIndexedPrimitive) DirectXVectorShotDrawIndexedPrimitive = false;
    if (AskDirectXVectorShotDrawIndexedPrimitive)
    {
        AskDirectXVectorShotDrawIndexedPrimitive = !AskDirectXVectorShotDrawIndexedPrimitive;
        DirectXVectorShotDrawIndexedPrimitive = true;
    }
    if (DirectXVectorShotDrawPrimitive) DirectXVectorShotDrawPrimitive = false;
    if (AskDirectXVectorShotDrawPrimitive)
    {
        AskDirectXVectorShotDrawPrimitive = !AskDirectXVectorShotDrawPrimitive;
        DirectXVectorShotDrawPrimitive = true;
    }
#endif

In the file GameInfo.h Search this :

class CGameInfo
{
    public:
    CEvilSettings m_Settings;

Add this after :

#ifdef TESTMODE
    bool DirectXVectorShotDrawIndexedPrimitive;
    bool AskDirectXVectorShotDrawIndexedPrimitive;
    bool DirectXVectorShotDrawPrimitive;
    bool AskDirectXVectorShotDrawPrimitive;
#endif

In the file NewIDirect3DDevice8.cpp Search this :

HRESULT __stdcall NewIDirect3DDevice8:rawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount)
{
    GameInfo.m_iHUD++;
    HRESULT Result;

Add this after :

#ifdef TESTMODE
    // 2th generation screen shot method 
    if (GameInfo.DirectXVectorShotDrawPrimitive)
    fprintf(GameInfo.m_pLogFile, "%sGameInfo.m_iHUD : %i Indexed hTexture: 0x%0.8x Crc32: 0x%0.8x Ambient: 0x%0.8x PrimitiveType : %d StartVertex : %d PrimitiveCount : %d\n", (GameInfo.m_iHUD == GameInfo.m_iActive)?"**":"", GameInfo.m_iHUD, m_pCurrentTexture, m_pCurrentTexture->m_Crc32, GameInfo.m_D3DRSAmbient, PrimitiveType, StartVertex, PrimitiveCount);
#endif

Search this :

HRESULT __stdcall NewIDirect3DDevice8:rawIndexedPrimitive(D3DPRIMITIVETYPE Type, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
    static DWORD m_LastOTexCrc = 0; //For checking that we don't save two entries for the same weapon
    static DWORD m_LastOTexCrc2 = 0; 
    static bool InOwnHands = false; //for making sure we dont enter our own weapons to somebody elses weaponslist
    GameInfo.m_iObject++;
    HRESULT Result;

Add this after :

#ifdef TESTMODE
    // 2th generation screen shot method
    if (GameInfo.DirectXVectorShotDrawIndexedPrimitive)
    fprintf(GameInfo.m_pLogFile, "%sGameInfo.m_iObject: %i Crc32 : 0x%0.8x IndexedPrimitive: MinIndex %i NumVertices %i StartIndex %i PrimitiveCount %i Stride %i\n", (GameInfo.m_iObject == GameInfo.m_iActive)?"**":"", GameInfo.m_iObject, m_pCurrentTexture->m_Crc32, MinIndex, NumVertices, StartIndex, PrimitiveCount, m_Stride);
#endif


Source: http://www.unknowncheats.me/forum/2-x-coding-and-tutorials/25104-tutorial-get-crc32-values.html