Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- err = SetDebugPrivileges()
- WriteConsole("Err: " .. tostring(err) .. "\n")
- local hwnd = 0
- while (hwnd == 0) do
- hwnd = FindWindow("Counter-Strike Source")
- end
- local procID = GetProcessId(hwnd)
- WriteConsole("Process ID: " .. tostring(procID) .. "\n")
- local procHandle = OpenProcess(PROCESS_ALL_ACCESS, procID)
- WriteConsole("Process Handle: " .. tostring(procHandle) .. " [" .. tostring(PROCESS_ALL_ACCESS) .. "]\n")
- sv_cheats = {0x1123A8F0, 0}
- sv_cheats[2] = ReadInt(procHandle, sv_cheats[1])
- r_drawothermodels = {0x18420968, 0}
- r_drawothermodels[2] = ReadInt(procHandle, r_drawothermodels[1])
- cvars = {
- sv_cheats = {0x1123A8F0, 0x78, ReadInt, WriteInt, -1, 1}, --F9
- r_drawothermodels = {0x18420968, 0x79, ReadInt, WriteInt, -1, 2}, --F10
- host_timescale = {0x18420968, 0x7A, ReadFloat, WriteFloat, -1, 2.5} --F11
- } for k, v in pairs(cvars) do v[5] = v[3](procHandle, v[1]) end
- local val = -1
- while (GetAsyncKey(0x23) == 0) do --END
- for k, v in pairs(cvars) do
- if (GetAsyncKey(v[2]) == 1) then
- val = v[3](procHandle, v[1])
- if (val == v[5]) then v[4](procHandle, v[1], v[6])
- elseif (val == v[6]) then v[4](procHandle, v[1], v[5]) end
- end
- end
- Sleep(100)
- end
- CloseHandle(procHandle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement