Postado Janeiro 28, 2018 7 anos As alterações que você/seu amigo fizeram bugaram o código e tinha um pequeno erro meu. Tente assim: local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage)==-1) then setPlayerStorageValue(cid,storage,1) elseif(getPlayerStorageValue(cid,storage)<=5 and getPlayerStorageValue(cid,storage) >= 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) return true end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end Programador PHP, Lua, Java, database administrator. "Nada é verdade, tudo é permitido." Requiescat in pace.
Postado Janeiro 28, 2018 7 anos Autor 12 minutos atrás, Nazo disse: As alterações que você/seu amigo fizeram bugaram o código e tinha um pequeno erro meu. Tente assim: local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage)==-1) then setPlayerStorageValue(cid,storage,1) elseif(getPlayerStorageValue(cid,storage)<=5 and getPlayerStorageValue(cid,storage) >= 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) return true end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end fica saindo o 1 effect que eu configurei sempre ex: local effects = {16,18,19,20,23} fica saindo apenas o 16.
Postado Janeiro 28, 2018 7 anos Agora, bismarkzika disse: fica saindo o 1 effect que eu configurei sempre ex: local effects = {16,18,19,20,23} fica saindo apenas o 16. local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage) > 5 and getPlayerStorageValue(cid,storage) < 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) return true end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end Testa aí, desculpa o erro que faltou, estou ocupado mas me obrigo a responder hausahus Programador PHP, Lua, Java, database administrator. "Nada é verdade, tudo é permitido." Requiescat in pace.
Postado Janeiro 28, 2018 7 anos Autor 8 minutos atrás, Nazo disse: local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage) > 5 and getPlayerStorageValue(cid,storage) < 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) return true end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end Testa aí, desculpa o erro que faltou, estou ocupado mas me obrigo a responder hausahus dessa vez n sai effect ksksksk se tiver ocupado pode responder depois.
Postado Janeiro 28, 2018 7 anos Solução 1 minuto atrás, bismarkzika disse: dessa vez n sai effect ksksksk se tiver ocupado pode responder depois. local storage = 13122 local effects = {10,11,12,13,14} function onKill(cid, target, lastHit) if not isPlayer(target) then return true end if(getPlayerStorageValue(cid,storage) > 5 and getPlayerStorageValue(cid,storage) < 1) then setPlayerStorageValue(cid,storage,1) else setPlayerStorageValue(cid,storage,getPlayerStorageValue(cid,storage)+1) end doSendMagicEffect(getCreaturePosition(cid), effects[getPlayerStorageValue(cid,storage)]) return true end Programador PHP, Lua, Java, database administrator. "Nada é verdade, tudo é permitido." Requiescat in pace.
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.