getResourceState
Shared
Tells which state a resource is in.
string|false getResourceState(resource|string resource)
Parameters
| Name | Type | Description |
|---|---|---|
| resource | resource|string | The resource, or its name. |
Returns
"loaded" (stopped), "starting", "running" or "stopping", or false if the resource does not exist.
Example
if getResourceState("scoreboard") == "loaded" then
startResource("scoreboard")
endNoteA stopped resource can only be given by name, since it has no element.