> For the complete documentation index, see [llms.txt](https://zarzel.gitbook.io/zarscript2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zarzel.gitbook.io/zarscript2/documentation/api-libs/module_manager.md).

# module\_manager

### module\_manager.register

```lua
module_manager.register(module_name, module_table)
```

| Argument      | Type   | Description  |
| ------------- | ------ | ------------ |
| module\_name  | String | Module name  |
| module\_table | Table  | Module table |

Register a module in the client

### module\_manager.register\_boolean

```lua
module_manager.register_boolean(module_name, option_name, default_state)
```

| Argument       | Type    | Description                     |
| -------------- | ------- | ------------------------------- |
| module\_name   | String  | Module name                     |
| option\_name   | String  | The name of the option          |
| default\_state | Boolean | The default state of the option |

Register a boolean option in a module&#x20;

### module\_manager.register\_number

```lua
module_manager.register_number(module_name, option_name, min_value, max_value, current_value)
```

| Argument       | Type   | Description                        |
| -------------- | ------ | ---------------------------------- |
| module\_name   | String | Module name                        |
| option\_name   | String | The name of the option             |
| min\_value     | Number | The min value of the number option |
| max\_value     | Number | The max value of the number option |
| current\_value | Number | The default value of the option    |

Register a number option in a module&#x20;

### module\_manager.is\_module\_on

```lua
module_manager.is_module_on(module_name): boolean
```

| Argument     | Type   | Description                  |
| ------------ | ------ | ---------------------------- |
| module\_name | String | Module name (case-sensitive) |

Returns if the specified module is currently active

### module\_manager.option

```lua
module_manager.option(module_name, module_option, [...]): [...]
```

| Argument       | Type   | Description                             |
| -------------- | ------ | --------------------------------------- |
| module\_name   | String | Module name (case-sensitive)            |
| module\_option | String | Option name (case-sensitive)            |
| \[...]         | String | Used for getting options in sub options |

Returns the value of the specified option

### module\_manager.set\_option

```lua
module_manager.set_option(module_name, module_option, [...], [...])
```

| Argument       | Type                  | Description                             |
| -------------- | --------------------- | --------------------------------------- |
| module\_name   | String                | Module name (case-sensitive)            |
| module\_option | String                | Option name (case-sensitive)            |
| \[...]         | String                | Used for getting options in sub options |
| \[...]         | String/boolean/number | New value of the option                 |

Sets a new value to the desired option
