Compare commits
No commits in common. "205bdc02722ad7c8da5b2ac255b8f822d03b99da" and "7977f0129af857ecb972d4fb4115c3763afb14ac" have entirely different histories.
205bdc0272
...
7977f0129a
2 changed files with 11 additions and 19 deletions
|
@ -37,24 +37,18 @@ do
|
|||
|
||||
if darkrp.canMakeMoneyRequest(target) then
|
||||
local money = owner():getMoney()
|
||||
local requestStr = ""
|
||||
if #args >= 3 then
|
||||
for i = 3, #args do
|
||||
requestStr = requestStr.." "..args[i]
|
||||
target:requestMoney((#args[3] > 0 and args[3] or ""), amount,
|
||||
function() --Success
|
||||
if owner():getMoney() + amount >= money then
|
||||
core:log(log.INFO, "Successfully received "..darkrp.formatMoney(amount).." from "..target:getName().."!")
|
||||
else
|
||||
-- This probably won't happen here
|
||||
core:log(log.ERROR, "An unknown error occured! Transaction status is unknown.")
|
||||
end
|
||||
end,
|
||||
function() --Failure
|
||||
core:log(log.ERROR, "Money request to "..target:getName().." failed!")
|
||||
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().."!")
|
||||
else
|
||||
-- This probably won't happen here
|
||||
core:log(log.ERROR, "An unknown error occured! Transaction status is unknown.")
|
||||
end
|
||||
end,
|
||||
function() --Failure
|
||||
core:log(log.ERROR, "Money request to "..target:getName().." failed!")
|
||||
end
|
||||
)
|
||||
core:log(log.INFO, "Requested "..darkrp.formatMoney(amount).." from "..target:getName()..".")
|
||||
else
|
||||
|
|
|
@ -349,9 +349,7 @@ end
|
|||
|
||||
-- Get's a player's entity by searching for it via an inputted string
|
||||
function core:get_entity(ply)
|
||||
if ply == nil then
|
||||
return nil
|
||||
elseif type(ply) == "Player" then
|
||||
if type(ply) == "Player" then
|
||||
return ply
|
||||
elseif ply == "^" then
|
||||
return owner()
|
||||
|
|
Loading…
Reference in a new issue