mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
Compare commits
5 Commits
c8089109c6
...
v2.1.01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
268c95f29a | ||
|
|
91dd069e5a | ||
|
|
f96d96f26e | ||
|
|
ae231b6101 | ||
|
|
c709159ea4 |
@@ -1,6 +1,6 @@
|
|||||||
name "Jim_Bridge"
|
name "Jim_Bridge"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "2.0.23"
|
version "2.1.01"
|
||||||
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.'
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ local function awaitWithTimeout(registerFn, timeoutMs)
|
|||||||
return nil, res
|
return nil, res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Registers a callback function with the appropriate framework.
|
--- Registers a callback function with the appropriate framework.
|
||||||
---
|
---
|
||||||
--- This function checks which framework is started (e.g., OX, QB, ESX) and registers the callback accordingly.
|
--- This function checks which framework is started (e.g., OX, QB, ESX) and registers the callback accordingly.
|
||||||
|
|||||||
@@ -2104,9 +2104,7 @@ end
|
|||||||
function openStash(data)
|
function openStash(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
|
||||||
|
|
||||||
local p = promise.new()
|
local exploitCheck = triggerCallback(getScript()..":getRegisteredStashLocations", data.stash)
|
||||||
p:resolve(triggerCallback(getScript()..":getRegisteredStashLocations", data.stash))
|
|
||||||
local exploitCheck = Citizen.Await(p)
|
|
||||||
|
|
||||||
if not exploitCheck then
|
if not exploitCheck then
|
||||||
print("^3Warning^7: ^2This isn't a registered stash^1, refusing call^7")
|
print("^3Warning^7: ^2This isn't a registered stash^1, refusing call^7")
|
||||||
@@ -2351,19 +2349,23 @@ end
|
|||||||
--- )
|
--- )
|
||||||
--- ```
|
--- ```
|
||||||
function registerStash(name, label, slots, weight, owner, coords)
|
function registerStash(name, label, slots, weight, owner, coords)
|
||||||
if coords then
|
|
||||||
|
-- ensure tables exist
|
||||||
|
stashExploitCheck = stashExploitCheck or {}
|
||||||
stashExploitCheck[name] = stashExploitCheck[name] or {}
|
stashExploitCheck[name] = stashExploitCheck[name] or {}
|
||||||
stashExploitCheck[name][#stashExploitCheck[name]+1] = coords
|
|
||||||
else
|
|
||||||
print("^3Warning^7: ^1Stash ^4"..name.." ^1doesn^7'^1t have coords^7, ^1this is exploitable^7, ^1add coords to ^3regiterStash^7()")
|
|
||||||
end
|
|
||||||
for i = 1, #InvFunc do
|
for i = 1, #InvFunc do
|
||||||
local inv = InvFunc[i]
|
local inv = InvFunc[i]
|
||||||
if isStarted(inv.invName) then
|
if isStarted(inv.invName) then
|
||||||
inv.registerStash(name, label, slots, weight, owner, coords)
|
inv.registerStash(name, label, slots, weight, owner, coords)
|
||||||
return
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if coords then
|
||||||
|
stashExploitCheck[name][#stashExploitCheck[name]+1] = coords.xyz
|
||||||
|
else
|
||||||
|
print("^3Warning^7: ^1Stash ^4"..name.." ^1doesn^7'^1t have coords^7, ^1this is exploitable^7, ^1add coords to ^3regiterStash^7()")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if isServer() then
|
if isServer() then
|
||||||
@@ -2689,6 +2691,9 @@ end)
|
|||||||
--- ```
|
--- ```
|
||||||
function registerShop(name, label, items, society, coords)
|
function registerShop(name, label, items, society, coords)
|
||||||
local shopResource = ""
|
local shopResource = ""
|
||||||
|
-- ensure tables exist
|
||||||
|
shopExploitCheck = shopExploitCheck or {}
|
||||||
|
shopExploitCheck[name] = shopExploitCheck[name] or {}
|
||||||
|
|
||||||
for i = 1, #InvFunc do
|
for i = 1, #InvFunc do
|
||||||
local inv = InvFunc[i]
|
local inv = InvFunc[i]
|
||||||
@@ -2700,9 +2705,7 @@ function registerShop(name, label, items, society, coords)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- If received coords, pass them to distance check cache
|
-- If received coords, pass them to distance check cache
|
||||||
if coords and type(coords) == "vector3" then
|
if coords then
|
||||||
--print("Registered Shop Correctly")
|
|
||||||
shopExploitCheck[name] = shopExploitCheck[name] or {}
|
|
||||||
shopExploitCheck[name][#shopExploitCheck[name]+1] = coords
|
shopExploitCheck[name][#shopExploitCheck[name]+1] = coords
|
||||||
else
|
else
|
||||||
print("^3Warning^7: ^1Store ^4"..name.." ^1doesn^7'^1t have coords^7, ^1this is exploitable^7, ^1add coords to ^3regiterShop^7()")
|
print("^3Warning^7: ^1Store ^4"..name.." ^1doesn^7'^1t have coords^7, ^1this is exploitable^7, ^1add coords to ^3regiterShop^7()")
|
||||||
|
|||||||
@@ -130,12 +130,13 @@ end)
|
|||||||
--- @param type string "thirst" or "hunger".
|
--- @param type string "thirst" or "hunger".
|
||||||
--- @param amount number New value to set.
|
--- @param amount number New value to set.
|
||||||
RegisterNetEvent(getScript()..":server:setNeed", function(needType, amount)
|
RegisterNetEvent(getScript()..":server:setNeed", function(needType, amount)
|
||||||
local src = source
|
print("^1Deprecated function ':server:setNeed' called, please update your scripts^7")
|
||||||
if needType == "thirst" then
|
-- local src = source
|
||||||
setThirst(src, amount)
|
-- if needType == "thirst" then
|
||||||
elseif needType == "hunger" then
|
-- setThirst(src, amount)
|
||||||
setHunger(src, amount)
|
-- elseif needType == "hunger" then
|
||||||
end
|
-- setHunger(src, amount)
|
||||||
|
-- end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
@@ -322,41 +323,42 @@ end
|
|||||||
--- ConsumeSuccess("beer", "alcohol")
|
--- ConsumeSuccess("beer", "alcohol")
|
||||||
--- ```
|
--- ```
|
||||||
function ConsumeSuccess(itemName, type, data)
|
function ConsumeSuccess(itemName, type, data)
|
||||||
local hunger = data and data.hunger or Items[itemName].hunger
|
print("^1Deprecated function 'ConsumeSuccess' called, please update your scripts^7")
|
||||||
local thirst = data and data.thirst or Items[itemName].thirst
|
--local hunger = data and data.hunger or Items[itemName].hunger
|
||||||
|
--local thirst = data and data.thirst or Items[itemName].thirst
|
||||||
ExecuteCommand("e c")
|
--
|
||||||
removeItem(itemName, 1)
|
--ExecuteCommand("e c")
|
||||||
|
--removeItem(itemName, 1)
|
||||||
if isStarted(ESXExport) then
|
--
|
||||||
if hunger then
|
--if isStarted(ESXExport) then
|
||||||
TriggerServerEvent(getScript()..":server:setNeed", "hunger", tonumber(hunger) * 10000)
|
-- if hunger then
|
||||||
end
|
-- TriggerServerEvent(getScript()..":server:setNeed", "hunger", tonumber(hunger) * 10000)
|
||||||
if thirst then
|
-- end
|
||||||
TriggerServerEvent(getScript()..":server:setNeed", "thirst", tonumber(thirst) * 10000)
|
-- if thirst then
|
||||||
end
|
-- TriggerServerEvent(getScript()..":server:setNeed", "thirst", tonumber(thirst) * 10000)
|
||||||
else
|
-- end
|
||||||
if hunger then
|
--else
|
||||||
TriggerServerEvent(getScript()..":server:setNeed", "hunger", Core.Functions.GetPlayerData().metadata["hunger"] + tonumber(hunger))
|
-- if hunger then
|
||||||
end
|
-- TriggerServerEvent(getScript()..":server:setNeed", "hunger", Core.Functions.GetPlayerData().metadata["hunger"] + tonumber(hunger))
|
||||||
if thirst then
|
-- end
|
||||||
TriggerServerEvent(getScript()..":server:setNeed", "thirst", Core.Functions.GetPlayerData().metadata["thirst"] + tonumber(thirst))
|
-- if thirst then
|
||||||
end
|
-- TriggerServerEvent(getScript()..":server:setNeed", "thirst", Core.Functions.GetPlayerData().metadata["thirst"] + tonumber(thirst))
|
||||||
end
|
-- end
|
||||||
|
--end
|
||||||
if type == "alcohol" then
|
--
|
||||||
alcoholCount = (alcoholCount or 0) + 1
|
--if type == "alcohol" then
|
||||||
if alcoholCount > 1 and alcoholCount < 4 then
|
-- alcoholCount = (alcoholCount or 0) + 1
|
||||||
TriggerEvent("evidence:client:SetStatus", "alcohol", 200)
|
-- if alcoholCount > 1 and alcoholCount < 4 then
|
||||||
elseif alcoholCount >= 4 then
|
-- TriggerEvent("evidence:client:SetStatus", "alcohol", 200)
|
||||||
TriggerEvent("evidence:client:SetStatus", "heavyalcohol", 200)
|
-- elseif alcoholCount >= 4 then
|
||||||
AlienEffect()
|
-- TriggerEvent("evidence:client:SetStatus", "heavyalcohol", 200)
|
||||||
end
|
-- AlienEffect()
|
||||||
end
|
-- end
|
||||||
|
--end
|
||||||
if Config.Reward then
|
--
|
||||||
getRandomReward(itemName)
|
--if Config.Reward then
|
||||||
end
|
-- getRandomReward(itemName)
|
||||||
|
--end
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
@@ -918,17 +920,10 @@ local wardrobeFunc = {
|
|||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ name = "illenium-appearance",
|
{
|
||||||
|
name = "illenium-appearance",
|
||||||
openWardrobe = function()
|
openWardrobe = function()
|
||||||
exports['illenium-appearance']:startPlayerCustomization(function(appearance)
|
TriggerEvent("illenium-appearance:client:openOutfitMenu")
|
||||||
if appearance then
|
|
||||||
TriggerServerEvent("illenium-appearance:server:saveAppearance", appearance)
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
components = true, componentConfig = { masks = true, upperBody = true, lowerBody = true, bags = true, shoes = true, scarfAndChains = true, bodyArmor = true, shirts = true, decals = true, jackets = true },
|
|
||||||
props = true, propConfig = { hats = true, glasses = true, ear = true, watches = true, bracelets = true },
|
|
||||||
enableExit = true,
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
28
version.txt
28
version.txt
@@ -1,15 +1,17 @@
|
|||||||
2.0.22
|
2.1.01
|
||||||
|
|
||||||
- Support for qs-interface
|
- Script Overhaul, replace whole script
|
||||||
- Fix polyzone minZ + maxZ handling
|
- Very alpha support for VorpCore
|
||||||
- Fix ox_target zone location to match qb-target
|
- Improve security
|
||||||
- Fix "Waiting for script start" loop bug
|
- Removal of Quasar Script Support
|
||||||
- Add condition for fading in entities
|
- Support Tgiann-inv's new item system
|
||||||
- Fix typo breaking scripts on gta skillbar fail
|
- Refactor most multi-functions to be more optimized and smarter
|
||||||
- Fix typo for gksphone invoice event
|
- Added multifunction bossmenu and clothing functions
|
||||||
- Fix latio_ui TextUI placement
|
- Added ability to supress update notifcations in fxmanfiest.lua
|
||||||
- Remove registerShop debug message
|
- Added coordinate checks to registerStash, registerShop and sellShop
|
||||||
- Fix typo in print when removing codem stash item
|
- Optimize and Enhance built-in progressbar + target functions
|
||||||
- Fix function typo from origen inv documenation
|
- Improve weird multicharacter issue triggering onPlayerLoaded more than once
|
||||||
|
- Scripts that use this will need updating too, as things like stashes won't open
|
||||||
|
- **Hotfix for stores and stashes not registering properly**
|
||||||
|
|
||||||
https://github.com/jimathy/jim_bridge
|
https://github.com/jimathy/jim_bridge/releases/latest
|
||||||
Reference in New Issue
Block a user