Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include "GameClasses.h"
- BOOL bSpeed, bJump, bDistance, bNXChams, bNoFog = false;
- FLOAT fSpeed = 285.00, fHeight = 330.00;
- BOOL RunHack() {
- while (GetModuleHandle("cshell.dll") == NULL) { } // Just wait...
- // Do hacks
- while (true)
- {
- // On/Off Toggle
- if (GetAsyncKeyState(VK_NUMPAD1) & 1)
- {
- bSpeed = !bSpeed;
- }
- else if (GetAsyncKeyState(VK_NUMPAD2) & 1)
- {
- bJump = !bJump;
- }
- else if (GetAsyncKeyState(VK_NUMPAD3) & 1)
- {
- bDistance = !bDistance;
- }
- else if (GetAsyncKeyState(VK_NUMPAD4) & 1) {
- bNXChams = !bNXChams;
- }
- else if (GetAsyncKeyState(VK_NUMPAD5) & 1)
- {
- bNoFog = !bNoFog;
- }
- //Increase/Decrease speed
- if (GetAsyncKeyState(VK_INSERT) & 1)
- {
- fSpeed += 75.0F;
- }
- else if (GetAsyncKeyState(VK_DELETE) & 1)
- {
- if ((fSpeed - 75.0F) >= 285.00)
- {
- fSpeed -= 75.0F;
- }
- }
- //Increase/Decrease Height
- if (GetAsyncKeyState(VK_HOME) & 1)
- {
- fHeight += 75.0F;
- }
- else if (GetAsyncKeyState(VK_END) & 1)
- {
- // Never below 330.00
- if ((fHeight - 75.0F) >= 330.00)
- {
- fHeight -= 75.0F;
- }
- }
- cMoveMGR* pMoveMgr = (cMoveMGR*)0x38355DB8;
- if (pMoveMgr) {
- if (bJump) {
- // Jump Hack
- pMoveMgr->JumpVel = fHeight;
- }
- else {
- pMoveMgr->JumpVel = 330.00F;
- }
- if (bSpeed)
- {
- // Speed Hack
- pMoveMgr->WalkVel = fSpeed;
- pMoveMgr->FRunVel = fSpeed;
- pMoveMgr->BRunVel = fSpeed;
- pMoveMgr->SRunVel = fSpeed;
- pMoveMgr->DuckVel = fSpeed;
- }
- else
- {
- pMoveMgr->WalkVel = 50.00F;
- pMoveMgr->FRunVel = 285.00F;
- pMoveMgr->BRunVel = 285.00F;
- pMoveMgr->SRunVel = 285.00F;
- pMoveMgr->DuckVel = 70.0F;
- }
- if (bDistance)
- {
- //Activation Distance
- pMoveMgr->ActivationDistance = 99999999.0F;
- }
- else {
- pMoveMgr->ActivationDistance = 100.00F;
- }
- }
- if(bNXChams)
- {
- ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("SkelModelStencil", 1.0);
- }
- else {
- ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("SkelModelStencil", 0.0);
- }
- if (bNoFog)
- {
- ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("FogEnable", 0.0);
- }
- else {
- ((void(__cdecl*)(const char* Key, float Value))(0x3745A970))("FogEnable", 1.0);
- }
- }
- return true;
- }
- BOOL WINAPI DllMain(HMODULE MODULE, DWORD Reason, LPVOID Reserved) {
- static HANDLE THREAD;
- switch (Reason)
- {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(MODULE);
- THREAD = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)RunHack,0,0,0);
- break;
- case DLL_PROCESS_DETACH:
- if (THREAD != NULL)
- {
- TerminateThread(THREAD, 0);
- }
- break;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement