marcelao777
New Member
- Joined
- Sep 9, 2011
- Messages
- 81
- Reaction score
- 0
Hi, I need withdraw (! withdraw "x) premium_points and appear in my bag gold ingot 's, and decrease my balance and deposit premium_points (! deposit" x) and the gold ingot disappeared from my bag and increase my balance premium_points, if you can help me I thank
local ingot = 9971
local ingotcost = 1
function onSay(cid, words, param, channel)
if param == "sacar" then
if(getAccountPoints(cid) >= ingotcost) then
if(doAccountRemovePoints(cid, ingotcost) == TRUE) then
doPlayerRemoveItem(cid, ingot, ingotcost)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " ..param.. " is not currently online.")
return TRUE
end
end
doAccountRemovePoints(cid, count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "" ..count.. " premium points were deleted from " ..getCreatureName(pid).. "\'s Account.")
return true
end