Install Instructions

Step 1 - Install Dependencies

There is only one dependency (other resource) required to get Advanced Scuba Diving installed properly & working: ox_lib. You may already have this installed, but please double check & ensure you have the latest version by downloading the latest release package below.

Important Notice

It is vitally important to ensure you start each resource in the correct order in your server.cfg. To begin, "ox_lib" should be one of the first resources started. It should be started even before your framework (qb-core or es_extended).

Step 2 - Add Items

Next up, simply navigate to lation_diving/install/items directory (or look below this message) and find your respective inventory resource. Open the text file (or expand the drop-down menu) and copy and paste the items into your inventory resource's item directory.

Where do I add items in my inventory?

If you are unsure exactly where and how to add items into your inventory, just expand the drop down menu for your inventory and at the top will tell you where you need to copy the items too!

ox_inventory
-- Add items into ox_inventory/data/items.lua

['scuba_gear'] = {
	label = 'Scuba Gear',
	weight = 4750,
	stack = false,
	close = true
},

['diving_crate'] = {
	label = 'Crate',
	weight = 1500,
	stack = true,
	close = true
},
qb-inventory
-- Add items into [qb]/qb-core/shared/items.lua

scuba_gear = { name = 'scuba_gear', label = 'Scuba Gear', weight = 4750, type = 'item', image = 'scuba_gear.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'This looks useful' },
diving_crate = { name = 'diving_crate', label = 'Crate', weight = 1500, type = 'item', image = 'diving_crate.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'I wonder what is in here' },
qs-inventory
-- Add items into [qb]/qb-core/shared/items.lua if on QBCore
-- Add items into qs-inventory/shared/items.lua if on ESX

['scuba_gear'] = {['name'] = 'scuba_gear', ['label'] = 'Scuba Gear', ['weight'] = 4750, ['type'] = 'item', ['image'] = 'scuba_gear.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'This looks useful'},
['diving_crate'] = {['name'] = 'diving_crate', ['label'] = 'Crate', ['weight'] = 1500, ['type'] = 'item', ['image'] = 'diving_crate.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'I wonder what is in here'},

Step 3 - Add Images

Very similar to step one, except this time we will be adding the images for each item we added above into our respective inventory directories for images. Navigate to lation_diving/install/images to find all the images or download the ZIP file attached below then follow the instructions.

ox_inventory

Drag and drop the images into ox_inventory/web/images folder.

qb-inventory

Drag and drop the images into [qb]/qb-inventory/html/images folder.

qs-inventory

Drag and drop the images into qs-inventory/html/images folder.

Step 4 - Setup Config

The second to last step to get everything working for your unique server is to open the config.lua file and assign a proper value to Config.Target, as seen below:

-- Target system, available options are: 'ox_target', 'qb-target', 'qtarget', 'custom' & 'none'
-- 'custom' needs to be added to client/functions.lua
-- If 'none' then TextUI is used instead of targeting
Config.Target = 'none'

By default, the Config.Target value will be set to 'none' which means no target system will be used and instead TextUI interactions will be used. If you wish to use a targeting system instead, you must specify which target system you use from the available options listed.

Furthermore, there are countless other configurations that can be made in the config file to customize the script to your liking and fit your server's specific needs! Every option in the config is detailed with comments explaining the use & effects of each option - so please read diligently and carefully.

Step 5 - Ensure Resource

The final step is simple - drag and drop the lation_diving resource into your main resources directory or even a sub-folder. Open your server.cfg and add "ensure lation_diving" to the bottom. As mentioned above, resource start order is vitally important and you must ensure that lation_diving is started after all dependencies (and your framework).

Lastly - save, restart your server & enjoy the most premium scuba diving script on FiveM!

Optional - Enable Logging

An optional step but one many people use and enjoy is the ability to enable Discord logs via webhooks. These logs include everything from creating a group, adding and removing members, finding a crate, opening crates & more! Enabling the logging system is easy, follow these steps:

Step 1 - Create a channel

We first need a channel in our Discord server we want the logs to be sent too. This can be one channel or multiple channels for each action - that's up to you!

Step 2 - Create a webhook

Once you've created a channel (or channels) you want the logs to be sent too, click the cogwheel icon next to the channel, "Edit Channel". Then select "Integrations" then " View Webhooks".

In here we select the "New Webhook" option and click on our newly created webhook and "Copy Webhook URL".

Step 3 - Setup logs file

Take this webhook URL we copied and open logs.lua found in the root folder of lation_diving and you'll see all the available logging options. Let's enable the first one in the list, "crateFound" - we set enabled to "true" and inside the quotes ' ' for webhook = ' ' we paste our URL, so it will end up looking like this:

crateFound = {
    enabled = true,
    webhook = 'https://discord.com/api/webhooks/1193619219049361459/hcGTxI9fDKyTgh9RDBvpxvvvaJRk-kTpViXiuwJTrtuKkxQxqU51pqestZBjqIW-dSgm'
},

Step 4 - Save & restart

At this point if we save and restart our server we will now receive detailed logs into the channel we chose earlier whenever a player finds a crate! Now from here, you can either use the same webhook link for all other logs and set them to true to have all logging data go to the same channel (or enable just the ones you wish) or you can create dedicated channels for each type of log and create a unique webhook for each action - that's up to you!

Last updated