So I am having an issue (I’m not sure if it’s just me or not, hence why I’m not making another issue on github). When I unload the player on character switch, the phone data (Twitter account, messages, contacts, etc) doesn’t reset to that new/other characters.
If you are experiencing an error that somewhat looks like the following:
This is a bug in standalone configurations that we are aware of and a fix is being made for the next version. Unless you are confident with basic scripting, we suggest waiting till that update becomes available.
If you would like to work around this for now, you can enable useResourceIntegration in the config and create a resource that will call the export generatePhoneNumber and the newPlayer export.
More detailed information and examples are provided here.
I have fixed my last error it was giving me. however i am now getting this. Other scripts i have can connect to the database and use their correct things. however this script can not. Any help appreciated
the table listed in the error doesn t exist
This is an issue that we’re currently aware of and is being tracked here: https://github.com/project-error/npwd/issues/476
we don’t create a users table. This is something you created/create yourself that stores identifier information. We need a similar table so we can query your phone number or insert it into the database.
how would i go about doing this as im trying to use the phone as a standalone thing. so i dont have another script right now that would create users and that
You would need some sort of framework that stores user identifiers into the database. This is something that is relatively simple to do. I can make one within the next few days as this seems to be needed for those who use menu based servers.
There’s no point in adding something like esx or qbcore or any major framework to your server if all you want is user data stored as a menu based server.
If you would be able to make a simple framework to store userdata that would be wonderful.
Hi, you need to create column in players table “phone_number”.
Change in config.json - “useResourceIntegration”: true . So you can use newPlayer export.
Then with export exports.npwd:newPlayer you need to set the information about the player when is spawning. After that you need to update the phone_number in the database.
Try to set in config.json - “useResourceIntegration”: true and check if the error persist
can someone help me to get this to ESX as an item, i dont get how i do it. Now i have this and it dont work.
"PhoneAsItem": {
"enabled": false,
"exportResource": "es_extended",
"exportFunction": "TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)"
},```
and it dont work. please help
think you only need to have esx:getSharedObject like
“exportFunction”: “esx:getSharedObject”
thx for answer, but i get this error:
"PhoneAsItem": {
"enabled": true,
"exportResource": "es_extended",
"exportFunction": "esx:getSharedObject"
},
This isn’t how you should setup your config.json file for checking for an item. Here’s an issue that might help you get the grasp of it.
See here
If you want to use the phone as an item on a ESX server. There is the Script for this (read the readme.md):
Does it have pre-configured phone numbers for EMS, Mechanic and police?




