# SERVER EXPORTS

### Get Crypto Balance (By Source)

Retrieves the current balance of a specific cryptocurrency for a player using their Server ID (Source).

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

```lua
local balance = exports["17mov_Phone"]:Crypto_GetBalanceById(src, coin)
```

{% endcode %}

**Returns:**

* `number`: The current balance of the specified coin.

<table><thead><tr><th width="118" align="center">Argument</th><th width="93" align="center">Type</th><th width="116" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's server ID (source).</td></tr><tr><td align="center">coin</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The name/identifier of the coin (e.g., "bitcoin").</td></tr></tbody></table>

### Get Crypto Balance (By Number)

Retrieves the current balance of a specific cryptocurrency for a player using their phone number.

{% code lineNumbers="true" %}

```lua
local balance = exports["17mov_Phone"]:Crypto_GetBalanceByNumber(number, coin)
```

{% endcode %}

**Returns:**

* `number`:  The current balance of the specified coin. Returns `0` if the player is not found.

<table><thead><tr><th width="121" align="center">Argument</th><th width="104" align="center">Type</th><th width="111" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">number</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's phone number.</td></tr><tr><td align="center">coin</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The name/identifier of the coin (e.g., "bitcoin").</td></tr></tbody></table>

### Set Crypto Balance (By Source)

Sets a specific cryptocurrency balance for a player using their Server ID (Source). This overwrites the previous balance.

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

```lua
local success = exports["17mov_Phone"]:Crypto_SetCoinBalanceById(src, coin, balance)
```

{% endcode %}

**Returns:**

* `boolean`: `true` if the operation was successful.

<table><thead><tr><th width="115" align="center">Argument</th><th width="89" align="center">Type</th><th width="106" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's server ID (source).</td></tr><tr><td align="center">coin</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The name/identifier of the coin (e.g., "bitcoin").</td></tr><tr><td align="center">balance</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The new balance to set.</td></tr></tbody></table>

### Set Crypto Balance (By Number)

Sets a specific cryptocurrency balance for a player using their phone number. This overwrites the previous balance.

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

```lua
local success = exports["17mov_Phone"]:Crypto_SetCoinBalanceByNumber(number, coin, balance)
```

{% endcode %}

**Returns:**

* `boolean`: `true` if the operation was successful.

<table><thead><tr><th width="115" align="center">Argument</th><th width="89" align="center">Type</th><th width="109" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">number</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's phone number.</td></tr><tr><td align="center">coin</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The name/identifier of the coin (e.g., "bitcoin").</td></tr><tr><td align="center">balance</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The new balance to set.</td></tr></tbody></table>
