Documentation
  • 📄TeamsGG Documentation
    • Common Errors
  • Paid Scripts
    • 📱Phone
      • 🧠Installation
      • 🦄Unique phones
      • 💿Configure
      • ⏭️Exports
        • Client side
        • Server side
      • 🪛Commands
      • 🍎Custom apps
    • ☎️Boomer Phone
      • 🧠Installation
      • 🦄Unique phones
      • ⏯️Exports
        • Client side
    • 🏠Properties
      • 🧠Installation
      • 💿Configure
      • 🐚Add More Shells
      • ⏭️Exports
        • Client side
          • GetCurrentPropertyId
          • GetCurrentProperty
          • IsPointInsideProperty
          • OpenPropertyMenu
          • AddKey
          • RemoveKey
          • SetWaypointToProperty
          • GetAllProperties
          • GetKeyHolders
          • PoliceRaidDoor
        • Server side
          • GetAllProperties
          • AddKey
          • RemoveKey
          • ToggleDoorlock
          • GetPlayersInProperty
          • GetKeyHolders
          • DeleteProperty
          • AddStarterApartment
      • 👜State bags
    • 🏦Banking
      • 🧠Installation
      • ⏯️Exports
        • Client side
        • Server side
    • 💸Billing
      • 🧠Installation
      • ⏭️Exports
        • Client side
        • Server side
    • 📊Hud
      • 🧠Installation
      • ⏭️Exports
        • Client side
    • 📦Storage Units
      • 🧠Installation
Powered by GitBook
On this page
  • Camera
  • SIM Card as an Item
  • Inventory requirement
  • Config options
  • Item
  • Apps
  • Restrict Apps
  • Multi-language
  • Valet
  • Ringtones​
  • Notifications​
  • Wallpapers​
  • Currency​
  • Cell broadcast​
  • Custom sound​
  • Usage
  • Handle death/revive
  1. Paid Scripts
  2. Phone

Configure

PreviousUnique phonesNextExports

Last updated 3 months ago

Camera

Our camera can take pictures and record videos. You need to store this media somewhere, so we provide several options.

  1. Go to cofig/config.upload.lua and set the Config.Upload.Method to your preferred option:

  • Discord - NOT RECOMMENDED(the links will expire after a while)

  • Custom(You need to implement it yourself)

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

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' },
['ys_sim_card'] = {
    label = 'Sim Card',
    stack = false,
    weight = 10,
    consume = 0,
},

Apps

You can add/remove apps from the phone by modifying the config.json:apps file.

  1. Go to config/config.json and locate the app.

  2. Select it and REMOVE it.

  3. 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:

  1. Navigate to /config/config.locales.lua and add a new entry to the Config.Locales array with your language.

  2. Add your file in /ui/build/locales and name it the same as the value field in the config.locales.lua file.

  3. Restart the server to Apply the changes.

Valet

You can enable and customize the Valet functionality from config/config.garages.lua.

/config/config.garage.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

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.

/config/config.json
{
  "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
    }
  ]
}

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.

/config/config.json
{
  "notifications": [
    {
      "key": "Spaceline", -- name of the file without the extension
      "name": "Spaceline", -- name that will be displayed in the phone
      "extension": "mp3" -- file extension
    }
  ]
}

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.

/config/config.json
{
  "wallpapers": [
    {
      "key": "Graphite", -- name of the file without the extension
      "name": "Graphite", -- name that will be displayed in the phone
      "extension": "png" -- file extension
    }
  ]
}

You can also change your city's currency and format in the config.misc.lua file.

/config/config.misc.lua
Config.CurrencyFormat = "{amount}$"
Config.CurrencySymbol = "$"
Config.CurrencyLabel = 'usd'

Cell broadcast is a technology that allows messages (such as public alerts) to be broadcast to all mobile users on the server

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')`

Create a sim card item with the command -

Preferably commit your translations to our repository -

Ringtones

Notifications

Wallpapers

Currency

Cell broadcast

Custom sound

You can replace the broadcast sound by replacing the cellBroadcast.mp3 file in sounds\notifications\apps folder.

📱
💿
Fivemanage
Fivemerr
GitHub
​
​
​
​
​
​
Learn more