AbortRemoteRequest

From Multi Theft Auto: Wiki
Revision as of 20:56, 8 October 2019 by Danilo (talk | contribs) (→‎Example)
Jump to navigation Jump to search

Aborts a fetchRemote or callRemote request.

Syntax

table abortRemoteRequest( request theRequest )

Required Arguments

Returns

Returns true on success, false when invalid request was provided

Example

this example aborts all pending requests of currently running resource.

function CMD_abortRequests()
    local requests = getRemoteRequests()
	
    for _, request in ipairs(requests) do
        abortRemoteRequest()
    end
end

addCommandHandler("abortrequests", CMD_abortRequests)


This template will be deleted.

See Also