Soo... this script will give items for all online players....
to /data/talkactions/talkactions.xml add:
to /data/talkactions/scripts/additem.lua add:
script by me, written for Megaevo.net
to /data/talkactions/talkactions.xml add:
Code:
<talkaction words="/additem" acces="5" event="script" value="additem.lua"/>
to /data/talkactions/scripts/additem.lua add:
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
script by me, written for Megaevo.net