Allow money.add to add money to "frozen" users

This commit is contained in:
luk3yx 2019-05-25 18:46:16 +12:00
parent 347c24381c
commit 727628c087
1 changed files with 3 additions and 2 deletions

View File

@ -85,11 +85,12 @@ function money3.add(name, amount)
return "The amount specified must be a positive non-NaN number."
end
if not money3.user_exists(name) then
local credit = money3.get(name)
if not credit then
return name .. " does not exist."
end
money3.set(name, money3.get(name) + amount)
money3.set(name, credit + amount)
return nil
end