💾Installation
Installation and download processes are straightforward and fixed. After following the specified steps, you can easily complete the installation.
Before Starting
Installation and download processes are straightforward and fixed. After following the specified steps, you can easily complete the installation. Skipping a small step can lead to significant errors in the future!
If you dont know, how to phone use check this link for how to usage!
If you get an error, and if the error located in errors page, support it will take much longer for you to get a reply.
If you don't modify configurations file, support it will take much longer for you to get a reply.
Installation
If you dont have knowledge, you can use this video for installation process
Extract ls-phone from the downloaded folder and install it on your server.
If the downloaded file has a different name than ls-phone, rename it to ls-phone or it will not work and errors will occur!
After installing it on your server, import the SQL database named "phone.sql" into your server's database.
Before starting, make sure you're started ls-phone after ls-core start. If you dont, start ls-phone after ls-core.
Requirements
Do not skip any requirements. It's will errors in future!
First, make sure that the specified resources have been downloaded and installed on your server;
ls-crypto
screenshot-basic
Image Capture
You need to webhooks for take an photo in this section you'll learn how to add webhooks.
First locate configs/config_server.lua
and scroll to end find Config.Server.Webhook
and modify.
Config.Server.Webhook = "your webhook link"
If you skip, these step you cant capture images/videos.
Key Configuring
Phone mainly works as item instead key, but you can use keys too! You can change keybinding from Settings > Key Bindings > FiveM > Phone Shortcut this only affects you, if you want change for everyone, ls-phone/client/otherc.lua and find RegisterKeyMapping after that change M key whatever you want!
RegisterKeyMapping does not affect who joined after ls-phone start. They need to change in Settings > Key Bindings > FiveM > Phone Shortcut
Key not working at every inventory, like ox_inventory because ls-core GetItem function not working as expected for ox_inventory. If you want to use by key, try to modify ls-core/server/main.lua, locate self.Functions.GetItem and try to modify
Executing Non-Included SQL
Verified profiles can be used in some apps, if you want to add verified profiles to your phone execute this SQL,
ALTER TABLE twitter_users add verified int DEFAULT "0";
ALTER TABLE instagram_users add verified int DEFAULT "0";
Impementing Inventories
Some inventories doesn't uses metadata, and if you're using non metadata inventory execute this sql,
Process time depends your inventory script, most and common inventories added to this step.
Some inventory does not support metadata usage, for reason best choice is closing metadata. You can locate this section for disable metadata.
Implementing to no more required, but in some inventories it doesnt working, you can use these steps.
qb-inventory

lj-inventory

ox_inventory

ls-inventoryhud

More Inventories Added In Future
Configuration
Phone Configuration is important, if you dont configure probably will get an error.
Webhook (Images)
You need to webhooks for take an photo in this section you'll learn how to add webhooks.
First locate configs/config_server.lua
and scroll to end find Config.Server.Webhook
and modify.
Config.Server.Webhook = "your webhook link"
Custom Billing
If you're using custom billing script, locate configs/config_server.lua
and find Config.Server.Paybilling
after that you can modify the whole code,
Config.Server.PayBilling = function(Ply, society, amount, invoiceId, sendercitizenid)
local Invoices = {}
-- Your code
return Invoices
end
After that locate server/others.lua
and find ls-phone:s:getAllBilling
modify the whole code,
LS_CORE.Callback.Functions.CreateCallback("ls-phone:s:getAllBilling", function(source, cb)
local invoices = LS_CORE.Config.DATABASE(LS_CORE.Config.DATABASE_NAME, 'fetchAll', 'SELECT * FROM phone_invoices WHERE citizenid = ?', {Config.Server.GetPlayerIdentifier(source)})
if invoices[1] ~= nil then
cb(invoices)
end
end)
If you're using client side paid function, locate client/others.lua
and find PayInvoice
modify the whole code,
RegisterNUICallback('PayInvoice', function(data, cb)
local senderCitizenId = data.senderCitizenId
local society = data.society
local amount = data.amount
local invoiceId = data.invoiceId
-- Your code
end)
Custom Garage
If you're using custom garage script, locate server/others.lua
and find these code snippet and edit whole code,
Framework.Functions.CreateCallback("ls-phone:s:getCars", function(source, cb)
local Player = Config.Server.GetPlayer(source)
if not Player then return end
local result = LS_CORE.Config.DATABASE(LS_CORE.Config.DATABASE_NAME, 'fetchAll', 'SELECT * FROM player_vehicles WHERE citizenid = ?', { Config.Server.GetPlayerIdentifier(source) })
local results = {}
for key, value in ipairs(result) do
table.insert(results, {["garage"] = value["garage"], ["plate"] = value["plate"], ["model"] = value["vehicle"]})
end
cb(results)
end)
RegisterNetEvent("ls-phone:s:deletePed", function()
local src = source
Config.Server.GetPlayer(src, true).Functions.RemoveMoney("bank", Config.ValetCost, "Money taken from bank")
TriggerClientEvent("ls-phone:c:sendNotification", src, {
app = "garage",
message = "VALET_COST",
})
end)
RegisterNetEvent("ls-phone:s:changeVehicleDatabaseStatus", function(plate)
LS_CORE.Config.DATABASE( LS_CORE.Config.DATABASE_NAME, 'execute', 'UPDATE `player_vehicles` SET `garage` = @garage WHERE `plate` = @plate', {
["@plate"] = plate,
["@garage"] = nil,
})
end)
Framework.Functions.CreateCallback("ls-phone:s:getVehicleFromPlate", function(source, cb, plate)
cb(LS_CORE.Config.DATABASE(LS_CORE.Config.DATABASE_NAME, 'fetchAll', 'SELECT * FROM player_vehicles WHERE plate = ?', { plate })[1])
end)
Disabling Metadata
Some inventory does not support metadata usage, for reason best choice is closing metadata.
For changing metadata, configs/config_server.lua

If you close the metadata, you need to add metadata sql to your own server.
CREATE TABLE IF NOT EXISTS `phone_metadata` (
`identifier` varchar(255) NOT NULL,
`data` longtext NOT NULL,
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Battery
When holding phone, using battery will charge phone.
For changing battery, configs/config.js

Internet
There is 2 way to use internet, mobile data or wi-fi. Some apps requires internet for use.
For disabling Internet, configs/config.js

Last updated