M MY Multiplayer: Wiki
Side
Kind

startResource

Shared

Starts a resource right away, after starting the resources it includes with <include> in its meta.xml.

bool startResource(string name)

Parameters

NameTypeDescription
namestringThe resource's name.

Returns

true if the resource is running when the call ends (also when it already ran), false if it does not exist, an included resource is missing or failed, or the start was cancelled.

Before running the scripts it fires onResourcePreStart, which can cancel the start, and at the end onResourceStart.

Example

if not startResource("scoreboard") then
    outputServerLog("scoreboard could not start")
end
NoteIt takes the name only: a stopped resource has no element to give.

See also