diff --git a/[core]/codem-inventory/editable/utilityserver.lua b/[core]/codem-inventory/editable/utilityserver.lua index a9eee004..2c743b7d 100644 --- a/[core]/codem-inventory/editable/utilityserver.lua +++ b/[core]/codem-inventory/editable/utilityserver.lua @@ -184,6 +184,9 @@ function RemoveMoney(source, type, value) if type == 'cash' then Player.removeMoney(value) end + if type == 'black_money' then + Player.removeAccountMoney('black_money', value) +end elseif Config.Framework == 'qb' or Config.Framework == 'oldqb' then if type == 'bank' then Player.Functions.RemoveMoney('bank', value) @@ -205,6 +208,9 @@ function AddMoney(source, type, value) if type == 'cash' then Player.addMoney(value) end + if type == 'black_money' then + Player.addAccountMoney('black_money', value) +end elseif Config.Framework == 'qb' or Config.Framework == 'oldqb' then if type == 'bank' then Player.Functions.AddMoney('bank', value) @@ -226,6 +232,10 @@ function GetPlayerMoney(source, value) if value == 'cash' then return Player.getMoney() end + -- FÜGE DIESE ZEILEN HINZU: + if value == 'black_money' then + return Player.getAccount('black_money').money + end elseif Config.Framework == 'qb' or Config.Framework == 'oldqb' then if value == 'bank' then return Player.PlayerData.money['bank'] @@ -352,10 +362,12 @@ Citizen.CreateThread(function() if Player then if itemData then if itemData.name == 'cash' then - Player.addMoney(amount) - else - AddItem(Player.source, itemData.name, amount) - end + Player.addMoney(amount) +elseif itemData.name == 'black_money' then + Player.addAccountMoney('black_money', amount) +else + AddItem(Player.source, itemData.name, amount) +end if Config.UseDiscordWebhooks then local discorddata = { playername = GetName(Player.source),