Ir para conteúdo

Featured Replies

Postado

Olá, alguém poderia corrigir esse script? Para que quando não tiver nem red skull ou black skull, apareca a mensagem "Você precisa estar red skull ou black skull."

Pois quando utilizado o comando sem a skull, ainda sim, sai a mensagem de que a "skull foi removida", de fora so isso, porque ele é funcional.

 

 

--- skull remover by kakilo - quinto script

function onSay(cid, words, param, channel)

if (getCreatureSkullType(cid) == SKULL_BLACK) then
if doPlayerRemoveMoney(cid, 5000000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull")
end
end

if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveMoney(cid, 3000000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull")
end
end

if (getCreatureSkullType(cid) == SKULL_NONE) then
doPlayerSendTextMessage(cid, 22, "Sua skull foi retirada com sucesso!")
end

return TRUE
end

 

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Postado
--- skull remover by kakilo - quinto script

function onSay(cid, words, param, channel)

  if (getCreatureSkullType(cid) == SKULL_BLACK) then
    if doPlayerRemoveMoney(cid, 5000000) then
      doCreatureSetSkullType(cid, SKULL_NONE)
      doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")
    else
      doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull")
    end
  end

  if (getCreatureSkullType(cid) == SKULL_RED) then
    if doPlayerRemoveMoney(cid, 3000000) then
      doCreatureSetSkullType(cid, SKULL_NONE)
      doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
    else
      doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull")
    end
  end

  if (getCreatureSkullType(cid) == SKULL_NONE) then
    doPlayerSendTextMessage(cid, 22, "Você precisa estar red skull ou black skull!")
  end

  return TRUE
end

 

Life is so meaningless, there is nothing worth a smile
So goodbye, I'll miss you

 

 

sugestões?

 

 

Postado
--- skull remover by kakilo - quinto script

function onSay(cid, words, param, channel)

if (getCreatureSkullType(cid) == SKULL_BLACK) then
if doPlayerRemoveMoney(cid, 5000000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull")
end
end

if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveMoney(cid, 3000000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull")
end
end

if (getCreatureSkullType(cid) == SKULL_NONE) then
doPlayerSendCancel(cid, "Voce precisa ser Red ou Black Skull para usar.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end

return TRUE
end

 

Postado

Na verdade assim evita duas possíveis mensagens:

 

--- skull remover by kakilo - quinto script

function onSay(cid, words, param, channel)

  if (getCreatureSkullType(cid) == SKULL_NONE) then
    doPlayerSendTextMessage(cid, 22, "Você precisa estar red skull ou black skull!")
  end

  if (getCreatureSkullType(cid) == SKULL_BLACK) then
    if doPlayerRemoveMoney(cid, 5000000) then
      doCreatureSetSkullType(cid, SKULL_NONE)
      doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")
    else
      doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull")
    end
  end

  if (getCreatureSkullType(cid) == SKULL_RED) then
    if doPlayerRemoveMoney(cid, 3000000) then
      doCreatureSetSkullType(cid, SKULL_NONE)
      doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
    else
      doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull")
    end
  end


  return TRUE
end

 

Life is so meaningless, there is nothing worth a smile
So goodbye, I'll miss you

 

 

sugestões?

 

 

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