# QBox

You will receive the script in [`keymaster.fivem.net`](https://keymaster.fivem.net/asset-grants) profile, after this click in blue "download" button.

After download, put the script in your server files.

{% hint style="warning" %}
Remeber:

You need to be logged with the same cfx.re account you used to buy in my tebex store.
{% endhint %}

1. Install all [dependencies](#dependencies-part), and follow their respective installation instructions.

## Dependencies Part

* [**qbx-core**](https://github.com/Qbox-project/qbx_core)
* [**oxmysql**](https://github.com/overextended/oxmysql)
* [**qb-crypto**](https://github.com/qbcore-framework/qb-crypto) **( optional or similar )**
* [**qb-houses**](https://github.com/qbcore-framework/qb-houses) **( optional or similar )**
* [**qb-lapraces**](https://github.com/qbcore-framework/qb-lapraces) **( optional or similar )**
* [**screenshot-basic**](https://github.com/citizenfx/screenshot-basic)&#x20;
* [**xsound**](https://github.com/Xogy/xsound)

Download all the scripts by clicking on their respective names, put them in the server files and ensure in server.cfg

## Webhooks

JPR Phone System uses webhooks for photo system, video system and audios files.\
All you need to do is replace the default webhooks, via config.lua\
\
Our log system works for regular players as well as more detailed logs for staff.

<figure><img src="https://3317815405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAcw6nAW8IGe15skCfMoj%2Fuploads%2F7AqHe6zeCeThuXFscKK6%2FCaptura%20de%20ecr%C3%A3%202023-05-25%20150122.png?alt=media&#x26;token=50e5c67e-ecea-4235-949e-b466fbc7527d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more info how to create a discord webhook follow this tutorial:\
<https://www.youtube.com/watch?v=fKksxz2Gdnc&t=7s&ab_channel=NoIntroTutorials>
{% endhint %}

## Integration with the home system

The JPR Phone System offers unique phones, so we have to get the information of the properties bought from the original buyer of the phone and not from the player who is using the phone, so we only need to little edits to the script.

{% tabs %}
{% tab title="QB-Houses" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "qb-houses"
```

Edit server side file of **QB-Houses**, add this:

```lua
QBCore.Functions.CreateCallback('jpr-phonesystem:server:GetPlayerHouses', function(source, cb, serie)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    local MyHouses = {}
    local CitizenId = MySQL.query.await('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        local result = MySQL.query.await('SELECT * FROM player_houses WHERE citizenid = ?',
            {CitizenId[1].citizenid})
        local DonoData = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?', {CitizenId[1].citizenid})
        if result and result[1] and DonoData[1] then
            local nome = DonoData[1]
            DonoData = json.decode(DonoData[1].charinfo)
            for k, v in pairs(result) do
                MyHouses[#MyHouses+1] = {
                    name = v.house,
                    keyholders = {},
                    owner = CitizenId[1].citizenid,
                    price = Config.Houses[v.house].price,
                    label = Config.Houses[v.house].adress,
                    tier = Config.Houses[v.house].tier,
                    garage = Config.Houses[v.house].garage
                }

                if v.keyholders ~= "null" then
                    v.keyholders = json.decode(v.keyholders)
                    if v.keyholders then
                        for _, data in pairs(v.keyholders) do
                            local keyholderdata = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?',
                                {data})
                            if keyholderdata[1] then
                                keyholderdata[1].charinfo = json.decode(keyholderdata[1].charinfo)

                                local userKeyHolderData = {
                                    charinfo = {
                                        firstname = keyholderdata[1].charinfo.firstname,
                                        lastname = keyholderdata[1].charinfo.lastname
                                    },
                                    citizenid = keyholderdata[1].citizenid,
                                    name = keyholderdata[1].name
                                }
                                MyHouses[k].keyholders[#MyHouses[k].keyholders+1] = userKeyHolderData
                            end
                        end
                    else
                        MyHouses[k].keyholders[1] = {
                            charinfo = {
                                firstname = DonoData.charinfo.firstname,
                                lastname = DonoData.charinfo.lastname
                            },
                            citizenid = CitizenId[1].citizenid,
                            name = nome.name
                        }
                    end
                else
                    MyHouses[k].keyholders[1] = {
                        charinfo = {
                            firstname = DonoData.charinfo.firstname,
                            lastname = DonoData.charinfo.lastname
                        },
                        citizenid = CitizenId[1].citizenid,
                        name = nome.name
                    }
                end
            end

            SetTimeout(100, function()
                cb(MyHouses)
            end)
        else
            cb({})
        end
    else
        cb({})
    end
end)

QBCore.Functions.CreateCallback('jpr-phonesystem:server:GetHouseKeys', function(source, cb, serie)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    local MyKeys = {}
    local CitizenId = MySQL.query.await('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        local result = MySQL.query.await('SELECT * FROM player_houses', {})
        for _, v in pairs(result) do
            if v.keyholders ~= "null" then
                v.keyholders = json.decode(v.keyholders)
                for _, p in pairs(v.keyholders) do
                    if p == CitizenId[1].citizenid and (v.citizenid ~= CitizenId[1].citizenid) then
                        MyKeys[#MyKeys+1] = {
                            HouseData = Config.Houses[v.house]
                        }
                    end
                end
            end

            if v.citizenid == CitizenId[1].citizenid then
                MyKeys[#MyKeys+1] = {
                    HouseData = Config.Houses[v.house]
                }
            end
        end
    end
    cb(MyKeys)
end)

QBCore.Functions.CreateCallback('jpr-phonesystem:server:TransferCid', function(_, cb, NewCid, house)
    local result = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?', {NewCid})
    if result[1] then
        local HouseName = house.name
        housekeyholders[HouseName] = {}
        housekeyholders[HouseName][1] = NewCid
        houseownercid[HouseName] = NewCid
        houseowneridentifier[HouseName] = result[1].license
        MySQL.update(
            'UPDATE player_houses SET citizenid = ?, keyholders = ?, identifier = ? WHERE house = ?',
            {NewCid, json.encode(housekeyholders[HouseName]), result[1].license, HouseName})
        cb(true)
    else
        cb(false)
    end
end)
```

{% endtab %}

{% tab title="PS-Housing" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "ps-housing"
```

Edit server side file of **PS-Housing**, add this:

```lua
QBCore.Functions.CreateCallback('jpr-phonesystem:server:GetPlayerHouses', function(source, cb, serie)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    local MyHouses = {}
    local CitizenId = MySQL.query.await('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        local result = MySQL.query.await('SELECT * FROM properties WHERE owner_citizenid = ?',
            {CitizenId[1].citizenid})
        local DonoData = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?', {CitizenId[1].citizenid})
        if result and result[1] and DonoData[1] then
            local nome = DonoData[1]
            DonoData = json.decode(DonoData[1].charinfo)
            for k, v in pairs(result) do
                MyHouses[#MyHouses+1] = {
                    name = v.property_id,
                    keyholders = {},
                    owner = CitizenId[1].citizenid,
                    label = v.street,
                    tier = v.shell,
                }

                if v.has_access ~= "null" then
                    v.has_access = json.decode(v.has_access)
                    if v.has_access then
                        for _, data in pairs(v.has_access) do
                            local keyholderdata = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?',
                                {data})
                            if keyholderdata[1] then
                                keyholderdata[1].charinfo = json.decode(keyholderdata[1].charinfo)

                                local userKeyHolderData = {
                                    charinfo = {
                                        firstname = keyholderdata[1].charinfo.firstname,
                                        lastname = keyholderdata[1].charinfo.lastname
                                    },
                                    citizenid = keyholderdata[1].citizenid,
                                    name = keyholderdata[1].name
                                }
                                MyHouses[k].keyholders[#MyHouses[k].keyholders+1] = userKeyHolderData
                            end
                        end
                    else
                        MyHouses[k].keyholders[1] = {
                            charinfo = {
                                firstname = DonoData.charinfo.firstname,
                                lastname = DonoData.charinfo.lastname
                            },
                            citizenid = CitizenId[1].citizenid,
                            name = nome.name
                        }
                    end
                end
            end

            SetTimeout(100, function()
                cb(MyHouses)
            end)
        else
            cb({})
        end
    else
        cb({})
    end
end)

QBCore.Functions.CreateCallback('jpr-phonesystem:server:GetHouseKeys', function(source, cb, serie)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    local MyKeys = {}
    local CitizenId = MySQL.query.await('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        local result = MySQL.query.await('SELECT * FROM properties', {})
        for _, v in pairs(result) do
            if v.has_access ~= "null" then
                v.has_access = json.decode(v.has_access)
                for _, p in pairs(v.has_access) do
                    if p == CitizenId[1].citizenid and (v.citizenid ~= CitizenId[1].citizenid) then
                        local coordsRaw = json.decode(v.door_data)
                        MyKeys[#MyKeys+1] = {
                            HouseData = {
                                adress = v.street,
                                coords = {
                                    enter = {
                                        x = coordsRaw.x,
                                        y = coordsRaw.y,
                                    }
                                },
                                name = v.property_id,
                            }
                        }
                    end
                end
            end
            
            if v.citizenid == CitizenId[1].citizenid then
                local coordsRaw = json.decode(v.door_data)
                MyKeys[#MyKeys+1] = {
                    HouseData = {
                        adress = v.street,
                        coords = {
                            enter = {
                                x = coordsRaw.x,
                                y = coordsRaw.y,
                            }
                        },
                        name = v.property_id,
                    }
                }
            end
        end
    end
    cb(MyKeys)
end)

RegisterNetEvent('ps-housing:server:removeHouseKey', function(house, citizenData)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    if not Player then return end

    local result = MySQL.query.await('SELECT * FROM properties where property_id = ?', {house})
    if #result > 0 then
        local newHolders = {}
        if result[1].has_access then
            local oldKeys = json.decode(result[1].has_access)
            for k, _ in pairs(oldKeys) do
                if oldKeys[k] ~= citizenData.citizenid then
                    newHolders[#newHolders+1] = oldKeys[k]
                end
            end
        end
    
        MySQL.update('UPDATE properties SET has_access = ? WHERE property_id = ?', {json.encode(newHolders), house})
    end
end)


QBCore.Functions.CreateCallback('jpr-phonesystem:server:TransferCid', function(_, cb, NewCid, house)
    local result = MySQL.query.await('SELECT * FROM players WHERE citizenid = ?', {NewCid})
    if result[1] then
        local HouseName = house.name
        MySQL.update(
            'UPDATE properties SET owner_citizenid = ? WHERE property_id = ?',
            {NewCid, HouseName})
        
        cb(true)
    else
        cb(false)
    end
end)

```

{% endtab %}

{% tab title="QS-Housing" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "qs-housing"
```

Open **fxmanifest.lua** of **QS-Housing** and on **server\_scripts** add this line:

`'jprphonesystem.lua',`\
\
Now add this file on **QS-Housing** folder:\
<https://drive.google.com/file/d/10VIew0k2E_Ffg7EkzCLMw3WYdouPuD0a/view?usp=drive_link>

\
Ready to go!
{% endtab %}

{% tab title="S4-House" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "s4-house"
```

Open **fxmanifest.lua** of **S4-House** and on **server\_scripts** add this line:

`'jprphonesystem.lua',`\
\
Now add this file on **S4-House** folder:\
<https://drive.google.com/file/d/1cIFRyGNz9nfL6WDhPTk7utrGgLnQF6GJ/view?usp=drive_link>

\
Ready to go!
{% endtab %}

{% tab title="JPR-Housing" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "jpr-housing"
```

{% endtab %}

{% tab title="Loaf-Housing" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "loaf-housing"
```

Open **fxmanifest.lua** of **Loaf-Housing** and on **server\_scripts** add this line:

`'jprphonesystem.lua',`\
\
Now add this file on **Loaf-Housing** folder:\
<https://drive.google.com/file/d/1G0GRlPPN0_LhEiZmvzgtwq1tsIVacicq/view?usp=sharing>

\
Ready to go!
{% endtab %}

{% tab title="NoLag" %}
Open **config.lua** of **Phone System** and change house name to this one:

```lua
Config.HouseScriptName = "nolag-housing"
```

Open **fxmanifest.lua** of **NoLag-Housing** and on **server\_scripts** add this line:

`'jprphonesystem.lua',`\
\
Now add this file on **NoLag-Housing** folder:\
<https://drive.google.com/file/d/1cv8YDwZX2IC2PrLm6sdRpQtDBbLTWfUv/view?usp=sharing><br>

Ready to go!
{% endtab %}
{% endtabs %}

{% hint style="danger" %}
If you cant find your housing script, open discord ticket, we can adapt it to your system!
{% endhint %}

## Permissions to JPR Phone System

JPR Phone System needs permissions to record your voice, so you can send audio messages and record videos with audio by the phone.

If you receive a message like this, click **F8**, "**Allow**".

<figure><img src="https://3317815405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAcw6nAW8IGe15skCfMoj%2Fuploads%2FKSd1vSqz5cqlHNXm9VTQ%2F15.png?alt=media&#x26;token=8a14a8e0-7539-4539-aa4e-c9a5a3fb0646" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This message appears only once.
{% endhint %}

## SQL

Execute `JPR - Phone System.sql` file in your SQL

{% hint style="danger" %}
This is mandatory!
{% endhint %}

## MDT :warning:

MDT app has all its code open, the filtering part is in **openFunctions.js** and the part that takes information from **SQL** is in **client\_config** and **server\_config**. \
Any change to your **SQL** can affect the way **MDT** works, so if you have the **programming skills** to adapt it to your server or **it's already working** (most of them) use it, otherwise **disable it in the config**.<br>

## Inventory Setup

{% tabs %}
{% tab title="Usual Inventorys" %}
Go to `qbx-core, shared, items.lua`, replace **phone item** line to this ones:

```lua
['phone'] = {['name']='phone',['label']='Phone',['weight']=700,['type']='item',['image']='phone.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat phone ya got there'},
['phone_white']={['name']='phone_white',['label']='White Phone',['weight']=700,['type']='item',['image']='phone_white.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat white phone ya got there'},
['phone_gold']={['name']='phone_gold',['label']='Gold Phone',['weight']=700,['type']='item',['image']='phone_gold.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat gold phone ya got there'},
['phone_red']={['name']='phone_red',['label']='Red Phone',['weight']=700,['type']='item',['image']='phone_red.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat red phone ya got there'},
['phone_blue']={['name']='phone_blue',['label']='Blue Phone',['weight']=700,['type']='item',['image']='phone_blue.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat blue phone ya got there'},
['phone_green']={['name']='phone_green',['label']='Green Phone',['weight']=700,['type']='item',['image']='phone_green.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat green phone ya got there'},
['phone_pink']={['name']='phone_pink',['label']='Pink Phone',['weight']=700,['type']='item',['image']='phone_pink.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat pink phone ya got there'},
['phone_green_light']={['name']='phone_green_light',['label']='Green Light Phone',['weight']=700,['type']='item',['image']='phone_green_light.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='Neat green light phone ya got there'},
['phone_purple']={['name']='phone_purple',['label']='Purple Phone',['weight']=700,['type']='item',['image']='phone_purple.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='A neat purple phone'},
['phone_purple_deep']={['name']='phone_purple_deep',['label']='Deep Purple Phone',['weight']=700,['type']='item',['image']='phone_purple_deep.png',['unique']=true,['useable']=true,['shouldClose']=true,['combinable']=nil,['description']='A phone with a deep purple color'},
['powerbank'] 			 	 	 	 = {['name'] = 'powerbank', 			  			['label'] = 'Powerbank', 					['weight'] = 200, 		['type'] = 'item', 		['image'] = 'powerbank.png', 				['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,   ['combinable'] = nil,   ['description'] = 'A good way to get battery'},
['phone_no_case'] = {['name'] = 'phone_no_case', ['label'] = 'No phone case', ['weight'] = 0, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_no_case.png', ['unique'] = true, ['useable'] = true, ['description'] = 'No phone case'},
['phone_case_1'] = {['name'] = 'phone_case_1', ['label'] = 'Phone Case 1', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_1.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 1'},
['phone_case_2'] = {['name'] = 'phone_case_2', ['label'] = 'Phone Case 2', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_2.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 2'},
['phone_case_3'] = {['name'] = 'phone_case_3', ['label'] = 'Phone Case 3', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_3.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 3'},
['phone_case_4'] = {['name'] = 'phone_case_4', ['label'] = 'Phone Case 4', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_4.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 4'},
['phone_case_5'] = {['name'] = 'phone_case_5', ['label'] = 'Phone Case 5', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_5.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 5'},
['phone_case_6'] = {['name'] = 'phone_case_6', ['label'] = 'Phone Case 6', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_6.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 6'},
['phone_case_7'] = {['name'] = 'phone_case_7', ['label'] = 'Phone Case 7', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_7.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 7'},
['phone_case_8'] = {['name'] = 'phone_case_8', ['label'] = 'Phone Case 8', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_8.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 8'},
['phone_case_9'] = {['name'] = 'phone_case_9', ['label'] = 'Phone Case 9', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_9.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 9'},
['phone_case_10'] = {['name'] = 'phone_case_10', ['label'] = 'Phone Case 10', ['weight'] = 200, ['type'] = 'item', ['ammotype'] = nil, ['image'] = 'phone_case_10.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stylish phone case 10'},
```

{% endtab %}

{% tab title="Lastest QBX Versions" %}
Go to `qbx-core, shared, items.lua`, replace **phone item** line to this ones:

```lua
phone = { name = 'phone', label = 'Phone', weight = 700, type = 'item', image = 'phone.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat phone ya got there' }, 
phone_white = { name = 'phone_white', label = 'White Phone', weight = 700, type = 'item', image = 'phone_white.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat white phone ya got there' }, 
phone_gold = { name = 'phone_gold', label = 'Gold Phone', weight = 700, type = 'item', image = 'phone_gold.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat gold phone ya got there' }, 
phone_red = { name = 'phone_red', label = 'Red Phone', weight = 700, type = 'item', image = 'phone_red.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat red phone ya got there' }, 
phone_blue = { name = 'phone_blue', label = 'Blue Phone', weight = 700, type = 'item', image = 'phone_blue.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat blue phone ya got there' }, 
phone_green = { name = 'phone_green', label = 'Green Phone', weight = 700, type = 'item', image = 'phone_green.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat green phone ya got there' }, 
phone_pink = { name = 'phone_pink', label = 'Pink Phone', weight = 700, type = 'item', image = 'phone_pink.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat pink phone ya got there' }, 
phone_green_light = { name = 'phone_green_light', label = 'Green Light Phone', weight = 700, type = 'item', image = 'phone_green_light.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Neat green light phone ya got there' }, 
phone_purple = { name = 'phone_purple', label = 'Purple Phone', weight = 700, type = 'item', image = 'phone_purple.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A neat purple phone' },
phone_purple_deep = { name = 'phone_purple_deep', label = 'Deep Purple Phone', weight = 700, type = 'item', image = 'phone_purple_deep.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A phone with a deep purple color' },
powerbank = { name = 'powerbank', label = 'Powerbank', weight = 200, type = 'item', image = 'powerbank.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A good way to get battery' },
phone_case_1 = { name = 'phone_case_1', label = 'Phone Case 1', weight = 150, type = 'item', image = 'phone_case_1.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_2 = { name = 'phone_case_2', label = 'Phone Case 2', weight = 150, type = 'item', image = 'phone_case_2.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_3 = { name = 'phone_case_3', label = 'Phone Case 3', weight = 150, type = 'item', image = 'phone_case_3.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_4 = { name = 'phone_case_4', label = 'Phone Case 4', weight = 150, type = 'item', image = 'phone_case_4.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_5 = { name = 'phone_case_5', label = 'Phone Case 5', weight = 150, type = 'item', image = 'phone_case_5.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_6 = { name = 'phone_case_6', label = 'Phone Case 6', weight = 150, type = 'item', image = 'phone_case_6.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_7 = { name = 'phone_case_7', label = 'Phone Case 7', weight = 150, type = 'item', image = 'phone_case_7.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_8 = { name = 'phone_case_8', label = 'Phone Case 8', weight = 150, type = 'item', image = 'phone_case_8.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_9 = { name = 'phone_case_9', label = 'Phone Case 9', weight = 150, type = 'item', image = 'phone_case_9.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_case_10 = { name = 'phone_case_10', label = 'Phone Case 10', weight = 150, type = 'item', image = 'phone_case_10.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Stylish case for your phone' },
phone_no_case = { name = 'phone_no_case', label = 'Phone No Case', weight = 700, type = 'item', image = 'phone_no_case.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A phone without a case' },
```

{% endtab %}

{% tab title="OX Inventory" %}

`ox_inventory - data - items.lua`, **replace** phone item and **add** powerbank item:

```lua
['phone'] = {
	label = 'Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_white'] = {
	label = 'White Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_gold'] = {
	label = 'Gold Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_red'] = {
	label = 'Red Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_blue'] = {
	label = 'Blue Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_green'] = {
	label = 'Green Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_pink'] = {
	label = 'Pink Phone',
	weight = 190,
	stack = false,
	close = true,
},
['phone_green_light'] = {
	label = 'Green Light Phone',
	weight = 190,
	stack = false,
	close = true,
},
["phone_purple"] = {
	label = "Purple Phone",
	weight = 1,
	stack = true,
	close = true,
},
["phone_purple_deep"] = {
	label = "Deep Purple Phone",
	weight = 1,
	stack = true,
	close = true,
},
['powerbank'] = {
	label = 'Powerbank',
	weight = 190,
	stack = false,
	close = false,
},
['phone_no_case'] = {
	label = 'No phone case',
	weight = 0,
	stack = false,
	close = true,
},
['phone_case_1'] = {
	label = 'Phone Case 1',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_2'] = {
	label = 'Phone Case 2',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_3'] = {
	label = 'Phone Case 3',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_4'] = {
	label = 'Phone Case 4',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_5'] = {
	label = 'Phone Case 5',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_6'] = {
	label = 'Phone Case 6',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_7'] = {
	label = 'Phone Case 7',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_8'] = {
	label = 'Phone Case 8',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_9'] = {
	label = 'Phone Case 9',
	weight = 190,
	stack = false,
	close = true,
},
['phone_case_10'] = {
	label = 'Phone Case 10',
	weight = 190,
	stack = false,
	close = true,
},

```

`ox_inventory  - client.lua`, **remove** this lines:

```lua
local phone = Items.phone

	if phone and phone.count < 1 then
		pcall(function()
			return exports.npwd:setPhoneDisabled(true)
		end)
	end
```

`ox_inventory - modules - items - client.lua`, **remove** this lines:

```lua
Item('phone', function(data, slot)
	local success, result = pcall(function()
		return exports.npwd:isPhoneVisible()
	end)

	if success then
		exports.npwd:setPhoneVisible(not result)
	end
end)
```

{% endtab %}
{% endtabs %}

## Using [Fivemanage](https://www.fivemanage.com/)

Follow this little video to know how to use [Fivemanage ](https://www.fivemanage.com/)for media uploads ( avoid discord future problems ) with our **Phone System**:

{% embed url="<https://www.youtube.com/watch?ab_channel=JPResources&v=XaV_jAJZDdI>" %}

(If you dont want this and keep "risking", we provide old system at same, just turn on **UseOtherUploadSystem** to true, **UseFivemerrSystem** to false and **UseFiveManageSystem** to false)

## Setup Google API Key

Just need to follow this quick 1 min video:

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

{% hint style="danger" %}
Without this **Google API Key**, your **spotify and youtube WILL NOT WORK!!**
{% endhint %}

## Video tutorial

If you have trouble installing it after all the explanation, you can watch this video of the script installation:

[**Click me**](https://www.youtube.com/watch?v=YiixJhw1KbY) **( video 1 ) or** [**Click me**](https://www.youtube.com/watch?v=tGro1tqqCLM) **( video 2 ) or** [**Click me**](https://www.youtube.com/watch?v=mLETX6l318I) **( video 3)**
