So, the only problem I have is MTA not registering key presses made by pyautogui, what's worse, it registeres when I'm not in any server, it stops working as soon as I join a server.
I tried different methods than pyautogui but nothing works, I am sure that there is a way to make it work, it doesn't need to be in python but I want to find a way to do that.