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?)