Compare commits

..

2 commits

2 changed files with 19 additions and 11 deletions

View file

@ -37,7 +37,13 @@ do
if darkrp.canMakeMoneyRequest(target) then if darkrp.canMakeMoneyRequest(target) then
local money = owner():getMoney() 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 function() --Success
if owner():getMoney() + amount >= money then if owner():getMoney() + amount >= money then
core:log(log.INFO, "Successfully received "..darkrp.formatMoney(amount).." from "..target:getName().."!") core:log(log.INFO, "Successfully received "..darkrp.formatMoney(amount).." from "..target:getName().."!")

View file

@ -349,7 +349,9 @@ end
-- Get's a player's entity by searching for it via an inputted string -- Get's a player's entity by searching for it via an inputted string
function core:get_entity(ply) function core:get_entity(ply)
if type(ply) == "Player" then if ply == nil then
return nil
elseif type(ply) == "Player" then
return ply return ply
elseif ply == "^" then elseif ply == "^" then
return owner() return owner()