# Documentation

## How do I send an ambulance dispatch after die? <a href="#how-do-i-send-an-ambulance-dispatch-after-die" id="how-do-i-send-an-ambulance-dispatch-after-die"></a>

{% tabs %}
{% tab title="Qb" %}
{% hint style="danger" %}
The sample code below is adapted for **qb-ambulancejob** only If you have a different script, you have to adapt it yourself.
{% endhint %}

{% hint style="success" %}
Find the `"hospital:server:ambulanceAlert"` function in **qb-ambulancejob/client/dead.lua and laststand.lua** then replace it with the following code.
{% endhint %}

```lua
local reportMessage = "Report Message"
local reportPhoto = "Image Link" or nil
local job = "ambulance" -- job code
local anonymous = false -- or true

exports["gksphone"]:SendReport(reportMessage, reportPhoto, job, anonymous)
```

{% endtab %}

{% tab title="ESX" %}
{% hint style="danger" %}
The sample code below is adapted for esx\_ambulancejob only If you have a different script, you have to adapt it yourself.
{% endhint %}

{% hint style="success" %}
Find the `SendDistressSignal()` function in **esx\_ambulancejob/client/main.lua** and replace it with the following code.
{% endhint %}

```lua
function SendDistressSignal()
    local label = "Emergency aid notification"
    local job = "ambulance"
    exports["gksphone"]:SendReport(label, nil, job, false)
end
```

{% endtab %}
{% endtabs %}

## How do I set the visibility of apps by jobs? <a href="#how-do-i-set-the-visibility-of-apps-by-jobs" id="how-do-i-set-the-visibility-of-apps-by-jobs"></a>

You can make the application you want visible to some jobs and invisible to others.

{% hint style="success" %}
To make it visible, you must add it to the allowjob section as in the example below.
{% endhint %}

{% hint style="danger" %}
To make it invisible, you must make the same addition to the blockedjobs section.
{% endhint %}

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FxEWr5AexAuH2IRxzuqmc%2Fimage.png?alt=media&#x26;token=15a83bd4-4d37-41ee-a353-d0ef73145689" alt=""><figcaption><p>gksphone\config\config.json</p></figcaption></figure>

## How to add filter in Advertising? <a href="#how-to-add-filter-in-a-dvertising" id="how-to-add-filter-in-a-dvertising"></a>

To add filters to the Advertising application, you can add filters like the examples below.

{% hint style="danger" %}
The order of the categories you write should be "jobname: filtername".
{% endhint %}

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FvGk4RjJHJXakbfjToVX8%2Fimage.webp?alt=media&#x26;token=35859951-6f8f-47a1-9869-af06258c8d3e" alt=""><figcaption><p>gksphone\config\config.json</p></figcaption></figure>

## How do I add new jobs to Business invoices in Bank/billing App? <a href="#how-do-i-add-new-jobs-to-business-invoices-in-business-app" id="how-do-i-add-new-jobs-to-business-invoices-in-business-app"></a>

Here you can add new jobs to commercial invoices in the invoice creation in the bank application.\
(gksphone/config/config.json)

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FAjaWQCVSK4qSeGkKXNCj%2Fimage.png?alt=media&#x26;token=1323ace5-78c3-41b5-8f7d-d82c069a30c0" alt="gksphone/config/config.json"><figcaption></figcaption></figure>

## What are the registercommands on the phone? <a href="#what-are-the-registercommands-on-the-phone" id="what-are-the-registercommands-on-the-phone"></a>

| RegisterCommand                                | Function                                                                                                                                                |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /phone                                         | Allows you to turn on the phone                                                                                                                         |
| /delphone                                      | It is used when the phone prop gets buggy                                                                                                               |
| /twitterverify none/blue/yellow username       | Giving/Receiving a tick to a Squawk user                                                                                                                |
| /blocktwitter true/false                       | You can block sharing on Squawk                                                                                                                         |
| /bantwitter true/false username                | You can ban or unlock a squawk user's account                                                                                                           |
| /phonenewnumber id newphonenumber              | You can give a person a unique phone number. (The person who is given a private number can use the new number by selecting it from the SIM application) |
| /adminauth true/false                          | So you can delete unwanted squawks, ads, snapgram                                                                                                       |
| /phonechangenumber phoneID oldNumber newNumber | to change a phone number                                                                                                                                |
| /chargephone playerSource 0-100                | change phone charge percentage                                                                                                                          |
| /snapgramVerify none/blue username             | Giving/Receiving a tick to a Snapgram user                                                                                                              |

## **How to fix license error or config.json file?** <a href="#how-to-fix-license-error-or-config.json-file" id="how-to-fix-license-error-or-config.json-file"></a>

{% hint style="info" %}
Check your config.json file. There may be a mistake. You can repair or see your error on this page. <https://jsonformatter.curiousconcept.com/>
{% endhint %}

## How to set E-SIM operator names and package contents? <a href="#how-to-set-e-sim-operator-names-and-package-contents" id="how-to-set-e-sim-operator-names-and-package-contents"></a>

Open the gksphone/config/config.lua file and change the names of the places indicated by the arrows in the picture below.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FwMEtl9cokxj54McGKdvV%2Fimage.png?alt=media&#x26;token=4e2a6606-bfbe-4a06-a9b7-cc532e55955c" alt=""><figcaption><p>gksphone/config/config.lua</p></figcaption></figure>

| Key       | Value                                                                            |
| --------- | -------------------------------------------------------------------------------- |
| name      | You can write the package name here                                              |
| label     | You can write the package name here                                              |
| sms       | If the SMS in the package runs out, the fee charged by your bank per SMS         |
| call      | If the Call/Min in the package runs out, the fee charged by your bank per SMS    |
| internet  | If the Internet/GB in the package runs out, the fee charged by your bank per SMS |
| newnumber | Fee for ordering a new number from the SIM application                           |

{% hint style="danger" %}
After the operator names are changed, you need to edit the operator names in the package names!

Editing the package contents is your own personal preference.
{% endhint %}

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FKt1k3H4kFcbspepZZj3D%2Fimage.png?alt=media&#x26;token=8b7d3c1b-4674-4dbc-9171-dc48e02a074b" alt=""><figcaption><p>gksphone/config/config.lua</p></figcaption></figure>

{% hint style="danger" %}
The places marked with arrows must be the same as the operator names you edited, marked with arrows in the first picture. Package names, prices and contents are your own choice.
{% endhint %}

## Setting charge usage

You can set the "ChargeMillisecond" option to how many milliseconds it will take to lose 1% charge.  `(gksphone\config\charge\config.lua)`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2F5ZFT4WwUd2Ij1PcQFPXd%2Fimage.png?alt=media&#x26;token=6067e67b-f71f-4978-97bd-9379b331ec98" alt=""><figcaption><p>gksphone\config\charge\config.lua</p></figcaption></figure>
