# getLatentEventHandles (Server)

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

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Events
- **URL**: https://wiki.mymp.gg/en/getLatentEventHandles-server
- **Counterpart**: Also exists on the client, with its own implementation: [getLatentEventHandles (Client)](https://wiki.mymp.gg/en/getLatentEventHandles-client.md)

## Syntax

```lua
table getLatentEventHandles(player thePlayer)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `thePlayer` | `player` | The player receiving the events. |

## Returns

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

## Example

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

## See also

- [getLatentEventStatus (Server)](https://wiki.mymp.gg/en/getLatentEventStatus-server.md): Tells how a latent event the server is sending to a player is going.
- [cancelLatentEvent (Server)](https://wiki.mymp.gg/en/cancelLatentEvent-server.md): Stops a latent event the server is sending to a player. The client drops what it had received and the event is not triggered there.
- [triggerLatentClientEvent (Server)](https://wiki.mymp.gg/en/triggerLatentClientEvent.md): Sends an event to the players' clients bit by bit, in the background, at no more than bandwidth bytes a second per player. Meant for large data that must not hold up the rest of the traffic.
