- Documentation
- Server functions
- getResources
Function
getResources
Returns every resource in the resources/ folder, running and stopped.
Syntax
table getResources()Returns
A table of resource handles.
Example
addCommandHandler("zasoby", function(player)
for _, res in ipairs(getResources()) do
outputChatBox(getResourceName(res) .. ": " .. getResourceState(res), player)
end
end)
See also
getResourceStateReturns the resource state:"running"when it runs or"loaded"when it is on disk but stopped. It also works on the client: there it only knows the resources running for the player, so it returns"running"orfalse.getResourceFromNameReturns the handle of the resource with the given name (the folder name inresources/), also when the resource is not running. Pass the handle tostartResource,getResourceState,calland other resource functions.