> For the complete documentation index, see [llms.txt](https://hrscripts.gitbook.io/hrscripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hrscripts.gitbook.io/hrscripts-documentation/resources/hrlib/modules/controls-disable/client.md).

# Client

The functions list of a module, created to provide system for disabling controls easier and more organized

## cDisable.registerProcess

Function to register a control/controls disable process

```lua
function HRLib.cDisable.registerProcess(key: string|string[], processId: any)
```

Parameters description

* `key` - the control(s) to disable with this process, if more than one, the controls must be in array
* `processId` - the id to recognize the process with (it can be any value, none or nil isn't allowed, just so it can be used again to focus on the specific process)

## cDisable.doesProcessExist

Function to check if a process exists in the list by given processId

```lua
function HRLib.cDisable.doesProcessExist(processId: any): boolean
```

Parameters description

* `processId` - the id of the process you want to check

## cDisable.getProcesses

Function to get all runned processes with their processId and control(s) disabled

```lua
function HRLib.cDisable.getProcesses():
{ key: string|string[], processId: any }[]? processes
```

Return description

* `processes` - a list full of processes. Each process is a hash table with `key` — *the value with all the controls disabled from the specific process* and `processId` — *the value with the process's id*\
  values in this list

## cDisable.removeProcess

Function to stop and remove process from the list of processes

```lua
function HRLib.cDisable.removeProcess(processId: any): boolean? success
```

Parameters description

* `processId` - the id of the process to stop and remove

Return description

* `success` - contains boolean for whether or not the removal is successful
