# stopEffect (Shared)

> Stops an effect: it stops emitting and the particles already out finish.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Effects
- **URL**: https://wiki.mymp.gg/en/stopEffect

## Syntax

```lua
bool stopEffect(effect effect)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `effect` | `effect` | The effect. |

## Returns

`true` if it stopped. `false` with a wrong argument (logs a warning).

An effect a client created is destroyed once it is over. A server's effect stays as an element until it is destroyed.

## Example

```lua
local smoke = createEffect("smoke_flare", 2495.1, -1687.4, 13.5)
setTimer(function()
    stopEffect(smoke)
end, 10000, 1)
```

## See also

- [createEffect (Shared)](https://wiki.mymp.gg/en/createEffect.md): Creates a particle effect in the world. On the server every client sees it; on a client, only that client does.
- [destroyElement (Shared)](https://wiki.mymp.gg/en/destroyElement.md): Destroys an element and all of its children. Before it goes, each one fires onElementDestroy on the server or onClientElementDestroy on the client.
