util.resource.start
Server
Starts a loaded resource
Syntax
local result = util.resource.start(
name
)The resource must be loaded before it can be started.
- Already running — returns
falseif the resource is already running. - Not loaded — returns
falseif the resource has not been loaded. - Async — the start is enqueued and executes on the next main thread tick; the resource will not be running immediately after this call returns.
Parameters
| Type | Name | Description |
|---|---|---|
string | name | Name of the resource to start |
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the start was enqueued successfully, false otherwise |
Examples
util.resource.start("my_resource")if not util.resource.is_running("my_resource") then
util.resource.start("my_resource")
end