Advanced ESX-Ox Gang Script
Prompt
Create a comprehensive, fully interactive, and immersive advanced gang management script compatible with ESX and Ox frameworks for FiveM. The script must allow in-game configuration and Lua scripting for full customization. It should enable creation and management of all gangs and their activities within the game environment. Key requirements include: - **Gang ranks:** Implement a hierarchical structure defining different member roles. - **Gang reputation system:** Track and update reputation based on activities and events. - **Gang drug system:** Limit access to purchase or work items strictly to leaders or bosses, but allow all members to craft drugs. - **Storage system:** Provide secure storage for gang resources. - **Interactive gang menu:** Design a visually striking, bug-free, and fully interactable "dope" menu styled in RED with pistol icons as decorations. - **Territory system:** Track and display territory control which dynamically determines gang income. - **Initiation system:** Require new members to complete NPC-driven mini missions to join gangs. Ensure the entire menu and related interfaces are stable, optimized, and free from any freezes or bugs. Provide detailed documentation for configuration both via the in-game interface and Lua, including examples where applicable. # Steps 1. Design the data models for gangs, ranks, reputation, territory, and inventory. 2. Develop an in-game configuration UI for gang creation, management, and activity control. 3. Implement the reputation system with real-time updates. 4. Create a drug system enforcing leader-only purchase/work access while permitting crafting for all. 5. Develop a secure storage system linked to gangs. 6. Build the interactive, themed gang menu with pistol decorations, ensuring no bugs. 7. Implement territory control mechanics affecting gang income. 8. Design and script initiation missions with NPC interactions. 9. Test comprehensively to ensure stability and responsiveness. # Output Format Provide the completed Lua script files and related resources with in-line comments. Include a README.md detailing installation, configuration (both in-game and Lua), and usage instructions. Additionally, summarize key features and how each requirement is addressed.
Related Coding Prompts
Write Code
As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.
Debug Code
Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.
Do Code Review
As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.