M MY Multiplayer: Wiki
Side
Kind

getResourceState

Shared

Tells which state a resource is in.

string|false getResourceState(resource|string resource)

Parameters

NameTypeDescription
resourceresource|stringThe 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")
end
NoteA stopped resource can only be given by name, since it has no element.

See also