# restartResource (Shared)

> Asks to stop and start again a running resource. It happens on the next resource pulse, not during the call, and the resource keeps its place in the start order.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Resources and modules
- **URL**: https://wiki.mymp.gg/en/restartResource

## Syntax

```lua
bool restartResource(resource|string resource)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `resource` | `resource\|string` | The resource, or its name. |

## Returns

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

## Example

```lua
addCommandHandler("restartmap", function()
    restartResource("race-map")
end)
```

## See also

- [startResource (Shared)](https://wiki.mymp.gg/en/startResource.md): Starts a resource right away, after starting the resources it includes with <include> in its meta.xml.
- [stopResource (Shared)](https://wiki.mymp.gg/en/stopResource.md): Asks to stop a running resource. It stops on the next resource pulse, not during the call.
- [getResourceState (Shared)](https://wiki.mymp.gg/en/getResourceState.md): Tells which state a resource is in.
