JPResources Documentation
  • 👋Welcome to JPResources
  • Installation
    • 📲Phone System
      • Installation Page
        • QBCore
        • QBox
        • ESX
        • VRPex
      • Config File
      • Events & Commands
      • Custom APPs
      • Translations
      • Common Problems
      • Installation Video
    • 🏡Housing System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Events & Commands
      • How to add MLO House
      • How to add SHELL Tier
      • Translations
      • Common Problems
    • 🎰Casino System
      • How to install
        • ESX
        • QBCore
        • QBox
      • Translations
      • Common Issues
    • 🚨MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🏥EMS MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🎒Inventory
      • How to install
      • Events & Commands
      • Translations
      • Common Issues
    • 🚘Vehicle Shops
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💰Business System
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💼Job System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Translations
    • 📱Budget Phone
      • QBCore
    • ⚙️Crew System
      • QBCore
    • 👚Clothing System
      • QBCore
    • 🏢Garage System
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 👪Multichar
      • Installation Page
        • QBCore
        • ESX
    • 🔪Territories
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🎒Backpack
      • QBCore
    • 💴Moneywash
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🌊Poolcleaner Job
      • Installation Page
    • 🚗TDi Smoke
      • Installation Page
  • Support / Store
    • 🛠️Where i can find support and buy new scripts
    • 🛠️FiveM asset escrow errors
Powered by GitBook
On this page
  • Dependencies Part
  • Webhooks
  • Unique Phones
  • Integration with the home system
  • MDT
  • Permissions to JPR Phone System
  • SQL
  • Inventory
  • Using Fivemanage
  • Using Fivemerr
  • Setup Google API Key
  • Video tutorial
  1. Installation
  2. Phone System
  3. Installation Page

ESX

PreviousQBoxNextVRPex

Last updated 1 month ago

You will receive the script in profile, after this click in blue "download" button.

After download, put the script in your server files.

Remeber:

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

  1. Install all , and follow their respective installation instructions.

Dependencies Part

  • (for unique phones (optional))

  • qb-lapraces (Provided on downloaded files)

  • qb-input (Provided on downloaded files)

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.

Unique Phones

In the config.lua file, we have the Config.UniquePhones option.

Integration with the home system

Due to the huge variety of home systems for ESX, if you want to make your system compatible with the phone system, please open a ticket on our discord, we will help you.

Add this inside server_config file of Phone System:

ESX.RegisterServerCallback('jpr-phonesystem:server:GetPlayerHouses', function(source, cb, serie)
    local src = source
    local Player = ESX.GetPlayerFromId(src)
    local MyHouses = {}
    local CitizenId = MySQL.Sync.fetchAll('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        -- for housing system adaptation, please open a discord ticket and talk with us
        local pHouses = exports["esx_property"]:GetPlayerProperties(CitizenId[1].citizenid)
        
        if pHouses then
            for k, v in pairs(pHouses) do
                if (pHouses[k]) then
                    pHouses[k].house = pHouses[k].Name
                    pHouses[k].citizenid = pHouses[k].Owner
                    pHouses[k].HouseData = {
                        coords = {
                            enter = {
                                x = pHouses[k].Entrance.x,
                                y = pHouses[k].Entrance.y,
                            }
                        },
                        adress = pHouses[k].Name,
                    }
                    pHouses[k].tier = pHouses[k].Interior
                    pHouses[k].label = pHouses[k].Name
                end
            end
            cb(pHouses)
        else
            cb(nil)
        end
    else
        cb(nil)
    end
end)

Open config.lua of Phone System and change house name to this one:

Config.HouseScriptName = "jpr-housing"

Add this inside server_config file of Phone System:

ESX.RegisterServerCallback('jpr-phonesystem:server:GetPlayerHouses', function(source, cb, serie)
    local myHouses = {}
    local citizenId = MySQL.scalar.await('SELECT citizenid FROM jpr_phonesystem_base WHERE idtelemovel = ?', { serie })

    if not citizenId then
        return cb(nil)
    end

    local houses = MySQL.query.await("SELECT propertyid FROM loaf_properties WHERE owner = ?", { citizenId })

    for i = 1, #houses do
        local propertyId = houses[i].propertyid
        local house = exports.loaf_housing:GetHouse(propertyId)

        if house then
            myHouses[#myHouses+1] = {
                house = house.label,
                label = house.label,
                citizenid = citizenId,
                HouseData = {
                    coords = {
                        enter = {
                            x = house.entrance.x,
                            y = house.entrance.y,
                        },
                    },
                    adress = house.label,
                },
                tier = {
                    label = "??",
                }
            }
        end
    end

    cb(myHouses)
end)

This part is a template of our callback to house script owners being able to be supported by us, just need to adapt this little callback and everything will work perfect: (Can be added inside server_config.lua of Phone System or directly on Housing Script server side.)

ESX.RegisterServerCallback('jpr-phonesystem:server:GetPlayerHouses', function(source, cb, serie)
    local src = source
    local Player = ESX.GetPlayerFromId(src)
    local MyHouses = {}
    local CitizenId = MySQL.Sync.fetchAll('SELECT * FROM jpr_phonesystem_base WHERE idtelemovel = ?', {serie})
    
    if (CitizenId[1]) then
        -- for housing system adaptation, please open a discord ticket and talk with us
        local pHouses = exports["esx_property"]:GetPlayerProperties(CitizenId[1].citizenid)
        
        if pHouses then
            for k, v in pairs(pHouses) do
                if (pHouses[k]) then
                    pHouses[k].house = pHouses[k].Name
                    pHouses[k].citizenid = pHouses[k].Owner
                    pHouses[k].HouseData = {
                        coords = {
                            enter = {
                                x = pHouses[k].Entrance.x,
                                y = pHouses[k].Entrance.y,
                            }
                        },
                        adress = pHouses[k].Name,
                    }
                    pHouses[k].tier = pHouses[k].Interior
                    pHouses[k].label = pHouses[k].Name
                end
            end
            cb(pHouses)
        else
            cb(nil)
        end
    else
        cb(nil)
    end
end)

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.

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".

This message appears only once.

SQL

Execute JPR - Phone System.sql file in your SQL

This is mandatory!

Inventory

Dont need to do any changes, just be sure you have all phones items and powerbank item created on SQL items Table.

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

['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_greenLight'] = {
	label = 'Green Light Phone',
	weight = 190,
	stack = false,
	close = true,
},
['powerbank'] = {
	label = 'Powerbank',
	weight = 190,
	stack = false,
	close = false,
},

ox_inventory - client.lua, remove this lines:

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:

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)

The default ESX inventory does not require any modification

(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)

(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)

You can choice what system you want to use, Fivemanage or Fivemerr, they both work great, Fivemerr is know to have more space with free plans, so choice one of them and follow the video tutorial.

Setup Google API Key

Just need to follow this quick 1 min video:

Without this Google API Key, your spotify and youtube WILL NOT WORK!!

Video tutorial

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

For more info how to create a discord webhook follow this tutorial:

The Phone System only supports this system on ESX if the server uses , otherwise you need to disable this option and use the normal system (global phones, i.e. each player with their own phone).

MDT

Using

Follow this little video to know how to use for media uploads ( avoid discord future problems ) with our Phone System:

Using

Follow this little video to know how to use for media uploads ( avoid discord future problems ) with our Phone System:

( video 1 ) or ( video 2 ) or ( video 3)

📲
⚠️
https://www.youtube.com/watch?v=fKksxz2Gdnc&t=7s&ab_channel=NoIntroTutorials
Fivemanage
Fivemanage
Fivemerr
Fivemerr
Click me
Click me
Click me
keymaster.fivem.net
es_extended
oxmysql
ox_inventory
screenshot-basic
xsound
dependencies
ox_inventory