A simple vehicle garage system created with a more versatile structure, allowing players to manage their vehicles from any location.
- Utilizes Prisma to interact with your database.
- The process of spawning vehicles is primarily handled by ox_core.
- Supports logging via Discord.
- Administrators have the ability to manage and oversee vehicles via command.
If you download the source code via the green Code
button, you'll need to build the resource. Information on how to do this is provided below. If you prefer not to build it, you can download latest release and drag and drop it into your server. However, any changes made to the built resource will need to be re-built to apply the changes.
- Download and install the LTS version of Node.js.
- Open a command-line terminal (e.g., Terminal, Command Prompt).
- Enter
node --version
to verify the installation. - Run
npm install -g pnpm
to globally install the package manager pnpm. - Download or clone the repository with
git clone https://github.com/arlofonseca/fivem-parking
. - Install all dependencies with
pnpm i
. - Create a new file named
.env
within the root directory. - Copy the contents of
.env.example
to the newly created.env
file and edit accordingly. - Connect your database with
pnpm pull
to add Prisma models toschema.prisma
. - Generate Prisma client using
pnpm generate
. - Build the resource with
pnpm build
.
Use pnpm watch
to rebuild whenever a file is modified.
- Displays a list of your owned vehicles.
- Retrieve your vehicle from your vehicle garage via its unique identifier.
If you do not know the unique identifier of your vehicle, you can find it when executing the /list
command.
- Stores your vehicle into your vehicle garage.
- Retrieve your vehicle from the impound via its unique identifier, restoring it to the
stored
state.
This will only work if you are within the radius of the location defined in config.json
.
- Removes a vehicle from the database.
This action cannot be reversed.
- Spawns a vehicle and saves it to both the database and your vehicle garage.
- Adds a vehicle to the target player's vehicle garage.
- Displays a list of the target player's owned vehicles.
- BerkieB originally made this resource. I wanted it publicly available, so here it is.