# CLIENT EXPORTS

### Open Phone

Opens the phone interface for the local player.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:OpenPhone()
```

{% endcode %}

### Close Phone

Closes the phone interface for the local player.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:ClosePhone()
```

{% endcode %}

### Set Phone Block State

Blocks or unblocks the local player from using their phone. When blocked, the player cannot open the phone interface.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:SetPlayerPhoneBlockState(state)
```

{% endcode %}

<table><thead><tr><th width="120" align="center">Argument</th><th width="97" align="center">Type</th><th width="114" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td><code>true</code> to block the phone, <code>false</code> to unblock.</td></tr></tbody></table>

### Has Phone Item

Checks if the player currently has the required phone item in their inventory.

{% code overflow="wrap" lineNumbers="true" %}

```lua
local hasPhone = exports["17mov_Phone"]:HasPhoneItem()
```

{% endcode %}

**Returns:**

* `boolean`: `true` if the player has the phone item, `false` otherwise.

### Is Phone Open

Checks if the phone interface is currently visible (open) for the player.

<pre class="language-lua" data-overflow="wrap" data-line-numbers><code class="lang-lua"><strong>local isOpen = exports["17mov_Phone"]:IsPhoneOpen()
</strong></code></pre>

**Returns:**

* `boolean`: `true` if the phone is open.

### Is Phone Minimized

Checks if the phone interface is currently minimzed, and if so - it returns current position and height

<pre class="language-lua" data-overflow="wrap" data-line-numbers><code class="lang-lua"><strong>local minimized = exports["17mov_Phone"]:IsPhoneMinimized()
</strong></code></pre>

**Returns:**

* `{height = number, x = number, y = number, isMinimized = boolean}`

### Create Notification

Sends a custom notification to the player's phone. Supports locale keys and dynamic replacements.

{% code lineNumbers="true" %}

```lua
exports["17mov_Phone"]:CreateNotification({
    app = "MESSAGES",
    title = "New Message",
    message = "You have a new message from John.",
    number = "555-0123"
})
```

{% endcode %}

<details>

<summary>Notification Structure</summary>

```lua
{
    number = "555-0123", -- (Optional) Player number associated with notification
    app = "APP_NAME", -- App identifier (e.g., "MESSAGES", "BANK")
    title = "Title", -- Title string or ReplaceType object
    message = "Message Content", -- Message string or ReplaceType object
    data = {
        href = "/messages/1", -- (Optional) Internal link to open on click
        alwaysShow = true -- (Optional) Show even if app is open
    }
}
```

</details>

### Toggle Flashlight

Toggles the phone's flashlight mode.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:ToggleFlashlight(state)
```

{% endcode %}

<table><thead><tr><th width="115" align="center">Argument</th><th width="110" align="center">Type</th><th width="104" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td><code>true</code> to turn on, <code>false</code> to turn off.</td></tr></tbody></table>

### Get Flashlight State

Checks if the flashlight is currently active.

{% code overflow="wrap" lineNumbers="true" %}

```lua
local isOn = exports["17mov_Phone"]:GetFlashlightState()
```

{% endcode %}

**Returns:**

* `boolean`: `true` if the flashlight is on.

### Set Streamer Mode State

Toggles the Streamer Mode setting. Streamer Mode hides sensitive information (like phone numbers or explicit images) from the UI.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:SetStreamerModeState(state)
```

{% endcode %}

<table><thead><tr><th width="135" align="center">Argument</th><th width="114" align="center">Type</th><th width="118" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td><code>true</code> to enable Streamer Mode.</td></tr></tbody></table>

### Get Streamer Mode State

Checks whether Streamer Mode is currently enabled.

{% code overflow="wrap" lineNumbers="true" %}

```lua
local isStreamerModeOn = exports["17mov_Phone"]:GetStreamerModeState()
```

{% endcode %}

**Returns:**

* `boolean`: `true` if enabled.

### Open App

Opens a specific application on the phone programmatically.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:OpenApp(appName)
```

{% endcode %}

<table><thead><tr><th width="122" align="center">Argument</th><th width="87" align="center">Type</th><th width="106" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">appName</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The internal name of the app (e.g., <code>"messages"</code>, <code>"camera"</code>).</td></tr></tbody></table>

### Close App

Closes a currently open application on the phone.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:CloseApp(appName)
```

{% endcode %}

<table><thead><tr><th width="118" align="center">Argument</th><th width="99" align="center">Type</th><th width="111" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">appName</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The internal name of the app to close.</td></tr></tbody></table>

### GetSignalTowers

Returns a table with all Signal Towers from config

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:GetSignalTowers()
```

{% endcode %}

**Returns:**

* `{coords: vector3, radius: number}[]`&#x20;

### GetSignalLevelForCoords

Returns a 0-4 value that represent signal strenght for given coordinates

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:GetSignalLevelForCoords(coords)
```

{% endcode %}

<table><thead><tr><th width="118" align="center">Argument</th><th width="99" align="center">Type</th><th width="111" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">coords</td><td align="center"><code>vector3</code></td><td align="center">❌</td><td>Coords to check signal</td></tr></tbody></table>

**Returns:**

* `number (0-4)`&#x20;

### GetPlayerSignalLevel

Returns a current player signal strenght&#x20;

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:GetPlayerSignalLevel()
```

{% endcode %}

**Returns:**

* `number (0-4)`&#x20;

### GetConfig

Retrieves the full phone configuration, allowing other scripts to read global settings, available applications, and their specific parameters.

{% code lineNumbers="true" %}

```lua
local phoneConfig = exports["17mov_Phone"]:GetConfig()
```

{% endcode %}

#### Returns:

* `table` Config: The main configuration table of the script.

<details>

<summary>Usage Examples:</summary>

```lua
local config = exports["17mov_Phone"]:GetConfig()

-- Check if phones are unique (metadata-based)
if config.UniquePhones then
    print("The server is using unique phone items")
end

-- Accessing specific app settings
local showNumber = config.Apps['Companies'].ShowCompanyExactNumber
print("Show exact company number: " .. tostring(showNumber))
```

</details>

### GetPlayerNumber

Returns the phone number of the simcard currently equipped by the player.

```lua
local playerNumber = exports["17mov_Phone"]:GetPlayerNumber()
```

#### Returns:

* `string` playerNumber: The current player's active phone number.

## SetPhonePosition

Sets phone position on screen

```lua
exports["17mov_Phone"]:SetPhonePosition(0.5, 0.5)
```

<table><thead><tr><th width="118" align="center">Argument</th><th width="99" align="center">Type</th><th width="111" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">x</td><td align="center"><code>float</code></td><td align="center">❌</td><td>x coordinates (0.0-1.0) 0 being right edge of the screen, 1 being left edge of the screen</td></tr><tr><td align="center">y</td><td align="center"><code>float</code></td><td align="center">❌</td><td>y coordinates (0.0-1.0) 0 being bottom edge of the screen, 1 being top edge of the screen</td></tr></tbody></table>
