carlinhous1996
New Member
I need help creating a code that changes the character's total money value, taking into account backpack money and bank money.
I need it to be something like this:
setPlayerTotalMoney(who)
my friend helped me by creating the following code:
my friend said that to create the setPlayerTotalMoney(who) code you need to use Query
Can someone help me?
I need it to be something like this:
setPlayerTotalMoney(who)
my friend helped me by creating the following code:
LUA:
--[[
O que preciso que o script faça:
Preciso que ele me retorne o valor do resultado da soma entre bankBalance e playerMoney
]]
function getPlayerTotalMoney(who)
local bankBalance, playerMoney = getPlayerBalance(who), getPlayerMoney(who)
if ((bankBalance > 0) or (playerMoney > 0)) then
return bankBalance + playerMoney
else
return 0
end
end
-- print(getPlayerTotalMoney())
my friend said that to create the setPlayerTotalMoney(who) code you need to use Query
Can someone help me?