How titansproductions/tp-advanced-zombies works
Main Components
• Client Scripts: Located in the “tp-advancedzombies/client” directory. These Lua scripts (e.g., tp-client_main.lua, tp-client_functions.lua) handle in-game client-side logic such as UI interactions, statistics gathering, zone management, and traffic adjustments.
• Server Scripts: Found in the “tp-advancedzombies/server” folder. They are responsible for server-side actions including managing loot, handling player statistics, and processing functions that impact game state.
• Database: There is a “database” directory containing a SQL file (tp_user_statistics.sql). This indicates that the system persists data such as user statistics and perhaps other gameplay data.
• HTML/UI Components: The “tp-advancedzombies/html” directory includes HTML, CSS, JS (with localization files and configuration). This part is likely used to render interactive in-game or web-based UIs (e.g., dashboards, menus) that display game statistics or settings.
• Configuration & Locales: Files like “config.lua” and “locales.lua” are used to manage settings and translations, respectively.
• Asset Streaming: The “tp-advancedzombies/stream” folder holds models and textures (with files like .ydd, .yft, .ymt, .ytd) that are streamed into the game. These assets are critical for the visual representation of zombies, NPCs, and other in-game characters.
Relationships and Interactions
• The Client and Server components interact directly over the FiveM framework. The client scripts will call server events/functions (and vice versa) to synchronize game state.
• The Server communicates with the Database to read and write statistics and other persistent data.
• The HTML/UI layer likely provides a visual interface (possibly via an in-game browser) that the client or server triggers to display statistics, configurations, or other game-related information.
• The Streamed assets are loaded into the game environment to provide the custom models and textures needed by both client and server scripts.
• Configuration and Locale files ensure that both the client and server operate under consistent settings and display the correct language or regional formats.
Architectural Patterns and Technologies
• Separation-of-Concerns: The code is divided between client-side logic, server-side logic, asset management, and UI presentation.
• Event-Driven Architecture: Given the nature of FiveM scripting, events and remote procedure calls (RPC) will play a central role in the interactions between client and server scripts.
• Modular Design: The distinct directories for client, server, HTML, and stream assets suggest a modular approach that facilitates independent updates or extensions (e.g., adding more assets or new UI features).
Final Content
• Each major component (Client, Server, Database, HTML/UI, Streaming Assets) should be clearly identified.
• Use annotations to call out the technologies: Lua for client/server scripts, SQL for the database, and standard web technologies (HTML, CSS, JavaScript) for the UI.