From the reference libraryRedM

autodoc_client_functions

jo_libs/modules/emit/autodoc/autodoc_client_functions.md

autodoc_client_functions

JO Functions > jo.emit.isEventInProgress()

A function to check if an event is currently getting data with emit module <br>

JO Functions > jo.emit.isEventInProgress() > Syntax

jo.emit.isEventInProgress(eventName)

JO Functions > jo.emit.isEventInProgress() > Parameters

eventName : string

JO Functions > jo.emit.isEventInProgress() > Example

print(jo.emit.isEventInProgress('YourEventName'))
-- Expected outfit : `true` if the event is not fully received yet.


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.triggerServer() > Syntax

jo.emit.triggerServer(eventName, ...)

JO Functions > jo.emit.triggerServer() > Parameters

eventName : string

The event name

... : any

Other arguments

JO Functions > jo.emit.triggerServer() > Example

local data = "MyData"
jo.emit.triggerServer('YourEventName', data)


JO Functions > jo.emit.triggerServer.latent()

A function to trigger the server with limited bandwith <br>

JO Functions > jo.emit.triggerServer.latent() > Syntax

jo.emit.triggerServer.latent(eventName, ...)

JO Functions > jo.emit.triggerServer.latent() > Parameters

eventName : string

The event name

... : any

Other arguments

JO Functions > jo.emit.triggerServer.latent() > Example

local data = {}
for i = 1, 100000 do
  data[i] = i
end
jo.emit.triggerServer.latent("YourEventName", data)


JO Functions > jo.emit.updateBps()

A function to update the bit/s of emit module <br>

The default bitrate is 20.000 bit/s

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)

Back to documentation