jeudi 27 mars 2014

[Coding] how to get this work topic




hello guys i need a bit help to get it working

here is the surce code what is wrong may combat arms only crashes

main.cpp

Code:


#include <Windows.h>
#include "Class.h"

cConsole* pConsole;

#define Console 0x373BB6D0

INT ShowFPS, SpeedHack, SpeedHackx1, FlyHack, bFlyhack, Tracers, Pickup, SuperJump;

void Funçoes()
{
        pConsole = (cConsole*)Console;

if(GetAsyncKeyState(VK_F2) & 1) ShowFPS    = ! ShowFPS;
  if(ShowFPS)
                pConsole->FPS = 1;
        else
                pConsole->FPS = 0;

if(GetAsyncKeyState(VK_F3) & 1) SpeedHack  = ! SpeedHack;
  if(SpeedHack)
        {
                pConsole->BaseMoveAccel = 3000.000f *2;
                pConsole->StartAccel = 500.000f *2;
                pConsole->MaxAccel = 3000.000f *2;
                pConsole->AccelInc = 6000.000f *2;
                pConsole->WalkVel = 70.000f *2;
                pConsole->FRunVel = 285.000f *2;
                pConsole->BRunVel = 285.000f *2;
                pConsole->SRunVel = 285.000f *2;
                pConsole->DuckVel = 50.000f *2;
                SpeedHackx1 = 1;
        } 
        else if(!SpeedHack && SpeedHackx1){
                pConsole->BaseMoveAccel = 3000.000f;
                pConsole->StartAccel = 500.000f;
                pConsole->MaxAccel = 3000.000f;
                pConsole->AccelInc = 6000.000f;
                pConsole->WalkVel = 70.000f;
                pConsole->FRunVel = 285.000f;
                pConsole->BRunVel = 285.000f;
                pConsole->SRunVel = 285.000f;
                pConsole->DuckVel = 50.000f;
                SpeedHackx1 = 0;
        }

if(GetAsyncKeyState(VK_F4) & 1) FlyHack    = ! FlyHack;
        if(FlyHack){
                if(GetAsyncKeyState(VK_SPACE)){
                                if(bFlyhack == false){
                                        pConsole->PlayerGravity = 800;
                                        bFlyhack = true;}
                        }else{
                                if(bFlyhack == true){
                                        pConsole->PlayerGravity = -800;
                                        bFlyhack = false;
                                }
                        }
        }

if(GetAsyncKeyState(VK_F5) & 1) Tracers    = ! Tracers;
  if(Tracers)
                pConsole->ShowFirePath = 1;
        else
                pConsole->ShowFirePath = 0;

if(GetAsyncKeyState(VK_F6) & 1) Pickup    = ! Pickup;
    if(Pickup)
                pConsole->ActivationDistance = 99999;
        else
                pConsole->ActivationDistance = 100;

if(GetAsyncKeyState(VK_F7) & 1) SuperJump  = ! SuperJump;
    if(SuperJump)
                pConsole->JumpVel = 600;
        else
                pConsole->JumpVel = 300;
}

void dwHook (void)
{
        while(true) {
        DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");

 if(CShell)
          {
                Funçoes();
          }
        }
}

INT WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
        DisableThreadLibraryCalls(hModule);

        if(dwReason == DLL_PROCESS_ATTACH)
        {
      CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)dwHook,NULL,NULL,NULL);
        }
        return TRUE;
}


Class.h

Code:


class cConsole;

class cConsole
{
public:
char Unknown0[4];
        float FPS; //0x0004
char Unknown8[4400];
        float PlayerGravity; //0x1138
char Unknown113C[824];
        float BaseMoveAccel; //0x1474
char Unknown1478[32];
        float StartAccel; //0x1498
char Unknown149C[32];
        float MaxAccel; //0x14BC
char Unknown14C0[32];
        float AccelInc; //0x14E0
char Unknown14E4[32];
        float WalkVel; //0x1504
char Unknown1508[32];
        float FRunVel; //0x1528
char Unknown152C[32];
        float BRunVel; //0x154C
char Unknown1550[32];
        float SRunVel; //0x1570
char Unknown1574[32];
        float JumpVel; //0x1594
char Unknown1598[32];
        float DuckVel; //0x15B8
char Unknown15BC[30440];
        float ActivationDistance; //0x8CA4
char Unknown8CA8[2684];
        DWORD ShowFirePath; //0x9724
char Unknown9728[280];
};


thank you for help





Aucun commentaire:

Enregistrer un commentaire