> 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-ped-menu/installation.md).

# Installation

1. **Ensure all dependencies are installed**\
   \&#xNAN;*Be sure all dependencies are installed, running, and utilizing the latest versions available.*
2. **Import SQL File**\
   \&#xNAN;*Import the `sql.sql` file into your database. This creates the `players_peds` table required for storing player ped data.*

   ```sql
   CREATE TABLE `players_peds` (
       `identifier` VARCHAR(50) NULL DEFAULT NULL,
       `list` LONGTEXT NULL DEFAULT '[]',
       `favorite` VARCHAR(50) NULL DEFAULT ''
   );
   ```
3. **Configure Script**\
   \&#xNAN;*Configure the script to your liking in `config.lua`. Be sure to set your framework (`esx`, `oldesx`, or `qbcore`) and adjust other settings as needed.*
4. **Drag script into resources directory**\
   \&#xNAN;*Place the `nayzeee-pedmenu` folder into your server's resources directory. Be sure to ensure it within your `server.cfg` after all dependencies.*

   ```cfg
   ensure oxmysql
   ensure es_extended  # or qb-core
   ensure nayzeee-pedmenu
   ```
5. **Restart/Start Server**\
   \&#xNAN;*Restart your server or start the resource. The script will automatically load and begin functioning.*

***

### Optional: Custom Peds

If you want to add custom peds to the menu, you can:

1. Use the admin command to give peds to players: `/{givePed command} [playerID] [pedModel]`
2. Configure the `kids.xml` file for additional ped metadata if needed
3. Players can manage their peds through the in-game UI

***

### Troubleshooting

| Issue                  | Solution                                                                                         |
| ---------------------- | ------------------------------------------------------------------------------------------------ |
| Menu not opening       | Ensure you have peds assigned to your character. Use admin command to give yourself a ped first. |
| Framework not detected | Check `Config.Framework` is set correctly (`esx`, `oldesx`, or `qbcore`)                         |
| SQL errors             | Ensure oxmysql is running and the `players_peds` table exists                                    |
| Ped not loading        | Ensure the ped model exists on your server (custom peds must be streamed)                        |
| Favorite not spawning  | Check `Config.SpawnWithFavoritePed` is `true` and adjust `Config.SpawnFavoriteDelay` if needed   |
