# Restrictions

Restrictions are control mechanisms used to determine whether a user has access to the elevator or specific floors within the elevator system. These controls are flexible, stackable, and must return a boolean value (`true` or `false`) to the controller. Depending on the type of restriction applied, access can be restricted at the elevator level or limited to certain floors.

{% hint style="warning" %}

#### Return Value Requirement

Restriction must return a **boolean value** (`true` or `false`):

* `true` → Access granted.
* `false` → Access denied.
  {% endhint %}

{% hint style="info" %}
Restriction checks are cached for 5 seconds, ensuring the system doesn't repeatedly evaluate the same conditions.
{% endhint %}

#### Summary of Restriction Logic

| Restriction Type         | Scope                           | Behavior                                   |
| ------------------------ | ------------------------------- | ------------------------------------------ |
| **Elevator Restriction** | Entire elevator system          | Disables all floors if `false` is returned |
| **Floor Restriction**    | Specific floors of the elevator | Disables only the specified floors         |


---

# 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://none-fivem.gitbook.io/nonem/resources/no-elevators/restrictions.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.
