1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-12 17:56:11 +02:00
parent 9bb2ff9033
commit 71fe3b1bca

View file

@ -1,7 +1,6 @@
Config.Functions = { Config.Functions = {
--#region Server --#region Server
StartFramework = function() StartFramework = function()
-- Keine Änderung nötig, da TGIANN mit ESX und QBCore funktioniert
if GetResourceState("es_extended") ~= "missing" then if GetResourceState("es_extended") ~= "missing" then
ESX = exports["es_extended"]:getSharedObject() ESX = exports["es_extended"]:getSharedObject()
elseif GetResourceState("qb-core") ~= "missing" then elseif GetResourceState("qb-core") ~= "missing" then
@ -10,29 +9,24 @@ Config.Functions = {
end, end,
GiveItem = function(source, itemName, count) GiveItem = function(source, itemName, count)
-- TGIANN Inventory Version -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/AddItem/
exports["tgiann-inventory"]:AddItem(source, itemName, count) AddItem(source, itemName, count)
end, end,
HaveMoney = function(source, type, amount) HaveMoney = function(source, type, amount)
if amount == 0 then return true end if amount == 0 then return true end
-- TGIANN Inventory Version für Geldprüfung -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/HaveMoney/
local money = exports["tgiann-inventory"]:GetItemByName(source, "money") return HaveMoney(source, type, amount)
if money and money.amount >= amount then
return true
end
return false
end, end,
RemoveMoney = function(source, type, amount) RemoveMoney = function(source, type, amount)
if amount <= 0 then return end if amount <= 0 then return end
-- TGIANN Inventory Version für Geldentfernung -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/RemoveMoney/
exports["tgiann-inventory"]:RemoveItem(source, "money", amount) RemoveMoney(source, type, amount)
end, end,
--#endregion --#endregion
--#region Client --#region Client
TryToBuy = function(self, selection, dbId, success) TryToBuy = function(self, selection, dbId, success)
if Server.CanBuySnackFromVending(self.name, selection) then if Server.CanBuySnackFromVending(self.name, selection) then
@ -48,4 +42,17 @@ Config.Functions = {
Server.SetVendingUsed(dbId, false) Server.SetVendingUsed(dbId, false)
end end
end, end,
--[[
TargetAddModel = function(models, options)
end,
TargetAddLocalEntity = function(entity, options)
end,
TargetRemoveLocalEntity = function(entity)
end,
]]
--#endregion
} }