GetResources: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→See Also) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 6: | Line 6: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
table getResources () | table getResources () | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Resource]].getAll}} | |||
===Returns=== | ===Returns=== | ||
Line 26: | Line 27: | ||
==See Also== | ==See Also== | ||
{{Resource_functions}} | {{Resource_functions|server}} |
Latest revision as of 22:47, 6 September 2024
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
- callRemote
- copyResource
- createResource
- deleteResource
- getResourceACLRequests
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceOrganizationalPath
- getResources
- isResourceArchived
- isResourceProtected
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest
- Shared
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo