Skip to content
CustomCodex edited this page Aug 14, 2024 · 1 revision

Codex-PoliceArmory

๐Ÿ  Overview

Codex-PoliceArmory is a FiveM ESX-based police armory system designed to enhance the role-playing experience by allowing players to purchase and return weapons. The system integrates with Discord for logging events and supports custom configurations.

๐Ÿ”‘ Key Features

  • ๐Ÿ”ซ Weapon Management: Purchase and return weapons through an in-game menu.
  • ๐Ÿ’ฌ Discord Integration: Logs weapon transactions to Discord.
  • ๐Ÿ‘ฎโ€โ™‚๏ธ Custom NPC Interactions: Interaction with a Dutch police NPC.
  • ๐Ÿ“ Detailed Logging: Includes player information and weapon details.

Installation Guide

๐Ÿ› ๏ธ Prerequisites

  • FiveM Server with ESX framework
  • MySQL Database
  • Discord Webhook URLs

๐Ÿ“ฅ Steps

  1. Download the Resource

    • Clone or download the repository from GitHub.
    • Extract and place the Codex-PoliceArmory folder in your serverโ€™s resources directory.
  2. Database Setup

    • Import the provided SQL schema into your MySQL database.
    • Ensure tables user_weapons and police_armory are created.
  3. Configure the Resource

    • Open config.lua and set the NPCCoords and NPCHeading to your desired values.
    • Replace placeholder webhook URLs in server/main.lua with your actual Discord webhook URLs.
  4. Start the Resource

    • Add start Codex-PoliceArmory to your server configuration file (server.cfg).
    • Restart your FiveM server.
  5. Testing

    • Ensure the NPC appears at the designated location.
    • Test weapon purchase and return functionality.
    • Check Discord for webhook messages.

Configuration

๐Ÿ“ config.lua

  • NPCCoords: Coordinates where the NPC will spawn.
  • NPCHeading: Heading direction of the NPC.

4. Roadmap

Planned features and improvements for the project.

Roadmap

๐Ÿš€ Current Version

  • Weapon purchase and return functionality
  • Discord webhook integration
  • Basic NPC interactions

๐Ÿ“… Planned Features

  • Advanced NPC interactions: Custom dialogues and responses.
  • Weapon customization: Allow players to modify weapon components.
  • Extended logging: More detailed logging and analytics.
  • UI Enhancements: Improved menus and user interface elements.

๐Ÿ•ฐ๏ธ Future Considerations

  • Support for multiple languages
  • Integration with other FiveM resources
  • Performance optimizations

FAQ

๐Ÿค” How do I customize the NPC appearance?

The NPC appearance is defined by the model used in client/main.lua. You can replace 'a_m_y_police_01' with any other model you prefer.

๐Ÿ› ๏ธ What should I do if the NPC doesnโ€™t spawn?

Check the coordinates and heading values in config.lua. Ensure the NPC model is loaded correctly.

๐Ÿ’ฐ How can I adjust weapon prices?

Modify the price value in the buyWeapon function in server/main.lua.

๐Ÿ’ฌ Where can I get help if I encounter issues?

  • Check the Issues page on GitHub.
  • Join our Discord server for community support.