qbcore-framework / qb-npwd

QBCore Compatibility Resource for NPWD
21 stars 56 forks source link

[Feature] PhoneAsItem Support #1

Closed ItsANoBrainer closed 2 years ago

ItsANoBrainer commented 2 years ago

Users will still need to enable this feature in the NPWD config.json.

BerkieBb commented 2 years ago
  1. Use the hasitem callback instead of making your own
  2. Use promises like in the hasitem function or use the hasitem function of qb-core
BerkieBb commented 2 years ago

And change the Config.PhoneList to

Config.PhoneList = {
    ['phone'] = 1,
}

To accompany for the supported format for the hasitem callback

IdrisDose commented 2 years ago

Code looks alrighty, will need testing before merging