Postado Março 12, 2017 8 anos O script em si funciona, porém ele manda mensagem pela quantidade de players online, precisava ser apenas 1 vez. Se tiver 100 online, aparece 100 mensagem. talkaction function onSay(cid, words, param, channel) local t = string.explode(param, ",") if t[1] ~= nil and t[2] ~= nil then local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end for i = 1, #list do doPlayerAddItem(list[i],t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 12, 2017 8 anos Solução Spoiler function onSay(cid, words, param, channel) local t = string.explode(param, ",") if t[1] ~= nil and t[2] ~= nil then local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end for i = 1, #list do doPlayerAddItem(list[i],t[1],t[2]) end doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") else doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 12, 2017 8 anos Autor @rogaforyn2, valeu bro! (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.