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
| Name | Type | Description |
|---|---|---|
| thePlayer | player | The player receiving the event. |
| handle | int | A 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)