Power Scripts
  • 📄Home
  • 🚲Bikerack
  • 📸Bodycams
  • 📹Dashcams V2
  • 📱Encrypted Chat
  • 🔧Mechanic Tablet
  • 🏢Player Owned Offices
  • 🚢Player Owned Yachts
  • 🏠Stash Houses
  • 🔒Storage Lockers
  • 🧹Sunset Bleach
  • 📦Warehouses V2
Powered by GitBook
On this page
  • Introduction
  • Installation
  • Configuration
  • Editable files
  • functions.lua

Was this helpful?

Player Owned Yachts

PreviousPlayer Owned OfficesNextStash Houses

Last updated 1 year ago

Was this helpful?

Introduction

This script adds the ability for your players to have the chance to buy their very own private yacht

This script is written to work with and

This resource requires and

Features of Player Owned Yachts:

  • Ability to Change The Livery on Yacht.

  • Ability to Change the Light Color on the Yacht.

  • Ability for Players to share keys with friends .

  • Ability for Players to Sell their yacht to a friend.

  • Each Yacht has a boat and helicopter garage (this simply saves and retrieves the vehicle stored)

  • Each Yacht has its own outfit section for players to change outfits (requires supported clothing resource).

  • Each Yacht has its own storage space which can be configured in config (requires supported inventory resource).

This is compatible with the following inventory systems:

This is compatible with the following clothing systems:


Installation

You must have cfx-gabz-yachts resource already purchased and installed

You must edit the client.lua inside the cfx-gabz-yachts resource folder, enabling all yachts by changing all yachts from enabled = false to enabled = true.

  • Download the power_yachts from Keymaster

  • Run the .sql file in your database.

  • Add the files to your resources folder

  • Ensure that the resource file will start (either ensure your resource in the server.cfg or inside a folder which is started on server start)

  • Edit the config file to your needs

  • Restart your server


Configuration

Select the tab below for your framework to see the configuration options available.

-- QBCore Support 
enableQBCore = true

-- ESX Support
enableESX = false

-- Purchase Price of Yacht
purchasePrice = 5000000

-- Target Support 
-- Supported Resources: ox_target, qb-target
enableTarget = true

-- Resource Used for Inventories
-- Supported Resources: ox_inventory, qb-inventory, qs-inventory, chezza-inventory
inventoryResource = 'qb-inventory'

-- Max Storage In The Yacht Stash
storageAmount = 1000000

-- config to toggleProps for Renewed-Weaponscarry on enter and exit.
renewedWeapons = false

-- Enable Yacht Bartender
enableBartender = true
-- The list of items the bartender will sell
bartenderInventory = {
 {name = 'Bottle Of Beer', item = 'beer', price = 10},
}

-- Resource Used for Clothing
-- Supported Resources: rcore_clothes, illenium_appearance, qb-clothing
clothingResource = 'illenium_appearance'

-- How many days should the yacht be left before it is removed if no one has entered it?
-- Example if set to 14, the yacht will be removed if no one has entered it in 14 days
enableExpiry = true
expireDays = 14

-- This enables support for JG-Garages (not working atm)
useJGGarages = false

-- Enable JG-TextUI for Garages
useJGTextUI = true

In this section, you can edit the language if you need to translate to another language or edit the wording.

-- Language Settings
Lang = {
 ['enter_yacht'] = 'Press ~g~E~w~ To Enter Yacht\nPress ~g~H~w~ To Invite In Friends',
 ['heli_garage'] = 'Press ~g~E~w~ To Access Garage\nPress ~g~G~w~ To Store Helicopter',
 ['boat_garage'] = 'Press ~g~E~w~ To Access Garage\nPress ~g~G~w~ To Store Boat',
 ['exit_yacht'] = 'Press ~g~E~w~ To Exit Yacht',
 ['storage'] = '~w~Press ~g~E~w~ To Access Storage',
 ['management'] = '~w~Press ~g~E ~w~To Manage Yacht',
 ['clothing'] = '~w~Press ~g~E~w~ To Access Clothing',
 ['bartender'] = '~w~Press ~g~E~w~ To Access Bar',
 ['jg_garage_load'] = '[E] Open Garage',
 ['jg_garage_store'] = '[E] Store Vehicle',
}

Editable files

functions.lua

Inventory Compatibility

If you would like to edit the inventory functions, you can edit them in the functions.lua file. Default functions are as follows:

function openStorage(stashId)
 if inventoryResource == 'ox_inventory' then 
  exports.ox_inventory:openInventory('stash', {id = stashId, owner = false})
 end 

 if inventoryResource == 'chezza-inventory' then 
  TriggerEvent('inventory:openStorage', "Stash", stashId, storageAmount, 1000)
 end 

 if inventoryResource == 'quasar-inventory' then 
  local other = {}
  other.maxweight = storageAmount
  other.slots = 50 
  TriggerServerEvent("inventory:server:OpenInventory", "stash", stashId, other)
  TriggerEvent("inventory:client:SetCurrentStash", stashId)
 end

 if inventoryResource == 'qb-inventory' then 
  TriggerServerEvent("inventory:server:OpenInventory", "stash", stashId, {maxweight = storageAmount, slots = 250})
  TriggerEvent("inventory:client:SetCurrentStash", stashId)
 end
end

Clothing compatibility

If you would like to edit the clothing functions, you can edit them in the functions.lua file. Default functions are as follows:

function openClothingOutfits()
 if clothingResource == 'rcore_clothes' then
  TriggerEvent("rcore_clothes:openOutfits") 
 end

 if clothingResource == 'illenium_appearance' then
  TriggerEvent('illenium-appearance:client:openOutfitMenu')
 end
end

🚢
QBCore
ESX Legacy
ox_lib
cfx-gabz-yachts
qb-inventory
lj-inventory
ox_inventory
chezza-inventory
rcore_clothes
illenium_appearance
qb-clothing