Page cover

Installation & Integration

Installation

  1. To install sd_lib, drag and drop the file into your resources folder and make sure it is started/ensured after any framework and before any of my scripts.

  2. The resources name should just be 'sd_lib' and not 'sd_lib-main' or 'sd_lib-(version)'

Example of a Server Config:

ensure qb-core
ensure ox_lib
ensure sd_lib

ensure [SD] -- Folder with all of my resources in it.

Integration

Open up the fxmanifest of the resource, you'd like to import sd_lib into and modify the shared_scripts to add '@sd_lib/init.lua' I've made some examples below.

shared_scripts { '@sd_lib/init.lua', 'client/lationiscool.lua' }

Or if you don't have any other shared_scripts, you can just do this:

shared_script '@sd_lib/init.lua'

OX Integration

Some of our modules can automatically detect ox_lib and, if available, will utilize its functions (e.g., StartProgress and ShowNotification). However, be aware that you need to manually set the variable EnableOX to true within each module. Additionally, ox_lib must be imported into both sd_lib and the resource using sd_lib.

shared_scripts {
    '@sd_lib/init.lua',
    '@ox_lib/init.lua',
} 

Last updated