QuestionWhere is wrong? :(

Posts 1–10 of 10 · Page 1 of 1
Where is wrong? :(
Hello MPGH ,

I'm here to see the mistakes that I do in C++ !

Where it isn't good, please draw my attention!

Open:

Microsoft Visual C++ 2010 Express -> New Project... -> Win32 Project -> Project Name -> Next> -> Select DLL -> Finish -> Put any code before "// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h""

Example:

Link: http://www.mpgh.net/forum/580-crossf...-wallhack.html (By @darlwis , and I put the link to not think that stealing!)

Example (With @darlwis code):

Code:
// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#define NoRecoil1 0x051C
#define NoRecoil2 0x0684
#define NoRecoil3 0x1934
#define NoRecoil4 0x1B18
#define NoRecoil5 0x1FA0
#define NoRecoil6 0x2108
#define NoRecoil7 0x2270
#define NoReload 0x26A4
#define WeaponMgr 0xAB7270
#define SeeGhost1 0x88
#define SeeGhost2 0x90
#define SeeGhost3 0x8C

memcpy((VOID*)0x6CD5D4, "\x00\x00\x00\x00\x00\x00", 6);
memcpy((VOID*)0x6CD5D4, "\x01\x01\x01\x01\x01\x01", 6);
Code by @darlwis

Where is wrong?

If someone wants to correct me, write my whole code, because otherwise I do not understand, because I'm noob!
Anyone can help me please?
Quote Originally Posted by AquaShot View Post
Hello MPGH ,

I'm here to see the mistakes that I do in C++ !

Where it isn't good, please draw my attention!

Open:

Microsoft Visual C++ 2010 Express -> New Project... -> Win32 Project -> Project Name -> Next> -> Select DLL -> Finish -> Put any code before "// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h""

Example:

Link: http://www.mpgh.net/forum/580-crossf...-wallhack.html (By @darlwis , and I put the link to not think that stealing!)

Example (With @darlwis code):

Code:
// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#define NoRecoil1 0x051C
#define NoRecoil2 0x0684
#define NoRecoil3 0x1934
#define NoRecoil4 0x1B18
#define NoRecoil5 0x1FA0
#define NoRecoil6 0x2108
#define NoRecoil7 0x2270
#define NoReload 0x26A4
#define WeaponMgr 0xAB7270
#define SeeGhost1 0x88
#define SeeGhost2 0x90
#define SeeGhost3 0x8C

memcpy((VOID*)0x6CD5D4, "\x00\x00\x00\x00\x00\x00", 6);
memcpy((VOID*)0x6CD5D4, "\x01\x01\x01\x01\x01\x01", 6);
Code by @darlwis

Where is wrong?

If someone wants to correct me, write my whole code, because otherwise I do not understand, because I'm noob!
1:U Need a DllMain
2: For OFF and On do this:
Code:
bool wallhack = false;
if(GetAsyncKeyState(VK_F4)) {
wallhack = !wallhack;
}


if(wallhack)
{
memcpy((VOID*)0x6CD5D4, "\x00\x00\x00\x00\x00\x00", 6);//ON
}
else
{
memcpy((VOID*)0x6CD5D4, "\x01\x01\x01\x01\x01\x01", 6);//OFF
}
Aham...

You mean something like this:


Code:
// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#define NoRecoil1 0x051C
#define NoRecoil2 0x0684
#define NoRecoil3 0x1934
#define NoRecoil4 0x1B18
#define NoRecoil5 0x1FA0
#define NoRecoil6 0x2108
#define NoRecoil7 0x2270
#define NoReload 0x26A4
#define WeaponMgr 0xAB7270
#define SeeGhost1 0x88
#define SeeGhost2 0x90
#define SeeGhost3 0x8C

bool wallhack = false;
if(GetAsyncKeyState(VK_F4)) {
wallhack = !wallhack;
}


if(wallhack)
{
memcpy((VOID*)0x6CD5D4, "\x00\x00\x00\x00\x00\x00", 6);//ON
}
else
{
memcpy((VOID*)0x6CD5D4, "\x01\x01\x01\x01\x01\x01", 6);//OFF
}
Certainly isn't good because say:

Code:
------ Build started: Project: Ent3r, Configuration: Debug Win32 ------
  Ent3r.cpp
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2059: syntax error : 'if'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(24): error C2059: syntax error : 'if'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(25): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(25): error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(28): error C2059: syntax error : 'else'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(29): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(29): error C2447: '{' : missing function header (old-style formal list?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Ent3r is my Project Name!
Quote Originally Posted by AquaShot View Post
Aham...

You mean something like this:


Code:
// Project Name.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#define NoRecoil1 0x051C
#define NoRecoil2 0x0684
#define NoRecoil3 0x1934
#define NoRecoil4 0x1B18
#define NoRecoil5 0x1FA0
#define NoRecoil6 0x2108
#define NoRecoil7 0x2270
#define NoReload 0x26A4
#define WeaponMgr 0xAB7270
#define SeeGhost1 0x88
#define SeeGhost2 0x90
#define SeeGhost3 0x8C

bool wallhack = false;
if(GetAsyncKeyState(VK_F4)) {
wallhack = !wallhack;
}


if(wallhack)
{
memcpy((VOID*)0x6CD5D4, "\x00\x00\x00\x00\x00\x00", 6);//ON
}
else
{
memcpy((VOID*)0x6CD5D4, "\x01\x01\x01\x01\x01\x01", 6);//OFF
}
Certainly isn't good because say:

Code:
------ Build started: Project: Ent3r, Configuration: Debug Win32 ------
  Ent3r.cpp
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2059: syntax error : 'if'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(19): error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(24): error C2059: syntax error : 'if'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(25): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(25): error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(28): error C2059: syntax error : 'else'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(29): error C2143: syntax error : missing ';' before '{'
c:\documents and settings\iarktic0\my documents\visual studio 2010\projects\ent3r\ent3r\ent3r.cpp(29): error C2447: '{' : missing function header (old-style formal list?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Ent3r is my Project Name!
lol first learn C++,Then Code.
U are wrong at all let me do a base for u later.
Make a thread and put the wallhack in the thread
Quote Originally Posted by Swag View Post
Make a thread and put the wallhack in the thread
@Swag ,

I make another hack, please help me!
Help me please?
You need a thread and DLL Main
You can't call functions outside a function
That's something you would see at the first page after creating a project in a programming book
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us