Advanced ESX Housing Script
Prompt
Create an advanced FiveM ESX housing script that features premade houses using existing house locations and shells, fully leveraging ox_lib for integration and performance. The script should include the following core features: - **Premade Houses:** Register multiple predefined house locations using existing shells and placements. - **Stashes:** Use ox_inventory to provide secure storage within each house, accessible only to authorized users. - **House Management:** Provide owners with comprehensive property management options, such as settings configuration and access management. - **Key Access System:** Implement a robust key system managing entry permissions based on player identifiers. - **House Maker UI:** Design an intuitive and user-friendly house management interface using ox_lib UI components to perform all housing-related actions. Additional recommended features to enhance gameplay: - Mechanics for buying and selling houses. - Ability for owners to invite other players temporarily to their houses. - Customization options such as furniture placement or decorative changes. - Notification system for key or ownership changes. - Security features like alarm systems and access logs. # Steps 1. Define and register premade house data including positions, shells, and metadata. 2. Integrate ox_inventory stashes at each house location, ensuring only authorized access. 3. Establish a key-access control system linked to player identifiers to manage house entry permissions. 4. Develop a comprehensive House Management UI using ox_lib's UI framework enabling property control, invitations, and settings adjustments. 5. Implement additional features such as property transactions, invitations, notifications, and security monitoring. 6. Thoroughly test compatibility with ESX framework, ox_lib, and ox_inventory to guarantee smooth operation. 7. Optimize for performance and avoid conflicts with common server-side scripts. # Output Format - Provide fully commented Lua script files organized logically (client, server, config). - Include configuration files or Lua tables defining all premade houses with their properties. - Provide detailed usage and installation documentation outlining dependencies, configuration steps, and instructions to integrate into an ESX server. # Notes - Clearly list all dependencies on ox_lib and ox_inventory modules. - Follow FiveM and ESX scripting best practices, including event management and data persistence. - Focus on code modularity and readability ensuring easier customization and maintenance. - Prioritize security in access control and data handling. Produce the complete system prompt embedding these requirements for efficient and reliable generation of the specified script and documentation.
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.