A script built for ox core to persist vehicle positions through server reboots. When the resource stops it'll save all vehicles to the DB, when it gets started it'll respawn all the previously saved files.
# Debug Logs
# Refer to https://overextended.dev/ox_core#replicated for details
setr ox:debug 0
# When to save the vehicles
# 0 will only save the vehicles on the txadmin event signalling server shutdown,
# 1 will save the vehicles on resource stop (default option)
set persistvehicles:useTxAdminEvent 1
# Run a version check on resource start
# 0 doesn't run the version check
# 1 runs the version check
set persistvehicles:versioncheck 1
- Run the
base.sql
if not it will not work.
Install any LTS release of Node.js
from v18.
Install the pnpm
package manager globally.
npm install -g pnpm
Initialise your own repository by using one of the options below.
- Create a new repository using this template.
- Download the template directly.
- Use the GitHub CLI.
gh repo create <name> --template=overextended/fivem-typescript-boilerplate
Navigate to your new directory and execute the following command to install dependencies.
pnpm install
Use pnpm watch
to actively rebuild modified files while developing the resource.
During web development, use pnpm web:dev
to start vite's webserver and watch for changes.
Use pnpm build
to build all project files in production mode.
To build and create GitHub releases, tag your commit (e.g. v1.0.0
) and push it.