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
| Name | Type | Description |
|---|---|---|
| resource | resource|string | The 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)