std::vector<std::string> msgs ={
"refund my pa$$$te",
"nn cheat user is me"
};
void Misc::ChatSpamer()
{
if (!g_EngineClient->IsInGame() || !g_EngineClient->IsConnected())
return;
long curTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
static long timestamp = curTime;
if ((curTime - timestamp) < 850)
return;
if (g_Options.misc_chatspamer)
{
if (msgs.empty())
return;
std::srand(time(NULL));
std::string msg = msgs[rand() % msgs.size()];
std::string str;
str.append("say ");
str.append(msg);
g_EngineClient->ExecuteClientCmd(str.c_str());
}
timestamp = curTime;
}