For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

1. Insert the .sql file to your database


2. Install dependencys


3. Framework changes

QB-Framework

To make everything work with QB-Core you have to add a function to qb-core. Include it after "function self.Functions.SetPlayerData(key, val)" in Line 257.

qb-core/server/player.lua
function self.Functions.SetPhoneNumber(val)
    self.PlayerData.charinfo.phone = val
    self.Functions.UpdatePlayerData()
end

Nothing needs to be changes for ESX. 😄👍

4. Restart your server


5. Smartphone changes

Create a new folder in phone/apps/emergencyphone and copy the file sv_changenumber.lua into it which can be found in the emergencyphone folder.

Variant one:

In this variant, we used Quasar's workcalls. The advantage in this variant is that players can keep their private numbers and thus still receive private calls and messages.

So you have to set the corresponding numbers in the config of the qs-smartphone and set the Config.useQuasarWorkCalls to true in the emergencyphone.

Variant two:

In this variant, the number of a player is replaced by the control center number. Thus, no private messages or calls can be received!

  • Download qs-base and qs-fakenumber DLC for qs-smartphone and install it If you have problems installing them, please ask the support of Quasar. Those are not my scripts and I won't help you with it!

  • Config.useQuasarWorkCalls = false

  • Remove any existing workcall from the config of qs-smartphone

Add this code in npwd\dist\game\server after line 57577.

Due to the current limitation of ySeries phone, the control center numbers MUST have exactly the same format as all other numbers. If you have a prefix of 855 and a length (excluding prefix) of 6, every control center number must also be in this format.

So for 911 -> 855000911 or any other number in this format!

Last updated