kaszanalubizryc
New Member
- Joined
- Sep 10, 2015
- Messages
- 148
- Reaction score
- 1
hello i need know how i can here use local config?
Code:
local config = {
[24345] = {coins = 10},
[24346] = {coins = 20}
}
local function doPlayerAddPremiumPoints(cid, count)
db.query('UPDATE accounts SET premium_points = premium_points+'.. count ..' WHERE id = ' .. getAccountNumberByPlayerName(getCreatureName(cid)))
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddPremiumPoints(cid, 10)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have recived 10 shop points to your account.")
doSendMagicEffect(getCreaturePosition(cid), 28)
doRemoveItem(item.uid,1)
return true
end