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

Function

cancelLatentEvent

ServerEventsIdentical to MTA:SA

Stops sending a latent event to a player.

Syntax

bool cancelLatentEvent(player thePlayer, int handle)

Arguments

thePlayerplayer
The player.
handleint
A handle from getLatentEventHandles.

Returns

true when cancelled.

Example

addEventHandler("onPlayerQuit", root, function()
    for _, handle in ipairs(getLatentEventHandles(source) or {}) do cancelLatentEvent(source, handle) end
end)

See also