- Orders will be the same for all players, once a person receives the order, it will no longer appear in the others.
- If players mark, scrip will receive a notification for each new order.
- 0.00ms when out of use. 0.03 ms when in use.
- open ui command is “openDelivery”
- close ui command if bugged “closeDelivery”
- In the config, you can set the timing with which new orders will be placed, which items, how many pieces, price, duration and maximum number of orders will be ordered.
- Its ready for ESX and QBCORE
- You can integrate it into your framework by editing the server event.
RegisterNetEvent('plt_delivery:Delivey')
- With the client side event, you can enable the UI to be opened from any other script you want.
TriggerEvent("plt_delivery:TakeOrders")
Trigger Photo
- You can use it in your own notification system by changing its function.
Notification Photo
if you just want to tie it to a job. for ESX
- add to client.lua
local PlayerData = {}
Citizen.CreateThread(function(...)
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
if ESX == nil then Citizen.Wait(2000)
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj; end)
end
while ESX.GetPlayerData().job == nil do Citizen.Wait(10) end
PlayerData = ESX.GetPlayerData()
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
PlayerData.job = job
end)
- and
RegisterNetEvent('plt_delivery:TakeOrders')
AddEventHandler('plt_delivery:TakeOrders', function()
TriggerServerEvent("plt_delivery:SendMeOrders")
end)
- change to
RegisterNetEvent('plt_delivery:TakeOrders')
AddEventHandler('plt_delivery:TakeOrders', function()
if PlayerData.job.name == "courier" then
TriggerServerEvent("plt_delivery:SendMeOrders")
else
singleNotify("error","You are Not Courier",5000)
end
end)
The version added to the shop locations with qtarget.
Thank you to @SimpleGamerDK for the arrangement.
client.lua (9.2 KB)
My Other Script: