> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

<Warning>
  **Return Value Requirement:** Restriction must return a boolean value (`true` or
  `false`). Return `true` for access granted, `false` for access denied.
</Warning>

<Info>
  Restriction checks are cached for 5 seconds, ensuring the system doesn't repeatedly
  evaluate the same conditions.
</Info>

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