Skip to content

Installation

This guide will walk you through installing prp-racing on your FiveM server.

Installation steps

1
Download the resources
Download both prp-racing and prp-racing-assets from the CFX portal and place them in your resources folder.
2
Add to server.cfg
Add both resources to your server.cfg after all dependencies, with the assets resource before the main script.
ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-racing-assets
ensure prp-racing
3
Add items
Add the required item to your inventory resource — see Items below.
4
Configure config.lua
Open config.lua to configure the item name, leaderboard timeout and checkpoint models.
5
Configure sv_config.lua
Open sv_config.lua to configure ELO settings, crew settings, system race settings, reward splits, currencies, police dispatch and allowlist options.
6
Optional: inventory icons
Custom inventory icons are included in the installation/inventory icons folder. Copy them to your inventory resource's image directory if you'd like to use them.

Items

Add the item below to your inventory resource using the format appropriate for your setup.

Add the item below to your ox_inventory into data/items.lua.

lua
["racing_tablet"] = {
    label = "Racing Tablet",
    weight = 500,
    stack = false
},
["pink_slip"] = {
    label = "Pink Slip Claim",
    weight = 5,
    stack = false
}

RequireItemToOpen

Set Config.RequireItemToOpen = false in config.lua to let any player open the tablet without needing the item. The item is still required to participate in a race even when this is disabled.

You will still need to use the export to open the UI for the player in the case Config.RequireItemToOpen is true.

Database

All required tables are created automatically on first server start:

TablePurpose
racing_usersPlayer profiles, nicknames, daily reward state
racing_seasonsSeason definitions and status
racing_crewsCrew data, members, roles
racing_tracksTrack checkpoints and props
racing_tournamentsTournament definitions and brackets
racing_eloELO per player/crew per season or tournament
racing_racesRace instances
racing_player_racesPer-player race results, lap times, rewards
racing_tracks_favouritesPlayer-favourited tracks
racing_season_rewardsEnd-of-season reward claims
vehicles_pink_claimsPending pink slip vehicle transfers