Ir para conteúdo

Featured Replies

Postado

Pessoal estou com o seguinte Bug no meu executável:

 

 

 

post-166582-0-08869100-1428697062_thumb.

 

 

Meu servidor é 10.10 theforgothen 

 

Se alguem conseguir me ajudar dou REP+ 

 

Segue abaixo o Script:

 

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
 
 
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
 
 
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
 
Muito Obrigado Galera quem  ajudar dou REP+
 
 
Postado

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      

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo