Documentation, deprecated old points, removed incomplete clothing bridge.

Documentation added, deprecated old points, removed incomplete clothing bridge. I migrated the points into the new system and added deprecation notices. Cleaned some white spaces because they made me unhappy. Added GetStreetNameAtCoords as it may be useful to return a string for others. Added support for lb-tablet dispatch alerts (thank you loaf)
This commit is contained in:
MrNewb committed 2025-04-02 07:27:13 -04:00
1 parent 3e936d2c1c
commit 6bdee6ad91
27 files changed
+276 -411

No files matched your search

+19 -2
View File
@@ -2,20 +2,37 @@ Shops = Shops or {}
local registeredShops = {}
---commentThis can open a shop for the client
---@param src number
---@param shopTitle string
---@return boolean
Shops.OpenShop = function(src, shopTitle)
if not shopTitle and not registeredShops[shopTitle] then return false end
TriggerClientEvent('community_bridge:openShop', src, 'shop', shopTitle, registeredShops[shopTitle])
return true
end
---This will create a shop to use on the client side, shops must be registered server side and exsist in the shop inventory table to allow any purchases passed.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
---@return boolean
Shops.CreateShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
if not shopTitle and not shopInventory and not shopCoords then return end
if not shopTitle and not shopInventory and not shopCoords then return false end
if registeredShops[shopTitle] then return true end
registeredShops[shopTitle] = {name = shopTitle, inventory = shopInventory, shopCoords = shopCoords, groups = shopGroups}
return true
end
---This is an internal event to complete a shop transaction, it will verify pass items and amounts are registered to the created shop.
---@param src number
---@param shopName string
---@param item string
---@param amount number
---@param paymentType string
---@return nil
Shops.CompleteCheckout = function(src, shopName, item, amount, paymentType)
if not src and not shopName and not item and not amount and not paymentType then return end
local ilocale = Language.Locale
local shopData = registeredShops[shopName]