Commands & Exports

This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.


Commands

This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.

Command
Description

/yachtMenu

Open yacht customizable menu.


Client Exports

This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.

chevron-rightIsInYachthashtag

The IsInYacht export allows you to check whether the player is currently inside a yacht. This is useful for restricting actions, triggering yacht-specific features, or applying logic only when the player is within a yacht interior.


How to Use

To verify if the player is currently inside a yacht, use the following code:

local isInYacht = exports['qs-yacht']:IsInYacht()
print("Is the player inside a yacht? " .. tostring(isInYacht))

This export returns a boolean value:

  • true → The player is currently inside a yacht.

  • false → The player is not inside any yacht.


Example Use Case

You can use this export to restrict features that should only be available inside yachts, such as opening yacht storage or interacting with yacht systems:

local isInYacht = exports['qs-yachtcreator']:IsInYacht()

if isInYacht then
    print("Player can access yacht features.")
else
    print("Player is not inside a yacht.")
end

This is especially useful for ensuring that yacht-exclusive interactions only work when the player is actually inside a yacht.

chevron-rightGetCurrentYachtIdhashtag

The GetCurrentYachtId export allows you to retrieve the unique identifier of the yacht the player is currently inside.


How to Use

To get the current yacht identifier, use the following code:

local yachtId = exports['qs-yacht']:GetCurrentYachtId()
print("Current yacht ID: " .. tostring(yachtId))

This will return the yacht ID if the player is inside a yacht, or nil if the player is not inside any yacht.

chevron-rightIsInYachtInteriorhashtag

The IsInYachtInterior export allows you to check whether the player is currently inside a yacht interior.


How to Use

To verify if the player is inside a yacht interior, use the following code:

local isInInterior = exports['qs-yacht']:IsInYachtInterior()
print("Is the player inside a yacht interior? " .. tostring(isInInterior))

This will return true if the player is inside a yacht interior, or false if they are not.

chevron-rightIsInYachtBridgehashtag

The IsInYachtBridge export allows you to check whether the player is currently inside the yacht bridge.


How to Use

To verify if the player is inside the yacht bridge, use the following code:

This will return true if the player is inside the yacht bridge, or false if they are not.

chevron-rightGetCurrentYachtDatahashtag

The GetCurrentYachtData export allows you to retrieve the full data table of the yacht the player is currently inside.


How to Use

To get the current yacht data, use the following code:

This will return the yacht data table if the player is inside a yacht, or nil if they are not.

chevron-rightGetCurrentYachthashtag

The GetCurrentYacht export allows you to retrieve the yacht entity the player is currently inside.


How to Use

To get the current yacht entity, use the following code:

This will return the yacht entity if the player is inside a yacht, or nil if they are not.