Whitigol Documentation

website·Indexed 31 days ago

https://docs.whitigol.me/

Documentation for a suite of FiveM development tools, including fivem-compiler for script compilation, create-fivem for bootstrapping scripts in TypeScript, JavaScript, or Lua, the DevMate development tool for resource creation and server management, and wLauncher (v1), a customizable FiveM launcher.

Tokens
5.3K
Snippets
26
Records
53
Agent score
52%

What's inside Whitigol

  1. Overview of fivem-compiler

    fivem-compiler is a build tool designed to optimize the development of FiveM scripts. It supports JavaScript, TypeScript, and Lua, providing rapid compilation and incremental recompilation. It is specifically designed to handle both server/client scripts and NUI interfaces built with HTML, React, or Vue.
  2. Overview of wLauncher (v1) features

    wLauncher (v1) is a FiveM launcher designed for simplicity and performance. Key features include:

    • Multi-Server Support: Manage multiple servers within one interface.
    • Per-Server Nicknames: Ability to set a unique nickname for every server joined.
    • Profile Exporting: Share server profiles with others while keeping sensitive server information private.
    • Live Server Info: Real-time player count and server status visibility.
    • Customization: Support for various themes and customizable behavior.
    • Automatic Updates: The application automatically checks for and installs updates.
  3. Overview of DevMate development tool

    DevMate is a comprehensive development suite for FiveM designed to simplify resource creation, server management, and debugging. It is intended for server owners, developers, and administrators to enhance their development workflow.
  4. Overview of manual installation for fivem-compiler

    The fivem-compiler can be manually installed and configured in an existing project for developers who need more control over the initial setup or are integrating the compiler into an existing development workflow. While manual installation is available, the recommended method for the smoothest setup experience is using the create-fivem tool.
  5. Manage scripts with the Resource Manager

    The Resource Manager provides an in-game UI to start, stop, or restart scripts. It includes a 'Safe Restart' feature that minimizes client crashes by ensuring props, vehicles, and maps are properly unloaded before the restart. The manager also tracks the last restarted script for quick access.
  6. Install fivem-compiler and TypeScript dependencies

    To manually set up a FiveM project with TypeScript using the fivem-compiler, install the compiler along with the necessary CitizenFX types and Node.js types as development dependencies.
    npm i @whitigol/fivem-compiler @citizenfx/client @citizenfx/server @types/node --save-dev
  7. Enforce required plugins for wLauncher server profiles

    To ensure compatibility, you can require specific client-side mods or DLLs in a server profile. If a user is missing a required plugin, wLauncher will prompt them to download it before launching the game.

    Each required plugin requires the following fields:

    • Plugin File Name: The exact, case-sensitive filename (e.g., SirenSetting_Limit_Adjuster.asi).
    • Download URL: A direct link to the file. This must be a direct download link, not a link to a landing page.
    1. Scroll to the Required Plugins section at the bottom of the profile editor.
    2. Click Add Required Plugin.
    3. Fill out the Plugin File Name and Download URL.
    4. Repeat for additional plugins.
  8. Bootstrap a FiveM script using create-fivem

    create-fivem is a CLI tool that scaffolds a new FiveM script project. It supports TypeScript, JavaScript, and Lua and comes pre-configured with the @whitigol/fivem-compiler for development and deployment.

    Requirements:

    • Node.js 18 or newer
    • A Node.js package manager (npm, pnpm, bun, or yarn)
    npm create fivem@latest
  9. Best practices for configuring DevMate

    To ensure server stability and security when configuring DevMate:

    1. Start with default settings and make incremental adjustments.
    2. Test all permission changes in a development environment before deploying to production.
    3. Use the EventWatcher and Discord integration to monitor server health and errors.
    4. Limit access to dangerous tools like CodeExecuter.
    5. Maintain backups of the configuration file before making major changes.
  10. Install DevMate on a FiveM server

    To install DevMate, download the resource from the Big Daddy Scripts Account Page. Extract the .zip file and place the DevMate folder into your server's resources directory.

    Critical: Do not rename the DevMate folder, as this will cause the script to malfunction.

  11. Set up the recommended project structure for TypeScript

    For a standard fivem-compiler TypeScript project, organize your files as follows:

    1. Create a src folder in the project root.
    2. Inside src, create two subfolders: client and server.
    3. Create an index.ts file in both src/client and src/server to serve as the entry point scripts for their respective environments.
    4. Create a separate tsconfig.json file within both the client and server folders to handle environment-specific TypeScript configurations.
  12. Access server files via Resource Explorer

    The Resource Explorer simulates an FTP connection, allowing developers to edit configurations and resolve issues within a VS Code interface without exposing server credentials.

    Security Warning: This feature allows users to see and modify all resources on the server. Only grant this permission to trusted administrators.