# Installation

{% hint style="danger" %}
If you are transferring files using FTP transfer your files using [winscp ](https://winscp.net/eng/download.php)program. Filezilla transfers files as corrupted.
{% endhint %}

{% hint style="danger" %}
If you have xsound in your source files, you must remove it. Use the xsound file we provided to you.
{% endhint %}

### Step 1: File Location

* Create a \[phone] folder inside the main source file and extract the files in the zip to this folder.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FRiKMYZwkWLzEmU4eZ50x%2Ffolder.png?alt=media&#x26;token=0a865092-042f-457c-9039-f22cb3640986" alt=""><figcaption><p>Phone files should be like this among your resources.</p></figcaption></figure>

### Step 2: Insert SQL Query

* Read the **gksphone/gksphone.sql** file into your database.

{% embed url="<https://www.youtube.com/watch?v=40rEUkF2mso>" %}

### Step 3: ConifgAPI.lua Configuration

* Fill in the blanks in gksphone/configAPI.lua with discord webhook for taking photos(Don't skip without filling these sections).

{% hint style="info" %}
You can check here for all the config api functions.
{% endhint %}

{% hint style="warning" %}
If you want to use music and playtube app: you must fill Cfg.TebexTransactionID line with your [tbx-id](https://docs.gkshop.org/information/faq#i-cant-find-my-transaction-id).
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnzCIydoDTM36u1gSgRi1%2Fuploads%2FHlvEenOktwmv4IjsV1tq%2Fyeniconfigapi.png?alt=media&#x26;token=92f9bf31-b845-4169-a582-192927627d09" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you are going to use a discord webhook for your media uploads, don't forget to write your discord webhook in the Cfg.PhotoWebHook section. If you don't know how to create discord webhook, [check this page](https://hookdeck.com/webhooks/platforms/how-to-get-started-with-discord-webhooks#discord-webhooks-frequently-asked-questions).
{% endhint %}

{% hint style="success" %}
As GKSHOP, We offer Media Service so that you can better use the media services on our phone. It isn't mandatory to purchase this service, it is optional. [Purchase GKSMEDIA SERVICE](https://service.gkshop.org/package/5563991)
{% endhint %}

### Step 4: Config.lua Configuration

* You can edit the fields in **gksphone/config.lua** to the infrastructure you use and activate it according to the sound script you use and make the necessary adjustments.

{% hint style="danger" %}
Don't forget to set the **"Config.ESXVersion"** part in the config.lua file according to you. Otherwise, the phone functions won't work properly.
{% endhint %}

```lua
-- PHONE SETTINGS --

Config = Config or {}
Config.KeyMapping       = true                 --## This setting is for those using slotted inventory. (Prevents key operation)
Config.OpenPhone        = 'f1'                 --## Phone open key ## https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
Config.RegisterCommand  = "TooglePhone"        --
Config.ItemName         = {
                            "phone",
                            "pink_phone",
                            "gold_phone"
                        }
Config.ChargeItemName       = "powerbank"      -- PowerBank Item Name
Config.PropActive           = false
Config.Locale               = 'en'
Config.Fahrenheit           = false
Config.DataUsersPhoneNumber = false            -- You can use it if there is phone_number in the users table in the database.
Config.UsableItem           = true             -- If you want to use without items set it to false
Config.OxInvetory           = true             -- if you are using ox inventory set this to true
Config.AirDropID            = false            -- Activate the AirDrop feature if you want the player to see the ID.
Config.AutoMessageDelete    = true             -- Automatically deletes messages (Messages,Mail,Group Messages,Matchme Messages,Advertising)
Config.AutoDeleteTime       = 4                -- How many days ago you want to delete data
Config.TargetExport         = "qtarget"        -- exports["qtarget"]  -- Resource Name
Config.EyeTarget            = false            -- required qtarget
Config.WaitPhone            = 2                -- Cycle time when phone is on
Config.Signal               = true             -- Signal system (phone downtime in some areas)
-- PHONE SETTINGS --


-- ESX  --
Config.ESXVersion           = "Legacy"            -- ESX Version Legacy (+1.2) / OldLegacy (1.1)
Config.ESXResourceName      = "es_extended"       -- Filename of ESX Framework script
Config.ESXSharedObject      = "esx:getSharedObject"  -- ESX SharedObject Function
Config.ESXName              = "esx"            -- if you are using a different ESX name (you may need to change it)
Config.ESXLogout            = "esx:playerLogout"    --- ESX Logout trigger
Config.EsxAddonAcc          = 'esx_addonaccount:getSharedAccount'   -- if you are using a different ESX name (you may need to change it)
Config.ESXonPlayerDeath     = 'esx:onPlayerDeath'      -- Trigger to be used when the player dies
Config.ESXonPlayerSpawn     = 'esx:onPlayerSpawn'      --  The trigger that should be when the player gets revive
Config.ESXScoietyGetEmployes = "esx_society:getEmployees"   -- ESX Scoiety Adjust the triggers accordingly if they are different for you.
Config.ESXScoietyGetJob      = "esx_society:getJob"         -- ESX Scoiety Adjust the triggers accordingly if they are different for you.

-- ESX --


-- SETTINGS REQUIRED TO SPEAK VOICE --


Config.MumbleExport         = "mumble-voip"       -- exports["mumble-voip"]
Config.PMAVoiceExport       = "pma-voice"         -- exports["pma-voice"]
Config.PMAVoice         = true                   -- Use Pma-Voice Resource (Recomended!) https://github.com/AvarianKnight/pma-voice
Config.UseMumbleVoIP    = false                   -- Use Frazzle's Mumble-VoIP Resource https://github.com/FrazzIe/mumble-voip
Config.UseTokoVoIP      = false
Config.SaltyChat        = false                   -- SaltyChat (v2.6)


--- ## CALL COMMAND ### ---

Config.OnlineContactPlayers = false    -- Activate to see active players in the contacts

Config.CallAnswer = "answer"  -- quick answer (registercommand)
Config.EndCall = "endcall"  -- to close call (registercommand)

Config.SpecificNumberOn = false  --- If you want the SpecificNumber function to work, enable it
 -- When this number is called the trigger on the doc page will work.
 -- server : https://docs.gkshop.org/gksphone/developers/server-event#specific-number
 -- client : https://docs.gkshop.org/gksphone/developers/client-event#specific-number
Config.SpecificNumber = {
    ["5555555"] = true
}


-- APP SETTINGS --

Config.TaxiPrice        = 75      -- Taxi Price ( 75$/KM )
Config.TaxiJobCode      = "taxi"  -- Job Code

-- ### BANK APP ### ---
Config.BankTransferCom  = 10     -- Bank transfer commission rate
Config.OfflineBankTransfer = true

---### Dispatch ### ---
Config.cdDispatch       = false  -- Activate if you are using Codesign Dispatch (https://codesign.pro/package/4206357)

-- ### VALE APP ### ---
Config.OwnedVehicles        = "owned_vehicles"    -- ## SQL TABLE NAME (VEHICLES)
Config.ValetOut             = "OUT"               -- ## GARAGE IN OUT OPTION
Config.ValePrice            = 100                 -- Vale Price
Config.ValeNPC              = false                -- Activate if you want the valet to bring the car to you.
Config.ImpoundVale          = true                -- Set to true to not fetch impounded cars


Config.cdGarages            = false   -- Activate if you are using Codesign Garage (https://codesign.pro/package/4206352)
Config.loafGarages          = false   -- Activate if you are using Loaf Garage (https://store.loaf-scripts.com/package/4310876)

Config.ClassList = {
    [0] = "Compact",
    [1] = "Sedan",
    [2] = "SUV",
    [3] = "Coupe",
    [4] = "Muscle",
    [5] = "Sport Classic",
    [6] = "Sport",
    [7] = "Super",
    [8] = "Motorbike",
    [9] = "Off-Road",
    [10] = "Industrial",
    [11] = "Utility",
    [12] = "Van",
    [13] = "Bike",
    [14] = "Boat",
    [15] = "Helicopter",
    [16] = "Plane",
    [17] = "Service",
    [18] = "Emergency",
    [19] = "Military",
    [20] = "Commercial",
    [21] = "Train"
}

-- ## CAR SELLER ## --
Config.OfflineCarSeller = true
Config.DefaultGarage = "pillboxgarage"  -- The garage where the car will go when a car is purchased
Config.Carhashdebug = false  -- car hash (f8)
Config.CarsellerTax = 10
Config.CarsSellerBlacklist = {
    [-16948145] = false, -- car hash and true/false
    [-344943009] = false
}

Config.CarSellerClassBlock = {
    ["Emergency"] = true
}



-- ### House APP ### ---
Config.loafHouse          = false   -- Activate if you are using Loaf House (https://store.loaf-scripts.com/package/4310850)


-- ### Advertising APP ### ---
Config.AdvertisingPrice = 300
Config.AdvertisingSendBlockCommand = "blockAdd" -- (/blockAdd true/false)


-- ### Twitter APP ### ---
Config.TwitterVerifyCommand = "twitterverify"
Config.TwitterSendBlockCommand = "blockTwitter" -- (/blockTwitter true/false)


-- ### SnapGram APP ### ---
Config.InstagramVerifyCommand = "instagramverify"
Config.InstagramSendBlockCommand = "blockInstagram" -- (/blockInstagram true/false)

-- ### Race APP ### ---
Config.RaceAutCommand = "raceaut"
Config.esxcoreaut = "admin"  --- esx 1.2 authorization system

-- ### Charge ### --- (/charge playerid charge(0-100))
Config.ChargeAutCommand = "charge"
Config.esxcorechargeaut = "admin"  ---  esx 1.2 authorization system

-- ### Number Change ### ---
Config.NewNumberChange = "phonenumberchange" -- /phonenumberchange playerid newnumber

-- APP SETTINGS --


--## PHONE Box --##
Config.PhoneBox = true
Config.PhoneBoxKey = "E"
Config.PhoneBoxRegCom = "phonebox"
Config.PhoneBoothMoney = { actived = true, money = 500 }
Config.PhoneBoothModel = {
	[1281992692] = true,
    [1158960338] = true,
    [295857659] = true,
    [-78626473] = true,
    [-2103798695] = true,
    [1511539537] = true,
    [-1559354806] = true
}
Config.PhoneBootNumber = "22222"


--## Crypto ##--

Config.Crytos = {
    ["bitcoin"] = true,
    ["ethereum"] = true,
    ["tether"] = true,
    ["binance-usd"] = true,
    ["uniswap"] = true,
    ["binancecoi"] = true,
    ["terra-luna"] = true,
    ["avalanche-2"] = true,
    ["cardano"] = true,
    ["ripple"] = true,
    ["usd-coin"] = true,
    ["dogecoin"] = true,
    ["litecoin"] = true,
    ["chainlink"] = true,
    ["stellar"] = true,
    ["tron"] = true,
    ["eos"] = true,
    ["monero"] = true,
    ["iota"] = true
}

---##  Spam ## ---

Config.SpamLimit = 6  -- Default: 6
Config.SpamReset = 10  -- seconds
Config.SpamPlayerKick = true
Config.SpamDropPlayer = "You were kicked from the server for spamming too much"



--- ### FREAMWORK ### ----

ESX = nil
pcall(function() ESX = exports[Config.ESXResourceName]:getSharedObject() end)
if ESX == nil then
    TriggerEvent(Config.ESXSharedObject, function(obj) ESX = obj end)
end


-- ### Business APP ### ---


-- JOBs that will use the Business APP
Config.UseBusinessJobs = {
    mechanic = true,
    ambulance = true,
    police = true
}


Config.UseBillingCommission = true  -- Invoice commission true/false
-- This is a percentage (0.10) == 10% ( Must be active to receive commission - If the player is not in the game, she/he cannot receive a commission.)
Config.BillingCommissions = { 
    mechanic = 0.10,
    police = 0.25
}

-- People who can use the application at a high level (jobs and lowest rank) 
Config.JobGrade  = { 
    ["police"] = 3,
    ["ambulance"] = 2,
    ["mechanic"] = 2
}

--- ## Live APP --- ##

Config.LiveAPPDonateTax = 0.20 -- deduction rate from incoming money
```

<table><thead><tr><th width="267">Code Block</th><th width="251.33333333333331">Value</th><th>Explanation</th></tr></thead><tbody><tr><td>Config.EsxVersion</td><td>Legacy / OldLegacy</td><td>You need to set to your ESX version.</td></tr><tr><td>Config.PMAVoice </td><td>true / false</td><td>Set true if you are using</td></tr><tr><td>Config.UseMumbleVoIP</td><td>true / false</td><td>Set true if you are using</td></tr><tr><td>Config.UseTokoVoIP</td><td>true / false</td><td>Set true if you are using</td></tr><tr><td>Config.SaltyChat</td><td>true / false</td><td>Set true if you are using</td></tr><tr><td>Config.OnlineContactPlayers</td><td>true / false</td><td>Set true if you are using</td></tr><tr><td>Config.CallAnswer</td><td>answer</td><td>Answer registercommand</td></tr><tr><td>Config.EndCall</td><td>endcall</td><td>Endcall registercommand</td></tr></tbody></table>

### Step 5: Polyzone

{% hint style="info" %}
If you want to use the phone's signal feature, don't forget to use the polyzone script.
{% endhint %}

{% embed url="<https://github.com/mkafrin/PolyZone>" %}

### Step 6: Server.cfg Configuration

```markdown
ensure gks_gotur
ensure gks_racing
ensure xsound
ensure gks_ebay
ensure gksphone
ensure gks_rentacar
```
