Skip to main contentDownload
https://www.leaderos.net/plugin/fivem
Source Code
https://github.com/leaderos-net/fivem-leaderos-connect
Installation
Step 1: Download the Script
- Download the ZIP file.
Step 2: Extract and Upload
- Extract the contents of the downloaded ZIP file.
- Upload the
leaderos_connect folder to your server’s resources directory (e.g., resources/leaderos_connect).
-
Open your server’s
server.cfg file and add the following lines:
ensure leaderos_connect: Ensures the script starts with your server.
add_ace resource.leaderos_connect command allow: Grants the script permission to execute server commands.
- Open
resources/leaderos_connect/config.js and configure the following settings:
websiteUrl: The URL of your LeaderOS-based website. Example: https://example.com
apiKey: Your website’s API key. You can find this in your LeaderOS control panel under Dashboard > Settings > API.
serverToken: The unique token for your server. You can find this in your LeaderOS control panel under Dashboard > Store > Servers > [Your Server] > Server Token.
checkPlayerOnline: If set to true, commands for offline players will be queued and executed when they join. If set to false, commands are executed immediately regardless of player status.
lang: The language for system messages. Supported languages: en, tr
Step 5: Restart Your Server
- Restart your FiveM server to apply the changes.
- If everything is configured correctly, you should see the following message in the server console:
[LeaderOS Connect] Successfully connected to the server! (or the equivalent in your selected language).
Troubleshooting
- Website URL Error: If you encounter a URL error, ensure your URL starts with
https:// and does not end with a trailing /.
- API Key/Server Token Error: Double-check that both values are copied correctly from your LeaderOS panel.
- Permission Error: Ensure you have added the
add_ace line to your server.cfg file.
- Resource Not Starting: Check the server console for error messages and confirm that the folder is named
leaderos_connect and located in the correct directory.