Rurouni
New Member
- Joined
- Sep 23, 2012
- Messages
- 10
- Reaction score
- 2
balance.lua
deposit.lua
withdraw.lua
- - - Updated - - -
you should change
PHP:
function onSay(cid, words, param)
if getTilePzInfo(getPlayerPosition(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your account balance is ".. getPlayerBalance(cid) .." gold.")
else
doPlayerSendCancel(cid, "You can only use this command in PZ.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
deposit.lua
PHP:
function onSay(cid, words, param)
if getPlayerTown(cid) == 24 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot deposit money being in Rookgaard.")
return
end
if isPlayer(cid) == TRUE and param ~= "" then
if getTilePzInfo(getPlayerPosition(cid)) == TRUE then
if doPlayerRemoveMoney(cid, param) == TRUE then
doPlayerSetBalance(cid, param)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have added the amount of ".. param .." gold to your balance. You can withdraw your money anytime you want to.")
else
doPlayerSendCancel(cid, "You do not have enough money.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You can only use this command in PZ.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
end
withdraw.lua
PHP:
function onSay(cid, words, param)
if getPlayerTown(cid) == 24 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot withdraw money being in Rookgaard.")
return
end
if isPlayer(cid) == TRUE and param ~= "" then
if getTilePzInfo(getPlayerPosition(cid)) == TRUE then
if getPlayerBalance(cid) >= param then
doPlayerSetBalance(cid, getPlayerBalance(cid) - param)
doPlayerAddMoney(cid, param)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Here you are, ".. param .." gold.")
else
doPlayerSendCancel(cid, "You do not have enough money.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You can only use this command in PZ.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
end
- - - Updated - - -
you should change
for your rookgaard town ID.getPlayerTown(cid) == 24