Mdcrf
New Member
- Joined
- Mar 2, 2014
- Messages
- 18
- Reaction score
- 1
Hi.
As a title said, i want this talkaction give item for all players online but not MC players... my server have 100+ online and any players have a 2-20 players online at the same time (MultiClient) ... i never give a good item because any players win 2-20 reward at once.
sry for bad english.
Anyone change this talkaction for reward only 1 player per ip?
As a title said, i want this talkaction give item for all players online but not MC players... my server have 100+ online and any players have a 2-20 players online at the same time (MultiClient) ... i never give a good item because any players win 2-20 reward at once.
sry for bad english.
Anyone change this talkaction for reward only 1 player per ip?
Code:
function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
if t[1] ~= nil and t[2] ~= nil then
doBroadcastMessage(getPlayerName(cid) .. " give: " .. t[2] .." ".. getItemNameById(t[1]) .. " for all players online!")
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
else
doPlayerPopupFYI(cid, "No param...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")
end
return true
end