Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trainer +5 Source Code
#1
I've made a money trainer (called it monkey trainer) 2 years ago, now I've edited it a little, IDK I'm just bored.

Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>

#define gProc hProc //lol ye examples and source codes sometimes confusing me
#define ALT VK_MENU
HWND GTASA;

using namespace std;

int money = 0xB7CE50;
int gravity = 0x863984;
int wep1 = 0x969130;
int wep2 = 0x969131;
int wep3 = 0x969132;


bool get_gta_window(HWND GTA)
{
    GTA = FindWindow(NULL, "GTA:SA");
    if(!GTA)
    {
        MessageBox(NULL, "GTA San Andreas not found.", "FAIL", MB_ICONERROR);
        MessageBox(NULL, "Exitig.", "FAIL", MB_ICONERROR);
        MessageBox(NULL, "trololo.", "FAIL", MB_ICONERROR);
        exit(0);
    }
}

void give_monkey(int amt)
{
    DWORD dwID;
    HANDLE hProc;

    HWND sa;
    get_gta_window(sa);
    GetWindowThreadProcessId(sa, &dwID);
    hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, dwID);
    WriteProcessMemory(hProc, (LPVOID)money, (LPVOID)amt, sizeof(amt), NULL );

}

void change_gravity(int amt)
{
    DWORD dwID;
    HANDLE hProc;

    HWND sa;
    get_gta_window(sa);
    GetWindowThreadProcessId(sa, &dwID);
    hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, dwID);
    WriteProcessMemory(hProc, (LPVOID)gravity, (LPVOID)amt, sizeof(amt), NULL );

}

void give_weapon_set(int which_one)
{
     DWORD dwID;
    HANDLE hProc;

    HWND sa;
    get_gta_window(sa);
    GetWindowThreadProcessId(sa, &dwID);
    hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, dwID);
    
    switch(which_one)
    {
        case 1:
        WriteProcessMemory(hProc, (LPVOID)wep1, (LPVOID)1, sizeof(1), NULL );
        break;
        
        case 2:
        WriteProcessMemory(hProc, (LPVOID)wep2, (LPVOID)1, sizeof(1), NULL );
        break;
        
        case 3:
        WriteProcessMemory(hProc, (LPVOID)wep3, (LPVOID)1, sizeof(1), NULL );
        break;
   }
}


void get_hot_keys()
{
while(1)
            {
                if(GetAsyncKeyState(ALT) && GetAsyncKeyState(VK_F1))
                {
                        give_monkey(99999);
                }
                

                if(GetAsyncKeyState(ALT) && GetAsyncKeyState(VK_F2))
                {
                       change_gravity(200);
                }
                
                if(GetAsyncKeyState(ALT) && GetAsyncKeyState(VK_F3))
                {
                        give_weapon_set(1);
                }
                if(GetAsyncKeyState(ALT) && GetAsyncKeyState(VK_F4))
                {
                        give_weapon_set(2);
                }
                if(GetAsyncKeyState(ALT) && GetAsyncKeyState(VK_F5))
                {
                        give_weapon_set(3);
                }
            }
}


int main(int argc, char *argv[])
{
    printf("ALT + F1 for 999999 money\nALT + F2 low gravity\nALT + F3 weapon set 1\nALT + F4 weapon set 2\nALT + F5 weapon set 3");
    while(1)
    {
            if(get_gta_window(GTASA))
            {
            get_hot_keys();
             }
            
    }
}

Made with Dev-C++.

It's a trainer for GTA:SA, I got memory addresses from here.

This is just simple as it looks.
[Image: 99180919.png]
Reply

#2
I love the FAIL error lol
Reply

#3
LOLLLL GTA Trainer hahaaahahha made my day.
Reply

#4
/hate c++
Reply

#5
Lol, you use .NET. THAT'S A SCRIPTINGLANGUAGE. LOL!
Reply

#6
I have no idea what that means lol
Reply

#7
that one will leak a lot of handles
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 4,142 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 4,747 11-08-2013, 05:25
Last Post: [HARD] Tony.
  [Request] Health and Points on hud source robinvm 7 5,636 10-27-2013, 08:23
Last Post: robinvm
  Help Code color crosshairs koren30 3 4,037 10-02-2013, 19:26
Last Post: koren30
  [Release] [SOURCE] DOOR V2.0 [HARD] Tony. 5 5,391 09-26-2013, 14:01
Last Post: Nekochan
  Help need help?how to make plugins code hXnarutoXone 12 8,629 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,334 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,169 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,760 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,682 07-28-2013, 01:52
Last Post: First_Semyon

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.