M MY Multiplayer: Wiki
Side
Kind

cancelLatentEvent

Server

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.

Also exists on the client, with its own implementation: cancelLatentEvent

bool cancelLatentEvent(player thePlayer, int handle)

Parameters

NameTypeDescription
thePlayerplayerThe player receiving the event.
handleintA handle from getLatentEventHandles for that player.

Returns

true if it was cancelled, false if the handle does not exist for that player or the transfer already finished.

Example

addCommandHandler("skipdownload", function(player)
    for _, handle in ipairs(getLatentEventHandles(player)) do
        cancelLatentEvent(player, handle)
    end
end)

See also