M MY Multiplayer: Wiki
Side
Kind

getLatentEventHandles

Server

Lists the latent events the server is still sending to a player.

Also exists on the client, with its own implementation: getLatentEventHandles

table getLatentEventHandles(player thePlayer)

Parameters

NameTypeDescription
thePlayerplayerThe player receiving the events.

Returns

A table of the handles, oldest first. Every resource's are included; a finished transfer leaves the list.

Example

addEventHandler("onPlayerJoin", root, function()
    triggerLatentClientEvent(source, "onMapDownload", 50000, resourceRoot, { objects = {} })
    local handles = getLatentEventHandles(source)
    setElementData(source, "mapDownload", handles[#handles])
end)

See also