1. Get a bypass (sv_cheats or cvar bypass i think)
2. Run it
3. Enter commands doing said thing
4. ???
5. Profit
Also, can one of you guys check this out? I found it after doing some research.
Code:
void CConVar::Spoof(ConVar* pCvar)
{
int origFlags = pCvar->m_nFlags;
const char* origName = pCvar->GetName();
const char* origValue = pCvar->GetDefault();
ConVar* pNewVar = (ConVar*)malloc(sizeof ConVar);
memcpy(pNewVar, pCvar, sizeof(ConVar));
pNewVar->m_pNext = 0;
g_pCvar->RegisterConCommand(pNewVar);
char tmp[50];
_snprintf(tmp, sizeof(tmp), "new_%s", origName);
strcpy((char*)pCvar->m_pszName, tmp);
pCvar->m_nFlags = FCVAR_NONE;
new ConVar(origName, origValue, origFlags, "cvar");
LOG_INFO("renamed %s to %s", origName, tmp);
LOG_INFO("dummied CVar %s", origName);
}