Browse Source

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

master
luk3yx 2 months ago
parent
commit
727628c087
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      core.lua

+ 3
- 2
core.lua 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


Loading…
Cancel
Save