FiveSoft Documentation

website·Indexed 30 days ago

https://docs.fivesoft.cc

Documentation for FiveSoft scripts and tools for FiveM servers, including guides for paid resources like FS-Pets and FS-TextUI, free scripts, and coding help for ESX Menu and FiveM natives.

Tokens
4.9K
Snippets
28
Records
45
Agent score
50%

What's inside FiveSoft

  1. Overview of fs-textui for FiveM

    fs-textui is a high-performance 3D TextUI system for FiveM designed for visual fluidity and minimal resource consumption. It utilizes GPU acceleration via CSS transform3d to prevent UI stuttering and employs a dual-thread system (Scanner + Render) for smart proximity caching, allowing it to manage hundreds of points without impacting FPS. Performance metrics are approximately 0.01ms on idle and 0.02ms - 0.04ms while active.
  2. Overview of fs-pets companion system for FiveM

    fs-pets is a comprehensive companion system for FiveM servers that allows players to adopt, raise, and care for pets. It features a rich NUI interface, real-time stat tracking, and multiplayer animation synchronization. The system is compatible with ESX and QBCore frameworks. For NPC interactions, it supports ox_target, qb-target, ox_lib TextUI, fs-textui, and native 3D draw text.
  3. Claim the customer role for support

    To receive customer support and obtain the customer role, users must verify their purchase through the following process:

    1. Join the official Discord server.
    2. Open a support ticket within the Discord server.
    3. Provide the transaction ID from the purchase made in the store, accompanied by a screenshot of the transaction.

    Staff will validate the provided data against the internal database before granting the customer role. Providing false proof of purchase will result in sanctions.

  4. Create and open a default ESX menu

    Use ESX.UI.Menu.Open to create a standard menu. It is recommended to call ESX.UI.Menu.CloseAll() before opening a new menu to ensure no other menus remain open. The function requires a menu type ('default'), a resource name, a unique menu identifier, a configuration object (title, alignment, and elements), a callback function for when an item is selected, and a callback function for when the menu is closed.
    ESX.UI.Menu.CloseAll() -- Close all open menus first
    
    ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'menuName', {
      title    = 'Your Title Here',
      align    = 'top-left', -- Position of the menu
      elements = {
        {label = 'Example 1', value = 'e1'},
        {label = 'Example 2', value = 'e2'}
      }
    }, function(data, menu)
      -- This executes when an element is selected (Enter pressed)
      if data.current.value == 'e1' then
        -- Action for Example 1
      end
      if data.current.value == 'e2' then
        print('Example 2 pressed')
      end
    end, function(data, menu)
      -- This executes when the menu is closed
      menu.close()
    end)
    
  5. Deploy and start the fs-pets resource

    Extract the archive into the server's resources directory. The folder must be named exactly fs-pets; renaming the folder will cause the resource to stop automatically. Add ensure fs-pets to your server.cfg and ensure it starts after the framework and dependencies.
    # Recommended load order in server.cfg
    ensure oxmysql
    ensure ox_lib
    ensure es_extended  # or qb-core
    ensure ox_target    # optional
    ensure fs-pets
  6. Assign a developer role to a user

    To grant a developer role to another user, a customer must complete the following sequence of steps within the official Discord server:

    1. Obtain the Customer Role: You must first acquire the customer role (refer to the 'Get Customer Role' documentation). This is a prerequisite for the subsequent steps.
    2. Open a Support Ticket: Open a ticket within the Discord server to initiate the request.
    3. Mention the Developer: Mention the specific user who should be granted the developer role within the ticket.
  7. Access Fivesoft technical support

    Technical support for Fivesoft scripts is provided exclusively via Discord. Support is available to all customers and confirmed developers (developers who have been validated by the buyer through the Fivesoft Discord). Support may be refused to non-customers, unvalidated developers, or those who violate the Terms of Service or exhibit rude behavior.
  8. Install and configure FS-TextUI on the server

    To set up the FS-TextUI resource, extract the downloaded archive into the server's resources directory. The folder must be named exactly fs-textui.

    Crucially, the resource must be started after your server framework (such as ESX or QBCore). In your server.cfg, place the ensure command below the line where your framework is started.

    ensure fs-textui
  9. Obtain FS-TextUI via Cfx.re Asset Escrow

    FS-TextUI is distributed through the Cfx.re Assets Escrow System and is bound to the Cfx.re account used during the Tebex purchase. To retrieve the files:

    1. Sign in to the Cfx.re Portal.
    2. Navigate to the 'Granted Assets' section.
    3. Locate the asset named '3D Text UI' by Fivesoft.
    4. Download the package for upload to your server.
  10. Obtain the FS-Pets script via Cfx.re Escrow

    FS-Pets is distributed through the Cfx.re Assets Escrow System and sold via Tebex Limited. To download the files, sign in to the Cfx.re Portal account used for purchase, navigate to the 'Granted Assets' section, and locate the 'Pet System' asset by Fivesoft.
  11. Install FS-Pets dependencies

    The following resources must be installed and started before fs-pets:

    • oxmysql: Required (Database driver)
    • ox_lib: Required (UI components and callbacks)
    • ox_target or qb-target: Optional (Required if NPCInteraction.Type is set to "target")
    • ox_inventory or qb-inventory: Optional (Required if using consumable items)
  12. Implement a Global Override for legacy DrawText3D calls

    To support old scripts without modifying every individual call, you can implement a global DrawText3D function at the top of your legacy client.lua. This function generates a position-based unique ID to interface with the FS-TextUI system. Note: Avoid moving text points dynamically when using this override, as the ID is tied to the position.
    function DrawText3D(x, y, z, text)
        local coords = vector3(x, y, z)
    
        -- Generates a semi-stable unique ID based on position
        local id = string.format("legacy_%s_%s", math.floor(x), math.floor(y))
    
        exports['fs-textui']:DrawText3D(coords, text, id, "E")
    end