Will it work will qs_inventory? Quasar with ESX
you’d have to add support for that
v2.0.0
There’s a beta out now! Leave some suggestions and lmk any issues!
(This is a rework and fixes items)
Since I’ve gotten no feedback whatsoever. I’ll be releasing this new version (v2.0.0 )!
If there are errors, I’ll fix them after I’m made aware of them!
Update to v2.0.0 today! (make sure to keep a backup of your old version you used!)
1 Like
v2.0.1
Preview coming soon
What’s Changed
Bag images for those that dont have any! by @Flek26 in #7
Easier to read config by @PenguScript in 2cb3b64
Apparently I had some code that I didn’t add to the repo (oops) here is the FIXED DELIVERY a71d6bb
New Contributors
Full Changelog : v2.0.0…v2.0.1
Github Release
1 Like
What’s Changed?
Made the config easier for those who are lazy.
Full Changelog : Comparing v2.0.1...v2.0.2 · PenguScript/pengu_gruppe6delivery · GitHub
1 Like
The update we’ve all been waiting for!
v2.0.5
What’s Changed
Added interact options by @Nathan-FiveM in #9
Update interact from entity to model by @Nathan-FiveM in #11
v2.0.5 by @PenguScripts in #12
Added More Direction that fixes the repetitive cycle of the bag runs.
New Contributors
@Nathan-FiveM made their first contribution in #9
Full Changelog : v2.0.4…v2.0.5
1 Like
Idea to maybe use , if criminals see bank truck running around they can rob the truck for what cash has been picked up , maybe a silent alarm the driver can pull ?
Linden
February 22, 2024, 2:00pm
33
Quite well done, but just a few things regarding security.
May want to ensure they can’t get more than the valid number of bags from whoever/wherever they’re stealing the item from (I didn’t look at the specifics).
if Config.Inventory == 'ox' then
local slot = exports.ox_inventory:GetSlotIdWithItem(source, itemName)
if slot then
if exports.ox_inventory:RemoveItem(source, itemName, 1, nil, slot) then end
end
elseif Config.Inventory == 'qb' then
if Player.Functions.RemoveItem(itemName, 1) then end
end
end)
RegisterNetEvent('pengu_gruppe6delivery:RobbedItem', function(ink, amount)
local Player = QBCore.Functions.GetPlayer(source)
if ink == 'uninked' then
if Config.Inventory == 'ox' then
if exports.ox_inventory:CanCarryAmount(source, Config.BagItemName) then
if exports.ox_inventory:AddItem(source, Config.BagItemName, amount) then end
end
elseif Config.Inventory == 'qb' then
if Player.Functions.AddItem(Config.BagItemName, amount) then end
end
elseif ink == 'inked' then
Same validation required.
end
end)
RegisterNetEvent('pengu_gruppe6delivery:RemoveItemFromTrunk', function(plate, itemName)
local vehicleInventoryId = 'trunk'..plate
local vehicleInventory = exports.ox_inventory:GetInventory(vehicleInventoryId, false)
exports.ox_inventory:RemoveItem(vehicleInventory.id, itemName, 1)
end)
RegisterNetEvent('pengu_gruppe6delivery:AddItem', function(itemName)
local Player = QBCore.Functions.GetPlayer(source)
if Config.Inventory == 'ox' then
if exports.ox_inventory:CanCarryAmount(source, Config.BagItemName) then
if exports.ox_inventory:AddItem(source, Config.BagItemName, 1) then end
end
elseif Config.Inventory == 'qb' then
Player.Functions.AddItem(Config.BagItemName, 1)
end
end)
You’ll want to keep track of their delivered bags on the server.
-- Set Duty
QBCore.Functions.CreateUseableItem(Config.BagItemName, function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if Player.Functions.GetItemByName(item.name) then
print('opening')
end
end)
RegisterNetEvent('pengu_gruppe6delivery:RecievePaycheck', function(TotalBags, TotalOrganized)
local Player = QBCore.Functions.GetPlayer(source)
local Amount = 0
for i=1, TotalBags do
Amount = Amount + math.random(Config.MoneyPerBagMin,Config.MoneyPerBagMax)
end
for i=1, TotalOrganized do
Amount = Amount + math.random(Config.MoneyPerOrganizedMin,Config.MoneyPerOrganizedMax)
end
Player.Functions.AddMoney(Config.MoneyType, Amount, "Gruppe 6 Deliveries")
TriggerClientEvent('pengu_gruppe6delivery:Notify', source, "You've recieved $"..Amount.." from Gruppe 6!", nil, "primary", 4000)
2 Likes
v2.0.7
What’s Changed
Added Vehicle Keys Function to Config.lua by @PenguScript in #16
Full Changelog : v2.0.6…v2.0.7
GitHub Link
Next, I’ll look over Linden’s comment and make many tweaks to make my resource better!
Issues regarding notifications/key issues (every issue) should be fixed now.
Download v2.0.8 in Releases!
GitHub Link