Ir para conteúdo

Featured Replies

Postado

Boa noite galera , botei esse sistema no meu ot=

local Points = 10000  --Serão adicionados 10000 Premium Points
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have received "..Points.." of Premium Points to your account.")    
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..Points.." WHERE id=" ..getPlayerAccountId(cid))

 

Mais ta acontecendo 1 erro , porque quando o char deslogar é entrar dnv ele ganhar os 100 points dnv , tem como alguem mim ajudar

@Werner

 

 

Postado
local Points = 10000  --Serão adicionados 10000 Premium Points
storage = getPlayerStorageValue(cid,51801)
           if storage == -1 then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have received "..Points.." of Premium Points to your account.")    
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..Points.." WHERE id=" ..getPlayerAccountId(cid))
        setPlayerStorageValue(cid,51801,1)
           else
return true
           end

 

Postado
  • Autor
  Em 26/03/2018 em 22:57, GiovaneCampos disse:

local Points = 10000  --Serão adicionados 10000 Premium Points
storage = getPlayerStorageValue(cid,51801)
           if storage == -1 then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have received "..Points.." of Premium Points to your account.")    
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..Points.." WHERE id=" ..getPlayerAccountId(cid))
        setPlayerStorageValue(cid,51801,1)
           else
return true
           end

 

Funcionou valeu irmao , mais causou outro erro.

ao entrar o char esta vindo sem nada.

Meu first itens

function onLogin(cid)
    if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
        if isSorcerer(cid) then
            local bag = doPlayerAddItem(cid, 1988, 1)

            doAddContainerItem(bag, 2120, 1)
            doAddContainerItem(bag, 2554, 1)
            doAddContainerItem(bag, 2160, 2)
                        doAddContainerItem(bag, 2789, 25)
                        doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 7620, 1)
            
            doPlayerAddItem(cid, 2173, 1)        
            doPlayerAddItem(cid, 2525, 1)
            doPlayerAddItem(cid, 2190, 1)
            doPlayerAddItem(cid, 2463, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 2647, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2124, 1)

        setPlayerStorageValue(cid, 50000, 1)

        elseif isDruid(cid) then
            local bag = doPlayerAddItem(cid, 1988, 1)

            doAddContainerItem(bag, 2120, 1)
            doAddContainerItem(bag, 2554, 1)
            doAddContainerItem(bag, 2160, 2)
                        doAddContainerItem(bag, 2789, 25)
                        doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 7620, 1)
            
            doPlayerAddItem(cid, 2173, 1)        
            doPlayerAddItem(cid, 2525, 1)
            doPlayerAddItem(cid, 2182, 1)
            doPlayerAddItem(cid, 2463, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 2647, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2124, 1)

            setPlayerStorageValue(cid, 50000, 1)

        elseif isPaladin(cid) then
            local bag = doPlayerAddItem(cid, 1988, 1)

            doAddContainerItem(bag, 2120, 1)
            doAddContainerItem(bag, 2554, 1)
            doAddContainerItem(bag, 2160, 2)
                        doAddContainerItem(bag, 2789, 25)
                        doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 7620, 1)
            
            doPlayerAddItem(cid, 2173, 1)        
            doPlayerAddItem(cid, 2525, 1)
            doPlayerAddItem(cid, 2389, 1)
            doPlayerAddItem(cid, 2463, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 2647, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2124, 1)

            setPlayerStorageValue(cid, 50000, 1)

        elseif isKnight(cid) then
            local bag = doPlayerAddItem(cid, 1988, 1)

            doAddContainerItem(bag, 2120, 1)
            doAddContainerItem(bag, 2554, 1)
            doAddContainerItem(bag, 2160, 2)
                        doAddContainerItem(bag, 2789, 25)
                        doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 7620, 1)
            doAddContainerItem(bag, 2428, 1)
            doAddContainerItem(bag, 2394, 1)
        
            doPlayerAddItem(cid, 2173, 1)
            doPlayerAddItem(cid, 2525, 1)
            doPlayerAddItem(cid, 2383, 1)
            doPlayerAddItem(cid, 2463, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 2647, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2124, 1)

            setPlayerStorageValue(cid, 50000, 1)
        end
    end
local Points = 100  --Serão adicionados 10000 Premium Points
storage = getPlayerStorageValue(cid,51801)
           if storage == -1 then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have received "..Points.." of Premium Points to your account.")    
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..Points.." WHERE id=" ..getPlayerAccountId(cid))
        setPlayerStorageValue(cid,51801,1)
           else
return true
           end
     return TRUE
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.6k

Informação Importante

Confirmação de Termo