Open config.lua in VSCode, Notepad++, or a similar editor. Using the built-in Notepad application is strongly discouraged as it may cause issues!
Add your server secret, found on the Manage Servers page, to the config.
Make sure to add your resource to the server.cfg and restart the server!
Congratulations! Assuming all goes well, your console will not be full of errors and everything should work! The rest of the tutorial is optional! 🎉🎉
Setting Up RCON (Optional)
RCON is no longer mandatory, and is instead only recommended for developers already experienced with RCON. The only benefit to using RCON is that commands and staff actions will be executed 2-4 seconds faster.
Pick a secure RCON password, preferably between 8-12 characters, that cannot be guessed easily. Do not share this password with anyone else!
Add the password to the bottom of your server.cfg as demonstrated below.
Navigate to the Manage Servers page, and configure each server to include the correct IP and port, as well as your newly configured RCON password.
To check if RCON is working properly, you can use our Debug Server tool, located on the Server Dashboard of whatever server you are trying to test!
Setting Up Logging (Optional)
In order to have the most possible usage of StaffWatch's chat and command logging system, you will have to modify the default chat resource. Luckily it is not that difficult.
Navigate to the folder containing the default FiveM chat resource. The resource is typically located under /cfx-server-data/resources/[gameplay]/chat.
In this directory, open the file labeled cl_chat.luaand copy-paste the code in the box below at the location marked by the arrows in the code-block below.
Insert the code above into the following location.
The arrows are there for reference, do not actually add them into the Lua file or it will break.