GetResources
From Multi Theft Auto: Wiki
This function retrieves a table of all the resources that exist on the server.
Syntax
table getResources ()
OOP Syntax Help! I don't understand this!
- Method: Resource.getAll(...)
Returns
Returns a table of resources.
Example
This function lists all loaded resources in the console.
function displayResources() outputConsole("List of resources:") local resourceTable = getResources() -- get a table of resources for resourceKey, resourceValue in ipairs(resourceTable) do -- iterate through the table and output each resource's name local name = getResourceName(resourceValue) outputConsole(" " .. name) end end
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