-
Notifications
You must be signed in to change notification settings - Fork 1
Home
CustomCodex edited this page Aug 14, 2024
·
1 revision
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.
- ๐ซ 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.
- FiveM Server with ESX framework
- MySQL Database
- Discord Webhook URLs
-
Download the Resource
- Clone or download the repository from GitHub.
- Extract and place the
Codex-PoliceArmory
folder in your serverโsresources
directory.
-
Database Setup
- Import the provided SQL schema into your MySQL database.
- Ensure tables
user_weapons
andpolice_armory
are created.
-
Configure the Resource
- Open
config.lua
and set theNPCCoords
andNPCHeading
to your desired values. - Replace placeholder webhook URLs in
server/main.lua
with your actual Discord webhook URLs.
- Open
-
Start the Resource
- Add
start Codex-PoliceArmory
to your server configuration file (server.cfg
). - Restart your FiveM server.
- Add
-
Testing
- Ensure the NPC appears at the designated location.
- Test weapon purchase and return functionality.
- Check Discord for webhook messages.
- NPCCoords: Coordinates where the NPC will spawn.
- NPCHeading: Heading direction of the NPC.
Planned features and improvements for the project.
- Weapon purchase and return functionality
- Discord webhook integration
- Basic NPC interactions
- 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.
- Support for multiple languages
- Integration with other FiveM resources
- Performance optimizations
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.
Check the coordinates and heading values in config.lua
. Ensure the NPC model is loaded correctly.
Modify the price value in the buyWeapon
function in server/main.lua
.
- Check the Issues page on GitHub.
- Join our Discord server for community support.