Common Issues
Crashes
My Phone crashed after a settings update!
This can sometimes happen after we change the structure of our client stored setting data. As the phone is in the beta stage, these changes can happen but are not expected to be numerous. If you experience issues after a settings update and you have previously used the phone, please follow the guide below.
- Press F8 and paste
nui_devtools
then press enter - On the header, click
application
. - On the side bar under
Storage
expand local storage as such. - Find
https://cfx-nui-npwd
- Right click and select
Clear
- Restart the resource, using
ensure npwd
Errors
Event playerJoining was not safe for net
You need to update your artifacts to a version beyond 3622
. Don’t know your artifact version? Type version
into your console.
Click here to download the latest.
No such export isPhoneVisible
You downloaded the source code and didn’t build.
Please download from the release tab and be sure you download the npwd.zip
as this is the built version.
If you want to modify the source code please see the documentation page for building.
No such export: newPlayer in resource npwd
This export is only available when the useResourceIntegration
is set to true. See here.
Cannot read properties of undefined (reading 'phone_number')
The error would look like this
This is usually caused by:
- You did not configure the
config.json
properly.- Please follow the configuration documentation again.
- You do not have a users table where you store player's identifiers.
- As of v1.04, NPWD doesn't generate one.
- You will need to install pe-core.
- You do not have a
phone_number
column.- See the sql file for an example query.
Failed to upload photo, Column 'image' cannot be null
Ensure you installed the correct version of screenshot-basic and have followed the documentation for generating an imgur token. If you have done so, then imgur may be blocked in your country. We're working on alternatives for this issue.
Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
You need to set your database collation to utf8_unicode_ci
. In future releases, we'll specify this ourselves. You can also try using this query to resolve the issue:
ALTER TABLE npwd_messages CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE npwd_messages_conversationsCONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
This error will make it so emojis show as a question mark on twitter as well.
Basic Questions
How do I open the phone?
By default, the phone opens with F1
. You can adjust it within the config.json.
Note: Once this is set, you will need to restart the server for the best results.
How do I use the phone to send a gps location to ambulance job?
We currently don’t have this functionality. We have plans to create an export to send a message so this will be possible.
How do I change the command to open the phone?
You can do so here. Just restart the resource after.
How do I set the default language?
As of v1.0.4, the only way to set the default language is by setting it here and rebuilding the phone. We are working on abstracting this to a config so this isn't required.
How do I add custom apps ?
First you'll find apps made by our community here. Make sure to download release and not source if you don't plan to edit our apps.
Please make sure you've ensured every apps BEFORE ensuring npwd like this :
ensure npwd_crypto
ensure npwd_qb_garage
ensure ...
ensure npwd
Then head out to your NPWD Phone folder, open config.json and find the line which contains :
"apps" : [],
Once you find it, add as many apps you want to use like this :
"apps" : ["pefcl", "npwd_crypto", "npwd_qb_garage", ...]
And you're free to go, enjoy your fresh new apps !