> For the complete documentation index, see [llms.txt](https://nayzeee-dev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nayzeee-dev.gitbook.io/docs/nayzeee-scripts/nayzeee-admin-jail/installation.md).

# Installation

***

1. **Install Dependencies**\
   \&#xNAN;*Ensure all required dependencies are installed and running before starting the script.*
2. **Import Database**\
   \&#xNAN;*Import the required SQL file into your database.*

   Run:

   ```sql
   -- Run INSTALL/nayzeee-adminjail.sql in your database
   ```
3. **Configure Script**\
   \&#xNAN;*Configure the script inside `config.lua`.*

   Example configuration:

   ```lua
   Config.Framework = 'auto' -- Options: auto, qb, esx, qbox

   Config.AdminGroups = {
       'admin',
       'mod',
       'superadmin',
       'god',
   }
   ```
4. **Add to server.cfg**\
   \&#xNAN;*Ensure the resource is started after dependencies.*

   ```cfg
   ensure oxmysql
   ensure ox_lib
   ensure nayzeee-adminjail
   ```

***

#### Troubleshooting

| Issue                | Solution                              |
| -------------------- | ------------------------------------- |
| Can't jail players   | Check admin group configuration       |
| Jail time not saving | Verify database connection            |
| UI not opening       | Ensure ox\_lib is running and started |
