Skip to content

Commit

Permalink
bank: withdrawn money isn't actually withdrawn
Browse files Browse the repository at this point in the history
  • Loading branch information
mabako committed May 10, 2010
1 parent 1db5290 commit d207aec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/bank/bank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ addEventHandler( "bank:updateaccount", root,
end

if modifyAccountBalance( card[2] , amount ) then
if amount < 0 then
exports.players:giveMoney( source, -amount )
end
outputChatBox( "You've " .. ( amount > 0 and ( "deposited $" .. amount .. " to" ) or ( "withdrawn $" .. -amount .. " from" ) ) .. " your account. Your new balance: $" .. getAccountBalance( card[2] ) .. ".", source, 0, 255, 0 )
else
outputChatBox( "Your request could not be processed at this time.", source, 255, 0, 0 )
Expand Down

0 comments on commit d207aec

Please sign in to comment.