💿Configure
Camera
Our camera can take pictures and record videos. You need to store this media somewhere, so we provide several options.
Go to
cofig/config.upload.lua
and set theConfig.Upload.Method
to your preferred option:
Discord - NOT RECOMMENDED(the links will expire after a while)
Custom(You need to implement it yourself)
Go to
server.cfg
file and put the following variables
set yseriesApiKeyImage "PUT_YOUR_API_KEY_OR_WEBHOOK_HERE"
set yseriesApiKeyVideo "PUT_YOUR_API_KEY_OR_WEBHOOK_HERE"
set yseriesApiKeyAudio "PUT_YOUR_API_KEY_OR_WEBHOOK_HERE"
Restart your server, and your camera should work if you did everything correctly.
SIM Card as an Item
Inventory requirement
To use a sim card as an item, you need one of the following inventories or any other inventory that supports metadata(you will need to integrate it yourself).
ox_inventory(Recommended)
qb-inventory
ps-inventory
lj-inventory
codem-inventory
core-inventory
Config options
Head over to config\config.sim.lua
-- Whether to enable the SIM switch functionality.
-- *manual: When a phone is initialized the phone won't have a SIM card. You need to have a SIM card item in your inventory. You can assign the SIM card to the phone via the Settings app -> SIM Manager.
-- *auto_generate: When a phone is initialized, it will automatically generate a SIM card and add it to the phone.
Config.Sim.Mode = 'auto_generate' -- options: 'manual', 'auto_generate'
-- Whether to enable the SIM switch functionality from the Settings app(Settings -> SIM Manager).
Config.Sim.EnableSimSwitch = true
Create a sim card item with the command - Learn more
Item
ys_sim_card = { name = 'ys_sim_card', label = 'Sim Card', weight = 10, type = 'item', image = 'ys_sim_card.png', unique = true, useable = false, shouldClose = false, combinable = nil, description = 'A sim card' },
Apps
You can add/remove apps from the phone by modifying the config.json:apps
file.
Go to
config/config.json
and locate the app.Select it and REMOVE it.
Restart the phone, preferably the whole server.
If it doesn't work, you most likely commented on the app, so you must remove it. JSON files don't support comments.
Restrict Apps
{
"key": "darkchat",
"name": "Dark Chat",
"description": "Communication",
"defaultApp": false,
"disabledJobs": ["police"],
"allowedJobs": ["cartel"]
},
Multi-language
Although we provide multi-language support, our language choices are still restricted.
Add new language:
Navigate to
/config/config.locales.lua
and add a new entry to theConfig.Locales
array with your language.Add your file in
/ui/build/locales
and name it the same as thevalue
field in theconfig.locales.lua
file.Restart the server to Apply the changes.
Preferably commit your translations to our repository - GitHub
Valet
You can enable and customize the Valet
functionality from config/config.garages.lua
.
Config.Valet = {}
Config.Valet.Enabled = true -- Allow players to get their vehicles from the phone
Config.Valet.Price = 100 -- Price to get your vehicle from the valet
Ringtones
To add personalized ringtones and notification sounds to your phone, simply follow these instructions:
Navigate to /config/config.json
and add a new entry to the ringtones
array.
The key
field is the name of the file without the extension.
The name
field is the name that will be displayed on the phone.
The extension
field is the file extension.
Add your sound file to /ui/build/(humanoid/yos)/sounds/ringtones
and name it the same as the key
field in the config.json
file.
{
"ringtones": [
{
"key": "GalaxyBells", - name of the file without the extension
"name": "Galaxy Bells", - name that will be displayed in the phone
"extension": "mp3" - file extension
}
]
}
Notifications
To add personalized ringtones and notification sounds to your phone, simply follow these instructions:
Navigate to /config/config.json
and add a new entry to the notifications
array.
The key
field is the name of the file without the extension.
The name
field is the name that will be displayed on the phone.
The extension
field is the file extension.
Add your sound file to /ui/build/(humanoid/yos)/sounds/notifications
and name it the same as the key
field in the config.json
file.
{
"notifications": [
{
"key": "Spaceline", -- name of the file without the extension
"name": "Spaceline", -- name that will be displayed in the phone
"extension": "mp3" -- file extension
}
]
}
Wallpapers
To add personalized wallpapers to your phone, follow these instructions:
Navigate to /config/config.json
and add a new entry to the wallpapers
array.
The key
field is the name of the file without the extension.
The name
field is the name that will be displayed on the phone.
The extension
field is the file extension.
Add your wallpaper to /ui/build/backgrounds-front
and name it the same as the key
field in the config.json
file.
{
"wallpapers": [
{
"key": "Graphite", -- name of the file without the extension
"name": "Graphite", -- name that will be displayed in the phone
"extension": "png" -- file extension
}
]
}
Currency
You can also change your city's currency and format in the config.misc.lua
file.
Config.CurrencyFormat = "{amount}$"
Config.CurrencySymbol = "$"
Config.CurrencyLabel = 'usd'
Cell broadcast
Cell broadcast is a technology that allows messages (such as public alerts) to be broadcast to all mobile users on the server
Custom sound
You can replace the broadcast sound by replacing the cellBroadcast.mp3
file in sounds\notifications\apps
folder.
Usage
Via Export:
---Sends a cell broadcast message.
---@param to number The recipient of the message. Source id.
---@param title string The title of the message.
---@param content string The content of the message.
---@param iconUrl string The URL of the icon to display with the message.
exports["yseries"]:CellBroadcast(to, title, content, iconUrl)
Via command in-game:
/cellbroadcast <source> <title> <content> <iconUrl(optional)>
Handle death/revive
You can restrict phone usage after death by modifying the \client\custom\functions\death.lua
file.
There, you need to trigger OnRevive()
or OnDeath()
events based on your framework.
Note: If you're using ESX
you have to adjust the revive event based on your ambulance script. Otherwise, the phone will be locked after death.
You can restrict some actions while the phone is opened in
`client\custom\functions\misc.lua:1` or
`server\custom\functions\misc.lua:1` or in another resource with
`AddEventHandler('yseries:client:toggle-phone')` or
`AddEventHandler('yseries:server:toggle-phone')`
Last updated