Compare commits

...

4 Commits

Author SHA1 Message Date
Jim Shield
02c202d075 Version Bump - v1.0.3 2024-01-19 12:53:45 +00:00
Jim Shield
9e9fb14f55 Merge pull request #3 from bandgeekndb/stashoptions
Allow for passing through stash options when opening a stash
2024-01-19 12:50:10 +00:00
Jim Shield
61e0d777a8 Attempt to fix ox_lib's setVehicleProperites + 1.0.2 2024-01-18 20:21:22 +00:00
Nicholas Blew
63c2d5d83d Allow for passing through stash options when opening a stash 2024-01-18 02:20:20 -05:00
5 changed files with 25 additions and 7 deletions

View File

@@ -380,7 +380,7 @@ function openStash(data)
exports[CodeMInv]:OpenStash(data.stash, 400000, 100)
else
TriggerEvent("inventory:client:SetCurrentStash", data.stash)
TriggerServerEvent("inventory:server:OpenInventory", "stash", data.stash)
TriggerServerEvent("inventory:server:OpenInventory", "stash", data.stash, data.stashOptions)
end
lookEnt(data.coords)
end

View File

@@ -863,4 +863,4 @@ function StopEffects() -- Used to clear up any effects stuck on screen
AnimpostfxStop('RaceTurbo')
AnimpostfxStop('FocusIn')
AnimpostfxStop('Rampage')
end
end

View File

@@ -1,6 +1,6 @@
name "Jim_Bridge"
author "Jimathy"
version "1.0.1"
version "1.0.3"
description "Framework Bridge By Jimathy"
fx_version "cerulean"
game "gta5"

View File

@@ -1 +1 @@
1.0.1
1.0.3

View File

@@ -60,7 +60,7 @@ end
-- Load Vehicles
if GetResourceState(QBXExport):find("start") then
Core = Core or exports[QBXExport]:GetCoreObject()
Core = Core or exports[QBExport]:GetCoreObject()
print("^6Bridge^7: ^2Loading ^3Vehicles^2 from ^7"..QBXExport)
Vehicles = exports[QBXExport]:GetVehiclesByHash()
elseif GetResourceState(QBExport):find("start") then
@@ -937,12 +937,30 @@ function setVehicleProperties(vehicle, props)
format(vehicle))
end
if GetResourceState(OXLibExport):find("start") then
lib.setVehicleProperties(vehicle, props)
TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props)
elseif GetResourceState(QBExport):find("start") then
Core.Functions.SetVehicleProperties(vehicle, props)
end
end
RegisterNetEvent(GetCurrentResourceName()..":ox:setVehicleProperties", function(netId, props)
local vehicle = NetworkGetEntityFromNetworkId(netId)
local value = props
Entity(vehicle).state[GetCurrentResourceName()..':setVehicleProperties'] = value
end)
AddStateBagChangeHandler(GetCurrentResourceName()..':setVehicleProperties', '', function(bagName, _, value)
if not value or not GetEntityFromStateBagName then return end
local entity = GetEntityFromStateBagName(bagName)
local networked = not bagName:find('localEntity')
if networked and NetworkGetEntityOwner(entity) ~= cache.playerId then return end
if lib.setVehicleProperties(entity, value) then
Entity(entity).state:set('setVehicleProperties', nil, true)
end
end)
RegisterNetEvent(GetCurrentResourceName()..":server:ChargePlayer", function(cost, type) local src = source
if Config.System.Debug then print("^6Bridge^7: ^2Charging ^2Player: '^6"..cost.."^7'", type) end
if type == "cash" then
@@ -1213,4 +1231,4 @@ function registerStash(name, label)
exports[QSInv]:RegisterStash(name, 50, 4000000)
end
end
-- IN NO WAY PERFECT --
-- IN NO WAY PERFECT --