Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ConVar *allowcslua = g_ICvar->FindVar("sv_allowcslua");
- if (allowcslua != 0) { MessageBoxA(0, "Failed to find sv_allowcslua convar!", "g_ICvar", 0); ExitProcess(1); }
- char *newallowcsluaname = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 16);
- strcpy_s(newallowcsluaname, 16, "hk_allowcslua"); //be safe when using string functions!
- allowcslua->m_pszName = newallowcsluaname;
- //create "fake" sv_allowcslua convar
- ConVar fakeallowcslua("sv_allowcslua", allowcslua->GetString(), allowcslua->m_nFlags, allowcslua->GetHelpText());
- //force the real sv_allowcslua
- allowcslua->SetValue(1); //force sv_allowcslua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement