How to start in C++?

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
hello, here's what I would do

1. Follow some c++ youtube tutorial with high like/dislike ratio

2.
monday said:
you could check this out

http://ugbase.eu/Thread-FreezeRotation-exe-disable-Spin-And-Rotation-Matrix
Code:
//By Opcode.eXe

#include <iostream>
#include <math.h>
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>

using namespace std;

int main()
{
    SetConsoleTitle("FreezeRotation.eXe by Opcode.eXe");
    cout << "FreezeRotation - makes your car hard like 0x688 nipples!" << endl;
    cout << "Looking for GTA:SA:MP window." << endl;
    // MA VARIABLES
    DWORD pId;
    DWORD dwOldProtect = 0;
    HANDLE pHandle;
    HWND hWnd = 0;
    DWORD vpointer = 0;
    DWORD collflags;
    DWORD spin;
    BYTE inair;
    float zero = 0.0;
    while(hWnd == 0){
        hWnd = FindWindow(0, "GTA:SA:MP"); 
        Sleep(100);
    }
    cout << "Just found the window. FreezeRotation has been started." << endl;

    GetWindowThreadProcessId(hWnd, &pId);
    pHandle = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION, TRUE, pId);

    while(true){
        ReadProcessMemory(pHandle, (LPCVOID)0xBA18FC, &vpointer, 4, 0);
        if(vpointer >= 1)
        {
            collflags = vpointer + 185;
            ReadProcessMemory(pHandle, (LPCVOID)collflags, &inair, 1, 0);
            if(inair == false){
                WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50), (LPVOID)&zero, 4, NULL);
                WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50 + 4), (LPVOID)&zero, 4, NULL);
                WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50 + 8), (LPVOID)&zero, 4, NULL);
            }
        }
        Sleep(10);
    }
    CloseHandle(pHandle);
    return 0;
}

The code above changes gta_sa memory from the other process. The code below does it from the "inside":

Code:
//by springfield

#include <windows.h>

#define SAMP_INFO  0x212A80
#define SAMP_SETTINGS  0x3D5

DWORD* pInfo = NULL;
BYTE* ThroughWalls = NULL;
float* fDistance = NULL;
//---------------------------------------------------------------------------
bool KeyPressed(BYTE key)
{
	return ((GetAsyncKeyState(key)&(1<<16))!=0);
}
//---------------------------------------------------------------------------

void Thread()
{
	DWORD SampDLL = (DWORD)GetModuleHandleA("samp.dll");
	if(SampDLL)
	{
		pInfo = (DWORD*)(SampDLL+SAMP_INFO);
		while(*pInfo==0) Sleep(1000);
		while(*(DWORD*)(*pInfo + SAMP_SETTINGS) == 0) Sleep(1000);    
		ThroughWalls = (BYTE*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x2F);
		fDistance = (float*)((DWORD*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x27));
		Sleep(14000);
		DWORD OldProt;
		VirtualProtect((LPVOID)ThroughWalls, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
		VirtualProtect((LPVOID)fDistance, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
		for(;;)
		{
			do
			{
				Sleep(100);
			}
			while(!KeyPressed(VK_MENU) || !KeyPressed(VK_F3));

			do
			{
				Sleep(50);
			}
			while(KeyPressed(VK_F3));

			*ThroughWalls = 0;
			*fDistance = 1500.0;

			do
			{
				Sleep(100);
			}
			while(!KeyPressed(VK_MENU) || !KeyPressed(VK_F3));

			do
			{
				Sleep(50);
			}
			while(KeyPressed(VK_F3));
			*ThroughWalls = 1;
			*fDistance = 50.0;
		}
	}
}

//-------------------------------------------------------------------------------
int WINAPI DllMain(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
	if(reason==DLL_PROCESS_ATTACH)
	{
		 CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Thread, 0, 0, 0);
	}
	return 1;
}


3. https://www.youtube.com/watch?v=A_MrrAo8uLk

4. https://guidedhacking.com/forumdisplay.php?37-Hacking-tutorials
 

Codex1337

Active member
Joined
Mar 1, 2014
Messages
170
Reaction score
1
@monday, which compiler do you recommend? or which one do you use?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
I use Visual Studio community edition
 

Codex1337

Active member
Joined
Mar 1, 2014
Messages
170
Reaction score
1
There are plenty of options, do I need to select any of them or I just proceed to "Install"? https://gyazo.com/464cfee3c37625335cc7571254c8fe9b

If I select the options, the installation size is huge https://gyazo.com/6e1a6d2586e9d0178494efde26c399e6
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
0x32789 said:
MrChristmas said:
Xamarin Studio is pretty good too but limited

only suitable for java and android projects..
or even if I'm wrong, I use Xamarin for java while MS visual studio for windows apps..

but you can open projects more quickly to review them rather than wait 20 years for VS to start
 

Rabbyt69

New member
Joined
Mar 27, 2017
Messages
3
Reaction score
0
what do you mean? I wanna make a gta samp private aimbot to defend any teamviewer tests
If you know a good method to do it add me on skype (yannyspetcu) or reply here detailed
 

Codex1337

Active member
Joined
Mar 1, 2014
Messages
170
Reaction score
1
Thank you guys, I really appreciate it, I was looking for it since ages.
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
vs 2017 community edition ftw?
 

Audioli

Active member
Joined
May 20, 2015
Messages
58
Reaction score
0
Download Code::Blocks better than VS eating less ram and low size file ( 300 mb)!
 

FILTER

Member
Joined
Jul 30, 2016
Messages
17
Reaction score
0
i would get a c++ book. c++ can be a little tricky so be ready
 
Top