> For the complete documentation index, see [llms.txt](https://23yun.gitbook.io/23yun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://23yun.gitbook.io/23yun/al_admin_qb/installation.md).

# Installation

### Preface

* No need to install any additional environments like Node.js or PHP on the server, nor run any extra services. <mark style="color:orange;">Plug-and-play functionality.</mark>
* The default access address for the panel is `ip:23001`, for example: <mark style="color:orange;">`http://111.222.333.444:23001`</mark>. After [Installation](/23yun/al_admin_esx/installation.md) , open [Config](/23yun/al_admin_esx/config.md) to review and configure the necessary settings. <mark style="color:red;">Do not use the default account credentials</mark>
* If additional features or plugin compatibility are needed, contact the author via **QQ:** **2569384741 or Discord:** [**https://discord.gg/crgjBszkKx**](https://discord.gg/crgjBszkKx)
* <mark style="color:red;">Do not use a VPN or proxy while logging in</mark>; it will fail the authentication.

### Dependencies

1. qb
2. oxmysql
3. [screenshot-basic](https://github.com/citizenfx/screenshot-basic), You can click the link or directly download the compressed file provided below.

{% file src="/files/v0zz3fZPVet2rmxgzqS7" %}

### Necessary Steps

1. Import all SQL files from the `sql` folder <mark style="color:orange;">in ascending order</mark>.
2. Open the `config.lua` file and configure inventory, account credentials, and other settings
3. Open the `dist/static/config.js` file and enter your server information. In most cases, you only need to modify the IP and port. The web panel and WebSocket ports usually don’t require changes.
4. Open the `qb-core\server\player.lua` file, locate the following code (you can quickly find it by searching for `self.Functions.AddMethod`):\
   \
   ![](/files/anv3BcFKljhTTLEilyQ4)\
   \
   Compare with your own file and update the code according to the image. The `self.Functions.AddMethod` is part of the original QB Core and requires modification. Please check and update this section as needed.\
   The `self.Functions.AddField` is part of the original QB Core and does **not** require any changes or additions.\
   The `for k, func in pairs(self.Functions) do` is newly added code.

   Below are the three code segments:

   1. **`self.Functions.AddMethod`** (requires modification):\
      Ensure this section is updated to match the provided code.
   2. **`self.Functions.AddField`** (no changes required):\
      Verify that this section remains untouched.
   3. **`for k, func in pairs(self.Functions) do`** (newly added):\
      Add this code to the file as shown.

   Make sure to carefully compare each part with the provided image to ensure accurate implementation.<br>

   ```lua
   function self.Functions.AddMethod(methodName, handler)
       -- self.Functions[methodName] = handler
       self.Functions[methodName] = function(...)
           local customData = {
               resource = GetInvokingResource() or '',
           }
           TriggerEvent('al_admin:logger:insert', methodName, customData, self, ...)
           return handler(...)
       end
   end

   function self.Functions.AddField(fieldName, data)
       self[fieldName] = data
   end

   for k, func in pairs(self.Functions) do
       if type(func) == 'function' then
           self.Functions[k] = function(...)
               local args = {...}
               local customData = {
                   resource = GetInvokingResource() or '',
               }
               if k == 'SetPlayerData' or k == 'UpdatePlayerData' then
                   customData.oldinventory = self.PlayerData[args[1]]
               end
               TriggerEvent('al_admin:logger:insert', k, customData, self, ...)
               return func(...)
           end
       end
   end
   ```
5. Add the following line at the very bottom of your server.cfg file: `ensure al_admin`
6. Restart your server

### Notes

If you encounter issues such as the webpage not opening or being unable to log in, please refer to the guide for troubleshooting steps. [FAQ](/23yun/al_admin_esx/faq.md)
