3

Trying to make a simple spray control script for cs:go (for educational purpose) I'm using pyHook to activate a function that moves the mouse in a pattern. It works great outside of cs:go for example in paint but only make the aim lagg for half a second when ingame. Any tips for making it work?

import pyHook
import pythoncom
import pyautogui
import time

time.sleep(10) 
def onclick(event):
    pyautogui.dragTo(660, 540)

    return True

hm = pyHook.HookManager()
hm.SubscribeMouseAllButtonsDown(onclick)
hm.HookMouse()
pythoncom.PumpMessages()
hm.UnhookMouse()
x5fs3f
  • 31
  • 1
  • 2
  • Chances are that CS:Go's anti-cheat features detect you trying to mess with input and delay it. Either that or your computer can't handle the events in real-time with CS running. I find it much more likely to be the former. – Adam Smith Feb 12 '16 at 19:26
  • Makes sense i guess, i did not think that the anti-cheat would protect from messing with input outside of the game... – x5fs3f Feb 12 '16 at 20:50
  • That's pretty much its whole job. – Adam Smith Feb 12 '16 at 20:54
  • 2
    Turns out that it was not the anti cheat system that stopped it from working. Turning of raw input in the game menu made it work, after a few mins of tinkering i now have a nice no reciol script :) – x5fs3f Feb 13 '16 at 00:00
  • @x5fs3f thanks for that was stuck there for a while. Turning off Raw Input in Keyboard/Mouse Settings does work. – Nitin Kumar Jul 01 '21 at 11:51

0 Answers0