This is a compatibility resource that enables npwd to function properly with qb-core. Please ensure that you have the latest release of npwd and qb-core installed
- Download this repository and place it in the
resources
directory - Run the
patch.sql
to patch the database for npwd - Add
ensure qbx-npwd
to yourserver.cfg
(Start this resource afterqb-core
andox_inventory
and beforenpwd
have been started)
If you wish to require a player to have a phone item in their inventory, you must follow the steps below.
- Navigate to the
config.json
innpwd
and change the following settings underPhoneAsItem
:
"PhoneAsItem": {
"enabled": true,
"exportResource": "qbx-npwd",
"exportFunction": "HasPhone"
},
- Also in the
config.json
innpwd
change the following settings underdatabase
:
"database": {
"playerTable": "players",
"identifierColumn": "citizenid",
},
- Navigate to the
config.lua
inqbx-npwd
and verify all the items you want to work as a phone are listed.
- Double clicking any phone items in the inventory will open the phone. If you want to be able to drag and drop phone items over the Use button in the inventory, you must navigate to
qb-core/shared/items.lua
, find your phone item, and changeusable
totrue
andshouldClose
totrue
.