fivem_joystick
This plugin allows you to control aircraft and helicopters in your FiveM server using your joystick (flight stick).
The Python program is used to recognize joystick input and send it to the FiveM server. Communication between Python and JavaScript is achieved through WebSockets.
Currently, it can successfully recognize input from my Thrustmaster T16000M joystick, but you may need to make some adjustments based on your specific joystick.
It supports four axes: x, y, z, and r. These are mapped to the elevator, aileron, rudder, and throttle, respectively. The first half of the r-axis is for throttle, and the second half is for braking.
Currently, this plugin can control aircraft and helicopters, but there may be some latency due to network transmission.
Upcoming Development Work:
-
Optimize usage and interface
-
Implement command binding for the nunchuk
How to Use
-
Download the Release Version: Download the release version and deploy the joystick folder from the release into your FiveM server, specifically placing it under the resources folder.
-
Configure the Server: Add the following code to your server.cfg file:
start joystick
3. Run the Joystick Executable: Locate the joystick.exe file in the release version and double-click to run it. If you have a file named joystick_config.json, place it in the same directory as joystick.exe. The joystick.exe will automatically read this file upon execution.
-
Enter the FiveM Server: Ensure that the plugin is enabled when you join the FiveM server.
-
Establish Connection: In joystick.py, click “Allow FiveM Connection.” Then, in FiveM, enter the command
/joystick. If everything is set up correctly, you should see a bar on the right side of the screen displaying the current value of your joystick’s r-axis (throttle).
Enjoy flying with your joystick!
for download please goto github:
HJDCZY/fivem_joystick