Warehousing System with Forklift Logistics for FiveM!
- Optimised Code, Resmon of 0~0.02ms. Peaking Whilst Creating the Pallets, and Worst Case Reaching 0.06ms if Using DrawText.
- Fully Configurable Warehousing System.
- Configurable Locations which Allow for Multiple Warehouses, each with their Own Vehicles, Themes and Job Requirements.
- Payments for Deliveries, with Penalties for Late Deliveries and Damaged Pallets.
- Strong Exploit Protection, with all Sensitive Data being Stored on the Server.
- 3 Locations Pre-Configured, with the Ability to Add More.
- Discord Logs for Payments and Exploits.
This script requires the following scripts to be installed:
Depending on your Framework and if you use a Targetting system, you will need to have installed either of the following dependencies:
- Always use the latest FiveM artifacts (tested on 6683), you can find them here.
- Download the latest release from Releases.
- Extract the contents of the zip file into your resources folder, into a folder which starts after your framework &
duffor; - Ensure the script in your
server.cfgafter your framework &duff. - Configure
shared/config.lua&server/config.luato your liking, see Configuration for more information.
Note: This script automatically configures it's Core functions to work with your framework.
['DebugMode'] = falseDebugModeboolean, whether to show debug messages in the console.
['Marker'] = {
enabled = true,
pallet = {
type = 0,
colour = {r = 240, g = 160, b = 1, a = 255},
scale = vector3(1.0, 1.0, 1.0)
},
pickup = {
type = 1,
colour = {r = 135, g = 30, b = 35, a = 155},
scale = vector3(1.5, 1.5, 1.5)
}
}enabledboolean, whether to enable the markers.pallet|pickuptable, the marker settings for the pallets and pickups.typeinteger, the marker type. More information can be found here.colourtable, the colour of the marker.rinteger, the red value.ginteger, the green value.binteger, the blue value.ainteger, the alpha value.
scalevector3, the scale of the marker.
['Fuel'] = function(vehicle)
if IsDuplicityVersion() == 1 then return end
exports['ps-fuel']:SetFuel(vehicle, 100.0)
endFuelfunction, this is used to set the fuel of the vehicle when it is spawned. You can use this to set the fuel in your own way. Whether that be ps-fuel, LegacyFuel or some other fuel resource.
['Keys'] = function(plate)
if IsDuplicityVersion() == 1 then return end
TriggerEvent('vehiclekeys:client:SetOwner', plate)
endKeysfunction, this is used to set the owner of the vehicle when it is spawned. You can use this to set the owner in your own way.
['Locations'] = {
{
name = 'Walker Logistics',
coords = vector3(153.81, -3214.6, 4.93),
job = false,
blip = {
enabled = true,
options = {
main = {
name = 'Walker Logistics',
colours = {
opacity = 255,
primary = 28
},
display = {
category = 'jobs',
display = 'all_select'
},
style = {
sprite = 525,
scale = 0.5,
short_range = true
}
},
garage = {
name = 'Garage',
colours = {
opacity = 255,
primary = 28
},
display = {
category = 'mission',
display = 'all_select'
},
style = {
sprite = 357,
scale = 0.6,
short_range = true
},
distance = 250.0,
},
pallet = {
colours = {
opacity = 255,
primary = 70
},
display = {
category = 'mission',
display = 'radar_only'
},
style = {
sprite = 478,
scale = 0.8,
-- short_range = true
}
},
pickup = {
colours = {
opacity = 255,
primary = 2
},
display = {
category = 'mission',
display = 'radar_only'
},
style = {
sprite = 67,
scale = 0.8,
short_range = true
}
}
}
},
['Peds'] = {
{ -- Sign In
model = `s_m_y_airworker`,
coords = vector4(153.81, -3214.6, 5.86, 87.71),
scenario = 'WORLD_HUMAN_CLIPBOARD'
}, { -- Garage
model = `s_m_y_dockwork_01`,
coords = vector4(120.89, -3184.05, 5.92, 271.27),
scenario = 'WORLD_HUMAN_AA_COFFEE'
}
},
['Garage'] = {
model = `forklift`,
coords = vector4(128.15, -3183.94, 5.87, 269.27)
},
['Pickup'] = {
vehicle = `benson`,
driver = `s_m_m_security_01`,
coords = {
vector4(305.12, -2831.82, 6.0, 91.27), -- Start
vector4(159.18, -3196.7, 6.01, 90.43) -- Stop
}
},
['Pallets'] = {
coords = {
vector4(160.38, -3141.0, 5.99, 270.0),
vector4(160.65, -3153.77, 5.98, 270.0),
vector4(160.43, -3165.1, 5.99, 270.0),
vector4(162.71, -3211.25, 5.95, 270.0),
vector4(142.92, -3210.27, 5.86, 270.0),
vector4(133.71, -3210.35, 5.86, 180.0),
vector4(117.83, -3217.85, 6.02, 180.0),
vector4(114.89, -3190.58, 6.01, 90.0),
},
models = {
'prop_boxpile_02b',
'prop_boxpile_02c',
'prop_boxpile_03a',
'prop_boxpile_06a',
'prop_boxpile_07a',
'prop_boxpile_07d',
'prop_boxpile_09a'
}
}
}
}namestring, the name of the location.coordsvector4, the coordinates of the location.blip.enabledboolean, whether to show a blip for the location.blip.optionstable, blip_options, see here for more information.mainblip_options, the main blip options.garageblip_options, the garage blip options.palletblip_options, the pallet blip options.pickupblip_options, the pickup blip options.
['Peds']table[], the ped settings for the location.modelinteger, the model of the ped.coordsvector4, the coordinates of the ped.scenariostring, the scenario of the ped.
['Garage']table, the garage settings for the location.modelinteger, the model of the garage.coordsvector4, the coordinates of the garage.
['Pickup']table, the pickup settings for the location.vehicleinteger, the model of the pickup vehicle.driverinteger, the model of the driver.coordsvector4[], the coordinates of the pickup vehicle.
['Pallets']table, the pallet settings for the location.coordsvector4[], the coordinates of the pallets.modelsstring[], the models of the pallets.
['Notify'] = function(source, text, type, time)
local src = source
local types = {['error'] = 'error', ['success'] = 'success', ['primary'] = 'primary'}
-- Use the above table to change notify types to suit your notification resource
local is_server = IsDuplicityVersion() == 1
if is_server and not src then return end
-- ServerSide Notification
if is_server then
-- local Player = duff.bridge.getplayer(src)
-- if not Player then return end
-- Player.showNotification(text)
TriggerClientEvent('QBCore:Notify', src, text, types[type] or 'primary', time)
else
-- ClientSide Notification
local Core = duff.bridge.getcore()
-- Core.ShowNotification(text, types[type] or 'primary', time)
Core.Functions.Notify(text, types[type] or 'primary', time)
end
endNotifyfunction, this is used to send notifications to the player. You can use this to send notifications to the player in your own way. Whether that be okok, base QB or ox_lib!typestable, this is used to change the notification types to suit your notification resource. The default is set toqb's notification types. To change this, simply change the value of the key to the type of notification you want to send. (ie. for okok, change['primary'] = 'primary'to['primary'] = 'info').
['Target'] = {
enabled = true,
distance = 1.5,
icon = {
sign_up = 'fas fa-clipboard-list',
garage = 'fas fa-warehouse'
}
}enabledboolean, whether to use a target system or drawtext.distancefloat, the distance the player has to be within to see the target.icontable, the icons for the target. You can find the icons here.sign_upstring, the icon for the sign up target.garagestring, the icon for the garage target.
['DiscordLogs'] = {
enabled = true,
image = '',
colour = 65309,
webhook = ''
}enabledboolean, whether to log to discord.imagestring, the image to use for the logs.colourinteger, the colour of the embed, you can find the colours here.webhookstring, the webhook to send the logs to.
['Kick'] = {
message = 'You have been kicked for misusing forklift events.'
}messagestring, the message to send to the player when they are kicked.
['Pay'] = {
{ -- Walker Logistics
min_per_pallet = 50,
time_limit = 180,
max_loads = 5
}
}Paytable[], the payment settings for the locations. The index of the table should match the index of the location in theLocationstable.min_per_palletinteger, the minimum payment per pallet.time_limitinteger, the time limit for the job.max_loadsinteger, the maximum loads for the job.
- Join my discord and use the relative support channels.