RequestMoneyStr now can be more than 1 word long

This commit is contained in:
Logan G 2022-03-26 13:18:25 -06:00
parent 7977f0129a
commit 22b74b3db6
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -37,7 +37,13 @@ do
if darkrp.canMakeMoneyRequest(target) then
local money = owner():getMoney()
target:requestMoney((#args[3] > 0 and args[3] or ""), amount,
local requestStr = ""
if #args >= 3 then
for i = 3, #args do
requestStr = requestStr.." "..args[i]
end
end
target:requestMoney(requestStr, amount,
function() --Success
if owner():getMoney() + amount >= money then
core:log(log.INFO, "Successfully received "..darkrp.formatMoney(amount).." from "..target:getName().."!")