0Gravity
DISCORD
  • Introduction
  • FAQ
  • Summary
  • Developer Guide
  • Scripts
    • Fake Plates
    • PIN Code Minigame
  • Teleport Menu
  • 0Gravity - Weapon Lock | Free
Powered by GitBook
On this page
  • Overview
  • Code Structure
  • Extending Functionality
  • Troubleshooting

Developer Guide

Overview

This guide is intended for developers looking to customize or extend the ZeroGravity suite. Here, you will find information on code structure, event handling, and integration with frameworks like ESX.

Code Structure

  • PIN Code Minigame:

    • fxmanifest.lua: Resource manifest declaring the UI page and scripts.

    • client.lua & server.lua: Core logic for starting the minigame, handling player input, and triggering events.

    • HTML/CSS/JS: The NUI interface is built using standard web technologies (located in the html folder).

  • Fake Plates Module:

    • config.lua: Contains all configuration settings (pricing, cooldown, NPC settings, Discord webhook, etc.).

    • server.lua: Manages service callbacks, logs events, and handles transactions.

    • client.lua: Contains NPC spawning, interaction menus, and in-game service handling.

Extending Functionality

  • Integrating a Custom UI:

    • You can replace native notifications with a custom NUI interface by editing the HTML/CSS/JS files.

  • Adjusting Permissions:

    • Modify permission-check functions in the client and server scripts to integrate with your chosen framework (e.g., ESX, QBCore).

  • Enhancing Logging:

    • Update the logging functions in server.lua to include additional details or integrate with other logging platforms.

  • Adding New Services:

    • Use the existing structure in Fake Plates Module as a template to add further vehicle-related services.

Troubleshooting

  • Model Loading Errors:

    • Ensure that NPC models are correctly specified and that sufficient time is allowed for loading.

  • Webhook Issues:

    • Verify your Discord webhook URL in config.lua if logs are not appearing.

  • Cooldown and Timing:

    • Adjust timing variables in config.lua to match your server’s needs.

For additional support, consider consulting the inline comments in each source file.

PreviousSummaryNextFake Plates