ConAn Edujawa
Member
- Joined
- Feb 23, 2015
- Messages
- 457
- Reaction score
- 17
i have point system but when player get lvl 250 don't add point in site why ??
but points add in mysql accounts
im use 0.4
but points add in mysql accounts
Code:
local t, storage = {
-- level -- amount points (delete this line)..
{250, 30}
}, 259
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t[i]
if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSetStorage(cid, storage, i)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
end
end
return true
end
im use 0.4