Bloody-War
New Member
- Joined
- Feb 9, 2016
- Messages
- 88
- Reaction score
- 1
Hello Guys i wanna Convert this script to frag point script can some one help me to convert it?
thank you.
local t, storage = {
-- level -- amount points (delete this line)..
{250, 5},
{300, 10},
{400, 10},
{500, 15},
{600, 25}
}, 259
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t
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
thank you.
local t, storage = {
-- level -- amount points (delete this line)..
{250, 5},
{300, 10},
{400, 10},
{500, 15},
{600, 25}
}, 259
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t
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