autodoc_server_functions
JO Functions > jo.emit.triggerClient() > Syntax
jo.emit.triggerClient(eventName, source, ...)
JO Functions > jo.emit.triggerClient() > Parameters
eventName : string
The event name
source : integer|table
The player ID or list of players ID
... : any
Other arguments
JO Functions > jo.emit.triggerClient() > Example
local source = 5
local data = "MyData"
jo.emit.triggerClient('YourEventName', source, data)
--OR--
local sources = { 3, 4, 5, 13 } --list of players
local data = "MyData"
jo.emit.triggerClient('YourEventName', sources, data)
JO Functions > jo.emit.triggerClient.latent()
A function to trigger a client(s) with a limited bandwith <br>
JO Functions > jo.emit.triggerClient.latent() > Syntax
jo.emit.triggerClient.latent(eventName, source, ...)
JO Functions > jo.emit.triggerClient.latent() > Parameters
eventName : string
The event name
source : integer|table
The player ID or list of players ID
... : any
Other arguments
JO Functions > jo.emit.triggerClient.latent() > Example
local source = 5
local data = {}
for i = 1, 100000 do
data[i] = i
end
jo.emit.triggerClient.latent('YourEventName', source, data)
--OR--
local sources = { 3, 4, 5, 13 } --list of players
local data = {}
for i = 1, 100000 do
data[i] = i
end
jo.emit.triggerClient.latent('YourEventName', sources, data)
JO Functions > jo.emit.triggerServerWithSource()
Trigger an event on the server side and keep the source injection <br>
JO Functions > jo.emit.triggerServerWithSource() > Syntax
jo.emit.triggerServerWithSource(source, event, ...)
JO Functions > jo.emit.triggerServerWithSource() > Parameters
source : integer
The source player ID to send the event to
event : string
The name of the event to trigger
... : any
Additional parameters to pass to the event
JO Functions > jo.emit.updateBps()
A function to update the bit/s of emit module <br>
JO Functions > jo.emit.updateBps() > Syntax
jo.emit.updateBps(bps)
JO Functions > jo.emit.updateBps() > Parameters
bps : integer
bit/s
JO Functions > jo.emit.updateBps() > Example
jo.emit.updateBps(3000)