Change default number
Changing the default phone number depends on your framework and requires careful attention to avoid breaking internal files, as ESX and QBCore have entirely different approaches.
Change the default phone number in ESX
In ESX, the process is straightforward. Navigate to qs-base/config.lua, where you can modify the prefix and the number of digits assigned to the player:
Change the default phone number in QBCore
In QBCore, the process is more advanced. Access qb-core/server/player.lua and locate the CreatePhoneNumber() function:
To change the prefix or number length, you can edit the first math.random value to set a fixed prefix or a dynamic one using math.random, while the second value determines the number of digits.
Example of a custom number:
This creates a phone number with the prefix 376 followed by six random digits. Adjust the values as needed to suit your server's configuration.
Last updated