Figured I'd make a quick tutorial outlining some fun shit (chatspam, fake report spam, etc) for absolute beginners. This is my first tutorial, so be nice!
You'll need an internal SDK and Visual Studio, there are several public SDKs or you can make your own if you prefer, and Visual Studio is free for download from the Microsoft website.
A lot of this is common knowledge, but I figure it might be useful to those who are just beginning with CS:GO cheating, as it's pretty simple stuff.
Before you begin, this is
INTERNAL ONLY.
ClientCmd:
The engine function that's going to do most of the work is called "ClientCmd" (Alternatively you could use ClientCmd_Unrestricted, I haven't personally used this before so for the sake of this tutorial I'll stick with what I know.
ClientCmd is a virtual function that allows you to execute console commands from your injected DLL.
Here's a helper function to make it easier.
Code:
void PrintToChat(const char *text)
{
char buffer[256];
printf(buffer, "say \"%s\"", text); //printf text to a variable first
EngineClient->ClientCmd(buffer); //call the function and print to chat
}
Okay, that's all great, we could just call our new function in our CreateMove hook and print to the chat right now if we wanted. But the problem is that executing "ClientCmd" too fast or without intervals will either freeze or crash your game almost instantly. We need to find a way to limit how fast ClientCmd is being called per tick.
We could use a simple timer to achieve this fairly easily.
Here's an example of a timer.
Code:
#include "time.h" //this is the dependency you need for these functions to work
static clock_t start_t = clock();
double progress = (double)(clock() - start_t) / CLOCKS_PER_SEC;
if (progress < 0.5)
return;
//anti-paste: start the timer at the very end of the function
Now that you're limiting how fast "ClientCmd" can execute, you're good to execute the function.
Here's the basic syntax, using our helper function, minus the timer.
Code:
if (chatspam)
{
PrintToChat("You can't hack on VAC secured servers. :^)");
}
Now, armed with our understanding of how ClientCmd works, we can have some fun, such as creating a list of strings and choosing/printing a random one - this is how major cheat providers create their annoying chatspams. It's basically the same thing for a (fake) report spammer, the only difference is you're getting a random player name from your current session and using the same "Report submitted" format, only with a different name and report id each time.
Here's a general format of report notices, for reference; I'm sure most of you can figure it out from here.
Code:
printf(buffer, "Report for %s submitted, report id %lu.", randomPlayer[randomIndex].c_str(), reportid);
ClientCmd can also be used to call other cvars, but be careful with this, I haven't played with this function outside of chat spamming, I do know that VAC monitors and blacklists certain cvars from being modified.
Hopefully I explained this shit simply enough. I'm still learning every day so if there's something I misunderstood or got wrong let me know and I'll fix it.
I've been playing around with internals a lot more so I might release some more beginner tutorials later on.