Config File
tgiCoreExports = exports["tgiann-core"]
config = tgiCoreExports:getConfig()
---@type "bank" | "cash" | "money"
config.moneyType = "bank"
-- Toggles for the two rental modes. Disabled modes are hidden in the rent popup
-- and rejected server-side. At least one must be enabled.
---@type boolean
config.timedRentalEnabled = true
---@type boolean
config.unlimitedRentalEnabled = true
---@type number # seconds countdown after exiting vehicle before auto delete (timed rental)
config.timedRentalCountdown = 300
-- Percentage of the rent fee the shop owner earns when a config vehicle is rented
-- at a player-ownable location. Deposits are NEVER paid to the shop owner.
---@type number # 0-100
config.configVehicleRevenuePercent = 25
-- Percentage of the rent fee the shop owner earns when a player-listed vehicle is
-- rented at a player-ownable location. Deposits are NEVER paid to the shop owner.
---@type number # 0-100
config.playerListingRevenuePercent = 90
-- Fallback values used for config vehicles that omit `colors` or `performance`.
-- Player listings read these from the real vehicle properties, so this only
-- applies to the fixed fleet in `config.location[...].vehicles`.
-- Palette of { primary, secondary } pairs. When a config vehicle omits
-- `colors`, one entry from this list is picked at random and used.
---@type VehicleColors[]
config.defaultVehicleColors = {
{ primary = { 128, 128, 128 }, secondary = { 0, 0, 0 } },
{ primary = { 200, 50, 50 }, secondary = { 20, 20, 20 } },
{ primary = { 30, 30, 30 }, secondary = { 180, 180, 180 } },
{ primary = { 40, 80, 180 }, secondary = { 255, 255, 255 } },
{ primary = { 240, 240, 240 }, secondary = { 40, 40, 40 } },
{ primary = { 80, 140, 60 }, secondary = { 25, 25, 25 } },
}
---@type VehiclePerformance
config.defaultVehiclePerformance = {
engine = 0,
brakes = 0,
transmission = 0,
suspension = 0,
armor = 0,
turbo = false,
}
---@type number # radius (meters) used to check if the spawn point is already occupied by a vehicle
config.spawnCheckRadius = 3.0
-- When enabled, the first `#prefix` characters of the rented vehicle's plate are
-- replaced with `prefix`. Example: plate "ABC123AB" with prefix "RENT" → "RENT23AB".
-- Applies to both fleet vehicles and player-listed vehicles during an active rental.
---@type { enabled: boolean, prefix: string }
config.rentalPlatePrefix = {
enabled = true,
prefix = "RNT",
}
---@type string # inventory item name given to the renter on rent
config.documentItem = "rental_document"
---@type number # documents older than this many days are purged daily
config.documentExpireDays = 3
-- Marker shown at each location's spawn point for the "return vehicle" prompt
---@type MarkerConfig
config.returnMarker = {
dist = 20,
type = 20,
size = vector3(0.5, 0.5, 0.5),
color = { r = 54, g = 255, b = 159, a = 100 },
safeCamera = true,
bobUpAndDown = false,
zOffset = -0.7,
}
-- Marker shown at each shop's addVehicleCoords for the shop-owner "add vehicle" prompt
---@type MarkerConfig
config.addVehicleMarker = {
dist = 10,
type = 36,
size = vector3(0.5, 0.5, 0.5),
color = { r = 54, g = 255, b = 159, a = 100 },
safeCamera = true,
bobUpAndDown = false,
zOffset = -0.7,
}
-- Player-listed vehicles: price range limits per GTA vehicle class (enforced server-side)
-- Class IDs: 0=Compact, 1=Sedan, 2=SUV, 3=Coupe, 4=Muscle, 5=SportsClassic,
-- 6=Sports, 7=Super, 8=Motorcycle, 9=OffRoad, 10=Industrial, 11=Utility, 12=Vans,
-- 13=Cycle, 14=Boat, 15=Helicopter, 16=Plane, 17=Service, 18=Emergency,
-- 19=Military, 20=Commercial, 21=Trains, 22=OpenWheel
---@type PlayerVehiclePricing
config.playerVehiclePricing = {
[0] = { rentFee = { min = 50, max = 300 }, deposit = { min = 100, max = 600 } }, -- Compact
[1] = { rentFee = { min = 80, max = 400 }, deposit = { min = 160, max = 800 } }, -- Sedan
[2] = { rentFee = { min = 100, max = 500 }, deposit = { min = 200, max = 1000 } }, -- SUV
[3] = { rentFee = { min = 150, max = 800 }, deposit = { min = 300, max = 1600 } }, -- Coupe
[4] = { rentFee = { min = 150, max = 800 }, deposit = { min = 300, max = 1600 } }, -- Muscle
[5] = { rentFee = { min = 200, max = 1000 }, deposit = { min = 400, max = 2000 } }, -- Sports Classic
[6] = { rentFee = { min = 250, max = 1500 }, deposit = { min = 500, max = 3000 } }, -- Sports
[7] = { rentFee = { min = 500, max = 3000 }, deposit = { min = 1000, max = 6000 } }, -- Super
[8] = { rentFee = { min = 80, max = 400 }, deposit = { min = 160, max = 800 } }, -- Motorcycle
[9] = { rentFee = { min = 150, max = 700 }, deposit = { min = 300, max = 1400 } }, -- Off-road
default = { rentFee = { min = 50, max = 1000 }, deposit = { min = 100, max = 2000 } },
}
---@type ConfigVehicle[]
local defaultVehicleList = {
{
model = "adder",
label = "Adder",
price = 500,
deposit = 1000,
category = "sport",
colors = { primary = { 26, 26, 26 }, secondary = { 44, 44, 44 } },
performance = {
engine = 4,
brakes = 3,
transmission = 3,
suspension = 3,
armor = 0,
turbo = true,
},
},
{
model = "zentorno",
label = "Zentorno",
price = 450,
deposit = 900,
category = "sport",
performance = {
engine = 3,
brakes = 2,
transmission = 3,
suspension = 2,
armor = 0,
turbo = true,
},
},
{
model = "sultan",
label = "Sultan",
price = 150,
deposit = 300,
category = "sedan",
},
{
model = "schafter2",
label = "Schafter V12",
price = 200,
deposit = 400,
category = "sedan",
performance = {
engine = 2,
brakes = 2,
transmission = 2,
suspension = 1,
armor = 0,
turbo = false,
},
},
{
model = "baller",
label = "Baller",
price = 250,
deposit = 500,
category = "suv",
colors = { primary = { 59, 59, 59 }, secondary = { 59, 59, 59 } },
},
{
model = "blista",
label = "Blista",
price = 80,
deposit = 160,
category = "compact",
},
}
---@type BlipConfig
local defaultBlip = {
sprite = 523,
colour = 32,
scale = 0.7,
label = "BLIP"
}
---@type table<string, LocationConfig>
config.location = {
-- =====================================================================
-- this entry, or copy it as a template when adding a new location.
-- Other entries below reuse `defaultBlip` / `defaultVehicleList` for brevity.
-- =====================================================================
--[==[
["airport"] = {
-- NPC the player interacts with to open the rental menu.
npc = {
ped = `s_m_m_pilot_01`, -- model hash
coords = vector4(427.3820, -639.4905, 28.5001, 275.6836), -- x, y, z, heading
},
-- Map blip pinned to the NPC's position.
blip = {
sprite = 523, -- GTA blip sprite id (see FiveM blip list)
colour = 32, -- blip colour index
scale = 0.7,
label = "BLIP", -- language key; rendered via t(label)
},
-- Where rented vehicles spawn and where the "Return Vehicle" prompt appears.
spawnCoords = vector4(423.3707, -639.0389, 28.5001, 170.0601),
-- Fixed fleet for this location. `colors` and `performance` are optional
-- per vehicle; omitted fields are randomized client-side.
vehicles = {
{
model = "adder", -- spawn name (passed to CreateVehicle)
label = "Adder", -- display name in the UI
price = 500, -- rent fee
deposit = 1000, -- refundable deposit for unlimited rentals
category = "sport", -- "sedan" | "suv" | "sport" | "compact" | "motorcycle"
-- Optional cosmetics. RGB arrays, each channel 0-255.
colors = { primary = { 26, 26, 26 }, secondary = { 44, 44, 44 } },
-- Optional performance mod levels (0-4 for levels, boolean for turbo).
performance = {
engine = 4,
brakes = 3,
transmission = 3,
suspension = 3,
armor = 0,
turbo = true,
},
},
-- Minimal entry: UI will randomize colors + performance.
{
model = "sultan",
label = "Sultan",
price = 150,
deposit = 300,
category = "sedan",
},
},
-- Optional. If present, this location can be bought by a player and
-- managed as a rental shop. Omit this whole block for NPC-only locations.
playerOwnable = {
price = 50000, -- shop purchase price
rentMoneyPercent = 0.8, -- The value is multiplayer (0.1 = 10%) (the money spent by the player * earnPercent)
rentPeriodDay = 7, -- Period in days that the players can rent company
rentPayBeforeDay = 3, -- Period in days that the player can renew his rent before it ends
-- Optional control-panel fields:
--priceType = "bank", -- "bank" | "cash" | ...
--priceSymbol = "$",
--noMoneyMsg = "NO_MONEY", -- language key
-- Coord where the shop owner gets the "Add vehicle to rental" prompt.
addVehicleCoords = vector4(428.3918, -633.9823, 28.5001, 295.1385),
},
},
]==]
["pd"] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(406.0087, -1011.0125, 29.2669, 35.1983),
},
spawnCoords = vector4(401.7325, -1013.4661, 29.3901, 180.1009),
vehicles = defaultVehicleList,
blip = defaultBlip,
},
["altastreet"] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(-293.4568, -986.6376, 31.0806, 70.0474),
},
spawnCoords = vector4(-288.8806, -984.6809, 31.0806, 245.4082),
vehicles = defaultVehicleList,
blip = defaultBlip,
playerOwnable = {
price = 50000,
rentMoneyPercent = 100,
rentPeriodDay = 3,
rentPayBeforeDay = 1,
addVehicleCoords = vector4(-296.3748, -985.5549, 31.0806, 247.1913),
},
},
["pinkcage"] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(275.0741, -222.1188, 54.0136, 162.9539),
},
spawnCoords = vector4(273.4558, -225.2282, 53.9513, 192.9918),
vehicles = defaultVehicleList,
blip = defaultBlip,
playerOwnable = {
price = 50000,
rentMoneyPercent = 100,
rentPeriodDay = 3,
rentPayBeforeDay = 1,
addVehicleCoords = vector4(273.4558, -225.2282, 53.9513, 192.9918),
},
},
["dashound"] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(429.9981, -655.8502, 28.7266, 63.1332),
},
spawnCoords = vector4(425.4204, -658.0930, 28.5569, 182.2222),
vehicles = defaultVehicleList,
blip = defaultBlip,
playerOwnable = {
price = 50000,
rentMoneyPercent = 100,
rentPeriodDay = 3,
rentPayBeforeDay = 1,
addVehicleCoords = vector4(428.8923, -650.7154, 28.5003, 307.5319),
},
},
["airport"] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(-1038.0242, -2730.3474, 20.1693, 329.6541),
},
spawnCoords = vector4(-1036.5391, -2727.1572, 20.1392, 241.9838),
vehicles = defaultVehicleList,
blip = defaultBlip,
playerOwnable = {
price = 50000,
rentMoneyPercent = 100,
rentPeriodDay = 3,
rentPayBeforeDay = 1,
addVehicleCoords = vector4(-1041.6627, -2724.0664, 20.1449, 252.5669),
},
},
--[[
[""] = {
npc = {
ped = `a_m_y_business_03`,
coords = vector4(),
},
spawnCoords = vector4(),
vehicles = defaultVehicleList,
blip = defaultBlip,
playerOwnable = {
price = 50000,
rentMoneyPercent = 100,
rentPeriodDay = 3,
rentPayBeforeDay = 1,
addVehicleCoords = vector4(),
},
},
]]
}
---@type table<string, table<string, string>>
config.langs = {}
Last updated