⚙️Configuration
Shared
🧑 Ped
ped:
table
model:
string
coords:
vector4
scenario:
string
- List of scenarios: (Link)
This changes the model, coordinates and scenario (animation) of the GoPostal mission ped.
🅿 Parking
parking:
table
vector4
List of coordinates where job vehicles will spawn. Each vehicle needs the coordinates (and the area around them) to be clear of peds and vehicles in order to spawn the vehicle. If no spots are found, the mission will not start. This is to prevent random peds and vehicles from being deleted unintentionally.
📦 deletePackage
deletePackage:
number
Amount of time (in ms) after which the dropped off package prop will be deleted. All drop-off props are created client-side and are not networked to avoid pileups in servers with large playerbases.
Client
💭 Notify
Notification API that allows you to use whatever notification system your server is using. Change the body of the function to match your notification exports and you're good to go. This is set to use ox_lib notifications by default.
⛽ setVehicleFuel
Sets vehicle fuel. If you use a resource like ps-fuel
or CDN-fuel
, you should replace the body of this function with whatever exports those scripts use.
🔑 setVehicleKeys
Gives the player keys to the delivery vehicle. If you are using a script that changes this functionality, you should replace the body of this function accordingly.
🟡 setBlipProperties
Sets delivery point blip properties. Feel free to change it to your liking.
🔵 setMainBlipProperties
Sets the mission ped blip. This is the main map blip that will guide the player to the job start/end area.
⭕ Marker
This is the circle that appears on the ground and allows the player to drop off a package. If you would like to disable it for whatever reason (not recommended), set the diameter
to 0.0 and rgba
to 0.
💬 Prompt options
This is the lib.showTextUI
prompt that shows whenever a player enters a delivery marker. Further documentation available here: https://overextended.dev/ox_lib/Modules/Interface/Client/textui
Server
💭 Notify
Notification API that allows you to use whatever notification system your server is using. Change the body of the function to math your notification exports and you're good to go. This is set to use ox_lib notifications by default.
⭐ Experience module
The experience module allows for players to gain experience for each delivery. As they progress through the levels, their experience multiplier will rise, resulting in higher rewards per delivery and bonus rewards.
This module is disabled by default. If you would like to utilize the full functionality of the script, it is recommended that you enable it. To enable the module, please follow the instructions in the "Installation" section from step 2.
The reward multiplier formula is very simple:
If you decide to not use reward multipliers but want to keep the flair of level labels, set all multipliers to 1.0
.
WARNING: At least one level which has a base requirement of 0 xp must exist. If this requirement is not met, the experience menu will most likely fail to function correctly.
You may modify, add or remove levels as long as you follow the data structure correctly.
There is also the xpGain()
function. You can write whatever you want in the body of the function, as long as it returns an integer. Decimal values are not allowed. Example:
The default database integer limit (for the myGoPostal_progression
table) is int(11) unsigned
, which means that the maximum amount of xp a single person can have is .
I highly doubt that anyone will ever surpass this number, as long as you use reasonable values in the config. But who am I to tell you what to do, right? Feel free to use bigint unsigned
if you feel like it.
🔽🔼 Minimum & maximum deliveries
These two set the range for a random number generator that decides how many deliveries a player will have to complete to finish a mission. Shrimple as. 🦐
💰 Rewards & bonus rewards
The Rewards
and BonusRewards
tables not only look identical, they also work in the same exact way (wow! 🤯).
Rewards / BonusRewards:
table
enabled:
boolean
- If set to false, that type of reward will no longer work.accountType:
string
- Account type that money will be added to. Usually'cash'
or'bank'
.[
string
]:function
- Thestring
must be unique and matchArea.name
(explained further in the Areas section). Must return aninteger
.
server/rewards.lua
is a module that you can modify to fit your server's banking and payment logic. Both payment()
and bonusPayment()
pass source
and amount
arguments, which should be enough to generate sufficient data for most banking / payment resources.
💼 Job checks
You may use the job check feature to only allow certain jobs to start deliveries. To do so, set CheckJob
to true
in server/config.lua
, and list allowed jobs in the AllowedJobs
table:
Each key should be a valid QBCore job name. "Under the hood" the script checks the players PlayerData.job.name
and tries to match it to a valid key-value pair in AllowedJobs
, as long as CheckJob
is set to true
. Using a format like ['trucker']
also works for defining keys.
This is a whitelist, therefore you only need to define which jobs are allowed to start deliveries. Any job that is not on this list will not be allowed to start deliveries, as long as CheckJob
is set to true
.
🚚 Vehicles
All entries in the vehicles table must be a table of their own, and must contain a model
property. extras
, colorPrimary
, colorSecondary
and livery
are all optional. Here's the GPVehicle
class structure:
GPVehicle:
table
model:
string
colorPrimary?:
number
colorSecondary?:
number
livery?:
number
Livery ID
extras?:
table
[number]: boolean
🌍 Areas
You are able to designate your own delivery areas by following the Areas
table data structure. Each entry is a table (order of appearance will match in-game menu order of appearance). The coords
property must be a table containing vector4 entries. If the total number of entries is smaller than SV_Config.MinDeliveries
, the script may not work properly (a fail-safe should stop this from breaking the script, but it's not guaranteed).
Area:
table
name:
string
Must be a unique string. Must have a matching
Rewards
orBonusRewards
key to receive rewards for delivery or on mission end.
menu:
table
- Matches ox_lib'slib.registerContext
properties (title, description, icon)title:
string
description?:
string
icon?:
string
coords:
table
- Each entry in the table should be avector4
⛔ The "don't touch" zone
Debug
- self explanatory. This should be set to false unless you want your console to be a mess.GenerateDeliveriesLoopLimit
- a fail-safe mechanism so that your server doesn't hang up on an infinite loop in case the location randomizer fails to complete its tasks for whatever reason. The default of 1000 tries should be sufficient, unless your area coords table is extraordinarily big, or you are extremely unlucky.
Last updated