Ir para conteúdo

Featured Replies

Postado

Eu gostaria de um Script que não permitisse que os Jogadores se ataquem caso estiverem na mesma PT.

 

 

Não encontrei nenhum que realmente funcione no meu servidor. OBS: Meu servidor é: 9.83

Poderiam me ajudar?

 

No Aguardo!

cms1-pr%C3%AAmio.png

Resolvido por Wise

Ir para solução
  • Respostas 13
  • Visualizações 717
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Certo, tente desse modo: function onCombat(cid, target)     if isPlayer(target) and isInParty(cid) and isInParty(target) then         if getPlayerParty(target) == getPlayerParty(cid) or getPartyLeade

Postado

são 2 creeaturescripts

function onStatsChange(cid, attacker, type, combat, value)
    if value > 0 and type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS) then
        if isPlayer(attacker) and getPlayerParty(attacker) == getPlayerParty(cid) then return false end
    end
    
    return true
end

function onTarget(cid, target)
if getPlayerParty(cid) == getPlayerParty(target) then
			doPlayerSendDefaultCancel(cid, "Ataque apenas inimigos")
	return false
end
    return true
end

em login.lua:

    registerCreatureEvent(cid, "noDmg")
    registerCreatureEvent(cid, "Target")

 

Talvez tenha alguma diferença de funções, funciona pra 8.6

Abraço

Postado

Tenha certeza que você configurou o .xml de maneira correta, colocando o event name da mesma maneira que no login.lua

 

Além disso, se você usar um exevo gran mas vis em um player sem pt e outro na mesma pt, o que acontece?

 

Além disso tudo, faça uma modificação:

if isPlayer(attacker) and getPlayerParty(attacker) == getPlayerParty(cid) then doBroadcastMessage("negado") return false

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