QB-Core Integration
Dependencies
Below are a list of dependencies, outside of the standard installation, for NPWD to work with a QB-Core server.
- qb-npwd
- Required for NPWD to work with
QB-Coreusing thenewPlayerexport. - Pre-configured phone as an item.
- Required for NPWD to work with
- QB-Core
Initial Setup
The following steps are required for qb-npwd to function correctly with NPWD and qb-core. Follow each step exactly as shown.
danger
Failure to adhere to these instructions will result in NPWD not working correctly.
- Adjust the config.json file in NPWD to match the example below.
"PhoneAsItem": {
"enabled": true,
"exportResource": "qb-npwd",
"exportFunction": "HasPhone"
},
"general": {
"useResourceIntegration": true,
"toggleKey": "f1",
"toggleCommand": "phone"
},
"database": {
"useIdentifierPrefix": false,
"playerTable": "players",
"identifierColumn": "citizenid",
"identifierType": "license",
"profileQueries": true,
"phoneNumberColumn": "phone_number"
},
- Run the
patch.sql, located inqb-npwd, on your database. This will add thephone_numbercolumn to theplayerstable. - Verify your resource start order in your
server.cfgresembles the example found within the installation page.
Configuration
By default, only the phone item in your inventory will allow you to open the phone. You can add/remove phone items in the config.lua in qb-npwd.
Final Notes
As a reminder, qb-npwd will not support any non official versions of QB-Core.