Skip to content

openmailbox/tsrp-fivem

Repository files navigation

Time Served FiveM Code

This repository contains open-source code for a GTAV mod/game called Time Served.

Join the community Discord to connect with us.

Contributing

Contributions are welcome. Here are instructions for setting up a local development environment:

  1. Install Docker Desktop.
  2. git clone this repository into a local directory of your choice.
  3. Obtain your own license key from the FiveM Keymaster.
  4. Create your local config by copying cfg/server.orig.cfg to cfg/server.cfg.
  5. Modify cfg/server.cfg and add your FiveM license key at the bottom where it says MY_LICENSE_KEY.
  6. Use Docker Compose to execute compose up on the compose.yaml file.
    1. If using VSCode, the Docker plugin adds a right-click option to the compose.yaml file.
  7. In your browser, navigate to http://localhost:40125. You will see the txAdmin setup screen.
  8. Inspect the logs of the resulting tsrp-fivem container to find the pin number to setup txAdmin.
  9. Complete txAdmin setup and start the FiveM server.
    1. Select "Local Server Data" for Deployment Type.
    2. Input /fivem/server-data for Local Server Data.
    3. Input config/server.cfg for Server CFG File.
  10. Open your FiveM client and connect to localhost on port 30120.

Resources in src are linked into the running container as a volume, meaning changes will be reflected immediately.

The base FiveM-provided and mysql-async resources are linked at build time, meaning pulling in any new changes is as easy as rebuilding the image. In the future, we will probably need to change this to support a scenario where we want to fork or modify the base resources (i.e. chat). For now, it's a 1 or 0 choice to use or not use any of them which we can control from server.cfg.

Learn about development conventions by looking at the example resource template. The README files inside individual resources provide more detailed developer instructions for what the code does and how to use it.