# engineAddEffects (Client)

> Registers the particle effects in a file of the resource, so `createEffect` can use them by name.

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

## Syntax

```lua
table|false engineAddEffects(string path [, int priority = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `path` | `string` | Path of the effects file (the `<Effect>` entries of an XML) in the resource. |
| `priority` | `int` | Priority over effects of the same name from other resources and packs. The highest wins; among equals, the one added last. *(default: `0`)* |

## Returns

A list of the names of the effects added, or `false` if the file could not be read.

An added effect covers another of the same name until it is removed or the resource stops. When the effect a name points to changes, the effects playing the covered one stop.

## Example

```lua
local names = engineAddEffects("effects/neon.xml")
if names then
    for _, name in ipairs(names) do
        outputDebugString("effect added: " .. name)
    end
end
```

### Note

A file with no effect in it logs a warning and returns `false`.

## See also

- [engineRemoveEffects (Client)](https://wiki.mymp.gg/en/engineRemoveEffects.md): Removes the effects this resource added from a file with engineAddEffects.
- [engineGetEffects (Client)](https://wiki.mymp.gg/en/engineGetEffects.md): Lists the particle effects loaded on this client.
- [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.
