mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 06:26:01 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c202d075 | ||
|
|
9e9fb14f55 | ||
|
|
61e0d777a8 | ||
|
|
63c2d5d83d |
@@ -380,7 +380,7 @@ function openStash(data)
|
|||||||
exports[CodeMInv]:OpenStash(data.stash, 400000, 100)
|
exports[CodeMInv]:OpenStash(data.stash, 400000, 100)
|
||||||
else
|
else
|
||||||
TriggerEvent("inventory:client:SetCurrentStash", data.stash)
|
TriggerEvent("inventory:client:SetCurrentStash", data.stash)
|
||||||
TriggerServerEvent("inventory:server:OpenInventory", "stash", data.stash)
|
TriggerServerEvent("inventory:server:OpenInventory", "stash", data.stash, data.stashOptions)
|
||||||
end
|
end
|
||||||
lookEnt(data.coords)
|
lookEnt(data.coords)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -863,4 +863,4 @@ function StopEffects() -- Used to clear up any effects stuck on screen
|
|||||||
AnimpostfxStop('RaceTurbo')
|
AnimpostfxStop('RaceTurbo')
|
||||||
AnimpostfxStop('FocusIn')
|
AnimpostfxStop('FocusIn')
|
||||||
AnimpostfxStop('Rampage')
|
AnimpostfxStop('Rampage')
|
||||||
end
|
end
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
name "Jim_Bridge"
|
name "Jim_Bridge"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
description "Framework Bridge By Jimathy"
|
description "Framework Bridge By Jimathy"
|
||||||
fx_version "cerulean"
|
fx_version "cerulean"
|
||||||
game "gta5"
|
game "gta5"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.0.1
|
1.0.3
|
||||||
|
|||||||
24
wrapper.lua
24
wrapper.lua
@@ -60,7 +60,7 @@ end
|
|||||||
|
|
||||||
-- Load Vehicles
|
-- Load Vehicles
|
||||||
if GetResourceState(QBXExport):find("start") then
|
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)
|
print("^6Bridge^7: ^2Loading ^3Vehicles^2 from ^7"..QBXExport)
|
||||||
Vehicles = exports[QBXExport]:GetVehiclesByHash()
|
Vehicles = exports[QBXExport]:GetVehiclesByHash()
|
||||||
elseif GetResourceState(QBExport):find("start") then
|
elseif GetResourceState(QBExport):find("start") then
|
||||||
@@ -937,12 +937,30 @@ function setVehicleProperties(vehicle, props)
|
|||||||
format(vehicle))
|
format(vehicle))
|
||||||
end
|
end
|
||||||
if GetResourceState(OXLibExport):find("start") then
|
if GetResourceState(OXLibExport):find("start") then
|
||||||
lib.setVehicleProperties(vehicle, props)
|
TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props)
|
||||||
elseif GetResourceState(QBExport):find("start") then
|
elseif GetResourceState(QBExport):find("start") then
|
||||||
Core.Functions.SetVehicleProperties(vehicle, props)
|
Core.Functions.SetVehicleProperties(vehicle, props)
|
||||||
end
|
end
|
||||||
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
|
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 Config.System.Debug then print("^6Bridge^7: ^2Charging ^2Player: '^6"..cost.."^7'", type) end
|
||||||
if type == "cash" then
|
if type == "cash" then
|
||||||
@@ -1213,4 +1231,4 @@ function registerStash(name, label)
|
|||||||
exports[QSInv]:RegisterStash(name, 50, 4000000)
|
exports[QSInv]:RegisterStash(name, 50, 4000000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- IN NO WAY PERFECT --
|
-- IN NO WAY PERFECT --
|
||||||
Reference in New Issue
Block a user