Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] Help with a C++ and ASM code for GunZ hacking please!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
vladek
How do I cheat?
Reputation: 0

Joined: 25 Dec 2007
Posts: 6

PostPosted: Tue Dec 25, 2007 7:31 pm    Post subject: [Help] Help with a C++ and ASM code for GunZ hacking please! Reply with quote

Hi, well im new on this staff, so i will not explain it like an expert Razz

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 Sad...


If anyone can tell me in what im wrong, i will really apreciate it!
Thank you a lot..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites