Documentation
  • πŸ“„TeamsGG Documentation
    • Common Errors
  • Paid Scripts
    • πŸ“±Phone
      • 🧠Installation
      • πŸ¦„Unique phones
      • πŸ’ΏConfigure
        • πŸ’„Additional Features
        • πŸ“ΈCamera
        • 🍏Apps
        • πŸͺ΅Logs
        • πŸ–ΌοΈMedia Customization
        • πŸ—£οΈMulti-Language Support
        • πŸ—ƒοΈSIM Cards
        • πŸš—Valet System
      • ⏭️Exports
        • Client side
          • πŸ‘οΈβ€πŸ—¨οΈGeneral
          • β˜€οΈGroups
          • 🏒Companies
          • πŸ”§Misc
        • Server side
          • πŸ†”Identify Player
          • ☎️Sim Cards
          • β˜€οΈGroups
          • 🌐Cell Broadcast
          • πŸ’ΈYPay
          • πŸ“§Mail
          • πŸ“ͺNotifications
          • πŸ“΅Screen Damage
          • πŸ”§Misc
      • πŸͺ›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
  • πŸŽƒMinigames
    • 🎯Exports and Usage
    • πŸ”§Commands
Powered by GitBook
On this page
  • Config​
  • Custom apps​
  • How to add a custom app?​
  • How to remove a custom app?​
  1. Paid Scripts
  2. Phone

Custom apps

We offer you exports that can assist you in developing your own applications and integrating them into your phone.

Config​

The most straightforward method for incorporating an app is by editing the config.customApps.lua file. Locate the Config.CustomApps section and insert your app as demonstrated in the example below.

/config/config.customApps.lua
Config.CustomApps = {
    {
        key = "your-app-key", -- key is used to identify the app, must be unique.
        name = "your-app-name", -- Display name of the app
        defaultApp = true, -- Wether to show it by default or add it as downloadable from `Addapp`.
        game = true -- If true the app will show under games section in play store. Optional.
        ui = "https://cfx-nui-" .. GetCurrentResourceName() .. "/ui/dist/index.html", -- A link to a nui page. Built version.
        -- App icon. You can use a link or a local image. Simply paste your app image in `/build/(yos/humanoid)/apps/{key}.png`
        -- Make sure the file name matches the key.
        icon = { -- Optional
            yos = "https://cdn-icons-png.flaticon.com/512/2314/2314912.png", -- YPhone OS icon.
            humanoid = "https://cdn-icons-png.flaticon.com/512/566/566312.png", -- YFlip OS icon.
        },
        disabledJobs = {"police"}, -- Not available for Police job
        allowedJobs = {"ambulance"} -- Available for Ambulance only
    },
    {
        ... -- Add more apps here.
    }
}

To keep the authentic style in the home screen you can use our app-icon-placeholder.png from /build/apps folder and clip your icon in there. Also you can do the same for the notification icon by using notification-icon-placeholder.png from /build/notifications folder.

Custom apps​

If you wish to implement a custom user interface (UI) for your application, you must develop a separate resource using our templates.

How to add a custom app?​

To add a custom app, you need to use the following export:

client.lua
exports.yseries:AddCustomApp({
    key = key,
    name = "App Template",
    defaultApp = true,
    ui = "https://cfx-nui-" .. GetCurrentResourceName() .. "/ui/dist/index.html",
    icon = "https://i.ibb.co/QY127HV/app-icon-placeholder.png"
})

How to remove a custom app?​

To remove a custom app, you need to use the following export:

client.lua
exports.yseries:RemoveCustomApp(key)
PreviousCommandsNextBoomer Phone

Last updated 12 days ago

πŸ“±
🍎