mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 14:06:02 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e984a437df | ||
|
|
0818dae0df | ||
|
|
771a2a3217 | ||
|
|
04b3f87b32 | ||
|
|
6c3d0ffc5e | ||
|
|
3f093ce934 |
@@ -1,6 +1,6 @@
|
|||||||
name "Jim_Bridge"
|
name "Jim_Bridge"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "2.0.02"
|
version "2.0.03"
|
||||||
description "Framework Bridge By Jimathy"
|
description "Framework Bridge By Jimathy"
|
||||||
fx_version "cerulean"
|
fx_version "cerulean"
|
||||||
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
|
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ function getPlayerInv(src)
|
|||||||
if src then
|
if src then
|
||||||
grabInv = exports[CodeMInv]:GetInventory(src)
|
grabInv = exports[CodeMInv]:GetInventory(src)
|
||||||
else
|
else
|
||||||
grabInv = exports[CodeMInv]:GetClientPlayerInventory()
|
grabInv = exports[CodeMInv]:getUserInventory()
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif isStarted(QBInv) then
|
elseif isStarted(QBInv) then
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ end)
|
|||||||
--- ```
|
--- ```
|
||||||
function dupeWarn(src, item, amount)
|
function dupeWarn(src, item, amount)
|
||||||
local name = getPlayer(src).name
|
local name = getPlayer(src).name
|
||||||
print("^5DupeWarn^7: "..name.." (^1"..tostring(src).."^7) ^2Tried to remove item '^3"..item.."^7' but it wasn't there")
|
print("^5DupeWarn^7: "..name.." (^1"..tostring(src).."^7) ^2Tried to remove item '^3"..item.."^7'^2 but it wasn't there^7")
|
||||||
if not debugMode then
|
if not debugMode then
|
||||||
DropPlayer(src, name.."("..tostring(src)..") Kicked for suspected duplicating items: "..item)
|
DropPlayer(src, name.."("..tostring(src)..") Kicked for suspected duplicating items: "..item)
|
||||||
end
|
end
|
||||||
@@ -432,7 +432,7 @@ function getDurability(item)
|
|||||||
for _, v in pairs(itemcheck) do
|
for _, v in pairs(itemcheck) do
|
||||||
if v.name == item and v.slot <= lowestSlot then
|
if v.name == item and v.slot <= lowestSlot then
|
||||||
lowestSlot = v.slot
|
lowestSlot = v.slot
|
||||||
durability = v.metadata.durability
|
durability = v.info.durability
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -452,7 +452,7 @@ function getDurability(item)
|
|||||||
for _, v in pairs(itemcheck) do
|
for _, v in pairs(itemcheck) do
|
||||||
if v.name == item and v.slot <= lowestSlot then
|
if v.name == item and v.slot <= lowestSlot then
|
||||||
lowestSlot = v.slot
|
lowestSlot = v.slot
|
||||||
durability = v.metadata.durability
|
durability = v.info.durability
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ end)
|
|||||||
--- })
|
--- })
|
||||||
--- ```
|
--- ```
|
||||||
function openShop(data)
|
function openShop(data)
|
||||||
|
jsonPrint(data)
|
||||||
if (data.job or data.gang) and not jobCheck(data.job or data.gang) then return end
|
if (data.job or data.gang) and not jobCheck(data.job or data.gang) then return end
|
||||||
|
|
||||||
if Config.General.JimShops then
|
if Config.General.JimShops then
|
||||||
@@ -156,12 +157,16 @@ function openShop(data)
|
|||||||
elseif isStarted(OXInv) then
|
elseif isStarted(OXInv) then
|
||||||
exports[OXInv]:openInventory('shop', { type = data.shop })
|
exports[OXInv]:openInventory('shop', { type = data.shop })
|
||||||
|
|
||||||
|
elseif isStarted(QSInv) then
|
||||||
|
TriggerServerEvent("inventory:server:OpenInventory", "shop", data.items.label, data.items)
|
||||||
|
|
||||||
elseif isStarted(QBInv) then
|
elseif isStarted(QBInv) then
|
||||||
if QBInvNew then
|
if QBInvNew then
|
||||||
TriggerServerEvent(getScript()..':server:OpenShopNewQB', data.shop)
|
TriggerServerEvent(getScript()..':server:OpenShopNewQB', data.shop)
|
||||||
else
|
else
|
||||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", data.items.label, data.items)
|
TriggerServerEvent("inventory:server:OpenInventory", "shop", data.items.label, data.items)
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif isStarted(RSGInv) then
|
elseif isStarted(RSGInv) then
|
||||||
TriggerServerEvent(getScript()..':server:OpenShopNewRSG', data.shop)
|
TriggerServerEvent(getScript()..':server:OpenShopNewRSG', data.shop)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ function stashRemoveItem(stashItems, stashName, items)
|
|||||||
stashItems[l] = nil
|
stashItems[l] = nil
|
||||||
else
|
else
|
||||||
debugPrint("^6Bridge^7: ^2Removing item from ^3Stash^2 with ^7"..QBInv, k, v)
|
debugPrint("^6Bridge^7: ^2Removing item from ^3Stash^2 with ^7"..QBInv, k, v)
|
||||||
exports[QSInv]:RemoveItemIntoStash(stashName, k, v, l)
|
exports[QSInv]:RemoveItemIntoStash(stashName[1], k, v, l)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -350,6 +350,7 @@ function stashRemoveItem(stashItems, stashName, items)
|
|||||||
end
|
end
|
||||||
exports[CodeMInv]:UpdateStash(stashName, stashItems)
|
exports[CodeMInv]:UpdateStash(stashName, stashItems)
|
||||||
debugPrint("^6Bridge^7: ^3saveStash^7: ^2Saving ^3CodeM^2 stash ^7'^6"..stashName.."^7'")
|
debugPrint("^6Bridge^7: ^3saveStash^7: ^2Saving ^3CodeM^2 stash ^7'^6"..stashName.."^7'")
|
||||||
|
|
||||||
elseif isStarted(OrigenInv) then
|
elseif isStarted(OrigenInv) then
|
||||||
for k, v in pairs(items) do
|
for k, v in pairs(items) do
|
||||||
exports[OrigenInv]:RemoveFromStash(stashName, k, v)
|
exports[OrigenInv]:RemoveFromStash(stashName, k, v)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ function registerStash(name, label, slots, weight, owner, coords)
|
|||||||
exports[OXInv]:RegisterStash(name, label, slots or 50, weight or 4000000, owner or nil)
|
exports[OXInv]:RegisterStash(name, label, slots or 50, weight or 4000000, owner or nil)
|
||||||
elseif isStarted(QSInv) then
|
elseif isStarted(QSInv) then
|
||||||
debugPrint("^6Bridge^7: ^2Registering ^3QS ^2Stash^7:", name, label)
|
debugPrint("^6Bridge^7: ^2Registering ^3QS ^2Stash^7:", name, label)
|
||||||
exports[QSInv]:RegisterStash(nil, name, slots or 50, weight or 4000000)
|
exports[QSInv]:RegisterStash(name, label, slots or 50, weight or 4000000)
|
||||||
|
|
||||||
--elseif isStarted(CoreInv) then
|
--elseif isStarted(CoreInv) then
|
||||||
-- debugPrint("^6Bridge^7: ^2Registering ^3CoreInv ^2Stash^7:", name, label)
|
-- debugPrint("^6Bridge^7: ^2Registering ^3CoreInv ^2Stash^7:", name, label)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.0.02
|
2.0.03
|
||||||
Reference in New Issue
Block a user