ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getLatentEventStatus

Function

getLatentEventStatus

ServerEventsIdentical to MTA:SA

Returns the progress of sending a latent event to a player.

Syntax

table getLatentEventStatus(player thePlayer, int handle)

Arguments

thePlayerplayer
The player.
handleint
A handle from getLatentEventHandles.

Returns

A table { tickStart, tickEnd, totalSize, percentComplete }, or false.

Example

addCommandHandler("postep", function(player)
    for _, handle in ipairs(getLatentEventHandles(player) or {}) do
        local status = getLatentEventStatus(player, handle)
        if status then outputChatBox(status.percentComplete .. "%", player) end
    end
end)

See also