vladek How do I cheat?
Reputation: 0
Joined: 25 Dec 2007 Posts: 6
|
Posted: Tue Dec 25, 2007 7:31 pm Post subject: [Help] Help with a C++ and ASM code for GunZ hacking please! |
|
|
Hi, well im new on this staff, so i will not explain it like an expert
First, i will show you the C++ code (its just a Test, so it has only one Function).
mongo001.cpp
| Code: |
#include "mongo001.h"
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <fstream>
#include <string>
#include "func.h"
/* GetTwoKeys */
#define GetTwoKeys(keyone,keytwo) if(GetAsyncKeyState(keyone) &0x8000 && GetAsyncKeyState(keytwo) &0x8000)
/* Log */
#define Log( name , addr ) fprintf(xLog, name " : %.8X\n", addr );
/* Version */
#define MongoVersion 0.1
float TelePos[3] = {0.000000};
bool bQuest = false;
void ZChatOutput(const char* lpcFmt, ...)
{
_asm{
pushad
//Move ZChatOutputAddress into eax
mov eax,ZChatOutputDir
//Push 0xFFFFFFFF onto the stack
PUSH 0xFFFFFFFF
//Push 0 onto the stack
PUSH 0
//Push 2 onto the stack
PUSH 2
//Push lpcFmt onto the stack
PUSH lpcFmt
//Call ZChatOutput
call eax
//Cleanup the stack by adding the size of bytes pushed on the stack
add esp,16
popad
}
}
void Main()
{
while(true)
{
/* Info */
/* Working */
GetTwoKeys(0x12, 'A'){
ZChatOutput("Hi Version .", MongoVersion);
Sleep(500);
}
}
}
|
func.h
| Code: |
#define ZChatOutputDir 0x0042AEE0
|
That's all, i compiled it OK, but when i log into the game, i press Alt + A (It should show the message "HI version X", and it doesnt ...
If anyone can tell me in what im wrong, i will really apreciate it!
Thank you a lot..
|
|