- Documentation
- Server functions
- cancelLatentEvent
Function
cancelLatentEvent
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)