Postado Abril 2, 2020 5 anos boa noite, preciso de uma força se possivel. possuo um script de pvp-enforced, quando um player morre, TODOS que participaram da kill, recebem xp. queria colocar so pra quem deu o ultimo hit ganhar a xp e um script anti-MC nele alguem pode desenrolar pf? script: Spoiler function onKill(cid, target, lastHit) local storage = getPlayerStorageValue(target, 2310) if getPlayerLevel(cid) <= 100000 and isPlayer(cid) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (storage*1) * (getPlayerExperience(target) / 1000)) else return true end return true end
Postado Abril 2, 2020 5 anos 18 horas atrás, poko360 disse: boa noite, preciso de uma força se possivel. possuo um script de pvp-enforced, quando um player morre, TODOS que participaram da kill, recebem xp. queria colocar so pra quem deu o ultimo hit ganhar a xp e um script anti-MC nele alguem pode desenrolar pf? script: Ocultar conteúdo function onKill(cid, target, lastHit) local storage = getPlayerStorageValue(target, 2310) if getPlayerLevel(cid) <= 100000 and isPlayer(cid) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (storage*1) * (getPlayerExperience(target) / 1000)) else return true end return true end A função foi mudada para onDeath() --[[Script criado por ~Mathias Kenfi Email: [email protected] Contato: 034991286815 ]]-- function onDeath(cid, corpse, deathList) local storage = getPlayerStorageValue(cid, 2310) if isPlayer(cid) and isPlayer(deathList[1]) then if getPlayerIp(cid) ~= getPlayerIp(deathList[1]) then if getPlayerLevel(deathList[1]) <= 100000 then doPlayerAddExperience(deathList[1], (storage*1) * (getPlayerExperience(cid) / 1000)) end end end return true end
Postado Abril 2, 2020 5 anos Autor testei aqui, e nao deu xp mudei pra death: <event type="death" name="pvpenf" event="script" value="pvpenf.lua"/>
Postado Abril 3, 2020 5 anos 22 horas atrás, poko360 disse: testei aqui, e nao deu xp mudei pra death: <event type="death" name="pvpenf" event="script" value="pvpenf.lua"/> Mudança de evento é necessário reiniciar, você reiniciou? Qual a versão do seu OT? Qual versão da sua source? 22 horas atrás, poko360 disse: testei aqui, e nao deu xp mudei pra death: <event type="death" name="pvpenf" event="script" value="pvpenf.lua"/> --[[Script criado por ~Mathias Kenfi Email: [email protected] Contato: 034991286815 ]]-- function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) storage = getPlayerStorageValue(cid, 23100) target = lastHitKiller[1] if not(isPlayer(cid)) then return false end if not(isPlayer(target)) then return false end if getPlayerIp(cid) ~= getPlayerIp(target) then if getPlayerLevel(target) <= 100000 then doPlayerAddExperience(target, (storage*1) * (getPlayerExperience(cid) / 1000)) end end return true end A função foi mudada para onPrepareDeath()
Postado Abril 3, 2020 5 anos Autor reiniciei o servidor, e tbm n fuincionou tfs 0.4 sv 8.60 tipo, o player morre, e a barra de hp some, mas o player continua vivo, é que nem dar CTRL+N pra esconder os nicks
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.