# setCinematicWorld (Client)

> Sets the weather, hour and screen fade keys the cinematic applies during playback. It replaces the earlier keys.

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

## Syntax

```lua
bool setCinematicWorld(cinematic cinematic, table world)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |
| `world` | `table` | A table with the `weather`, `clock` and `fades` lists, all optional. |

## Returns

`true` if they were applied. `false` if the table is invalid, with a warning saying why.

Each list goes in order of `time`, the cinematic time in ms, required in every key:

- `weather`: `{ time, name }`, with a weather's name.
- `clock`: `{ time, hour, minute }`, with `hour` from 0 up to 24 and `minute` optional.
- `fades`: `{ time, opacity, red, green, blue }`, with `opacity` from 0 to 1 and the colour from 0 to 255, black by default.

When playback ends, the weather, hour and fade go back to what the world had.

## Example

```lua
local intro = createCinematic("cinematics/intro.cine")
setCinematicWorld(intro, {
    clock = { { time = 0, hour = 19, minute = 30 } },
    fades = {
        { time = 0, opacity = 1 },
        { time = 1500, opacity = 0 },
    },
})
```

## See also

- [getCinematicWorld (Client)](https://wiki.mymp.gg/en/getCinematicWorld.md): Returns the cinematic's weather, hour and fade keys.
- [setWeather (Client)](https://wiki.mymp.gg/en/setWeather.md): Changes this client's weather, at once or over a blend.
- [setTime (Client)](https://wiki.mymp.gg/en/setTime.md): Changes the game time on this client. The clock keeps running from there.
- [fadeCamera (Client)](https://wiki.mymp.gg/en/fadeCamera.md): Fades the screen out to a colour or back in.
