Skip to content

Commit

Permalink
fix(server/player): SetMoney regression
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm committed Dec 12, 2024
1 parent 5d8ae40 commit 0fd1aa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1330,12 +1330,13 @@ function SetMoney(identifier, moneyType, amount, reason)
amount = amount
}) then return false end

local difference = amount - player.PlayerData.money[moneyType]

player.PlayerData.money[moneyType] = amount

if not player.Offline then
UpdatePlayerData(identifier)

local difference = amount - player.PlayerData.money[moneyType]
local dirChange = difference < 0 and 'removed' or 'added'
local absDifference = math.abs(difference)
local tags = absDifference > 50000 and config.logging.role or {}
Expand Down

0 comments on commit 0fd1aa4

Please sign in to comment.