Postado Dezembro 8, 2016 8 anos Bom dia galera, estou com um scripts aqui ele ta funcionando 100% unica diferença que ao voce dar use no iten Present Box, ao invez de vir 1 iten, sempre vem 2 itens, tentei de tudo nao consegui identificar onde eu altero!! plx ajuda ai local items = { [5468] = {maxAmmount = 1, chance = 50}, [8982] = {maxAmmount = 1, chance = 50}, [10310] = {maxAmmount = 1, chance = 50}, [2829] = {maxAmmount = 1, chance = 50}, } function onUse(cid, item) for i, e in pairs(items) do if math.random(200) <= e.chance then local ammount = math.random(1, e.maxAmmount) doPlayerAddItem(cid, i, ammount) doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i)) end end doRemoveItem(item.uid) return true end
Postado Dezembro 8, 2016 8 anos Testa ai para ver se deu Spoiler local items = { [5468] = {maxAmmount = 1, chance = 50}, [8982] = {maxAmmount = 1, chance = 50}, [10310] = {maxAmmount = 1, chance = 50}, [2829] = {maxAmmount = 1, chance = 50}, } function onUse(cid, item) for i, e in pairs(items) do if math.random(100) <= e.chance then local ammount = math.random(1, e.maxAmmount) doPlayerAddItem(cid, i, ammount) doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i)) end end doRemoveItem(item.uid) return true end
Postado Dezembro 8, 2016 8 anos Autor 1 minuto atrás, PedroSTT disse: Testa ai para ver se deu Ocultar conteúdo local items = { [5468] = {maxAmmount = 1, chance = 50}, [8982] = {maxAmmount = 1, chance = 50}, [10310] = {maxAmmount = 1, chance = 50}, [2829] = {maxAmmount = 1, chance = 50}, } function onUse(cid, item) for i, e in pairs(items) do if math.random(100) <= e.chance then local ammount = math.random(1, e.maxAmmount) doPlayerAddItem(cid, i, ammount) doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i)) end end doRemoveItem(item.uid) return true end Eai pedro blz! testei aqui, ainda continua vindo em 2, e as vezes não da nenhum ou sera que esse scripts ta bugado?
Postado Dezembro 8, 2016 8 anos Agora, mateusmoretti disse: Eai pedro blz! testei aqui, ainda continua vindo em 2, e as vezes não da nenhum ou sera que esse scripts ta bugado? Pera , então teste agr Spoiler local items = { [5468] = {maxAmmount = 1, chance = 50}, [8982] = {maxAmmount = 1, chance = 50}, [10310] = {maxAmmount = 1, chance = 50}, [2829] = {maxAmmount = 1, chance = 50}, } function onUse(cid, item) for i, e in pairs(items) do if math.random(100) <= e.chance then local ammount = math.random(1) doPlayerAddItem(cid, i, ammount) doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i)) end end doRemoveItem(item.uid) return true end
Postado Dezembro 8, 2016 8 anos Autor 3 minutos atrás, PedroSTT disse: Pera , então teste agr Ocultar conteúdo local items = { [5468] = {maxAmmount = 1, chance = 50}, [8982] = {maxAmmount = 1, chance = 50}, [10310] = {maxAmmount = 1, chance = 50}, [2829] = {maxAmmount = 1, chance = 50}, } function onUse(cid, item) for i, e in pairs(items) do if math.random(100) <= e.chance then local ammount = math.random(1) doPlayerAddItem(cid, i, ammount) doPlayerSendTextMessage(cid, 22, "Voce ganhou "..ammount.."x "..getItemNameById(i)) end end doRemoveItem(item.uid) return true end Ainda persiste, vem de 2 ou 3 agora!
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.