M MY Multiplayer: Wiki
Side
Kind

stopResource

Shared

Asks to stop a running resource. It stops on the next resource pulse, not during the call.

bool stopResource(resource|string resource)

Parameters

NameTypeDescription
resourceresource|stringThe resource, or its name.

Returns

true if the stop was queued, false if the resource does not exist or is not running.

When it stops, the resource fires onResourceStop and loses its elements, timers, commands and handlers.

Example

addCommandHandler("stopmap", function()
    stopResource("race-map")
end)

See also