Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Boa noite.. Fiz esse script porém não está funcionando, poderiam me ajudar?

 

  Citar

 

function onSay(cid, words, param, channel)

 
if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveItem(cid, 8300,1) == TRUE then
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de uma Pedra Donate")
end
end

 

  Citar

 

<talkaction words="!removeskull" event="script" value="skull.lua"/>

 

Resolvido por leonardobo

Ir para solução
Postado

Bom você esqueceu de checar se o cara não estivesse red skull , não colocou pra tirar o red skull e esqueceu um end no seu script, use o meu.

function onSay(cid, words, param, channel)

if getCreatureSkullType(cid) == SKULL_RED == false then
doPlayerSendTextMessage(cid, 22, "Voce nao esta red skull !")
end
 
if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveItem(cid, 8300,1) == TRUE then
doCreatureSetSkullType(cid,0)
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de uma Pedra Donate")
end
end
return true
end
Postado
  • Autor
  Em 19/05/2015 em 00:28, leonardobo disse:

 

Bom você esqueceu de checar se o cara não estivesse red skull , não colocou pra tirar o red skull e esqueceu um end no seu script, use o meu.

function onSay(cid, words, param, channel)

if getCreatureSkullType(cid) == SKULL_RED == false then
doPlayerSendTextMessage(cid, 22, "Voce nao esta red skull !")
end
 
if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveItem(cid, 8300,1) == TRUE then
doCreatureSetSkullType(cid,0)
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de uma Pedra Donate")
end
end
return true
end

Muito obrigado pelo script, porém tive uma outra ideia, após isso ele removeria também os frags... teria como?

Postado
  • Solução

Testa ai não tenho certeza se vai dar certo.

function onSay(cid, words, param, channel)

if getCreatureSkullType(cid) == SKULL_RED == false then
doPlayerSendTextMessage(cid, 22, "Voce nao esta red skull !")
return true
end
 
if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveItem(cid, 8300,1) == TRUE then
doCreatureSetSkullType(cid,0)
db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. getPlayerGUID(cid) .. ");")
doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")
else
doPlayerSendTextMessage(cid, 22, "Voce precisa de uma Pedra Donate")
end
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.7k

Informação Importante

Confirmação de Termo