Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Aaa esqueci, fiz um negócio pra testar e esqueci de tirar.

Mude isso:

if getPlayerPremiumDays(cid) >= 0 then
Para isso:
if getPlayerPremiumDays(cid) > 0 then


Irá funcionar do jeito que você quer...

Editado por Caronte (veja o histórico de edições)

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

  • Respostas 8
  • Visualizações 896
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Aaa esqueci, fiz um negócio pra testar e esqueci de tirar. Mude isso: if getPlayerPremiumDays(cid) >= 0 thenPara isso:if getPlayerPremiumDays(cid) > 0 then Irá funcionar do jeito que você qu

  • function onSay(cid, words, param) local vocs = { [1] = 5, -- master sorcerer [2] = 6, -- elder druid [3] = 7, -- royal paladin [4] = 8, -- elite knight

Postado
  • Autor

Aaa esqueci, fiz um negócio pra testar e esqueci de tirar.

Mude isso:

if getPlayerPremiumDays(cid) >= 0 then

Para isso:

if getPlayerPremiumDays(cid) > 0 then

 

Irá funcinar do jeito que você quer...

cara vc é fera, de todos os forums vc foi o unico que conseguiu, funcionou
a unica coisa é que até lvl 8 está podendo comprar, em vez  de lvl 20+ mas creio que não tem como arrumar isso ou tem?

Editado por telefonesemfio (veja o histórico de edições)

Postado
  • Solução
function onSay(cid, words, param)
local vocs = { [1] = 5, -- master sorcerer

               [2] = 6, -- elder druid

               [3] = 7, -- royal paladin

               [4] = 8, -- elite knight

               }

local newvoc = vocs[getPlayerVocation(cid)]
local price = 20000
local level = 20
             		 
	if getPlayerLevel(cid) < level then
        return doPlayerSendCancel(cid, 'Voce precisa ser level '.. level ..' comprar promotion'.) and true
	end
	
    if getPlayerPremiumDays(cid) >= 0 then

        if getPlayerMoney(cid) >= price then

            if vocs[getPlayerVocation(cid)] then

                doPlayerSetVocation(cid, newvoc)
                doPlayerRemoveMoney(cid, price)
                doPlayerSendCancel(cid, "Parabens voce foi promovido.")
            else

                doPlayerSendCancel(cid, "Voce nao pode ser promovido.")
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
            end   

        else

            doPlayerSendCancel(cid, "Voce nao tem dinheiro suficiente.")
            doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
        end

    else

        doPlayerSendCancel(cid, "Voce precisa ser premium para usar esse comando.")
        doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
    end
    return true
end
Postado
  • Autor
function onSay(cid, words, param)
local vocs = { [1] = 5, -- master sorcerer

               [2] = 6, -- elder druid

               [3] = 7, -- royal paladin

               [4] = 8, -- elite knight

               }

local newvoc = vocs[getPlayerVocation(cid)]
local price = 20000
local level = 20
             		 
	if getPlayerLevel(cid) < level then
        return doPlayerSendCancel(cid, 'Voce precisa ser level '.. level ..' comprar promotion'.) and true
	end
	
    if getPlayerPremiumDays(cid) >= 0 then

        if getPlayerMoney(cid) >= price then

            if vocs[getPlayerVocation(cid)] then

                doPlayerSetVocation(cid, newvoc)
                doPlayerRemoveMoney(cid, price)
                doPlayerSendCancel(cid, "Parabens voce foi promovido.")
            else

                doPlayerSendCancel(cid, "Voce nao pode ser promovido.")
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
            end   

        else

            doPlayerSendCancel(cid, "Voce nao tem dinheiro suficiente.")
            doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
        end

    else

        doPlayerSendCancel(cid, "Voce precisa ser premium para usar esse comando.")
        doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
    end
    return true
end

vlw =)

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