dá uma olhada se no seu server tem a query do 'premium_points', tenta executar na db:
ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';
caso já exista troca essas 3 funções:
function getPlayerPoints(cid)
local Info = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
local p = Info:getDataInt("premium_points")
Info:free()
return p
end
function doPlayerAddPoints(cid, points)
local dif = getPlayerPoints(cid) + points
if dif >= 0 then
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
return TRUE
end
return FALSE
end
function doPlayerRemovePoints(cid, points)
local dif = getPlayerPoints(cid) - points
if dif >= 0 then
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` - " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
return TRUE
end
return FALSE
end
por essas que eu refiz:
function getAccountPoints(cid)
local check = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid))
return check:getDataInt("premium_points") <= 0 and 0 or check:getDataInt("premium_points") end
function doPlayerAddPoints(cid, amount)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..getAccountPoints(cid).."+"..amount.." WHERE `id` = "..getPlayerAccountId(cid))
end
function doPlayerRemovePoints(cid, points)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..getAccountPoints(cid).."-"..amount.." WHERE `id` = "..getPlayerAccountId(cid))
end