Advertisement
captmicro

Unknown

Dec 29th, 2010
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. err = SetDebugPrivileges()
  2. WriteConsole("Err: " .. tostring(err) .. "\n")
  3.  
  4. local hwnd = 0
  5. while (hwnd == 0) do
  6.     hwnd = FindWindow("Counter-Strike Source")
  7. end
  8.  
  9. local procID = GetProcessId(hwnd)
  10. WriteConsole("Process ID: " .. tostring(procID) .. "\n")
  11. local procHandle = OpenProcess(PROCESS_ALL_ACCESS, procID)
  12. WriteConsole("Process Handle: " .. tostring(procHandle) .. " [" .. tostring(PROCESS_ALL_ACCESS) .. "]\n")
  13.  
  14. sv_cheats = {0x1123A8F0, 0}
  15. sv_cheats[2] = ReadInt(procHandle, sv_cheats[1])
  16. r_drawothermodels = {0x18420968, 0}
  17. r_drawothermodels[2] = ReadInt(procHandle, r_drawothermodels[1])
  18.  
  19. cvars = {
  20. sv_cheats = {0x1123A8F0, 0x78, ReadInt, WriteInt, -1, 1}, --F9
  21. r_drawothermodels = {0x18420968, 0x79, ReadInt, WriteInt, -1, 2}, --F10
  22. host_timescale = {0x18420968, 0x7A, ReadFloat, WriteFloat, -1, 2.5} --F11
  23. } for k, v in pairs(cvars) do v[5] = v[3](procHandle, v[1]) end
  24.  
  25. local val = -1
  26. while (GetAsyncKey(0x23) == 0) do --END
  27.     for k, v in pairs(cvars) do
  28.         if (GetAsyncKey(v[2]) == 1) then
  29.             val = v[3](procHandle, v[1])
  30.             if (val == v[5]) then v[4](procHandle, v[1], v[6])
  31.             elseif (val == v[6]) then v[4](procHandle, v[1], v[5]) end
  32.         end
  33.     end
  34.     Sleep(100)
  35. end
  36.  
  37. CloseHandle(procHandle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement