forked from Simnation/Main
ed
This commit is contained in:
parent
3249b0b1fd
commit
6ec181becd
3 changed files with 99 additions and 83 deletions
BIN
resources/[inventory]/inventory_images/images/pizza.png
Normal file
BIN
resources/[inventory]/inventory_images/images/pizza.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 KiB |
|
@ -934,7 +934,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = true,
|
unique = true,
|
||||||
description = 'Knusprig goldene Pommes, serviert im kleinen Metallkorb – dazu ein cremiger Dip im stilechten Mini-Metalleimer.',
|
description = 'Knusprig goldene Pommes, serviert im kleinen Metallkorb – dazu ein cremiger Dip im stilechten Mini-Metalleimer.',
|
||||||
image = 'ChatGPT_Image_27._Apr._2025__12_41_35-removebg-preview.png',
|
image = 'fries_with_dip.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'Pommes mit Dip ',
|
label = 'Pommes mit Dip ',
|
||||||
name = 'fries_with_dip',
|
name = 'fries_with_dip',
|
||||||
|
@ -1671,6 +1671,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = false,
|
||||||
description = 'Ein Stück Glück auf deinem Teller – Genieße unser köstliches Stück Pizza!',
|
description = 'Ein Stück Glück auf deinem Teller – Genieße unser köstliches Stück Pizza!',
|
||||||
|
image = 'pizza.png',
|
||||||
name = 'pizza_piece',
|
name = 'pizza_piece',
|
||||||
label = 'Stück Pizza',
|
label = 'Stück Pizza',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -1703,7 +1704,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = false,
|
||||||
description = '',
|
description = '',
|
||||||
image = 'screenshot_691-removebg-preview.png',
|
image = 'hotdog.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'Hot Dog',
|
label = 'Hot Dog',
|
||||||
name = 'hotdog',
|
name = 'hotdog',
|
||||||
|
@ -1998,7 +1999,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = true,
|
unique = true,
|
||||||
description = 'Bunte, kleine Köstlichkeiten mit knackiger Hülle und fruchtig-süßem Kern – ein Farbtupfer voller Geschmack.',
|
description = 'Bunte, kleine Köstlichkeiten mit knackiger Hülle und fruchtig-süßem Kern – ein Farbtupfer voller Geschmack.',
|
||||||
image = 'file_00000000007861f7963805e1f6fecfc5-removebg-preview.png',
|
image = 'jelly_beans.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'Jelly Beans',
|
label = 'Jelly Beans',
|
||||||
name = 'jelly_beans',
|
name = 'jelly_beans',
|
||||||
|
@ -2349,7 +2350,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = true,
|
unique = true,
|
||||||
description = 'Der König unter den Hotdogs',
|
description = 'Der König unter den Hotdogs',
|
||||||
image = 'hotdogdeluxe-removebg-preview.png',
|
image = 'hotdog_deluxe.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'Deluxe Hotdog',
|
label = 'Deluxe Hotdog',
|
||||||
name = 'hotdog_deluxe',
|
name = 'hotdog_deluxe',
|
||||||
|
@ -2402,7 +2403,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Zitronen Limo',
|
description = 'Dose Zitronen Limo',
|
||||||
image = 'sprunk_dose.png',
|
image = 'sprunk_dose.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -2775,7 +2776,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Orangen Limo',
|
description = 'Dose Orangen Limo',
|
||||||
image = 'orange_o_tang_zero_dose.png',
|
image = 'orange_o_tang_zero_dose.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -5516,7 +5517,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Zitronen Limo',
|
description = 'Dose Zitronen Limo',
|
||||||
image = 'sprunk_zero_dose.png',
|
image = 'sprunk_zero_dose.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -5790,7 +5791,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Orangen Limo',
|
description = 'Dose Orangen Limo',
|
||||||
image = 'orange_o_tang_dose.png',
|
image = 'orange_o_tang_dose.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -6359,7 +6360,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Cola',
|
description = 'Dose Cola',
|
||||||
image = 'ecolazerocan.png',
|
image = 'ecolazerocan.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -6723,7 +6724,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = false,
|
||||||
description = '"Jetzt mit 0 % Kartoffel, 100 % Patriotismus!"',
|
description = '"Jetzt mit 0 % Kartoffel, 100 % Patriotismus!"',
|
||||||
image = 'screenshot_686-removebg-preview.png',
|
image = 'ffries.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'Freedom Fries',
|
label = 'Freedom Fries',
|
||||||
name = 'ffries',
|
name = 'ffries',
|
||||||
|
@ -7579,7 +7580,7 @@ itemsData = {
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = false,
|
||||||
description = '',
|
description = '',
|
||||||
image = 'screenshot_692-removebg-preview.png',
|
image = 'frenchfries.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
label = 'French Fries',
|
label = 'French Fries',
|
||||||
name = 'frenchfries',
|
name = 'frenchfries',
|
||||||
|
@ -7654,7 +7655,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 100,
|
weight = 100,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose mit Engery',
|
description = 'Dose mit Engery',
|
||||||
image = 'junk_energy.png',
|
image = 'junk_energy.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -8299,7 +8300,7 @@ itemsData = {
|
||||||
useable = true,
|
useable = true,
|
||||||
weight = 50,
|
weight = 50,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
unique = false,
|
unique = true,
|
||||||
description = 'Dose Cola',
|
description = 'Dose Cola',
|
||||||
image = 'ecola_dose.png',
|
image = 'ecola_dose.png',
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
|
@ -8339,7 +8340,7 @@ itemsData = {
|
||||||
label = 'Medium Scope',
|
label = 'Medium Scope',
|
||||||
name = 'medscope_attachment',
|
name = 'medscope_attachment',
|
||||||
},
|
},
|
||||||
cash = {
|
money_item = {
|
||||||
useable = false,
|
useable = false,
|
||||||
weight = 0,
|
weight = 0,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
|
@ -8348,7 +8349,7 @@ itemsData = {
|
||||||
image = 'cash.png',
|
image = 'cash.png',
|
||||||
shouldClose = false,
|
shouldClose = false,
|
||||||
label = 'Bargeld',
|
label = 'Bargeld',
|
||||||
name = 'cash',
|
name = 'money_item',
|
||||||
},
|
},
|
||||||
weapon_mg = {
|
weapon_mg = {
|
||||||
useable = false,
|
useable = false,
|
||||||
|
@ -10206,7 +10207,7 @@ itemsData = {
|
||||||
shouldClose = true,
|
shouldClose = true,
|
||||||
type = 'item',
|
type = 'item',
|
||||||
description = 'Transportiert dein Essen und deinen Alc, egal in welcher Form ^^',
|
description = 'Transportiert dein Essen und deinen Alc, egal in welcher Form ^^',
|
||||||
weight = 1000,
|
weight = 2,
|
||||||
label = 'Papiertüte',
|
label = 'Papiertüte',
|
||||||
unique = true,
|
unique = true,
|
||||||
useable = true,
|
useable = true,
|
||||||
|
|
|
@ -310,7 +310,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
return self.PlayerData.metadata['rep'][rep] or 0
|
return self.PlayerData.metadata['rep'][rep] or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function self.Functions.AddMoney(moneytype, amount, reason)
|
function self.Functions.AddMoney(moneytype, amount, reason)
|
||||||
reason = reason or 'unknown'
|
reason = reason or 'unknown'
|
||||||
moneytype = moneytype:lower()
|
moneytype = moneytype:lower()
|
||||||
amount = tonumber(amount)
|
amount = tonumber(amount)
|
||||||
|
@ -318,6 +318,11 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
if not self.PlayerData.money[moneytype] then return false end
|
if not self.PlayerData.money[moneytype] then return false end
|
||||||
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] + amount
|
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] + amount
|
||||||
|
|
||||||
|
local isMoneyItem, moneyItemName = exports["tgiann-inventory"]:IsMoneyItem(moneytype)
|
||||||
|
if isMoneyItem then
|
||||||
|
exports["tgiann-inventory"]:SetItem(self.PlayerData.source, moneyItemName, self.PlayerData.money[moneytype])
|
||||||
|
end
|
||||||
|
|
||||||
if not self.Offline then
|
if not self.Offline then
|
||||||
self.Functions.UpdatePlayerData()
|
self.Functions.UpdatePlayerData()
|
||||||
if amount > 100000 then
|
if amount > 100000 then
|
||||||
|
@ -331,9 +336,9 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function self.Functions.RemoveMoney(moneytype, amount, reason)
|
function self.Functions.RemoveMoney(moneytype, amount, reason)
|
||||||
reason = reason or 'unknown'
|
reason = reason or 'unknown'
|
||||||
moneytype = moneytype:lower()
|
moneytype = moneytype:lower()
|
||||||
amount = tonumber(amount)
|
amount = tonumber(amount)
|
||||||
|
@ -346,8 +351,11 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.PlayerData.money[moneytype] - amount < QBCore.Config.Money.MinusLimit then return false end
|
|
||||||
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
|
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
|
||||||
|
local isMoneyItem, moneyItemName = exports["tgiann-inventory"]:IsMoneyItem(moneytype)
|
||||||
|
if isMoneyItem then
|
||||||
|
exports["tgiann-inventory"]:SetItem(self.PlayerData.source, moneyItemName, self.PlayerData.money[moneytype])
|
||||||
|
end
|
||||||
|
|
||||||
if not self.Offline then
|
if not self.Offline then
|
||||||
self.Functions.UpdatePlayerData()
|
self.Functions.UpdatePlayerData()
|
||||||
|
@ -365,9 +373,9 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function self.Functions.SetMoney(moneytype, amount, reason)
|
function self.Functions.SetMoney(moneytype, amount, reason, forInventory)
|
||||||
reason = reason or 'unknown'
|
reason = reason or 'unknown'
|
||||||
moneytype = moneytype:lower()
|
moneytype = moneytype:lower()
|
||||||
amount = tonumber(amount)
|
amount = tonumber(amount)
|
||||||
|
@ -376,6 +384,13 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
local difference = amount - self.PlayerData.money[moneytype]
|
local difference = amount - self.PlayerData.money[moneytype]
|
||||||
self.PlayerData.money[moneytype] = amount
|
self.PlayerData.money[moneytype] = amount
|
||||||
|
|
||||||
|
if not forInventory then
|
||||||
|
local isMoneyItem, moneyItemName = exports["tgiann-inventory"]:IsMoneyItem(moneytype)
|
||||||
|
if isMoneyItem then
|
||||||
|
exports["tgiann-inventory"]:SetItem(self.PlayerData.source, moneyItemName, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not self.Offline then
|
if not self.Offline then
|
||||||
self.Functions.UpdatePlayerData()
|
self.Functions.UpdatePlayerData()
|
||||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'SetMoney', 'green', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') set, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'SetMoney', 'green', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') set, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||||
|
@ -385,7 +400,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function self.Functions.GetMoney(moneytype)
|
function self.Functions.GetMoney(moneytype)
|
||||||
if not moneytype then return false end
|
if not moneytype then return false end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue