1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-11 16:43:00 +08:00
cfx-server-data/resources/[gameplay]/channelfeed/client/channelfeed.lua

41 lines
646 B
Lua
Raw Normal View History

2016-12-15 20:40:07 +08:00
local eventBuffer = {}
AddUIHandler('getNew', function(data, cb)
local localBuf = eventBuffer
eventBuffer = {}
cb(localBuf)
end)
function printTo(channel, data)
table.insert(eventBuffer, {
meta = 'print',
channel = channel,
data = data
})
PollUI()
end
function addChannel(id, options)
if not options.template then
return
end
options.id = id
table.insert(eventBuffer, {
meta = 'addChannel',
data = options
})
PollUI()
end
function removeChannel(id)
table.insert(eventBuffer, {
meta = 'removeChannel',
data = id
})
end