Answer the question
In order to leave comments, you need to log in
How to control the mouse in games with Python?
Hello everyone, I'm writing a cheat for Samp, I think some people know about auto + c.
In short, the bot must perform the following actions:
1. Opens the sight (right mouse button)
2. makes a shot (left mouse button)
3. (presses "C")
I took the pyautogui library and the keyboard library to help, the sight opens, but after this immediately it aims at the floor, at the very bottom.So
my question is, how do I make it so that the scope is straight or how to raise it up with python?
Answer the question
In order to leave comments, you need to log in
I would not advise using these libraries, they are sometimes not perceived by games. Probably autohotkey(ahk) would be better.
Here's a site for you , translate and try, everything is perfectly clear.
Look carefully at the keyboard layout if you press the keyboard, be sure to use English :)
import pyautogui
import time
pyautogui.click(button='right') #pyautogui.click() - так вроде бы тоже работает
pyautogui.move(0, -300, 0.4) # 0: ось х, -300: ось y, скорость перемещения мыши
time.sleep(4)
pyautogui.hotkey('c') #нажимает "с".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question