Postado Novembro 10, 2017 7 anos gostaria de um script q o jogar tiver de mc nao pode atakar o outro char dele.
Postado Novembro 10, 2017 7 anos Este tópico foi movido para a área correta. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Spoiler This topic has been moved to the correct area. This is an automated message!Please read the forum rules.
Postado Novembro 10, 2017 7 anos @Jinx Tenho um sistema para impedir de atacar membros da msm party e da msm guild. Se precisar ta ae Em config.lua adicione: noDamageToGuildMates = false noDamageToPartyMembers = true Em creaturescripts.xml adicione: <event type="combat" name="combat" script="combat.lua"/> Em creaturescripts/scripts/login.lua adicione: registerCreatureEvent(cid, "combat") Na mesma pasta, crie um arquivo lua chamado combat e adicione isso nele: function onCombat(cid, target) if(isPlayer(cid) and isPlayer(target)) then if(getConfigValue("noDamageToGuildMates") and getPlayerGuildId(cid) > 0 and getPlayerGuildId(cid) == getPlayerGuildId(target)) then return false elseif(getConfigValue("noDamageToPartyMembers") and isInParty(target) and getPartyLeader(target) == getPartyLeader(cid)) then return false end end return true end Qualquer duvida ou erro deixe nos comentários.
Postado Novembro 12, 2017 7 anos Em 10/11/2017 em 03:29, Jinx disse: gostaria de um script q o jogar tiver de mc nao pode atakar o outro char dele. function onLogin(cid) registerCreatureEvent(cid, "MC_Block_Target") registerCreatureEvent(cid, "MC_Block_Combat") return true end function onTarget(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return false end return true end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return false end return true end return true end <event type="login" name="MC_Block_Login" event="script" value="NoTargetMC.lua"/> <event type="target" name="MC_Block_Target" event="script" value="NoTargetMC.lua"/> <event type="combat" name="MC_Block_Combat" event="script" value="NoTargetMC.lua"/>
Postado Abril 23, 2023 2 anos Em 12/11/2017 em 10:41, Danyel Varejao disse: function onLogin(cid) registerCreatureEvent(cid, "MC_Block_Target") registerCreatureEvent(cid, "MC_Block_Combat") return true end function onTarget(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return false end return true end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return false end return true end return true end <event type="login" name="MC_Block_Login" event="script" value="NoTargetMC.lua"/> <event type="target" name="MC_Block_Target" event="script" value="NoTargetMC.lua"/> <event type="combat" name="MC_Block_Combat" event="script" value="NoTargetMC.lua"/> Desculpá reviver, mas tem como fazer um que o player que tiver de mc não pode ataka com os dois char o outro player apenas com 1 char.
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.