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-core
- Required for NPWD to work with
QB-Core
using thenewPlayer
export. - Make sure to ensure
qb-npwd
beforenpwd
- Required for NPWD to work with
info
If you wish to add the phone as a required item, you can see an example in this resource.
Initial Setup
The following steps are required for NPWD. Follow each step exactly as shown.
danger
Failure to adhere to these instructions will result in NPWD not working correctly.
In your server.cfg
, add the following:
- Run the sql query below. This will add the
phone_number
column to theplayers
table.
ALTER TABLE players ADD COLUMN `phone_number` VARCHAR(20) DEFAULT NULL;
- Set the
npwd:framework
convar in yourserver.cfg
set npwd:framework qbcore
Phone item check
Dependencies
Below are a list of dependencies, outside of the standard installation, for NPWD to work with a QB-Core server if you choose this option.
- qb-npwd
- Required for NPWD to work with
QB-Core
using thenewPlayer
export. - Pre-configured phone as an item
- MUST be ensured before
npwd
- Required for NPWD to work with
danger
You CANNOT use the convar set npwd:framework qbcore
if you choose to use qb-npwd
If you wish to check for a phone as an item, you must either add the functionality yourself using our client exports.
- 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"
},
- Adjust the config.json file in NPWD to match the example below.
"PhoneAsItem": {
"enabled": true,
"exportResource": "qb-npwd",
"exportFunction": "HasPhone"
},