My code dont work

Posts 1–12 of 12 · Page 1 of 1
My code dont work
im trying to make my first hack, but i cant '-'
no error occurs, but in the game is like im without hack ._.

Code:
#include <Windows.h>
#define WeaponMgr 0xAB2940
#define NoReload 0x26C4
#define NoRecoil1 0x53C
#define NoRecoil2 0x6A4
#define NoRecoil3 0x1958
#define NoRecoil4 0x1964
#define NoRecoil5 0x1FC0
#define NoRecoil6 0x2128
#define NoRecoil7 0x2290

void lol()
{
unsigned long CShell = (unsigned long)GetModuleHandleA("CShell.dll");
unsigned long pWeaponMgr = *(unsigned long*)(CShell+WeaponMgr);

if(NoReload)
{
      if (pWeaponMgr)
                       {
                         for(int i=0; i<560; i++)
                                                  {
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload) = 100;
						 }
	  }
}

	if(pWeaponMgr)
	{
		for(int y=0; y<9; y++)
		{
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil1) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil2) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil3) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil4) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil5) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil6) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil7) = 0.0f;
		}
	}
}

int gsc()
{
lol();
return true;
}

void _stdcall DllMain(HMODULE hDll, unsigned long dwReason, LPVOID lpReserved)
{
	if (dwReason == 1)
	{
	gsc();
	}
	if (dwReason == 0)
	{
	}
}
if anyone can help me, i will thank
should work if yo inject before join room and after login
learn coding? stop leeching!
Quote Originally Posted by Code[VB] View Post
learn coding? stop leeching!
yea i agree..u people need to learn..we can't just spoonfeed everytime..try to learn from the codes people give out..there are tons of tuts on this section..u just need to look..
1. Learn C++
2. look at an example base
3. Figure out how it works.
4. make ur own base.
@twixxxx
It wasn't incorrect.
The WeaponMgr is built like this :
struct Weapon
{
BYTE Unknown[Length of Unknown area];
float ReloadSpeed;
//Something
};
struct WeaponMgr
{
Weapon *Weapons[900];
//Something
}
* WeaponPointer;

So *(DWORD*)(CShell+WeaponMgr) reads the Pointer to an instance from WeaponMgr from WeaponPointer,
*(DWORD*)(... +(4*y)) reads from the Pointer to the current Weapon
and
*(float*)(... + NoRecoil1) = 0.0f; writes the float 0.0f into ReloadSpeed from the current Weapon

@ Thread : If you use a new weapon, the reason could be that you don't activate the Hack for the weapon you are using because the weapon id of the newest weapopn is bigger than 600
why u need these?
Code:
void lol(){
//whatever
}

int gsc(){
//whatever
return true;
}

void _stdcall DllMain(HMODULE hDll, unsigned long dwReason, LPVOID lpReserved){
//whatever
}
Just do it once:
Code:
int lolgsc(void){ 
//whatever
return 0; 
}

void _stdcall DllMain(HMODULE hDll, unsigned long dwReason, LPVOID lpReserved){
//whatever
return 1;
}
Its To Hack...
Quote Originally Posted by GunBoy120 View Post
im trying to make my first hack, but i cant '-'
no error occurs, but in the game is like im without hack ._.

Code:
#include <Windows.h>
#define WeaponMgr 0xAB2940
#define NoReload 0x26C4
#define NoRecoil1 0x53C
#define NoRecoil2 0x6A4
#define NoRecoil3 0x1958
#define NoRecoil4 0x1964
#define NoRecoil5 0x1FC0
#define NoRecoil6 0x2128
#define NoRecoil7 0x2290

void lol()
{
unsigned long CShell = (unsigned long)GetModuleHandleA("CShell.dll");
unsigned long pWeaponMgr = *(unsigned long*)(CShell+WeaponMgr);

if(NoReload)
{
      if (pWeaponMgr)
                       {
                         for(int i=0; i<560; i++)
                                                  {
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload) = 100;
						 }
	  }
}

	if(pWeaponMgr)
	{
		for(int y=0; y<9; y++)
		{
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil1) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil2) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil3) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil4) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil5) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil6) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil7) = 0.0f;
		}
	}
}

int gsc()
{
lol();
return true;
}

void _stdcall DllMain(HMODULE hDll, unsigned long dwReason, LPVOID lpReserved)
{
	if (dwReason == 1)
	{
	gsc();
	}
	if (dwReason == 0)
	{
	}
}
if anyone can help me, i will thank
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil1) = 0.0f; is the problem

you don't need double DWORD with pointers lol

*(float*)((((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil1) = 0.0f; should be your code

---------- Post added at 01:47 AM ---------- Previous post was at 01:28 AM ----------

Quote Originally Posted by GunBoy120 View Post
im trying to make my first hack, but i cant '-'
no error occurs, but in the game is like im without hack ._.

Code:
#include <Windows.h>
#define WeaponMgr 0xAB2940
#define NoReload 0x26C4
#define NoRecoil1 0x53C
#define NoRecoil2 0x6A4
#define NoRecoil3 0x1958
#define NoRecoil4 0x1964
#define NoRecoil5 0x1FC0
#define NoRecoil6 0x2128
#define NoRecoil7 0x2290

void lol()
{
unsigned long CShell = (unsigned long)GetModuleHandleA("CShell.dll");
unsigned long pWeaponMgr = *(unsigned long*)(CShell+WeaponMgr);

if(NoReload)
{
      if (pWeaponMgr)
                       {
                         for(int i=0; i<560; i++)
                                                  {
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload) = 100;
						 }
	  }
}

	if(pWeaponMgr)
	{
		for(int y=0; y<9; y++)
		{
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil1) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil2) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil3) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil4) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil5) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil6) = 0.0f;
 *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + NoRecoil7) = 0.0f;
		}
	}
}

int gsc()
{
lol();
return true;
}

void _stdcall DllMain(HMODULE hDll, unsigned long dwReason, LPVOID lpReserved)
{
	if (dwReason == 1)
	{
	gsc();
	}
	if (dwReason == 0)
	{
	}
}
if anyone can help me, i will thank
well first of all your loop is wrong the outer one the new weapon log is up to 637

I am trying yours out and comparing with mine, but I think that main is patched
Do not use any of this code that is put on forums because it is probably detected...take the code that people put out and make your own...it will not take long before you know what your doing. Just keep trying.
#define NoReload ...//whatever
Code:
if(NoReload) 
{
//code
}
you took the defined NoReload' for making the if code
make it a "bool"
like

Code:
#define NoReload /*addie here*/

bool reload == true; 

if(reload) //if the bool reload is true (we turned it true) then the code works. So it need to work now.
{
//code here
}
Hope this will work, Maybe I'm totally wrong, but i don't find other wrong things.
Otherwise just make ur ID bigger then 600 (maybe u use a weapon bigger then ID 600)

If u dont use this, then just leave the full if(reload) { .. } <= leave this
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us