AbortRemoteRequest
From Multi Theft Auto: Wiki
Aborts a fetchRemote or callRemote request.
Syntax
bool abortRemoteRequest( request theRequest )
Required Arguments
- theRequest: returned from fetchRemote, callRemote or getRemoteRequests
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)
Minimum supported server | 1.5.7-9.20307 |
---|---|
Minimum supported client | 1.5.7-9.20307 |
Note: Using this function requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.7-9.20307" client="1.5.7-9.20307" />
See Also
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResourceState
- getResources
- getThisResource
- isResourceArchived
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest
- getRemoteRequests
- getRemoteRequestInfo
- abortRemoteRequest