Hi does anyone have or can convert this scrip into TFS 1.2? Basically it gives item to all but it doesnt give item to MC players
Lua:
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, player in ipairs(getPlayersOnline()) do
local playerIp = getPlayerIp(player)
if not list[tostring(playerIp)] then
list[tostring(playerIp)] = player
end
end
if next(list) then
for ip, pid in pairs(list) do
if isPlayer(pid) then
doPlayerAddItem(pid, t[1], t[2])
end
end
end
else
doPlayerPopupFYI(cid, "No param...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")
end
return true
end