# Desktop PCs

While the script allows players to use the laptop item anywhere, you can also configure static interaction points to open Desktop PCs with specific, custom features.

<figure><img src="https://1688068901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9bCwnajAqpi3Viykb5Wi%2Fuploads%2F97ulpdA9PUKfdK5EpIAT%2F%7BD12CC604-155C-4F61-9368-A0AD99677D4A%7D.png?alt=media&#x26;token=894a10f3-72d9-4af2-982a-99de4e49952f" alt=""><figcaption></figcaption></figure>

#### Configuration

To configure your Desktop PCs, navigate to `av_laptop/config/_pcstations.lua`. In this file, you will find a table containing all available static PCs.

Each entry must follow this specific structure:

* coords *(table/vector3)*: The `{x, y, z}` coordinates where the interaction point will be located in the world.
* canUse *(function)*: A verification check to determine if the player is authorized to access the PC (e.g., checking for a specific job). It must return `true` or `false`.
* password *(string)*: The required password to unlock the terminal.
* serial *(string)*: A unique identifier for this specific PC. This is crucial for local storage and database management.
* name *(string)*: The display username shown on the PC's lock screen and system.
* avatar *(string)*: The image URL for the user's profile picture.
* wallpaper *(string)*: The image URL for the desktop background.
* theme *(table, optional)*: Customizes the UI colors for this specific terminal. It requires an `accent` (HEX value) and a `glow` (RGBA value).
* apps *(table)*: A list of application identifiers that will be accessible on this PC.
* storage *(number)*: The maximum number of files that can be stored locally on this machine.

```lua
{
    coords = { x = 447.9599, y = -973.4294, z = 30.6896 },
    canUse = function() -- add your own check and return true or false
        return exports['av_laptop']:hasJob("police")
    end,
    password = "12345",
    serial = "sapd_boss_office",
    name = "SAPD Boss",
    avatar = "https://img.freepik.com/premium-vector/person-with-hat-their-head_169196-13010.jpg",
    wallpaper = "https://r2.fivemanage.com/QmVAYSlqeAlD4IxVbdvu5/police_wallpaper.jpg",
    theme = {accent = "#00f0ff", glow = "rgba(0, 240, 255, 0.5)"},
    apps = {
        ["documents"] = true,
        ["business"] = true, -- requires av_business script
        ["files"] = true,
        ["calculator"] = true,
        ["browser"] = true,
    },
    storage = 100,
}
```

### Available APPs

* This is a list of default apps you can use:
  * documents
  * files
  * calculator
  * browser

{% hint style="info" %}
The applications listed above are included for free within the core `av_laptop` system. You can further expand your system's capabilities with a wide variety of premium add-ons—such as Business, Boosting, Darkmarket, and many more—which are available separately.
{% endhint %}

### External Scripts

To open a Desktop PC from another script, use the following export and pass the configuration settings as shown below:

```lua
local settings = {
    serial = "test_pc",
    name = "Test PC",
    avatar = "https://i.pinimg.com/736x/89/56/01/89560125c0768dc90226047cd3cde92d.jpg",
    wallpaper = "https://wallpapercave.com/wp/wp12860280.jpg",
    theme = {
        accent = "violet",
        glow = "rgba(0,255,255,0.25)"
    },
    apps = {
        ["documents"] = true,
        ["business"] = true,
        ["files"] = true,
        ["calculator"] = true,
        ["terminal"] = false,
        ["browser"] = false,
    },
    storage = 150
}
RegisterCommand("pc", function()
    exports['av_laptop']:openPC(settings)
end,false)
```
