Solved Why this trainer didin't work ?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat
Status
Not open for further replies.

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Hi everyone, ım trying to do basic trainer for Counter-strike source but it didin't work. Im trying to do with dynamic adresses. (İts worked for Assaust Cube and CoD 2 by the way.) (Sorry for bad English.)

C++:
#include <iostream>
#include <windows.h>
using namespace std;
int main(){
	int deger=2000;
	HWND hwnd=FindWindowA(NULL, "Counter-Strike Source");
	if (hwnd==NULL){
		cout<<"Bulunamadi!"<<endl;
		Sleep(3000);
		exit(-1);
	}
	else{
	
		DWORD procID;
		GetWindowThreadProcessId(hwnd, &procID);
		HANDLE handle=OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
		if (procID==NULL){
		
			cout<<"Bulunamadi!"<<endl;
			Sleep(3000);
			exit(-1);
		}
		else{
			WriteProcessMemory(handle, (LPVOID)AmmoAdressHERE, &deger, sizeof(deger), 0);
                        WriteProcessMemory(handle, (LPVOID)HealthAdressHERE, &deger, sizeof(deger), 0);
		}

	}
system("pause");
	return 0;
}
 
Last edited:

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,746
40,528
316
Yes, i called it after WPM call. And yes ı do search for dynamic adresses everyime and copy/paste to hack then run it. Also when ı make right click to dynamic adress and then click to "Find Out what accesses this adress" counter-strike source closes instantly.
Cheat Engine → Edit → Settings → Debugger Options → Debugger Method → Use VEH Debugger
This'll fix the insta closing.

Not sure why it doesn't work though.

Also you problem is you're compiling for x64, you need to compile x86 because that's what the game uses.
 
Last edited by a moderator:

r4z0r

Coder
Meme Tier VIP
Jul 21, 2016
246
2,678
13
You need to find the pointer for your ammo and health addresses, you can't use dynamic.
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
So where is it failing?
Have you tried to debug it? Is it throwing errors?

You need to find the pointer for your ammo and health addresses, you can't use dynamic.
I mean technically you could... It just won't work anymore after the pointer gets invalidated =P
 
Last edited:

knight2

Newbie
Nobleman
Feb 18, 2016
2
94
0
first of all Welcome =) Now your code tries to use the function WriteProcessMemory
C++:
WriteProcessMemory(handle, (LPVOID)AmmoAdressHERE, &deger, sizeof(deger), 0);
WriteProcessMemory(handle, (LPVOID)HealthAdressHERE, &deger, sizeof(deger), 0);
I cant see that you have decleared AmmoAdressHERE or HealthAdressHERE variables, also you need to find the static addresses for the ammo and health before you can write to them.
To find addresses for health and ammo in cs or in any game for that matter, you can use cheat engine watch some of the guidedhacking yt vids if you need help to find the addresses .
Good luck keep coding =).
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
So where is it failing?
Have you tried to debug it? Is it throwing errors?



I mean technically you could... It just won't work anymore after the pointer gets invalidated =P
I didn't get any error, program works fine but it didnt change the values. İts work for Cod2 and assault cube.. İt didnt work because of VAC ?
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
first of all Welcome =) Now your code tries to use the function WriteProcessMemory
C++:
WriteProcessMemory(handle, (LPVOID)AmmoAdressHERE, °er, sizeof(deger), 0);
WriteProcessMemory(handle, (LPVOID)HealthAdressHERE, °er, sizeof(deger), 0);
I cant see that you have decleared AmmoAdressHERE or HealthAdressHERE variables, also you need to find the static addresses for the ammo and health before you can write to them.
To find addresses for health and ammo in cs or in any game for that matter, you can use cheat engine watch some of the guidedhacking yt vids if you need help to find the addresses .
Good luck keep coding =).
I dont have problem with adresses, AmmoAdressHERE, HealthAdressHERE are representation of adresses. But this program (dynamic or static adress doesn't matter) didn't work for counter-strike source. However it works for Cod2 and assault cube.
 

r4z0r

Coder
Meme Tier VIP
Jul 21, 2016
246
2,678
13
If you can find these addresses in CH and change them you should be able to do the same in your trainer. If you can change them with CH and this won't work you have wrong addresses (u said it worked 4 other games)
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
If you can find these addresses in CH and change them you should be able to do the same in your trainer. If you can change them with CH and this won't work you have wrong addresses (u said it worked 4 other games)
İt changes in CH but not in my trainer.
 

Boboo99

Scrub
Dank Tier VIP
Fleep Tier Donator
Feb 20, 2016
472
12,178
44
You might use the adresses belonging to that certain game :)
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
Idk if this will help but try calling VirtualProtectEx before writing to memory?
You might want to set the old protection back after writing too.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,746
40,528
316
Use GetLastError to find out why WPM fails.
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Вroihon;47676 said:
Use GetLastError to find out why WPM fails.
I cant find anything.
I use it like this: DWORD dw = GetLastError(); and cout<<dw; result is 0
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,746
40,528
316
I cant find anything.
I use it like this: DWORD dw = GetLastError(); and cout<<dw; result is 0
You called it instantly after the WPM call? If so WPM didn't fail. That means the addresses are wrong.
Do you create a new game, then scan for the dynamic addresses, then copy/paste them into the hack, then run it?
Because that's the only way this'd work with dynamic addresses since they change each time you join a new match or maybe even respawn.
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Вroihon;47678 said:
You called it instantly after the WPM call? If so WPM didn't fail. That means the addresses are wrong.
Do you create a new game, then scan for the dynamic addresses, then copy/paste them into the hack, then run it?
Because that's the only way this'd work with dynamic addresses since they change each time you join a new match or maybe even respawn.
Yes, i called it after WPM call. And yes ı do search for dynamic adresses everyime and copy/paste to hack then run it. Also when ı make right click to dynamic adress and then click to "Find Out what accesses this adress" counter-strike source closes instantly.
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Вroihon;47680 said:
Cheat Engine → Edit → Settings → Debugger Options → Debugger Method → Use VEH Debugger
This'll fix the insta closing.

Not sure why it doesn't work though.
VEH debugger worked thanks.
 
Status
Not open for further replies.
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods