From 1e7787808043b5a033d31d2e1a2a19ed484f4b4a Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Wed, 1 Oct 2025 00:53:52 -0600 Subject: [PATCH 1/9] - add lation to drawtext, menus, notify, progressbar - add okok notify --- Config.lua | 2 +- bridge/drawtext/lation.lua | 8 +++++ bridge/drawtext/okok.lua | 8 +++++ bridge/menus/lation.lua | 63 +++++++++++++++++++++++++++++++++ bridge/notify/client/lation.lua | 15 ++++++++ bridge/notify/client/okok.lua | 7 ++++ bridge/notify/server/lation.lua | 11 ++++++ bridge/notify/server/okok.lua | 8 +++++ bridge/progressbars/lation.lua | 42 ++++++++++++++++++++++ 9 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 bridge/drawtext/lation.lua create mode 100644 bridge/drawtext/okok.lua create mode 100644 bridge/menus/lation.lua create mode 100644 bridge/notify/client/lation.lua create mode 100644 bridge/notify/client/okok.lua create mode 100644 bridge/notify/server/lation.lua create mode 100644 bridge/notify/server/okok.lua create mode 100644 bridge/progressbars/lation.lua diff --git a/Config.lua b/Config.lua index c7d8e24..69b0eb8 100644 --- a/Config.lua +++ b/Config.lua @@ -7,7 +7,7 @@ Config.DrawText = "ox" -- qb, ox, ps Config.ConvertQBMenu = false -- Convert qb-menu to ps-ui context menu and qb-input to ps-ui input Config.Progressbar = { -- these are DEFAULT values, you can override them in the progressbar function - style = "keep", -- qb, oxbar, oxcircle, keep + style = "oxcircle", -- qb, oxbar, oxcircle, keep Movement = true, -- Disable movement CarMovement = true, -- Disable car movement Mouse = true, -- Disable mouse diff --git a/bridge/drawtext/lation.lua b/bridge/drawtext/lation.lua new file mode 100644 index 0000000..1b63b8c --- /dev/null +++ b/bridge/drawtext/lation.lua @@ -0,0 +1,8 @@ +function ps.drawText(text) + if not text then return end + exports.lation_ui:showText(text) +end + +function ps.hideText() + exports.lation_ui:hideText() +end \ No newline at end of file diff --git a/bridge/drawtext/okok.lua b/bridge/drawtext/okok.lua new file mode 100644 index 0000000..a589780 --- /dev/null +++ b/bridge/drawtext/okok.lua @@ -0,0 +1,8 @@ +function ps.drawText(text) + if not text then return end + exports['okokTextUI']:Open(text, 'lightgrey', 'right', true) +end + +function ps.hideText() + exports['okokTextUI']:Close() +end \ No newline at end of file diff --git a/bridge/menus/lation.lua b/bridge/menus/lation.lua new file mode 100644 index 0000000..5ba883e --- /dev/null +++ b/bridge/menus/lation.lua @@ -0,0 +1,63 @@ + + +function ps.menu(name, label, data) + local options = {} + for k, v in pairs (data or {}) do + local serverEvent, event = nil, nil + if v.isServer then + serverEvent = v.event + else + event = v.event + end + options[k] = { + title = v.title or '', + description = v.description or '', + icon = v.icon or nil, + disabled = v.disabled or nil, + onSelect = v.action or nil, + event = event, + args = v.args or nil, + serverEvent = serverEvent + } + end + exports.lation_ui:registerMenu({ + id = name, + title = label or 'Context Menu', + options = options, + }) + exports.lation_ui:showMenu(name) +end + +function ps.closeMenu() + exports.lation_ui:hideMenu() +end + +function ps.input(label, data) + local options = {} + + for k, v in pairs(data or {}) do + if v.type == 'text' then + v.type = 'input' + end + options[k] = { + label = v.title or nil, + type = v.type or 'input', + description = v.description or nil, + placeholder = v.placeholder or nil, + options = v.options or nil, + required = v.required or false, + min = v.min or nil, + max = v.max or nil, + } + end + + local result = exports.lation_ui:input({ + title = label, + options = options + }) + if result and result[1] then + return result + else + return nil + end +end \ No newline at end of file diff --git a/bridge/notify/client/lation.lua b/bridge/notify/client/lation.lua new file mode 100644 index 0000000..74013f7 --- /dev/null +++ b/bridge/notify/client/lation.lua @@ -0,0 +1,15 @@ + +function ps.notify(text, type, time) + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + exports.lation_ui:notify({ + message = text, + type = type, + duration = time + }) +end + +RegisterNetEvent('ps_lib:notify:lation', function(data) + ps.notify(data.message, data.type, data.duration) +end) \ No newline at end of file diff --git a/bridge/notify/client/okok.lua b/bridge/notify/client/okok.lua new file mode 100644 index 0000000..7899697 --- /dev/null +++ b/bridge/notify/client/okok.lua @@ -0,0 +1,7 @@ + +function ps.notify(text, type, time) + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + exports['okokNotify']:Alert('',text, time, type, false) +end \ No newline at end of file diff --git a/bridge/notify/server/lation.lua b/bridge/notify/server/lation.lua new file mode 100644 index 0000000..bc824b9 --- /dev/null +++ b/bridge/notify/server/lation.lua @@ -0,0 +1,11 @@ +function ps.notify(source, text, type, time) + if not source then return end + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + TriggerClientEvent('ps_lib:notify:lation', source, { + description = text, + type = type, + duration = time, + }) +end \ No newline at end of file diff --git a/bridge/notify/server/okok.lua b/bridge/notify/server/okok.lua new file mode 100644 index 0000000..cf1e6b7 --- /dev/null +++ b/bridge/notify/server/okok.lua @@ -0,0 +1,8 @@ + +function ps.notify(src, text, type, time) + if not src then return end + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + TriggerClientEvent('okokNotify:Alert', src, '', text, time, type, false) +end \ No newline at end of file diff --git a/bridge/progressbars/lation.lua b/bridge/progressbars/lation.lua new file mode 100644 index 0000000..7fc509a --- /dev/null +++ b/bridge/progressbars/lation.lua @@ -0,0 +1,42 @@ + +local function handleDisable(disabled) + if disabled.movement == nil then + disabled.movement = Config.Progressbar.Movement + end + if disabled.car == nil then + disabled.car = Config.Progressbar.CarMovement + end + if disabled.mouse == nil then + disabled.mouse = Config.Progressbar.Mouse + end + if disabled.combat == nil then + disabled.combat = Config.Progressbar.Combat + end + return disabled +end + +function ps.progressbar(text, time, emote, disabled) + disabled = handleDisable(disabled or {}) + if emote then + ps.playEmote(emote) + end + local data = { + duration = time, + label = text, + useWhileDead = false, + canCancel = true, + disable = { + car = disabled.car, + move = disabled.movement, + mouse = disabled.mouse, + combat = disabled.combat, + }, + } + if exports.lation_ui:progressBar(data) then + ps.cancelEmote() + return true + else + ps.cancelEmote() + return false + end +end \ No newline at end of file From b2a8b850dd0f45a7dd1a8339359290eb73773c17 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Wed, 1 Oct 2025 00:59:06 -0600 Subject: [PATCH 2/9] - adjust comments to reflect options --- Config.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Config.lua b/Config.lua index 69b0eb8..38b2174 100644 --- a/Config.lua +++ b/Config.lua @@ -1,9 +1,9 @@ Config = {} ps = {} -Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts -Config.Menus = "ox" -- qb, ox, ps -Config.DrawText = "ox" -- qb, ox, ps +Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation +Config.Menus = "ox" -- qb, ox, ps, lation +Config.DrawText = "ox" -- qb, ox, ps, lation, okok Config.ConvertQBMenu = false -- Convert qb-menu to ps-ui context menu and qb-input to ps-ui input Config.Progressbar = { -- these are DEFAULT values, you can override them in the progressbar function @@ -14,8 +14,7 @@ Config.Progressbar = { -- these are DEFAULT values, you can override them in the Combat = true, -- Disable combat } -Config.Logs = "fivemerr" -- fivemerr or fivemanage - +Config.Logs = "fivemerr" -- fivemerr or fivemanage QBCore, ESX, qbx, langs = nil, nil, nil From 76055b4eb32218c08338b9ea2dda09a9b269aec7 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:15:54 -0600 Subject: [PATCH 3/9] - `add` tgg to inventory options - `add` paradise notify options --- bridge/client.lua | 1 + bridge/inventory/tgiann/client/tgg.lua | 55 ++++++++ bridge/inventory/tgiann/server/tgg.lua | 175 +++++++++++++++++++++++++ bridge/notify/client/paradise.lua | 10 ++ bridge/notify/server/paradise.lua | 11 ++ bridge/server.lua | 1 + 6 files changed, 253 insertions(+) create mode 100644 bridge/inventory/tgiann/client/tgg.lua create mode 100644 bridge/inventory/tgiann/server/tgg.lua create mode 100644 bridge/notify/client/paradise.lua create mode 100644 bridge/notify/server/paradise.lua diff --git a/bridge/client.lua b/bridge/client.lua index b55ba0f..c66cc6d 100644 --- a/bridge/client.lua +++ b/bridge/client.lua @@ -19,6 +19,7 @@ local inventoryResources = { ['lj-inventory'] = 'bridge/inventory/lj/client/lj.lua', ['ps-inventory'] = 'bridge/inventory/ps/client/ps.lua', ['jpr-inventory'] = 'bridge/inventory/jpr/client/jpr.lua', + ['tgiann-inventory'] = 'bridge/inventory/tgiann/client/tgg.lua', } local targetResources = { diff --git a/bridge/inventory/tgiann/client/tgg.lua b/bridge/inventory/tgiann/client/tgg.lua new file mode 100644 index 0000000..a7b2418 --- /dev/null +++ b/bridge/inventory/tgiann/client/tgg.lua @@ -0,0 +1,55 @@ + + +--@param item string +-- @return string +-- example: ps.getImage('bread') +function ps.getImage(item) + local itemData = exports["tgiann-inventory"]:Items() + itemData = itemData[item] + + if itemData then + return 'nui://tgg-inventory/html/images/' .. itemData.image + else + return 'https://avatars.githubusercontent.com/u/99291234?s=280&v=4' + end +end +-- @param item string +-- @return string +-- example: ps.getLabel('bread') +function ps.getLabel(item) + local itemData = exports["tgiann-inventory"]:GetItemLabel(item) + if itemData then + return itemData + else + return 'Missing Item' + end +end + +--param item string +--param amount number +-- @return boolean +-- example: ps.hasItem('bread', 1) +function ps.hasItem(item, amount) + if not item then return false end + if not amount then amount = 1 end + + return exports["tgiann-inventory"]:HasItem(item, amount) +end + +--@param items table +--@return boolean +-- example: ps.hasItems({['bread'] = 1, ['water'] = 2}) +function ps.hasItems(items) + if not items then return false end + for k, v in pairs(items) do + if not ps.hasItem(k, v) then + return false + end + end + return true +end + +function ps.getItemCount(item) + if not item then return end + return exports["tgiann-inventory"]:GetItemCount(item, nil, nil) +end \ No newline at end of file diff --git a/bridge/inventory/tgiann/server/tgg.lua b/bridge/inventory/tgiann/server/tgg.lua new file mode 100644 index 0000000..73c98ad --- /dev/null +++ b/bridge/inventory/tgiann/server/tgg.lua @@ -0,0 +1,175 @@ + +-- @param identifier number|string i.e. source or CitizenID +-- @param item string +-- @param amount number +-- @param slot number|boolean i.e. false for auto slot ** optional +-- @param reason string ** optional +-- @return boolean +-- example: ps.removeItem(source, 'bread', 1, false, 'ps_lib Remove Item') +function ps.removeItem(identifier, item, amount, slot, reason) + if not identifier or not item then return end + if not amount then amount = 1 end + if not slot then slot = false end + if not reason then reason = 'ps_lib Remove Item' end + if exports['tgiann-inventory']:RemoveItem(identifier, item, amount, slot) then + return true + end + return false +end + + +-- @param identifier number|string i.e. source or CitizenID +-- @param item string +-- @param amount number +-- @param meta table ** optional +-- @param slot number|boolean i.e. false for auto slot ** optional +-- @param reason string ** optional +-- @return boolean +-- example: ps.addItem(source, 'bread', 1, {quality = 100}, false, 'ps_lib Add Item') +function ps.addItem(identifier, item, amount,meta, slot) + if not identifier or not item then return end + if not amount then amount = 1 end + if exports['tgiann-inventory']:AddItem(identifier, item, amount, slot, meta) then + return true + end + return false +end + + +-- @param source number|string i.e. source or CitizenID +-- @param identifier string i.e. stash name +-- @param data table i.e. {label = 'Stash', maxweight = 100000, slots = 50} ** optional +-- example: ps.openStash(source, 'my_stash', {label = 'My Stash', maxweight = 100000, slots = 50}) +function ps.openStash(source, identifier, data) + if not data.label then data.label = identifier end + if not data.maxweight then data.maxweight = 100000 end + if not data.slots then data.slots = 50 end + data.maxWeight = data.maxweight -- tgiann uses maxWeight + exports["tgiann-inventory"]:RegisterStash(data.label, data.label, data.slots, data.maxweight) + exports["tgiann-inventory"]:OpenInventory(source,'stash', data.label, data) +end + +-- @param identifier number|string i.e. source or CitizenID +-- @param item string +-- @param amount number +-- @return boolean +-- example: ps.hasItem(source, 'bread', 1) +function ps.hasItem(identifier, item, amount) + if not identifier or not item then return end + if not amount then amount = 1 end + return exports["tgiann-inventory"]:HasItem(identifier, item, amount) +end + +-- @param identifier number|string i.e. source +-- @return number +-- example: ps.getFreeWeight(source) +function ps.getFreeWeight(identifier) + if not identifier then return end + return exports["tgiann-inventory"]:GetFreeWeight(identifier) +end + +-- @param source number|string i.e. source +-- @param playerid number|string i.e. target player id or CitizenID +function ps.openInventoryById(source, playerid) + exports["tgiann-inventory"]:OpenInventoryById(source, playerid,false) +end + +-- @param source number|string i.e. source +-- @param identifier string i.e. Target Players CitizenID + +function ps.clearInventory(source, identifier) + if not identifier then return end + exports["tgiann-inventory"]:ClearInventory(identifier) +end + + +-- @param source number|string i.e. source +-- @param identifier string i.e. Stash Name +-- example: ps.clearStash(source, 'my_stash') +function ps.clearStash(source, identifier) + ps.warn("clearStash is not supported in tgiann-inventory") +end + + +-- @param identifier number|string i.e. source +-- @param item string +-- @return number +-- example: ps.getItemCount(identifier, 'bread') +function ps.getItemCount(identifier, item) + if not identifier or not item then return end + return exports["tgiann-inventory"]:GetItemCount(identifier, item) +end + +-- @param identifier number|string i.e. source +-- @param item string +-- @return table|nil +-- example: ps.getItemByName(identifier, 'bread') +function ps.getItemByName(identifier, item) + if not identifier or not item then return end + return exports["tgiann-inventory"]:GetItemByName(identifier, item) +end + +-- @param identifier number|string i.e. source +-- @param items table i.e. {'bread', 'water'} +-- @return table|nil +-- example: ps.getItemsByNames(identifier, {'bread', 'water'}) + +function ps.getItemsByNames(identifier, items) + if not identifier or not items then return end + local itemList = {} + for _, item in ipairs(items) do + local itemData = exports["tgiann-inventory"]:GetItemByName(identifier, item) + if itemData then + itemList[item] = itemData + end + end + return itemList +end + +-- @param source number|string i.e. source +-- @param shopData table i.e. {name = 'Shop', items = {}, slots = 10, label = 'Shop'} +-- example: ps.createShop(source, {name = 'Shop', items = {}, slots = 10, label = 'Shop'}) +function ps.createShop(source, shopData) + if not shopData.name then shopData.name = 'Shop' end + if not shopData.items then shopData.items = {} end + if not shopData.slots then shopData.slots = #shopData.items end + if not shopData.label then shopData.label = shopData.name end + exports["tgiann-inventory"]:RegisterShop(shopData.name, shopData.items) + exports["tgiann-inventory"]:OpenShop(source, shopData.name) +end + +-- @param source number|string i.e. source +-- @param recipe table i.e. {take = {bread = 1, water = 1}, give = {sandwich = 1}} +function ps.verifyRecipe(source, recipe) + local need, have = 0,0 + for k, v in pairs (recipe) do + if ps.getItemCount(source, k) >= v then + have = have + 1 + end + need = need + 1 + end + return have >= need +end + +-- @param source number|string i.e. source +-- @param recipe table i.e. {take = {bread = 1, water = 1}, give = {sandwich = 1}} +-- @return boolean +-- example: ps.craftItem(source, {take = {bread = 1, water = 1}, give = {sandwich = 1}}) +function ps.craftItem(source, recipe) + local src = source + local itemChecks = ps.verifyRecipe(src, recipe.take) + if not itemChecks then return false end + for k, v in pairs(recipe.take) do + if not ps.removeItem(src, k, v) then + ps.notify(src, ps.lang("noItem", v, k), "error") + return false + end + end + for k, v in pairs(recipe.give) do + if not ps.addItem(src, k, v) then + ps.notify(src, ps.lang("noItem", v, k), "error") + return false + end + end + return true +end \ No newline at end of file diff --git a/bridge/notify/client/paradise.lua b/bridge/notify/client/paradise.lua new file mode 100644 index 0000000..d40f9e1 --- /dev/null +++ b/bridge/notify/client/paradise.lua @@ -0,0 +1,10 @@ +function ps.notify(text, type, time) + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + exports['paradise_notify']:ShowNotification({ + description = text, + type = type, + duration = time, +}) +end \ No newline at end of file diff --git a/bridge/notify/server/paradise.lua b/bridge/notify/server/paradise.lua new file mode 100644 index 0000000..0867a96 --- /dev/null +++ b/bridge/notify/server/paradise.lua @@ -0,0 +1,11 @@ +function ps.notify(source, text, type, time) + if not source then return end + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + exports['paradise_notify']:ShowNotification(source, { + description = text, + type = type, + duration = time + }) +end \ No newline at end of file diff --git a/bridge/server.lua b/bridge/server.lua index 719d9ff..30555da 100644 --- a/bridge/server.lua +++ b/bridge/server.lua @@ -10,6 +10,7 @@ local inventoryResources = { ['lj-inventory'] = 'bridge/inventory/lj/server/lj.lua', ['ps-inventory'] = 'bridge/inventory/ps/server/ps.lua', ['jpr-inventory'] = 'bridge/inventory/jpr/server/jpr.lua', + ['tgiann-inventory'] = 'bridge/inventory/tgiann/server/tgg.lua', } local notify = { From b2bf9e2961eace38716ecdddde929c70777ca1ad Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:32:44 -0600 Subject: [PATCH 4/9] - `add` exports to most modules and bridges --- bridge/drawtext/lation.lua | 5 ++++- bridge/drawtext/okok.lua | 4 +++- bridge/drawtext/ox.lua | 5 ++++- bridge/drawtext/ps.lua | 5 ++++- bridge/drawtext/qb.lua | 5 ++++- bridge/emote/custom/client.lua | 5 ++++- bridge/emote/dp/client.lua | 5 ++++- bridge/emote/rp/client.lua | 3 +++ bridge/emote/scully/client.lua | 2 ++ bridge/inventory/custom/client/custom.lua | 5 +++++ bridge/inventory/custom/server/custom.lua | 17 ++++++++++++++++- bridge/inventory/jpr/client/jpr.lua | 5 +++++ bridge/inventory/jpr/server/jpr.lua | 17 ++++++++++++++++- bridge/inventory/lj/client/lj.lua | 7 ++++++- bridge/inventory/ox/client/ox.lua | 7 ++++++- bridge/inventory/ox/server/ox.lua | 17 ++++++++++++++++- bridge/inventory/ps/client/ps.lua | 7 ++++++- bridge/inventory/ps/server/ps.lua | 17 ++++++++++++++++- bridge/inventory/qb/client/qb.lua | 6 +++++- bridge/inventory/qb/server/qb.lua | 17 ++++++++++++++++- bridge/inventory/tgiann/client/tgg.lua | 7 ++++++- bridge/inventory/tgiann/server/tgg.lua | 17 ++++++++++++++++- bridge/menus/lation.lua | 6 +++++- bridge/menus/ox.lua | 5 ++++- bridge/menus/ps.lua | 5 ++++- bridge/menus/qb.lua | 5 ++++- bridge/notify/client/esx.lua | 3 ++- bridge/notify/client/lation.lua | 4 +++- bridge/notify/client/mad_thoughts.lua | 4 +++- bridge/notify/client/okok.lua | 4 +++- bridge/notify/client/ox.lua | 4 +++- bridge/notify/client/paradise.lua | 4 +++- bridge/notify/client/ps.lua | 4 +++- bridge/notify/client/qb.lua | 4 +++- bridge/notify/server/esx.lua | 4 +++- bridge/notify/server/lation.lua | 4 +++- bridge/notify/server/mad_thoughts.lua | 3 ++- bridge/notify/server/okok.lua | 3 ++- bridge/notify/server/ps.lua | 3 ++- bridge/notify/server/qb.lua | 3 ++- bridge/progressbars/keep.lua | 6 +++++- bridge/progressbars/lation.lua | 5 ++++- bridge/progressbars/oxbar.lua | 5 ++++- bridge/progressbars/oxcircle.lua | 5 ++++- bridge/progressbars/qb.lua | 5 ++++- bridge/target/interact/client.lua | 9 ++++++++- bridge/target/ox/client.lua | 9 ++++++++- bridge/target/qb/client.lua | 9 ++++++++- bridge/zones/PolyZone/client.lua | 7 ++++++- bridge/zones/ox/client.lua | 7 ++++++- modules/animation/animation.lua | 4 +++- modules/copyClipboard/client/clipboard.lua | 4 +++- modules/getNear/client/getNear.lua | 19 ++++++++++++++++--- modules/interactions/client/interactions.lua | 4 +++- modules/keybinds/client/keybinds.lua | 3 +++ modules/misc/shared/misc.lua | 7 +++++++ modules/raycast/client/raycast.lua | 2 ++ modules/requests/client/requests.lua | 3 +++ modules/streamed_assets/shared/objectList.lua | 3 ++- modules/versionCheck/server/versionCheck.lua | 4 +++- startFirst/shared/_print.lua | 8 +++++++- 61 files changed, 330 insertions(+), 55 deletions(-) diff --git a/bridge/drawtext/lation.lua b/bridge/drawtext/lation.lua index 1b63b8c..31bb72f 100644 --- a/bridge/drawtext/lation.lua +++ b/bridge/drawtext/lation.lua @@ -5,4 +5,7 @@ end function ps.hideText() exports.lation_ui:hideText() -end \ No newline at end of file +end + +exports('drawText', ps.drawText) +exports('hideText', ps.hideText) \ No newline at end of file diff --git a/bridge/drawtext/okok.lua b/bridge/drawtext/okok.lua index a589780..c093f10 100644 --- a/bridge/drawtext/okok.lua +++ b/bridge/drawtext/okok.lua @@ -5,4 +5,6 @@ end function ps.hideText() exports['okokTextUI']:Close() -end \ No newline at end of file +end +exports('drawText', ps.drawText) +exports('hideText', ps.hideText) \ No newline at end of file diff --git a/bridge/drawtext/ox.lua b/bridge/drawtext/ox.lua index eb5436d..260041d 100644 --- a/bridge/drawtext/ox.lua +++ b/bridge/drawtext/ox.lua @@ -5,4 +5,7 @@ end function ps.hideText() lib.hideTextUI() -end \ No newline at end of file +end + +exports('drawText', ps.drawText) +exports('hideText', ps.hideText) \ No newline at end of file diff --git a/bridge/drawtext/ps.lua b/bridge/drawtext/ps.lua index 333ba5c..80b8005 100644 --- a/bridge/drawtext/ps.lua +++ b/bridge/drawtext/ps.lua @@ -5,4 +5,7 @@ end function ps.hideText() exports['ps-ui']:hideDrawText() -end \ No newline at end of file +end + +exports('drawText', ps.drawText) +exports('hideText', ps.hideText) \ No newline at end of file diff --git a/bridge/drawtext/qb.lua b/bridge/drawtext/qb.lua index aa7699d..2d3c3bb 100644 --- a/bridge/drawtext/qb.lua +++ b/bridge/drawtext/qb.lua @@ -5,4 +5,7 @@ end function ps.hideText() exports['qb-core']:HideText() -end \ No newline at end of file +end + +exports('drawText', ps.drawText) +exports('hideText', ps.hideText) \ No newline at end of file diff --git a/bridge/emote/custom/client.lua b/bridge/emote/custom/client.lua index 8dbb9a3..d542afe 100644 --- a/bridge/emote/custom/client.lua +++ b/bridge/emote/custom/client.lua @@ -93,4 +93,7 @@ function ps.cancelEmote() end IsInEmote = false ClearPedTasks(PlayerPedId()) -end \ No newline at end of file +end + +exports('playEmote', ps.playEmote) +exports('cancelEmote', ps.cancelEmote) \ No newline at end of file diff --git a/bridge/emote/dp/client.lua b/bridge/emote/dp/client.lua index 076261b..9db71b9 100644 --- a/bridge/emote/dp/client.lua +++ b/bridge/emote/dp/client.lua @@ -111,4 +111,7 @@ function ps.playAnims(emote) 8.0, -8.0, -1, 49, 0, false, false, false ) end -end \ No newline at end of file +end + +exports('playEmote', ps.playEmote) +exports('cancelEmote', ps.cancelEmote) \ No newline at end of file diff --git a/bridge/emote/rp/client.lua b/bridge/emote/rp/client.lua index b35978e..41f866a 100644 --- a/bridge/emote/rp/client.lua +++ b/bridge/emote/rp/client.lua @@ -132,3 +132,6 @@ function ps.playAnims(emote) ) end end + +exports('playEmote', ps.playEmote) +exports('cancelEmote', ps.cancelEmote) \ No newline at end of file diff --git a/bridge/emote/scully/client.lua b/bridge/emote/scully/client.lua index e0220f2..9604c2f 100644 --- a/bridge/emote/scully/client.lua +++ b/bridge/emote/scully/client.lua @@ -114,3 +114,5 @@ function ps.playAnims(emote) end end +exports('playEmote', ps.playEmote) +exports('cancelEmote', ps.cancelEmote) \ No newline at end of file diff --git a/bridge/inventory/custom/client/custom.lua b/bridge/inventory/custom/client/custom.lua index 3fbd0e6..82558f8 100644 --- a/bridge/inventory/custom/client/custom.lua +++ b/bridge/inventory/custom/client/custom.lua @@ -26,3 +26,8 @@ function ps.hasItems(items) end return true end + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/custom/server/custom.lua b/bridge/inventory/custom/server/custom.lua index b415d12..586441f 100644 --- a/bridge/inventory/custom/server/custom.lua +++ b/bridge/inventory/custom/server/custom.lua @@ -102,4 +102,19 @@ function ps.craftItem(source, recipe) end end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) \ No newline at end of file diff --git a/bridge/inventory/jpr/client/jpr.lua b/bridge/inventory/jpr/client/jpr.lua index c09b009..246ce5e 100644 --- a/bridge/inventory/jpr/client/jpr.lua +++ b/bridge/inventory/jpr/client/jpr.lua @@ -31,3 +31,8 @@ function ps.hasItems(items) end return true end + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/jpr/server/jpr.lua b/bridge/inventory/jpr/server/jpr.lua index 958be9d..94f8b00 100644 --- a/bridge/inventory/jpr/server/jpr.lua +++ b/bridge/inventory/jpr/server/jpr.lua @@ -108,4 +108,19 @@ function ps.craftItem(source, recipe) end end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) diff --git a/bridge/inventory/lj/client/lj.lua b/bridge/inventory/lj/client/lj.lua index 0e7c988..44e7a7f 100644 --- a/bridge/inventory/lj/client/lj.lua +++ b/bridge/inventory/lj/client/lj.lua @@ -64,4 +64,9 @@ RegisterNetEvent('ps_lib:client:createShop', function(shopData) if not shopData.slots then shopData.slots = 50 end if not shopData.maxweight then shopData.maxweight = 100000 end TriggerServerEvent("inventory:server:OpenInventory", "shop", "Shop"..math.random(1, 99), shopData) -end) \ No newline at end of file +end) + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/ox/client/ox.lua b/bridge/inventory/ox/client/ox.lua index 8cdf689..6d154d3 100644 --- a/bridge/inventory/ox/client/ox.lua +++ b/bridge/inventory/ox/client/ox.lua @@ -54,4 +54,9 @@ end RegisterNetEvent('ps_lib:client:createShop', function(shopData) if not shopData then shopData.name = 'Shop' end exports.ox_inventory:openInventory('shop', { type = shopData, id = shopData }) -end) \ No newline at end of file +end) + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/ox/server/ox.lua b/bridge/inventory/ox/server/ox.lua index 44a2423..77e2dac 100644 --- a/bridge/inventory/ox/server/ox.lua +++ b/bridge/inventory/ox/server/ox.lua @@ -117,4 +117,19 @@ function ps.craftItem(source, recipe) end end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) \ No newline at end of file diff --git a/bridge/inventory/ps/client/ps.lua b/bridge/inventory/ps/client/ps.lua index 8abf394..65986f8 100644 --- a/bridge/inventory/ps/client/ps.lua +++ b/bridge/inventory/ps/client/ps.lua @@ -41,4 +41,9 @@ function ps.getItemCount(item) end end return amount -end \ No newline at end of file +end + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/ps/server/ps.lua b/bridge/inventory/ps/server/ps.lua index f4c4b0a..e6f80ae 100644 --- a/bridge/inventory/ps/server/ps.lua +++ b/bridge/inventory/ps/server/ps.lua @@ -127,4 +127,19 @@ function ps.craftItem(source, recipe) end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) \ No newline at end of file diff --git a/bridge/inventory/qb/client/qb.lua b/bridge/inventory/qb/client/qb.lua index 9096855..d407e65 100644 --- a/bridge/inventory/qb/client/qb.lua +++ b/bridge/inventory/qb/client/qb.lua @@ -56,4 +56,8 @@ function ps.getItemCount(item) end end return amount -end \ No newline at end of file +end +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/qb/server/qb.lua b/bridge/inventory/qb/server/qb.lua index 2716298..a834d4a 100644 --- a/bridge/inventory/qb/server/qb.lua +++ b/bridge/inventory/qb/server/qb.lua @@ -174,4 +174,19 @@ function ps.craftItem(source, recipe) end end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) \ No newline at end of file diff --git a/bridge/inventory/tgiann/client/tgg.lua b/bridge/inventory/tgiann/client/tgg.lua index a7b2418..0264f08 100644 --- a/bridge/inventory/tgiann/client/tgg.lua +++ b/bridge/inventory/tgiann/client/tgg.lua @@ -52,4 +52,9 @@ end function ps.getItemCount(item) if not item then return end return exports["tgiann-inventory"]:GetItemCount(item, nil, nil) -end \ No newline at end of file +end + +exports('getImage', ps.getImage) +exports('getLabel', ps.getLabel) +exports('hasItem', ps.hasItem) +exports('hasItems', ps.hasItems) diff --git a/bridge/inventory/tgiann/server/tgg.lua b/bridge/inventory/tgiann/server/tgg.lua index 73c98ad..d1df676 100644 --- a/bridge/inventory/tgiann/server/tgg.lua +++ b/bridge/inventory/tgiann/server/tgg.lua @@ -172,4 +172,19 @@ function ps.craftItem(source, recipe) end end return true -end \ No newline at end of file +end + +exports('removeItem', ps.removeItem) +exports('addItem', ps.addItem) +exports('openStash', ps.openStash) +exports('hasItem', ps.hasItem) +exports('getFreeWeight', ps.getFreeWeight) +exports('openInventoryById', ps.openInventoryById) +exports('clearInventory', ps.clearInventory) +exports('clearStash', ps.clearStash) +exports('getItemCount', ps.getItemCount) +exports('getItemByName', ps.getItemByName) +exports('getItemsByNames', ps.getItemsByNames) +exports('createShop', ps.createShop) +exports('verifyRecipe', ps.verifyRecipe) +exports('craftItem', ps.craftItem) \ No newline at end of file diff --git a/bridge/menus/lation.lua b/bridge/menus/lation.lua index 5ba883e..660a3c4 100644 --- a/bridge/menus/lation.lua +++ b/bridge/menus/lation.lua @@ -60,4 +60,8 @@ function ps.input(label, data) else return nil end -end \ No newline at end of file +end + +exports('menu', ps.menu) +exports('closeMenu', ps.closeMenu) +exports('input', ps.input) \ No newline at end of file diff --git a/bridge/menus/ox.lua b/bridge/menus/ox.lua index b8b14f2..628e1dc 100644 --- a/bridge/menus/ox.lua +++ b/bridge/menus/ox.lua @@ -57,4 +57,7 @@ function ps.input(label, data) else return nil end -end \ No newline at end of file +end +exports('menu', ps.menu) +exports('closeMenu', ps.closeMenu) +exports('input', ps.input) \ No newline at end of file diff --git a/bridge/menus/ps.lua b/bridge/menus/ps.lua index 95ac424..852460e 100644 --- a/bridge/menus/ps.lua +++ b/bridge/menus/ps.lua @@ -52,4 +52,7 @@ function ps.input(label, data) else return nil end -end \ No newline at end of file +end +exports('menu', ps.menu) +exports('closeMenu', ps.closeMenu) +exports('input', ps.input) \ No newline at end of file diff --git a/bridge/menus/qb.lua b/bridge/menus/qb.lua index 5d3fca3..cad10e1 100644 --- a/bridge/menus/qb.lua +++ b/bridge/menus/qb.lua @@ -55,4 +55,7 @@ function ps.input(label, data) else return nil end -end \ No newline at end of file +end +exports('menu', ps.menu) +exports('closeMenu', ps.closeMenu) +exports('input', ps.input) \ No newline at end of file diff --git a/bridge/notify/client/esx.lua b/bridge/notify/client/esx.lua index 9c526d6..fad8665 100644 --- a/bridge/notify/client/esx.lua +++ b/bridge/notify/client/esx.lua @@ -3,4 +3,5 @@ function ps.notify( text, type, time) if not type then type = 'info' end if not time then time = 5000 end ESX.ShowNotification(text, type, time, "Notification", "top-left") -end \ No newline at end of file +end +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/lation.lua b/bridge/notify/client/lation.lua index 74013f7..32929fe 100644 --- a/bridge/notify/client/lation.lua +++ b/bridge/notify/client/lation.lua @@ -12,4 +12,6 @@ end RegisterNetEvent('ps_lib:notify:lation', function(data) ps.notify(data.message, data.type, data.duration) -end) \ No newline at end of file +end) + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/mad_thoughts.lua b/bridge/notify/client/mad_thoughts.lua index cb5b1b4..13ff4a4 100644 --- a/bridge/notify/client/mad_thoughts.lua +++ b/bridge/notify/client/mad_thoughts.lua @@ -11,4 +11,6 @@ function ps.notify(text, type, time) elseif type == 'warning' then exports['mad-thoughts']:warning(text, time / 1000) end -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/okok.lua b/bridge/notify/client/okok.lua index 7899697..78da875 100644 --- a/bridge/notify/client/okok.lua +++ b/bridge/notify/client/okok.lua @@ -4,4 +4,6 @@ function ps.notify(text, type, time) if not type then type = 'info' end if not time then time = 5000 end exports['okokNotify']:Alert('',text, time, type, false) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/ox.lua b/bridge/notify/client/ox.lua index 3ec6f85..7934ae2 100644 --- a/bridge/notify/client/ox.lua +++ b/bridge/notify/client/ox.lua @@ -7,4 +7,6 @@ function ps.notify(text, type, time) type = type, duration = time, }) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/paradise.lua b/bridge/notify/client/paradise.lua index d40f9e1..c8bfc51 100644 --- a/bridge/notify/client/paradise.lua +++ b/bridge/notify/client/paradise.lua @@ -7,4 +7,6 @@ function ps.notify(text, type, time) type = type, duration = time, }) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/ps.lua b/bridge/notify/client/ps.lua index c20d8e2..41d8217 100644 --- a/bridge/notify/client/ps.lua +++ b/bridge/notify/client/ps.lua @@ -3,4 +3,6 @@ function ps.notify(text, type, time) if not type then type = 'info' end if not time then time = 5000 end exports['ps_lib']:notify(text, type, time) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/client/qb.lua b/bridge/notify/client/qb.lua index d6aeb41..9ef0ce1 100644 --- a/bridge/notify/client/qb.lua +++ b/bridge/notify/client/qb.lua @@ -4,4 +4,6 @@ function ps.notify(text, type, time) if not type then type = 'info' end if not time then time = 5000 end QBCore.Functions.Notify(text, type, time) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/server/esx.lua b/bridge/notify/server/esx.lua index ba52b28..2d81663 100644 --- a/bridge/notify/server/esx.lua +++ b/bridge/notify/server/esx.lua @@ -4,4 +4,6 @@ function ps.notify(source, text, type, time) if not type then type = 'info' end if not time then time = 5000 end TriggerClientEvent('esx:showNotification', source, text, type, time) -end \ No newline at end of file +end + +exports('notify', ps.notify) diff --git a/bridge/notify/server/lation.lua b/bridge/notify/server/lation.lua index bc824b9..81d6f6a 100644 --- a/bridge/notify/server/lation.lua +++ b/bridge/notify/server/lation.lua @@ -8,4 +8,6 @@ function ps.notify(source, text, type, time) type = type, duration = time, }) -end \ No newline at end of file +end + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/server/mad_thoughts.lua b/bridge/notify/server/mad_thoughts.lua index 7a91e9c..79b8620 100644 --- a/bridge/notify/server/mad_thoughts.lua +++ b/bridge/notify/server/mad_thoughts.lua @@ -12,4 +12,5 @@ function ps.notify(source, text, type, time) elseif type == 'warning' then exports['mad-thoughts']:warning(source, text, time / 1000) end -end \ No newline at end of file +end +exports('notify', ps.notify) diff --git a/bridge/notify/server/okok.lua b/bridge/notify/server/okok.lua index cf1e6b7..a4d564b 100644 --- a/bridge/notify/server/okok.lua +++ b/bridge/notify/server/okok.lua @@ -5,4 +5,5 @@ function ps.notify(src, text, type, time) if not type then type = 'info' end if not time then time = 5000 end TriggerClientEvent('okokNotify:Alert', src, '', text, time, type, false) -end \ No newline at end of file +end +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/server/ps.lua b/bridge/notify/server/ps.lua index 2d22261..9761a13 100644 --- a/bridge/notify/server/ps.lua +++ b/bridge/notify/server/ps.lua @@ -4,4 +4,5 @@ function ps.notify(source, text, type, time) if not type then type = 'info' end if not time then time = 5000 end TriggerClientEvent('ps_lib:notify', source, text, type, time) -end \ No newline at end of file +end +exports('notify', ps.notify) diff --git a/bridge/notify/server/qb.lua b/bridge/notify/server/qb.lua index 2a75e97..2ef55ba 100644 --- a/bridge/notify/server/qb.lua +++ b/bridge/notify/server/qb.lua @@ -4,4 +4,5 @@ function ps.notify(source, text, type, time) if not type then type = 'info' end if not time then time = 5000 end TriggerClientEvent('QBCore:Notify', source, text, type, time) -end \ No newline at end of file +end +exports('notify', ps.notify) diff --git a/bridge/progressbars/keep.lua b/bridge/progressbars/keep.lua index 0760895..a100f39 100644 --- a/bridge/progressbars/keep.lua +++ b/bridge/progressbars/keep.lua @@ -37,9 +37,13 @@ function ps.progressbar(text, time, emote, disabled) ps.cancelEmote() if not cancelled then p:resolve(true) + p = nil else p:resolve(false) + p = nil end end) return Citizen.Await(p) -end \ No newline at end of file +end + +exports('progressbar', ps.progressbar) \ No newline at end of file diff --git a/bridge/progressbars/lation.lua b/bridge/progressbars/lation.lua index 7fc509a..c03aae2 100644 --- a/bridge/progressbars/lation.lua +++ b/bridge/progressbars/lation.lua @@ -39,4 +39,7 @@ function ps.progressbar(text, time, emote, disabled) ps.cancelEmote() return false end -end \ No newline at end of file +end + + +exports('progressbar', ps.progressbar) \ No newline at end of file diff --git a/bridge/progressbars/oxbar.lua b/bridge/progressbars/oxbar.lua index 3ba0ee0..cb5ba00 100644 --- a/bridge/progressbars/oxbar.lua +++ b/bridge/progressbars/oxbar.lua @@ -39,4 +39,7 @@ function ps.progressbar(text, time, emote, disabled) ps.cancelEmote() return false end -end \ No newline at end of file +end + + +exports('progressbar', ps.progressbar) \ No newline at end of file diff --git a/bridge/progressbars/oxcircle.lua b/bridge/progressbars/oxcircle.lua index f206b2f..860f7e8 100644 --- a/bridge/progressbars/oxcircle.lua +++ b/bridge/progressbars/oxcircle.lua @@ -40,4 +40,7 @@ function ps.progressbar(text, time, emote, disabled) ps.cancelEmote() return false end -end \ No newline at end of file +end + + +exports('progressbar', ps.progressbar) \ No newline at end of file diff --git a/bridge/progressbars/qb.lua b/bridge/progressbars/qb.lua index 83e0f6c..32ec5df 100644 --- a/bridge/progressbars/qb.lua +++ b/bridge/progressbars/qb.lua @@ -38,4 +38,7 @@ function ps.progressbar(text, time, emote, disabled) ps.cancelEmote() end) return Citizen.Await(p) -end \ No newline at end of file +end + + +exports('progressbar', ps.progressbar) \ No newline at end of file diff --git a/bridge/target/interact/client.lua b/bridge/target/interact/client.lua index cf80d34..f3b4df8 100644 --- a/bridge/target/interact/client.lua +++ b/bridge/target/interact/client.lua @@ -132,4 +132,11 @@ AddEventHandler('onResourceStop', function(resourceName) end zones[resourceName] = nil end -end) \ No newline at end of file +end) + +exports('boxTarget', ps.boxTarget) +exports('circleTarget', ps.circleTarget) +exports('entityTarget', ps.entityTarget) +exports('targetModel', ps.targetModel) +exports('destroyAllTargets', ps.destroyAllTargets) +exports('destroyTarget', ps.destroyTarget) diff --git a/bridge/target/ox/client.lua b/bridge/target/ox/client.lua index 89a3509..5f8986e 100644 --- a/bridge/target/ox/client.lua +++ b/bridge/target/ox/client.lua @@ -123,4 +123,11 @@ AddEventHandler('onResourceStop', function(resourceName) end zones[resourceName] = nil end -end) \ No newline at end of file +end) + +exports('boxTarget', ps.boxTarget) +exports('circleTarget', ps.circleTarget) +exports('entityTarget', ps.entityTarget) +exports('targetModel', ps.targetModel) +exports('destroyAllTargets', ps.destroyAllTargets) +exports('destroyTarget', ps.destroyTarget) \ No newline at end of file diff --git a/bridge/target/qb/client.lua b/bridge/target/qb/client.lua index da53614..3720e9d 100644 --- a/bridge/target/qb/client.lua +++ b/bridge/target/qb/client.lua @@ -131,4 +131,11 @@ AddEventHandler('onResourceStop', function(resourceName) end zones[resourceName] = nil end -end) \ No newline at end of file +end) + +exports('boxTarget', ps.boxTarget) +exports('circleTarget', ps.circleTarget) +exports('entityTarget', ps.entityTarget) +exports('targetModel', ps.targetModel) +exports('destroyAllTargets', ps.destroyAllTargets) +exports('destroyTarget', ps.destroyTarget) \ No newline at end of file diff --git a/bridge/zones/PolyZone/client.lua b/bridge/zones/PolyZone/client.lua index a96923a..c977195 100644 --- a/bridge/zones/PolyZone/client.lua +++ b/bridge/zones/PolyZone/client.lua @@ -145,4 +145,9 @@ RegisterNetEvent('onResourceStop', function(resourceName) end zones[resourceName] = nil end -end) \ No newline at end of file +end) + +exports('boxZone', ps.zones.box) +exports('sphereZone', ps.zones.sphere) +exports('polyZone', ps.zones.poly) +exports('removeZone', ps.zones.remove) \ No newline at end of file diff --git a/bridge/zones/ox/client.lua b/bridge/zones/ox/client.lua index 8a66734..6b228bb 100644 --- a/bridge/zones/ox/client.lua +++ b/bridge/zones/ox/client.lua @@ -50,4 +50,9 @@ RegisterNetEvent('onResourceStop', function(resourceName) end zones[resourceName] = nil end -end) \ No newline at end of file +end) + +exports('boxZone', ps.zones.box) +exports('sphereZone', ps.zones.sphere) +exports('polyZone', ps.zones.poly) +exports('removeZone', ps.zones.remove) \ No newline at end of file diff --git a/modules/animation/animation.lua b/modules/animation/animation.lua index 4d5d9c2..e574c51 100644 --- a/modules/animation/animation.lua +++ b/modules/animation/animation.lua @@ -26,4 +26,6 @@ function ps.playAnim(ped, animDictionary, animationName, blendInSpeed, blendOutS lockZ or false ) RemoveAnimDict(animDictionary) -end \ No newline at end of file +end + +exports('playAnim', ps.playAnim) \ No newline at end of file diff --git a/modules/copyClipboard/client/clipboard.lua b/modules/copyClipboard/client/clipboard.lua index a2a511f..f57ad30 100644 --- a/modules/copyClipboard/client/clipboard.lua +++ b/modules/copyClipboard/client/clipboard.lua @@ -9,4 +9,6 @@ end RegisterCommand('testCopyClipboard', function(source, args, rawCommand) local text = table.concat(args, ' ') ps.copyClipboard(text) -end, false) \ No newline at end of file +end, false) + +exports('copyClipboard', ps.copyClipboard) \ No newline at end of file diff --git a/modules/getNear/client/getNear.lua b/modules/getNear/client/getNear.lua index 3ca097a..8256c55 100644 --- a/modules/getNear/client/getNear.lua +++ b/modules/getNear/client/getNear.lua @@ -22,6 +22,8 @@ function ps.getNearestPed(coords, distance) end end +exports('getNearestPed', ps.getNearestPed) +exports('GetClosestPed', ps.getNearestPed) function ps.getNearestVehicle(coords, distance) if not coords then coords = GetEntityCoords(PlayerPedId()) end if not distance then distance = 10.0 end @@ -45,6 +47,8 @@ function ps.getNearestVehicle(coords, distance) return 'no nearby vehicle', 'no nearby vehicle' end end +exports('getNearestVehicle', ps.getNearestVehicle) +exports('GetClosestVehicle', ps.getNearestVehicle) function ps.getNearestPlayers(coords, distance) local ped = PlayerPedId() @@ -66,7 +70,8 @@ function ps.getNearestPlayers(coords, distance) end return closestPlayer, closestDistance end - +exports('getNearestPlayers', ps.getNearestPlayers) +exports('GetClosestPlayer', ps.getNearestPlayers) function ps.getNearestObject(coords, distance) if not coords then coords = GetEntityCoords(PlayerPedId()) end if not distance then distance = 10.0 end @@ -91,6 +96,9 @@ function ps.getNearestObject(coords, distance) end end +exports('getNearestObject', ps.getNearestObject) +exports('GetClosestObject', ps.getNearestObject) + function ps.getNearestObjectOfType(type, distance, coords) if not type then return end if not coords then coords = GetEntityCoords(PlayerPedId()) end @@ -98,6 +106,9 @@ function ps.getNearestObjectOfType(type, distance, coords) return GetClosestObjectOfType(coords.x, coords.y, coords.z, distance, type, false, false, false) end +exports('getNearestObjectOfType', ps.getNearestObjectOfType) +exports('GetClosestObjectOfType', ps.getNearestObjectOfType) + function ps.getNearbyPed(coords, distance) if not coords then coords = GetEntityCoords(PlayerPedId()) end if not distance then distance = 25.0 end @@ -121,6 +132,7 @@ function ps.getNearbyPed(coords, distance) end end +exports('getNearbyPeds', ps.getNearbyPed) function ps.getNearbyVehicles(coords, distance) if not coords then coords = GetEntityCoords(PlayerPedId()) end if not distance then distance = 25.0 end @@ -143,7 +155,7 @@ function ps.getNearbyVehicles(coords, distance) return {} end end - +exports('getNearbyVehicles', ps.getNearbyVehicles) function ps.getNearbyObjects(coords, distance) if not coords then coords = GetEntityCoords(PlayerPedId()) end if not distance then distance = 25.0 end @@ -165,4 +177,5 @@ function ps.getNearbyObjects(coords, distance) ps.notify('No Objects Nearby', 'error') return {} end -end \ No newline at end of file +end +exports('getNearbyObjects', ps.getNearbyObjects) \ No newline at end of file diff --git a/modules/interactions/client/interactions.lua b/modules/interactions/client/interactions.lua index 0b88c79..449b092 100644 --- a/modules/interactions/client/interactions.lua +++ b/modules/interactions/client/interactions.lua @@ -17,4 +17,6 @@ function ps.minigame(type, values) local success = lib.skillCheck(values.difficulty, values.input) return success end -end \ No newline at end of file +end + +exports('minigame', ps.minigame) \ No newline at end of file diff --git a/modules/keybinds/client/keybinds.lua b/modules/keybinds/client/keybinds.lua index 25d3b43..ae85825 100644 --- a/modules/keybinds/client/keybinds.lua +++ b/modules/keybinds/client/keybinds.lua @@ -25,3 +25,6 @@ function ps.removeKeybind(key) ps.debug('Keybind does not exist') end end + +exports('addKeybind', ps.addKeybind) +exports('removeKeybind', ps.removeKeybind) \ No newline at end of file diff --git a/modules/misc/shared/misc.lua b/modules/misc/shared/misc.lua index 7230d27..51ff356 100644 --- a/modules/misc/shared/misc.lua +++ b/modules/misc/shared/misc.lua @@ -32,3 +32,10 @@ function ps.tableContains(tab, value) end return false end + +exports('sorter', ps.sorter) +exports('concat', ps.concat) +exports('string', ps.string) +exports('decimalRound', ps.decimalRound) +exports('random', ps.random) +exports('tableContains', ps.tableContains) \ No newline at end of file diff --git a/modules/raycast/client/raycast.lua b/modules/raycast/client/raycast.lua index a981df2..91d76d0 100644 --- a/modules/raycast/client/raycast.lua +++ b/modules/raycast/client/raycast.lua @@ -35,3 +35,5 @@ function ps.raycast() local _, hit, endCoords, surfaceNormal, entityHit = RayCastGamePlayCamera(1000.0) return hit, endCoords, surfaceNormal, entityHit end + +exports('raycast', ps.raycast) \ No newline at end of file diff --git a/modules/requests/client/requests.lua b/modules/requests/client/requests.lua index a6c1fa6..c70ef28 100644 --- a/modules/requests/client/requests.lua +++ b/modules/requests/client/requests.lua @@ -41,3 +41,6 @@ function ps.requestPTFX(dict, timeout) return true end +exports('requestModel', ps.requestModel) +exports('requestAnim', ps.requestAnim) +exports('requestPTFX', ps.requestPTFX) \ No newline at end of file diff --git a/modules/streamed_assets/shared/objectList.lua b/modules/streamed_assets/shared/objectList.lua index 4fbf1a1..e2b6598 100644 --- a/modules/streamed_assets/shared/objectList.lua +++ b/modules/streamed_assets/shared/objectList.lua @@ -18463,4 +18463,5 @@ end function ps.getRandomObject() return objectList[math.random(1, #objectList)] -end \ No newline at end of file +end + diff --git a/modules/versionCheck/server/versionCheck.lua b/modules/versionCheck/server/versionCheck.lua index 3d0647c..c728fbb 100644 --- a/modules/versionCheck/server/versionCheck.lua +++ b/modules/versionCheck/server/versionCheck.lua @@ -40,4 +40,6 @@ function ps.versionCheck(script, link, updateLink) end, "GET", "", "") end -- TODO: on release ill need to PR this to get the raw link for version check :) -ps.versionCheck('ps_lib', 'https://raw.githubusercontent.com/Project-Sloth/ps_lib/refs/heads/main/changelog.txt', 'https://github.com/Project-Sloth/ps_lib') \ No newline at end of file +ps.versionCheck('ps_lib', 'https://raw.githubusercontent.com/Project-Sloth/ps_lib/refs/heads/main/changelog.txt', 'https://github.com/Project-Sloth/ps_lib') + +exports('versionCheck', ps.versionCheck) \ No newline at end of file diff --git a/startFirst/shared/_print.lua b/startFirst/shared/_print.lua index f4463c8..e1d6d7d 100644 --- a/startFirst/shared/_print.lua +++ b/startFirst/shared/_print.lua @@ -47,4 +47,10 @@ end function ps.success(...) print('^2[SUCCESS]^0 ' .. formatArgs(...)) -end \ No newline at end of file +end + +exports('debug', ps.debug) +exports('info', ps.info) +exports('error', ps.error) +exports('warn', ps.warn) +exports('success', ps.success) \ No newline at end of file From 3d5e8fe59f5414cfb0574730f2aaba324a62fe24 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Fri, 3 Oct 2025 23:00:33 -0600 Subject: [PATCH 5/9] - `add` banking and vehiclekeys bridge - `refactored` client and server load bridge files to be easier --- Config.lua | 3 ++ bridge/banking/Renewed/server.lua | 35 ++++++++++++++++ bridge/banking/okok/server.lua | 35 ++++++++++++++++ bridge/banking/qb/server.lua | 41 ++++++++++++++++++ bridge/client.lua | 46 ++++++++------------- bridge/server.lua | 11 +++++ bridge/vehiclekeys/mrnewb/client/client.lua | 14 +++++++ bridge/vehiclekeys/qb/client/client.lua | 14 +++++++ 8 files changed, 170 insertions(+), 29 deletions(-) create mode 100644 bridge/banking/Renewed/server.lua create mode 100644 bridge/banking/okok/server.lua create mode 100644 bridge/banking/qb/server.lua create mode 100644 bridge/vehiclekeys/mrnewb/client/client.lua create mode 100644 bridge/vehiclekeys/qb/client/client.lua diff --git a/Config.lua b/Config.lua index 38b2174..c567b43 100644 --- a/Config.lua +++ b/Config.lua @@ -1,9 +1,12 @@ Config = {} ps = {} +Config.EmoteMenu = "rpemotes" -- rpemotes, dpemotes, scully, anything else for custom Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation Config.Menus = "ox" -- qb, ox, ps, lation Config.DrawText = "ox" -- qb, ox, ps, lation, okok +Config.Banking = "qb" -- qb, okok, Renewed, none +Config.VehicleKeys = "qb" -- qb, mrnewb, none Config.ConvertQBMenu = false -- Convert qb-menu to ps-ui context menu and qb-input to ps-ui input Config.Progressbar = { -- these are DEFAULT values, you can override them in the progressbar function diff --git a/bridge/banking/Renewed/server.lua b/bridge/banking/Renewed/server.lua new file mode 100644 index 0000000..800238d --- /dev/null +++ b/bridge/banking/Renewed/server.lua @@ -0,0 +1,35 @@ + +function ps.addAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + exports['Renewed-Banking']:addAccountMoney(id, amount) + return true +end + +function ps.removeAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + if exports['Renewed-Banking']:removeAccountMoney(id, amount) then + return true + end + return false +end + +function ps.getAccountMoney(id) + if not id then + return 0 + end + local money = exports['Renewed-Banking']:getAccountMoney(id) + if money then + return money + end + return 0 +end \ No newline at end of file diff --git a/bridge/banking/okok/server.lua b/bridge/banking/okok/server.lua new file mode 100644 index 0000000..e0d149f --- /dev/null +++ b/bridge/banking/okok/server.lua @@ -0,0 +1,35 @@ + +function ps.addAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + exports['okokBanking']:AddMoney(id, amount) + return true +end + +function ps.removeAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + if exports['okokBanking']:RemoveMoney(id, amount) then + return true + end + return false +end + +function ps.getAccountMoney(id) + if not id then + return 0 + end + local money = exports['okokBanking']:GetAccount(id) + if money then + return money + end + return 0 +end \ No newline at end of file diff --git a/bridge/banking/qb/server.lua b/bridge/banking/qb/server.lua new file mode 100644 index 0000000..10c9bea --- /dev/null +++ b/bridge/banking/qb/server.lua @@ -0,0 +1,41 @@ + +function ps.addAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + if not reason then + reason = "" + end + exports['qb-banking']:AddMoney(id, amount, reason) + return true +end + +function ps.removeAccountMoney(id, amount, reason) + if not id then + return false + end + if not amount or amount < 0 then + return false + end + if not reason then + reason = "" + end + if exports['qb-banking']:RemoveMoney(id, amount, reason) then + return true + end + return false +end + +function ps.getAccountMoney(id) + if not id then + return 0 + end + local money = exports['qb-banking']:GetBalance(id) + if money then + return money + end + return 0 +end \ No newline at end of file diff --git a/bridge/client.lua b/bridge/client.lua index c66cc6d..c7da737 100644 --- a/bridge/client.lua +++ b/bridge/client.lua @@ -2,9 +2,8 @@ local emote, framework, inventory, target = false, false, false, false -- Emote Loading local emoteResources = { ['rpemotes'] = 'bridge/emote/rp/client.lua', - ['rpemotes-reborn'] = 'bridge/emote/rp/client.lua', ['dpemotes'] = 'bridge/emote/dp/client.lua', - ['scully_emotemenu'] = 'bridge/emote/scully/client.lua', + ['scully'] = 'bridge/emote/scully/client.lua', } local frameworkResources = { @@ -60,33 +59,10 @@ local menus = { ['ps'] = 'ps.lua', } - - -local function loadEmotes() - for script, path in pairs(emoteResources) do - if GetResourceState(script) == 'started' then - loadLib(path) - emote = true - ps.success(('Emote resource found: %s'):format(script)) - break - end - end - - if not emote then - loadLib('bridge/emote/custom/client.lua') - ps.warn('No emote resource found: falling back to custom') - end -end - -AddEventHandler('onResourceStart', function(resourceName) - if emoteResources[resourceName] then - loadLib(emoteResources[resourceName]) - ps.success(('Emote resourcedfs started: %s'):format(resourceName)) - emote = resourceName - end -end) - -loadEmotes() +local vehicleKeys = { + ['qb'] = 'bridge/vehiclekeys/qb/client/client.lua', + ['mrnewb'] = 'bridge/vehiclekeys/mrnewb/client/client.lua', +} for k, v in pairs(zones) do if GetResourceState(v.script) == 'started' then @@ -167,11 +143,23 @@ if drawText[Config.DrawText] then loadLib('bridge/drawtext/'..drawText[Config.DrawText]) ps.success(('DrawText system loaded: %s'):format(Config.DrawText)) end + if notify[Config.Notify] then loadLib('bridge/notify/'..notify[Config.Notify]) ps.success(('Notify system loaded: %s'):format(Config.Notify)) end + if progressbars[Config.Progressbar.style] then loadLib('bridge/progressbars/'..progressbars[Config.Progressbar.style]) ps.success(('Progressbar system loaded: %s'):format(Config.Progressbar.style)) end + +if vehicleKeys[Config.VehicleKeys] then + loadLib(vehicleKeys[Config.VehicleKeys]) + ps.success(('Vehicle Keys system loaded: %s'):format(Config.VehicleKeys)) +end + +if emoteResources[Config.EmoteMenu] then + loadLib(emoteResources[Config.EmoteMenu]) + ps.success(('Emote system loaded: %s'):format(Config.EmoteMenu)) +end \ No newline at end of file diff --git a/bridge/server.lua b/bridge/server.lua index 30555da..276e91d 100644 --- a/bridge/server.lua +++ b/bridge/server.lua @@ -21,11 +21,22 @@ local notify = { ['mad_thoughts'] = 'server/mad_thoughts.lua', } +local banking = { + ['qb'] = 'bridge/banking/qb/server.lua', + ['okok'] = 'bridge/banking/okok/server.lua', + ['Renewed'] = 'bridge/banking/Renewed/server.lua', +} + if notify[Config.Notify] then loadLib('bridge/notify/'..notify[Config.Notify]) ps.success(('Notify system loaded: %s'):format(Config.Notify)) end +if banking[Config.Banking] then + loadLib(banking[Config.Banking]) + ps.success(('Banking system loaded: %s'):format(Config.Banking)) +end + local function loadFramework() for key, data in ipairs(frameworkResources) do if GetResourceState(data.name) == 'started' then diff --git a/bridge/vehiclekeys/mrnewb/client/client.lua b/bridge/vehiclekeys/mrnewb/client/client.lua new file mode 100644 index 0000000..89872fd --- /dev/null +++ b/bridge/vehiclekeys/mrnewb/client/client.lua @@ -0,0 +1,14 @@ + +function ps.giveVehicleKey(vehicle) + if not vehicle then + return false + end + exports.MrNewbVehicleKeys:GiveKeys(vehicle) +end + +function ps.removeVehicleKey(vehicle) + if not vehicle then + return false + end + exports.MrNewbVehicleKeys:RemoveKeys(vehicle) +end \ No newline at end of file diff --git a/bridge/vehiclekeys/qb/client/client.lua b/bridge/vehiclekeys/qb/client/client.lua new file mode 100644 index 0000000..5c7f7db --- /dev/null +++ b/bridge/vehiclekeys/qb/client/client.lua @@ -0,0 +1,14 @@ + +function ps.giveVehicleKey(vehicle) + if not vehicle then + return false + end + TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', QBCore.Functions.GetPlate(vehicle)) +end + +function ps.removeVehicleKey(vehicle) + if not vehicle then + return false + end + TriggerEvent('qb-vehiclekeys:client:RemoveKeys', QBCore.Functions.GetPlate(vehicle)) +end \ No newline at end of file From 3217ea6f244a662dad024838bdc5ee9788ed6253 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:19:21 -0600 Subject: [PATCH 6/9] - added prints to all files loaded in bridge so we know it actually loaded - added config.target and config.inventory with options for auto --- Config.lua | 2 + bridge/banking/Renewed/server.lua | 2 +- bridge/banking/okok/server.lua | 2 +- bridge/banking/qb/server.lua | 2 +- bridge/client.lua | 92 +++++++++------------ bridge/drawtext/lation.lua | 2 + bridge/drawtext/okok.lua | 2 + bridge/drawtext/ox.lua | 2 + bridge/drawtext/ps.lua | 2 + bridge/drawtext/qb.lua | 2 + bridge/emote/custom/client.lua | 2 + bridge/emote/dp/client.lua | 2 + bridge/emote/rp/client.lua | 2 +- bridge/emote/scully/client.lua | 2 +- bridge/inventory/custom/client/custom.lua | 2 + bridge/inventory/custom/server/custom.lua | 1 + bridge/inventory/jpr/client/jpr.lua | 2 +- bridge/inventory/jpr/server/jpr.lua | 2 +- bridge/inventory/lj/client/lj.lua | 1 + bridge/inventory/ox/client/ox.lua | 1 + bridge/inventory/ox/server/ox.lua | 2 +- bridge/inventory/ps/client/ps.lua | 1 + bridge/inventory/ps/server/ps.lua | 2 +- bridge/inventory/qb/client/qb.lua | 2 +- bridge/inventory/qb/server/qb.lua | 2 +- bridge/inventory/tgiann/client/tgg.lua | 2 +- bridge/inventory/tgiann/server/tgg.lua | 2 +- bridge/menus/lation.lua | 2 +- bridge/menus/ox.lua | 2 +- bridge/menus/ps.lua | 2 +- bridge/menus/qb.lua | 2 +- bridge/notify/client/esx.lua | 1 + bridge/notify/client/lation.lua | 2 +- bridge/notify/client/mad_thoughts.lua | 3 + bridge/notify/client/okok.lua | 2 +- bridge/notify/client/ox.lua | 1 + bridge/notify/client/paradise.lua | 1 + bridge/notify/client/ps.lua | 1 + bridge/notify/client/qb.lua | 2 +- bridge/notify/server/esx.lua | 1 + bridge/notify/server/lation.lua | 3 +- bridge/notify/server/mad_thoughts.lua | 1 + bridge/notify/server/okok.lua | 3 +- bridge/notify/server/ox.lua | 4 +- bridge/notify/server/paradise.lua | 4 +- bridge/notify/server/ps.lua | 1 + bridge/notify/server/qb.lua | 1 + bridge/progressbars/keep.lua | 2 +- bridge/progressbars/lation.lua | 2 +- bridge/progressbars/oxbar.lua | 4 +- bridge/progressbars/oxcircle.lua | 3 +- bridge/progressbars/qb.lua | 3 +- bridge/server.lua | 53 ++++++------ bridge/target/interact/client.lua | 1 + bridge/target/ox/client.lua | 3 +- bridge/target/qb/client.lua | 3 +- bridge/vehiclekeys/mrnewb/client/client.lua | 4 +- bridge/vehiclekeys/qb/client/client.lua | 4 +- bridge/zones/PolyZone/client.lua | 4 +- bridge/zones/ox/client.lua | 4 +- 60 files changed, 157 insertions(+), 112 deletions(-) diff --git a/Config.lua b/Config.lua index c567b43..099e678 100644 --- a/Config.lua +++ b/Config.lua @@ -1,6 +1,8 @@ Config = {} ps = {} +Config.Inventory = "auto" -- auto, ox, qb, ps, lj, tgg, jpr +Config.Target = "auto" -- auto, ox, qb, interact Config.EmoteMenu = "rpemotes" -- rpemotes, dpemotes, scully, anything else for custom Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation Config.Menus = "ox" -- qb, ox, ps, lation diff --git a/bridge/banking/Renewed/server.lua b/bridge/banking/Renewed/server.lua index 800238d..31a1c9d 100644 --- a/bridge/banking/Renewed/server.lua +++ b/bridge/banking/Renewed/server.lua @@ -1,4 +1,4 @@ - +ps.success('Banking Module Loaded: Renewed Banking') function ps.addAccountMoney(id, amount, reason) if not id then return false diff --git a/bridge/banking/okok/server.lua b/bridge/banking/okok/server.lua index e0d149f..d855739 100644 --- a/bridge/banking/okok/server.lua +++ b/bridge/banking/okok/server.lua @@ -1,4 +1,4 @@ - +ps.success('Banking Module Loaded: OKOK Banking') function ps.addAccountMoney(id, amount, reason) if not id then return false diff --git a/bridge/banking/qb/server.lua b/bridge/banking/qb/server.lua index 10c9bea..495aa55 100644 --- a/bridge/banking/qb/server.lua +++ b/bridge/banking/qb/server.lua @@ -1,4 +1,4 @@ - +ps.success('Banking Module Loaded: QB-Banking') function ps.addAccountMoney(id, amount, reason) if not id then return false diff --git a/bridge/client.lua b/bridge/client.lua index c7da737..9a6e5c8 100644 --- a/bridge/client.lua +++ b/bridge/client.lua @@ -64,13 +64,6 @@ local vehicleKeys = { ['mrnewb'] = 'bridge/vehiclekeys/mrnewb/client/client.lua', } -for k, v in pairs(zones) do - if GetResourceState(v.script) == 'started' then - loadLib(v.path) - ps.success(('Zone resource found: %s'):format(v.script)) - break - end -end local function loadFramework() for key, v in ipairs(frameworkResources) do @@ -94,7 +87,6 @@ local function loadInventory() if GetResourceState(script) == 'started' then loadLib(path) inventory = script - ps.success(('Inventory resource found: %s'):format(script)) break end end @@ -105,61 +97,59 @@ local function loadInventory() end end -loadInventory() - -AddEventHandler('onResourceStart', function(resourceName) - if inventoryResources[resourceName] then - loadLib(inventoryResources[resourceName]) - ps.success(('Inventory resource started: %s'):format(resourceName)) - end -end) - local function loadTarget() for script, path in pairs(targetResources) do if GetResourceState(script) == 'started' then loadLib(path) - target = script - ps.success(('Target resource found: %s'):format(script)) return end end end -loadTarget() - -AddEventHandler('onResourceStart', function(resourceName) - if targetResources[resourceName] then - loadLib(targetResources[resourceName]) - ps.success(('Target resource started: %s'):format(resourceName)) +local function loadAll() + if Config.Inventory ~= 'auto' then + if inventoryResources[Config.Inventory] then + loadLib(inventoryResources[Config.Inventory]) + else + loadLib('bridge/inventory/custom/client/custom.lua') + ps.warn('No inventory resource found: falling back to custom') + end + else + loadInventory() end -end) - -if menus[Config.Menus] then - loadLib('bridge/menus/'..menus[Config.Menus]) - ps.success(('Menu system loaded: %s'):format(Config.Menus)) -end - -if drawText[Config.DrawText] then - loadLib('bridge/drawtext/'..drawText[Config.DrawText]) - ps.success(('DrawText system loaded: %s'):format(Config.DrawText)) -end -if notify[Config.Notify] then - loadLib('bridge/notify/'..notify[Config.Notify]) - ps.success(('Notify system loaded: %s'):format(Config.Notify)) -end + if Config.Target ~= 'auto' then + if targetResources[Config.Target] then + loadLib(targetResources[Config.Target]) + end + else + loadTarget() + end -if progressbars[Config.Progressbar.style] then - loadLib('bridge/progressbars/'..progressbars[Config.Progressbar.style]) - ps.success(('Progressbar system loaded: %s'):format(Config.Progressbar.style)) -end + if menus[Config.Menus] then + loadLib('bridge/menus/'..menus[Config.Menus]) + end -if vehicleKeys[Config.VehicleKeys] then - loadLib(vehicleKeys[Config.VehicleKeys]) - ps.success(('Vehicle Keys system loaded: %s'):format(Config.VehicleKeys)) + if drawText[Config.DrawText] then + loadLib('bridge/drawtext/'..drawText[Config.DrawText]) + end + if notify[Config.Notify] then + loadLib('bridge/notify/'..notify[Config.Notify]) + end + if progressbars[Config.Progressbar.style] then + loadLib('bridge/progressbars/'..progressbars[Config.Progressbar.style]) + end + if vehicleKeys[Config.VehicleKeys] then + loadLib(vehicleKeys[Config.VehicleKeys]) + end + if emoteResources[Config.EmoteMenu] then + loadLib(emoteResources[Config.EmoteMenu]) + end + if GetResourceState('ox_lib') == 'started' then + loadLib('bridge/zones/ox/client.lua') + else + loadLib('bridge/zones/PolyZone/client.lua') + end end -if emoteResources[Config.EmoteMenu] then - loadLib(emoteResources[Config.EmoteMenu]) - ps.success(('Emote system loaded: %s'):format(Config.EmoteMenu)) -end \ No newline at end of file +loadAll() \ No newline at end of file diff --git a/bridge/drawtext/lation.lua b/bridge/drawtext/lation.lua index 31bb72f..863a2d2 100644 --- a/bridge/drawtext/lation.lua +++ b/bridge/drawtext/lation.lua @@ -1,3 +1,5 @@ +ps.success('Draw Text Module Loaded: Lation UI') + function ps.drawText(text) if not text then return end exports.lation_ui:showText(text) diff --git a/bridge/drawtext/okok.lua b/bridge/drawtext/okok.lua index c093f10..8d44871 100644 --- a/bridge/drawtext/okok.lua +++ b/bridge/drawtext/okok.lua @@ -1,3 +1,5 @@ +ps.success('Draw Text Module Loaded: Okok') + function ps.drawText(text) if not text then return end exports['okokTextUI']:Open(text, 'lightgrey', 'right', true) diff --git a/bridge/drawtext/ox.lua b/bridge/drawtext/ox.lua index 260041d..31b5c2a 100644 --- a/bridge/drawtext/ox.lua +++ b/bridge/drawtext/ox.lua @@ -1,3 +1,5 @@ +ps.success('Draw Text Module Loaded: ox_lib') + function ps.drawText(text) if not text then return end lib.showTextUI(text) diff --git a/bridge/drawtext/ps.lua b/bridge/drawtext/ps.lua index 80b8005..a2f5909 100644 --- a/bridge/drawtext/ps.lua +++ b/bridge/drawtext/ps.lua @@ -1,3 +1,5 @@ +ps.success('Draw Text Module Loaded: PS-UI') + function ps.drawText(text) if not text then return end exports['ps-ui']:drawText(text, "yellow") diff --git a/bridge/drawtext/qb.lua b/bridge/drawtext/qb.lua index 2d3c3bb..40664da 100644 --- a/bridge/drawtext/qb.lua +++ b/bridge/drawtext/qb.lua @@ -1,3 +1,5 @@ +ps.success('Draw Text Module Loaded: QB-Core') + function ps.drawText(text) if not text then return end exports['qb-core']:ShowText(text) diff --git a/bridge/emote/custom/client.lua b/bridge/emote/custom/client.lua index d542afe..f7d329a 100644 --- a/bridge/emote/custom/client.lua +++ b/bridge/emote/custom/client.lua @@ -1,3 +1,5 @@ +ps.success('Emote Module Loaded: Custom Emotes') + local props = {} local IsInEmote = false local emotes = { diff --git a/bridge/emote/dp/client.lua b/bridge/emote/dp/client.lua index 9db71b9..a071761 100644 --- a/bridge/emote/dp/client.lua +++ b/bridge/emote/dp/client.lua @@ -1,3 +1,5 @@ +ps.success('Emote Module Loaded: DP Emotes') + local props = {} local IsInEmote = false local emotes = { diff --git a/bridge/emote/rp/client.lua b/bridge/emote/rp/client.lua index 41f866a..6c60b93 100644 --- a/bridge/emote/rp/client.lua +++ b/bridge/emote/rp/client.lua @@ -1,4 +1,4 @@ - +ps.success('Emote Module Loaded: RP Emotes') local props = {} local IsInEmote = false local emotes = { diff --git a/bridge/emote/scully/client.lua b/bridge/emote/scully/client.lua index 9604c2f..5b73e2e 100644 --- a/bridge/emote/scully/client.lua +++ b/bridge/emote/scully/client.lua @@ -1,4 +1,4 @@ - +ps.success('Emote Module Loaded: RP Emotes') local props = {} local IsInEmote = false local emotes = { diff --git a/bridge/inventory/custom/client/custom.lua b/bridge/inventory/custom/client/custom.lua index 82558f8..2531688 100644 --- a/bridge/inventory/custom/client/custom.lua +++ b/bridge/inventory/custom/client/custom.lua @@ -1,3 +1,5 @@ +ps.success('Inventory Module Loaded: Custom Inventory') + -- returns path for image like nui://qb-inventory/html/images/item_image.png function ps.getImage(item) diff --git a/bridge/inventory/custom/server/custom.lua b/bridge/inventory/custom/server/custom.lua index 586441f..cefc2fa 100644 --- a/bridge/inventory/custom/server/custom.lua +++ b/bridge/inventory/custom/server/custom.lua @@ -1,4 +1,5 @@ --- function to remove item needs return true +ps.success('Inventory Module Loaded: Custom Inventory') function ps.removeItem(identifier, item, amount, slot, reason) if not identifier or not item then return end if not amount then amount = 1 end diff --git a/bridge/inventory/jpr/client/jpr.lua b/bridge/inventory/jpr/client/jpr.lua index 246ce5e..7a0fd1c 100644 --- a/bridge/inventory/jpr/client/jpr.lua +++ b/bridge/inventory/jpr/client/jpr.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: JPR Inventory') function ps.getImage(item) local itemData = QBCore.Shared.Items[item] if itemData then diff --git a/bridge/inventory/jpr/server/jpr.lua b/bridge/inventory/jpr/server/jpr.lua index 94f8b00..c315f48 100644 --- a/bridge/inventory/jpr/server/jpr.lua +++ b/bridge/inventory/jpr/server/jpr.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: JPR Inventory') function ps.removeItem(identifier, item, amount, slot, reason) if not identifier or not item then return end if not amount then amount = 1 end diff --git a/bridge/inventory/lj/client/lj.lua b/bridge/inventory/lj/client/lj.lua index 44e7a7f..024f428 100644 --- a/bridge/inventory/lj/client/lj.lua +++ b/bridge/inventory/lj/client/lj.lua @@ -1,3 +1,4 @@ +ps.success('Inventory Module Loaded: LJ Inventory') RegisterNetEvent('lj-inventory:client:openInventoryBackWards', function(name, data) TriggerEvent("inventory:client:SetCurrentStash", name) TriggerServerEvent("inventory:server:OpenInventory", "stash", name, { diff --git a/bridge/inventory/ox/client/ox.lua b/bridge/inventory/ox/client/ox.lua index 6d154d3..e6c47f1 100644 --- a/bridge/inventory/ox/client/ox.lua +++ b/bridge/inventory/ox/client/ox.lua @@ -1,3 +1,4 @@ +ps.success('Inventory Module Loaded: OX Inventory') RegisterNetEvent('ps_lib:client:openInventory', function(name) exports.ox_inventory:openInventory('stash', name) end) diff --git a/bridge/inventory/ox/server/ox.lua b/bridge/inventory/ox/server/ox.lua index 77e2dac..ebde191 100644 --- a/bridge/inventory/ox/server/ox.lua +++ b/bridge/inventory/ox/server/ox.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: OX Inventory') local function CanCarryItem(source, item, amount) if not source or not item then return end if not amount then amount = 1 end diff --git a/bridge/inventory/ps/client/ps.lua b/bridge/inventory/ps/client/ps.lua index 65986f8..9a7b4c2 100644 --- a/bridge/inventory/ps/client/ps.lua +++ b/bridge/inventory/ps/client/ps.lua @@ -1,3 +1,4 @@ +ps.success('Inventory Module Loaded: PS Inventory') function ps.getImage(item) local itemData = QBCore.Shared.Items[item].image if itemData then diff --git a/bridge/inventory/ps/server/ps.lua b/bridge/inventory/ps/server/ps.lua index e6f80ae..533a6ab 100644 --- a/bridge/inventory/ps/server/ps.lua +++ b/bridge/inventory/ps/server/ps.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: PS Inventory') function ps.removeItem(identifier, item, amount, slot, reason) if not identifier or not item then return end diff --git a/bridge/inventory/qb/client/qb.lua b/bridge/inventory/qb/client/qb.lua index d407e65..6983eb2 100644 --- a/bridge/inventory/qb/client/qb.lua +++ b/bridge/inventory/qb/client/qb.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: QB Inventory') --@param item string -- @return string diff --git a/bridge/inventory/qb/server/qb.lua b/bridge/inventory/qb/server/qb.lua index a834d4a..758f176 100644 --- a/bridge/inventory/qb/server/qb.lua +++ b/bridge/inventory/qb/server/qb.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: QB Inventory') -- @param identifier number|string i.e. source or CitizenID -- @param item string -- @param amount number diff --git a/bridge/inventory/tgiann/client/tgg.lua b/bridge/inventory/tgiann/client/tgg.lua index 0264f08..ecb5001 100644 --- a/bridge/inventory/tgiann/client/tgg.lua +++ b/bridge/inventory/tgiann/client/tgg.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: TGiann Inventory') --@param item string -- @return string diff --git a/bridge/inventory/tgiann/server/tgg.lua b/bridge/inventory/tgiann/server/tgg.lua index d1df676..4bf6363 100644 --- a/bridge/inventory/tgiann/server/tgg.lua +++ b/bridge/inventory/tgiann/server/tgg.lua @@ -1,4 +1,4 @@ - +ps.success('Inventory Module Loaded: TGiann Inventory') -- @param identifier number|string i.e. source or CitizenID -- @param item string -- @param amount number diff --git a/bridge/menus/lation.lua b/bridge/menus/lation.lua index 660a3c4..9459071 100644 --- a/bridge/menus/lation.lua +++ b/bridge/menus/lation.lua @@ -1,4 +1,4 @@ - +ps.success('Menu Module Loaded: Lation UI') function ps.menu(name, label, data) local options = {} diff --git a/bridge/menus/ox.lua b/bridge/menus/ox.lua index 628e1dc..7465b18 100644 --- a/bridge/menus/ox.lua +++ b/bridge/menus/ox.lua @@ -1,4 +1,4 @@ - +ps.success('Menu Module Loaded: ox_lib') function ps.menu(name, label, data) local options = {} diff --git a/bridge/menus/ps.lua b/bridge/menus/ps.lua index 852460e..7aff1fb 100644 --- a/bridge/menus/ps.lua +++ b/bridge/menus/ps.lua @@ -1,4 +1,4 @@ - +ps.success('Menu Module Loaded: PS-UI') function ps.menu(name, label, data) local options = {} diff --git a/bridge/menus/qb.lua b/bridge/menus/qb.lua index cad10e1..5338e80 100644 --- a/bridge/menus/qb.lua +++ b/bridge/menus/qb.lua @@ -1,4 +1,4 @@ - +ps.success('Menu Module Loaded: QB Menu') function ps.menu(name, label, data) local options = {} diff --git a/bridge/notify/client/esx.lua b/bridge/notify/client/esx.lua index fad8665..f63f679 100644 --- a/bridge/notify/client/esx.lua +++ b/bridge/notify/client/esx.lua @@ -1,3 +1,4 @@ +ps.success('Notification Module Loaded: ESX Notify') function ps.notify( text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/lation.lua b/bridge/notify/client/lation.lua index 32929fe..74e6e27 100644 --- a/bridge/notify/client/lation.lua +++ b/bridge/notify/client/lation.lua @@ -1,4 +1,4 @@ - +ps.success('Notification Module Loaded: Lation UI') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/mad_thoughts.lua b/bridge/notify/client/mad_thoughts.lua index 13ff4a4..f5da171 100644 --- a/bridge/notify/client/mad_thoughts.lua +++ b/bridge/notify/client/mad_thoughts.lua @@ -1,3 +1,6 @@ +ps.success('Notification Module Loaded: Mad Thoughts') + + --- IGNORE --- function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/okok.lua b/bridge/notify/client/okok.lua index 78da875..8c8c781 100644 --- a/bridge/notify/client/okok.lua +++ b/bridge/notify/client/okok.lua @@ -1,4 +1,4 @@ - +ps.success('Notification Module Loaded: okok Notify') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/ox.lua b/bridge/notify/client/ox.lua index 7934ae2..1e7ea9b 100644 --- a/bridge/notify/client/ox.lua +++ b/bridge/notify/client/ox.lua @@ -1,3 +1,4 @@ +ps.success('Notification Module Loaded: ox_lib Notify') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/paradise.lua b/bridge/notify/client/paradise.lua index c8bfc51..ce4980b 100644 --- a/bridge/notify/client/paradise.lua +++ b/bridge/notify/client/paradise.lua @@ -1,3 +1,4 @@ +ps.success('Notification Module Loaded: Paradise Notify') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/ps.lua b/bridge/notify/client/ps.lua index 41d8217..e79afc0 100644 --- a/bridge/notify/client/ps.lua +++ b/bridge/notify/client/ps.lua @@ -1,3 +1,4 @@ +ps.success('Notification Module Loaded: PS-UI') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/client/qb.lua b/bridge/notify/client/qb.lua index 9ef0ce1..69b71a7 100644 --- a/bridge/notify/client/qb.lua +++ b/bridge/notify/client/qb.lua @@ -1,4 +1,4 @@ - +ps.success('Notification Module Loaded: QB Notify') function ps.notify(text, type, time) if not text then return end if not type then type = 'info' end diff --git a/bridge/notify/server/esx.lua b/bridge/notify/server/esx.lua index 2d81663..b97d1db 100644 --- a/bridge/notify/server/esx.lua +++ b/bridge/notify/server/esx.lua @@ -1,3 +1,4 @@ +ps.success('Notification Module Loaded: ESX Notify') function ps.notify(source, text, type, time) if not source then return end if not text then return end diff --git a/bridge/notify/server/lation.lua b/bridge/notify/server/lation.lua index 81d6f6a..c6af6d5 100644 --- a/bridge/notify/server/lation.lua +++ b/bridge/notify/server/lation.lua @@ -10,4 +10,5 @@ function ps.notify(source, text, type, time) }) end -exports('notify', ps.notify) \ No newline at end of file +exports('notify', ps.notify) +ps.success('Notification Module Loaded: Lation UI') \ No newline at end of file diff --git a/bridge/notify/server/mad_thoughts.lua b/bridge/notify/server/mad_thoughts.lua index 79b8620..14ad3a0 100644 --- a/bridge/notify/server/mad_thoughts.lua +++ b/bridge/notify/server/mad_thoughts.lua @@ -14,3 +14,4 @@ function ps.notify(source, text, type, time) end end exports('notify', ps.notify) +ps.success('Notification Module Loaded: Mad Thoughts') \ No newline at end of file diff --git a/bridge/notify/server/okok.lua b/bridge/notify/server/okok.lua index a4d564b..1fdb857 100644 --- a/bridge/notify/server/okok.lua +++ b/bridge/notify/server/okok.lua @@ -6,4 +6,5 @@ function ps.notify(src, text, type, time) if not time then time = 5000 end TriggerClientEvent('okokNotify:Alert', src, '', text, time, type, false) end -exports('notify', ps.notify) \ No newline at end of file +exports('notify', ps.notify) +ps.success('Notification Module Loaded: okok Notify') \ No newline at end of file diff --git a/bridge/notify/server/ox.lua b/bridge/notify/server/ox.lua index b377c8e..80819ee 100644 --- a/bridge/notify/server/ox.lua +++ b/bridge/notify/server/ox.lua @@ -8,4 +8,6 @@ function ps.notify(source, text, type, time) type = type, duration = time, }) -end \ No newline at end of file +end +exports('notify', ps.notify) +ps.success('Notification Module Loaded: ox_lib Notify') \ No newline at end of file diff --git a/bridge/notify/server/paradise.lua b/bridge/notify/server/paradise.lua index 0867a96..5daaf17 100644 --- a/bridge/notify/server/paradise.lua +++ b/bridge/notify/server/paradise.lua @@ -8,4 +8,6 @@ function ps.notify(source, text, type, time) type = type, duration = time }) -end \ No newline at end of file +end +exports('notify', ps.notify) +ps.success('Notification Module Loaded: Paradise Notify') \ No newline at end of file diff --git a/bridge/notify/server/ps.lua b/bridge/notify/server/ps.lua index 9761a13..41e9d5c 100644 --- a/bridge/notify/server/ps.lua +++ b/bridge/notify/server/ps.lua @@ -6,3 +6,4 @@ function ps.notify(source, text, type, time) TriggerClientEvent('ps_lib:notify', source, text, type, time) end exports('notify', ps.notify) +ps.success('Notification Module Loaded: PS-UI') \ No newline at end of file diff --git a/bridge/notify/server/qb.lua b/bridge/notify/server/qb.lua index 2ef55ba..4ff62d2 100644 --- a/bridge/notify/server/qb.lua +++ b/bridge/notify/server/qb.lua @@ -6,3 +6,4 @@ function ps.notify(source, text, type, time) TriggerClientEvent('QBCore:Notify', source, text, type, time) end exports('notify', ps.notify) +ps.success('Notification Module Loaded: QB Notify') \ No newline at end of file diff --git a/bridge/progressbars/keep.lua b/bridge/progressbars/keep.lua index a100f39..173855f 100644 --- a/bridge/progressbars/keep.lua +++ b/bridge/progressbars/keep.lua @@ -1,5 +1,5 @@ local p = nil - +ps.success('Progressbar Module Loaded: keep-progressbar') local function handleDisable(disabled) if disabled.movement == nil then disabled.movement = Config.Progressbar.Movement diff --git a/bridge/progressbars/lation.lua b/bridge/progressbars/lation.lua index c03aae2..06fd1bf 100644 --- a/bridge/progressbars/lation.lua +++ b/bridge/progressbars/lation.lua @@ -1,4 +1,4 @@ - +ps.success('Progressbar Module Loaded: Lation UI') local function handleDisable(disabled) if disabled.movement == nil then disabled.movement = Config.Progressbar.Movement diff --git a/bridge/progressbars/oxbar.lua b/bridge/progressbars/oxbar.lua index cb5ba00..84128d5 100644 --- a/bridge/progressbars/oxbar.lua +++ b/bridge/progressbars/oxbar.lua @@ -42,4 +42,6 @@ function ps.progressbar(text, time, emote, disabled) end -exports('progressbar', ps.progressbar) \ No newline at end of file +exports('progressbar', ps.progressbar) + +ps.success('Progressbar Module Loaded: ox_lib Progressbar') \ No newline at end of file diff --git a/bridge/progressbars/oxcircle.lua b/bridge/progressbars/oxcircle.lua index 860f7e8..b40d3ca 100644 --- a/bridge/progressbars/oxcircle.lua +++ b/bridge/progressbars/oxcircle.lua @@ -43,4 +43,5 @@ function ps.progressbar(text, time, emote, disabled) end -exports('progressbar', ps.progressbar) \ No newline at end of file +exports('progressbar', ps.progressbar) +ps.success('Progressbar Module Loaded: ox_lib OX Circle Progressbar') \ No newline at end of file diff --git a/bridge/progressbars/qb.lua b/bridge/progressbars/qb.lua index 32ec5df..fa50df9 100644 --- a/bridge/progressbars/qb.lua +++ b/bridge/progressbars/qb.lua @@ -41,4 +41,5 @@ function ps.progressbar(text, time, emote, disabled) end -exports('progressbar', ps.progressbar) \ No newline at end of file +exports('progressbar', ps.progressbar) +ps.success('Progressbar Module Loaded: QB Progressbar') \ No newline at end of file diff --git a/bridge/server.lua b/bridge/server.lua index 276e91d..410128f 100644 --- a/bridge/server.lua +++ b/bridge/server.lua @@ -27,58 +27,59 @@ local banking = { ['Renewed'] = 'bridge/banking/Renewed/server.lua', } -if notify[Config.Notify] then - loadLib('bridge/notify/'..notify[Config.Notify]) - ps.success(('Notify system loaded: %s'):format(Config.Notify)) -end - -if banking[Config.Banking] then - loadLib(banking[Config.Banking]) - ps.success(('Banking system loaded: %s'):format(Config.Banking)) -end - local function loadFramework() for key, data in ipairs(frameworkResources) do if GetResourceState(data.name) == 'started' then loadLib(data.path) - framework = data.name + inventory = data.name ps.success(('Framework resource found: %s'):format(data.name)) break end end - if not framework then + if not inventory then loadLib('bridge/framework/custom/client.lua') ps.warn('No framework resource found: falling back to custom') end end -loadFramework() - local function loadInventory() + local inside = false for script, path in pairs(inventoryResources) do if GetResourceState(script) == 'started' then loadLib(path) - inventory = script - ps.success(('Inventory resource found: %s'):format(script)) + inside = true break end end - if not inventory then + if not inside then loadLib('bridge/inventory/custom/server/custom.lua') ps.warn('No inventory resource found: falling back to custom') end end -loadInventory() +function ps.getFramework() + return framework +end -AddEventHandler('onResourceStart', function(resourceName) - if inventoryResources[resourceName] then - loadLib(inventoryResources[resourceName]) - ps.success(('Inventory resource started: %s'):format(resourceName)) +local function loadAll() + if Config.Inventory ~= 'auto' then + if inventoryResources[Config.Inventory] then + loadLib(inventoryResources[Config.Inventory]) + else + loadLib('bridge/inventory/custom/server/custom.lua') + ps.warn('No inventory resource found: falling back to custom') + end + else + loadInventory() + end + if notify[Config.Notify] then + loadLib('bridge/notify/'..notify[Config.Notify]) end -end) -function ps.getFramework() - return framework -end \ No newline at end of file + if banking[Config.Banking] then + loadLib(banking[Config.Banking]) + end + loadFramework() +end +loadAll() \ No newline at end of file diff --git a/bridge/target/interact/client.lua b/bridge/target/interact/client.lua index f3b4df8..e7343eb 100644 --- a/bridge/target/interact/client.lua +++ b/bridge/target/interact/client.lua @@ -140,3 +140,4 @@ exports('entityTarget', ps.entityTarget) exports('targetModel', ps.targetModel) exports('destroyAllTargets', ps.destroyAllTargets) exports('destroyTarget', ps.destroyTarget) +ps.success('Target Module Loaded: Interact Target') \ No newline at end of file diff --git a/bridge/target/ox/client.lua b/bridge/target/ox/client.lua index 5f8986e..92403f4 100644 --- a/bridge/target/ox/client.lua +++ b/bridge/target/ox/client.lua @@ -130,4 +130,5 @@ exports('circleTarget', ps.circleTarget) exports('entityTarget', ps.entityTarget) exports('targetModel', ps.targetModel) exports('destroyAllTargets', ps.destroyAllTargets) -exports('destroyTarget', ps.destroyTarget) \ No newline at end of file +exports('destroyTarget', ps.destroyTarget) +ps.success('Target Module Loaded: ox_target') \ No newline at end of file diff --git a/bridge/target/qb/client.lua b/bridge/target/qb/client.lua index 3720e9d..7fa02f1 100644 --- a/bridge/target/qb/client.lua +++ b/bridge/target/qb/client.lua @@ -138,4 +138,5 @@ exports('circleTarget', ps.circleTarget) exports('entityTarget', ps.entityTarget) exports('targetModel', ps.targetModel) exports('destroyAllTargets', ps.destroyAllTargets) -exports('destroyTarget', ps.destroyTarget) \ No newline at end of file +exports('destroyTarget', ps.destroyTarget) +ps.success('Target Module Loaded: QB Target') \ No newline at end of file diff --git a/bridge/vehiclekeys/mrnewb/client/client.lua b/bridge/vehiclekeys/mrnewb/client/client.lua index 89872fd..edd23c4 100644 --- a/bridge/vehiclekeys/mrnewb/client/client.lua +++ b/bridge/vehiclekeys/mrnewb/client/client.lua @@ -11,4 +11,6 @@ function ps.removeVehicleKey(vehicle) return false end exports.MrNewbVehicleKeys:RemoveKeys(vehicle) -end \ No newline at end of file +end + +ps.success('Vehicle Keys Module Loaded: MrNewb Vehicle Keys') \ No newline at end of file diff --git a/bridge/vehiclekeys/qb/client/client.lua b/bridge/vehiclekeys/qb/client/client.lua index 5c7f7db..8f5965b 100644 --- a/bridge/vehiclekeys/qb/client/client.lua +++ b/bridge/vehiclekeys/qb/client/client.lua @@ -11,4 +11,6 @@ function ps.removeVehicleKey(vehicle) return false end TriggerEvent('qb-vehiclekeys:client:RemoveKeys', QBCore.Functions.GetPlate(vehicle)) -end \ No newline at end of file +end + +ps.success('Vehicle Keys Module Loaded: MrNewb Vehicle Keys') \ No newline at end of file diff --git a/bridge/zones/PolyZone/client.lua b/bridge/zones/PolyZone/client.lua index c977195..9802939 100644 --- a/bridge/zones/PolyZone/client.lua +++ b/bridge/zones/PolyZone/client.lua @@ -150,4 +150,6 @@ end) exports('boxZone', ps.zones.box) exports('sphereZone', ps.zones.sphere) exports('polyZone', ps.zones.poly) -exports('removeZone', ps.zones.remove) \ No newline at end of file +exports('removeZone', ps.zones.remove) + +ps.success('Zones Module Loaded: ox_lib Zones') \ No newline at end of file diff --git a/bridge/zones/ox/client.lua b/bridge/zones/ox/client.lua index 6b228bb..a32f22c 100644 --- a/bridge/zones/ox/client.lua +++ b/bridge/zones/ox/client.lua @@ -55,4 +55,6 @@ end) exports('boxZone', ps.zones.box) exports('sphereZone', ps.zones.sphere) exports('polyZone', ps.zones.poly) -exports('removeZone', ps.zones.remove) \ No newline at end of file +exports('removeZone', ps.zones.remove) + +ps.success('Zones Module Loaded: ox_lib Zones') \ No newline at end of file From f947bfe0a367b5c75cdb04d7a7f61a3b099e1bf2 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:20:49 -0600 Subject: [PATCH 7/9] add or to langs to auto default to en if the GetConvar auto default doesnt work --- Config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.lua b/Config.lua index 099e678..ccafc46 100644 --- a/Config.lua +++ b/Config.lua @@ -25,11 +25,11 @@ QBCore, ESX, qbx, langs = nil, nil, nil if GetResourceState('qbx_core') == 'started' then qbx = exports.qbx_core - langs = GetConvar('ox:locale', 'en') + langs = GetConvar('ox:locale', 'en') or 'en' elseif GetResourceState('es_extended') == 'started' then ESX = exports['es_extended']:getSharedObject() - langs = GetConvar('esx:locale', 'en') + langs = GetConvar('esx:locale', 'en') or 'en' elseif GetResourceState('qb-core') == 'started' then QBCore = exports['qb-core']:GetCoreObject() - langs = GetConvar('qb_locale', 'en') + langs = GetConvar('qb_locale', 'en') or 'en' end \ No newline at end of file From cb8f7e878140407b8c2f0456903f4203f022a7a5 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:27:11 -0600 Subject: [PATCH 8/9] - bump version --- changelog.txt | 21 ++++++++++++++++++++- fxmanifest.lua | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 4d6891f..c58d18d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -29,11 +29,30 @@ Build: 0.5.3 - returns the total amount of the item you send through -Newest Build: 0.5.4 +Build: 0.5.4 - moved a lot to bridge - progressbars, menus, notifications, drawtext, zones - removed ox_grids&Arrays&zones folder from modules - built wrapper for ox zones and PolyZone - fix small ox_inventory bugs for stashes - added support for mad_thoughts and keep_progressbar + +Newest Build: 0.5.5 + - added notification options + - okok, lation, paradise + - added inventory options + - tgg + - added Banking to bridge + - qb-banking, renewed-banking, okok banking + - added Vehicle Keys options + - MrNewb Vehicle Keys, qb + - Added Config Options Config.Inventory, Config.Target + - this allows you to load those modules before the scripts so load order is less + - of an issues + - added exports for most of the functions so you dont need to always load the entire + - lib + - added Lation Menus + - added Lation Draw Text + - added "or 'en'" to the langs global in config in case the native doesnt do it properly + \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index 1f5d6f2..caaab10 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -5,7 +5,7 @@ lua54 'yes' game 'gta5' name 'ps_lib' -version '0.5.4' +version '0.5.5' description 'Project Sloth Library' author 'Project Sloth' From 63172a2f22772cc38fbed18083eb77c8cf957e4d Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:37:19 -0600 Subject: [PATCH 9/9] `fix` config comments --- Config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config.lua b/Config.lua index ccafc46..a24b523 100644 --- a/Config.lua +++ b/Config.lua @@ -1,8 +1,8 @@ Config = {} ps = {} -Config.Inventory = "auto" -- auto, ox, qb, ps, lj, tgg, jpr -Config.Target = "auto" -- auto, ox, qb, interact +Config.Inventory = "auto" -- auto, ox_inventory, qb-inventory, ps-inventory, lj-inventory, tgiann-inventory, jpr-inventory +Config.Target = "auto" -- auto, ox_target, qb-target, interact Config.EmoteMenu = "rpemotes" -- rpemotes, dpemotes, scully, anything else for custom Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation Config.Menus = "ox" -- qb, ox, ps, lation