HelpForce Cvar C++

Posts 115 of 41 · Page 1 of 3
Force Cvar C++
I am quite new to this shit, so bare with my noobish stupidity...

So just to be clear, I am not 100% retarded, I have been coding a lua hack etc. (it is shit, but the point is that I can sorta half code) and I have worked with C++ a bit before. So I have heard that forcing a cvar (in this case sv_cheats) is bad, but as far as I can tell it is the easiest way to do it, so for my first hack I am just going to make it like this. Using cheat engine I was able to find the base address, but from then on I have no idea what to do really. So basically how do I force a cvar in gmod?

Just some info...

Yes, I have it all working with cheat engine, but I want to learn how to code, so the point of this isn't really trying to hack a game, it is just to learn how to. So please don't just post something like "just use a public bypasser, it will work fine" or "just use cheat engine, it works just fine".

Also, just as some side questions...

1. Why is forcing a cvar a bad way to do it?
2. Would VAC detect a cvar force on gmod? (And if you were to do this in a different game that VAC isn't broken in e.g. CSS, would VAC detect a cvar force?)
Quote Originally Posted by _Fami View Post
Because you shouldn't use ConVars, that's why it's bad.
Yeah, but why not?, I just don't understand what's sooo bad about them.
It's easily detectable

ChangeCVARValue( "sv_allowcslua", 1 )
if GetConVarValue( "sv_allowcslua" ) == 1 then BAN() end

CreateClientConVar( "mahhake_aimboat", somthingsomthingsomthing )
if ConVarExists( "mahhake_aimboat" ) then BAN() end

local CCCV = CreateClientConVar
CreateClientConVar = function( lol, ... )
if ( !TBLWITHALLOWEDCVARS[ lol ] ) then
BAN()
end
CCCV( lol, ... )
end
Quote Originally Posted by niller303 View Post
It's easily detectable

ChangeCVARValue( "sv_allowcslua", 1 )
if GetConVarValue( "sv_allowcslua" ) == 1 then BAN() end

CreateClientConVar( "mahhake_aimboat", somthingsomthingsomthing )
if ConVarExists( "mahhake_aimboat" ) then BAN() end

local CCCV = CreateClientConVar
CreateClientConVar = function( lol, ... )
if ( !TBLWITHALLOWEDCVARS[ lol ] ) then
BAN()
end
CCCV( lol, ... )
end
I meant VAC detectable, I know there are many server AntiCheats though. Like, does VAC do anything at all?, because from some people I hear it is better than nothing (but still does very little) and from others I hear that it only bans BaconBot.
ConVars are bad because they can be easily detected.
You shouldn't use static offsets if you are doing internal shit.
If you do use static offsets, you need to find the base for the module the place you want to get is in (client.dll in this case) and subtract the base from the place where you want to modify (ex. base is 0x10000000, modify place is 0x30000000, you would do 0x20000000). After that add that number to GetModuleHandle("yourdll").
VAC won't detect it in gmod, but if gac ever decides to wake up it will definitely detect it. Also, clientside anticheats can detect it too. I have (a long time ago) forced sv_cheats with ce in css and never got banned from that.
Quote Originally Posted by MeepDarknessMeep View Post
ConVars are bad because they can be easily detected.
You shouldn't use static offsets if you are doing internal shit.
If you do use static offsets, you need to find the base for the module the place you want to get is in (client.dll in this case) and subtract the base from the place where you want to modify (ex. base is 0x10000000, modify place is 0x30000000, you would do 0x20000000). After that add that number to GetModuleHandle("yourdll").
VAC won't detect it in gmod, but if gac ever decides to wake up it will definitely detect it. Also, clientside anticheats can detect it too. I have (a long time ago) forced sv_cheats with ce in css and never got banned from that.
Kk, thanks. As I already said I am a super noob at C++ hacking so bare with me :P...

The address that I found is engine.dll+640A98, so that is the base correct? I don't really understand what you means when you say "modify place".

Before I try to learn all this shit and fail, could you tell me if there is any easier place to start C++ hacking?, because from what I have seen so far, this bypass seems like it is going to be much harder than I originally thought.
Quote Originally Posted by mmmaaalll1 View Post
Kk, thanks. As I already said I am a super noob at C++ hacking so bare with me :P...

The address that I found is engine.dll+640A98, so that is the base correct? I don't really understand what you means when you say "modify place".

Before I try to learn all this shit and fail, could you tell me if there is any easier place to start C++ hacking?, because from what I have seen so far, this bypass seems like it is going to be much harder than I originally thought.
the offset in this case is 0x640A98 (engine.dll+640A98) and the base is engine.dll.
(dword)GetModuleHandle("engine.dll") + 0x640A98 would be the address you want to modify.
you have to dereference it to set the value. ex *(int*)((dword)GetModuleHandle("engine.dll") + 0x640A98) = 1
Quote Originally Posted by MeepDarknessMeep View Post
the offset in this case is 0x640A98 (engine.dll+640A98) and the base is engine.dll.
(dword)GetModuleHandle("engine.dll") + 0x640A98 would be the address you want to modify.
you have to dereference it to set the value. ex *(int*)((dword)GetModuleHandle("engine.dll") + 0x640A98) = 1
Is this right?... I am not 100% sure if I understand it, but I did google all of it etc., so I think I know what I am talking about :P

int& Address = *(int*) ((DWORD) GetModuleHandle("client.dll") + 0x640A98);
Quote Originally Posted by _Fami View Post
no that's not right, also C++ is outdated, use C# http://garry.tv/2014/04/18/9-reasons-why-i-love-c/
Don't listen to him.
Quote Originally Posted by mmmaaalll1 View Post
Is this right?... I am not 100% sure if I understand it, but I did google all of it etc., so I think I know what I am talking about :P

int& Address = *(int*) ((DWORD) GetModuleHandle("client.dll") + 0x640A98);
Close, your module is wrong. Also I highly recommend you to use a pointer instead of using an ampersand.
If _fami was here he would have said:
rofl FUCK 4 teh still bad get out of throses forums you don't know lua you mongtard shitty ac noob little autistic kid get dunked TOO GOOD he's autist little autistic kid smoke remplace
Quote Originally Posted by Im-Friendly View Post
If _fami was here he would have said:
rofl FUCK 4 teh still bad get out of throses forums you don't know lua you mongtard shitty ac noob little autistic kid get dunked TOO GOOD he's autist little autistic kid smoke remplace
no one cares
fucking skids, stolen from sethhack once again. retards just because deagler.net and unitedhosts.org leaked sethhack u guys r going fucking nuts.
Quote Originally Posted by _Fami View Post
Why? C++ is clearly outdated, Garry Newman himself (the creator of Garry's Mod) said that C# was better than C++ so stop saying bullshit, Garry's a better coder than you.
Another Time: http://garry.tv/2014/04/18/9-reasons-why-i-love-c/
so you are spamming litterly everything to just point this out?
dont listen to these retards, the best idea is to use patricks cvar spoofing method
its the only good thing in gmod you nerds can get your hands on anyway
More spoons may be given if you're really interested.
Code:
	ConVar *{Name to be referenced, no spaces.} = cvar->FindVar("{Name of the ConVar}");
	{Reference Name, no spaces.}->m_nFlags = {Flag you want the ConVar to have};
	{Reference Name, no spaces.}->SetValue({Desired value});
Should be easy enough to understand as is though, if you got any questions (actual questions), I'll be glad to answer them.
Posts 115 of 41 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?