Commands#
Yacht Creator keeps its commands to a minimum — the shop is opened at the dealer and everything else happens on board.
Command | Who | Description |
|---|---|---|
| Owner and key holders, on their yacht | Opens Yacht Management: keys, upgrades, radio, cameras, lights, decorating, wardrobe and storage placement, transfer and sale. |
| Any player, when Tebex is enabled | Checks a Tebex transaction ID and saves it to the player, so it fills in the Yacht Shop automatically. The name comes from |
| Only with Config.Debug = true | Spawns a local Aquarius on a berth (slot 35 by default) for testing. Only you see it and nothing is saved. |
Some chat resources keep the keyboard focused after a command. If
/yachtMenuopens but does not take the mouse, close the chat first or bind the command to a key with your keybinding resource.
Client Exports#
For checking from your own scripts where a player is — to block a garage, a phone app or a job action on a yacht, or to point a waypoint at one.
IsInYacht
Returns true while the player is within a yacht's area (500 m around it), on deck, inside or on the water nearby.
if exports['qs-yacht']:IsInYacht() then
print('The player is at a yacht')
endGetCurrentYachtId
The slot ID (0 – 41) of the yacht the player is at, or nil.
local yachtId = exports['qs-yacht']:GetCurrentYachtId()
print('Current yacht: ' .. tostring(yachtId))GetCurrentYachtData
What the player's client knows about the yacht they are at, or nil:
local data = exports['qs-yacht']:GetCurrentYachtData()
-- {
-- id = 12, -- slot ID
-- haskey = true, -- owner or key holder
-- isOfficialOwner = false, -- the owner themselves
-- upgrades = { 'vault' }, -- installed upgrades
-- locations = { stash = {...}, wardrobe = {...} }
-- }
if data and data.haskey then
-- let them use your yacht feature
endGetYachtWaypoint
The position of any yacht slot, owned or not — handy for a GPS, a taxi boat or a delivery job.
local pos = exports['qs-yacht']:GetYachtWaypoint(12) -- { x, y, z } or nil
if pos then
SetNewWaypoint(pos.x, pos.y)
endinDecorate
Returns true while the player is in the decorator. Use it to keep your HUD, phone or keybinds out of the way.
if exports['qs-yacht']:inDecorate() then return endClient Events#
Open the decorator
Opens the decorator on the yacht the player is at, if they are its owner or hold a key — the same as Decorate Yacht in the menu. Useful for a radial menu or a laptop prop.
TriggerEvent('yacht:decorate:open')Show a Yacht Creator notification
-- client
TriggerEvent('yacht:notification', 'Welcome aboard!', 'success') -- 'info' | 'error' | 'success'
-- server
TriggerClientEvent('yacht:notification', source, 'Welcome aboard!', 'info')Server Side#
Yacht Creator has no server exports. Ownership, keys and money are handled by the framework bridge in custom/esx/server.lua or custom/qb/server.lua, and the data lives in the qs_yachts and qs_yacht_keys tables, so another resource can read who owns which yacht directly:
-- Every yacht a player owns or holds a key for
local rows = MySQL.query.await([[
SELECT y.yacht_id, y.name, y.owner
FROM qs_yachts y
WHERE y.owner = ?
OR EXISTS (SELECT 1 FROM qs_yacht_keys k WHERE k.yacht_id = y.yacht_id AND k.identifier = ?)
]], { identifier, identifier })


