Panduh
Panduh Approves.
It says it for every player that is online. I say it once and it lag's server and spams Server Log.
Script.
What do i add to make it only show it once?
Script.
Code:
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])
doBroadcastMessage(getPlayerName(cid) .. " has given reward: " .. t[2] .." ".. getItemNameById(t[1]) .. " for all players!")
end -- Script by Dubler, written for megaevo.net
else
doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")
end
return true
end -- Script by Dubler, written for megaevo.net
What do i add to make it only show it once?