Postado Janeiro 25, 2017 8 anos galera estou usando um scripts aqui do TK, e esta funcionando 100% unic problema que se tiver 100 player online ele vai aparecer 100 mensagem, e possivel colocar para aparecer somente 1 msg? Mostrar conteúdo oculto 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 = tid end for i = 1, #list do doPlayerAddItem(list,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 18:44 [ADM] Acabou de dar: 1 Autoloot Boost para todos os players online! 18:44 [ADM] Acabou de dar: 1 Autoloot Boost para todos os players online! 18:44 [ADM] Acabou de dar: 1 Autoloot Boost para todos os players online! somente 1 msng 18:44 [ADM] Acabou de dar: 1 Autoloot Boost para todos os players online!
Postado Janeiro 25, 2017 8 anos 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end
Postado Janeiro 25, 2017 8 anos Autor Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function Em 25/01/2017 em 21:01, Noob II disse: 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 = tid end for i = 1, #list do doPlayerAddItem(list,t[1],t[2]) doBroadcastMessage(getPlayerName(cid) .. " Acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") end else doBroadcastMessage("No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end [Error - TalkAction Interface] data/talkactions/scripts/additem.lua:onSay Description: data/talkactions/scripts/additem.lua:8: attempt to get length of local 'list' (a number value) stack traceback: data/talkactions/scripts/additem.lua:8: in function
Postado Janeiro 25, 2017 8 anos @mateusmoretti, function onSay(cid, words, param, channel) -- Script by Dubler, written for megaevo.net local t = string.explode(param, ",") if t[1] ~= nil and t[2] ~= nil then local list = {} for i, tid in ipairs(getPlayersOnline()) do -- Script by Dubler, written for megaevo.net list[i] = tid end for i = 1, #list do doPlayerAddItem(list[i],t[1],t[2]) end -- Script by Dubler, written for megaevo.net doBroadcastMessage(getPlayerName(cid) .. " acabou de dar: " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os jogadores!") else doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10") end return true end
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.