# getLatentEventStatus (Client)

> Tells how a latent event this client is sending to the server is going.

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

## Syntax

```lua
table|false getLatentEventStatus(int handle)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `handle` | `int` | A handle from `getLatentEventHandles`. |

## Returns

A table with `tickStart` and `tickEnd` (on the `getTickCount` scale; `tickEnd` is an estimate while sending and the real end afterwards), `totalSize` (bytes) and `percentComplete` (0 to 100). `false` if the handle does not exist or the transfer finished more than a second ago.

## Example

```lua
addEventHandler("onClientRender", root, function()
    for _, handle in ipairs(getLatentEventHandles()) do
        local status = getLatentEventStatus(handle)
        if status then
            dxDrawText("Uploading: " .. status.percentComplete .. "%", 20, 300)
        end
    end
end)
```

## See also

- [getLatentEventHandles (Client)](https://wiki.mymp.gg/en/getLatentEventHandles-client.md): Lists the latent events this client is still sending to the server.
- [cancelLatentEvent (Client)](https://wiki.mymp.gg/en/cancelLatentEvent-client.md): Stops a latent event this client is sending to the server. The server drops what it had received and the event is not triggered.
- [triggerLatentServerEvent (Client)](https://wiki.mymp.gg/en/triggerLatentServerEvent.md): Sends an event to the server bit by bit, in the background, at no more than bandwidth bytes a second. Meant for large data that must not hold up the rest of the traffic.
