hey donate points for level dossent work anymore it worked before. but i added some scripts and then noticed after time that it dident work this is the script
Code:
local t, storage = {
{160, 30},
{190, 30},
{220, 30},
{250, 30},
{280, 30},
{300, 30},
{315, 30},
{330, 30}
}, 256
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 getStorage(storage) < i then
db.executeQuery('UPDATE znote_accounts SET points=points+'.. v[2] ..' WHERE account_id=' .. getPlayerAccountId(cid))
doSetStorage(storage, i)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' advenced to ' .. v[1] .. 'lvl and got ' .. v[2] .. ' ptz to sms shop.')
break
end
end
return true
end