Mauzim
Member
- Joined
- Jan 3, 2011
- Messages
- 568
- Reaction score
- 9
how to add it here
Code:
-- transfer
if talk_state[cid] == 40 and getCount(msg) > 0 then
if getPlayerBalance(cid) >= getCount(msg) then
talk_state[cid] = 41
last_count[cid] = getCount(msg)
sayText = 'Who would you like transfer ' .. last_count[cid] .. ' gold to?'
else
talk_state[cid] = 0
sayText = 'There is not enough gold on your account.'
end
elseif talk_state[cid] == 41 then
local toPlayer = doPlayerExist(msg)
if toPlayer ~= 0 then
last_name[cid] = toPlayer
talk_state[cid] = 42
sayText = 'So you would like to transfer ' .. last_count[cid] .. ' gold coins to ' .. last_name[cid] .. '?'
else
talk_state[cid] = 0
sayText = 'This player does not exist.'
end