# Client

## 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hrscripts.gitbook.io/hrscripts-documentation/resources/hrlib/modules/controls-disable/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
