Postado Setembro 24, 2019 5 anos Estou precisando editar o script desse tópico a seguir para dar o coração pro player somente se o target for level maior que 80, alguém pode me ajudar? O script da um coração como recompensa para um player que matar outro. O que eu preciso é que o player só receba o coração se ele tiver matado um player level maior que 80 Citar function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then local config = { Kname = getPlayerName(cid), Tname = getPlayerName(target), Tlevel = getPlayerLevel(target), } local heart = doPlayerAddItem(cid, 5943, 1) doItemSetAttribute(heart, "name", "" ..config.Tname.. " Heart's") doItemSetAttribute(heart, "description", "Killed at Level "..config.Tlevel.." by "..config.Kname..". " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) elseif getPlayerLevel(target) >80 then elseif getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExp(cid, -10000) end end return true end Desde já grato!!! @Rusherzin
Postado Setembro 24, 2019 5 anos function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) ~= getPlayerIp(target) then if getPlayerLevel(target) >= 80 then local heart = doPlayerAddItem(cid, 5943, 1) if heart then doItemSetAttribute(heart, "name", "" .. getPlayerName(target) .. " Heart's") doItemSetAttribute(heart, "description", "Killed at Level ".. getPlayerLevel(target) .." by ".. getPlayerName(cid) ..". " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) end end elseif getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExp(cid, -10000) end end return true end
Postado Setembro 24, 2019 5 anos Autor VLW IRMAO Editado Setembro 25, 2019 5 anos por Cricket (veja o histórico de ediçõ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.