- Documentation
- Server functions
- getResourceState
Function
getResourceState
Returns 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" or false.
Syntax
string getResourceState(resource theResource)Arguments
theResourceresource- The resource (a handle or a name).
Returns
"running", "loaded" or false.
Example
local admin = getResourceFromName("admin")
outputServerLog("admin: " .. tostring(admin and getResourceState(admin)))