> For the complete documentation index, see [llms.txt](https://dragon-heart-studios.gitbook.io/dragonheartstudios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dragon-heart-studios.gitbook.io/dragonheartstudios/scripts/dhs-bankingsim/phone-banking-integration.md).

# Phone Banking Integration

## Phone Banking Integration

**DHS-BankingSim** supports three phone resources out of the box. Pick the one that matches your server and follow the setup steps below.

***

### lb-phone

**No setup needed.** The banking app registers itself with lb-phone automatically when the server starts. Players will find it in their app list.

***

### roadphone

roadphone does not support automatic app registration, so you need to add one entry to its config file manually.

**File to edit:** `roadphone/public/static/config/config.json`

Find the `"AppStore"` array and add this entry:

```json
{
  "name": "Fleeca Bank",
  "light_icon": "/public/img/Apps/light_mode/bank.webp",
  "dark_icon": "/public/img/Apps/dark_mode/bank.webp",
  "default": true,
  "category": "apps",
  "custom_app_id": "dhs-banking",
  "redirect": "custom_app",
  "url": "https://cfx-nui-DHS-BankingSim/web/build/phone.html?phone=roadphone",
  "darkmode": true,
  "allowJobs": [],
  "disallowJobs": [],
  "custom_event": { "active": false, "closeWhenOpenApp": false }
}
```

> **`"redirect": "custom_app"` is required.** This tells roadphone to load the banking app inside an iframe. Without it, the app won't open. No Lua file changes are needed.

After adding the entry, restart roadphone (or your server). The Fleeca Bank app will appear in the phone's app store.

***

### 17mov\_Phone

**No setup needed.** The banking app registers itself with 17mov\_Phone automatically on server start. If 17mov\_Phone restarts mid-session, the banking app re-registers itself automatically.

***

### Phone Banking Settings

These settings are in `Config.PhoneBanking` inside `config/config.lua`:

| Setting                 | Default                  | What It Does                                                       |
| ----------------------- | ------------------------ | ------------------------------------------------------------------ |
| `Enabled`               | `true`                   | Turn phone banking on or off                                       |
| `DailyLimit`            | `$50,000`                | Maximum total transfers a player can make per day via phone        |
| `MaxTransactionAmount`  | `$25,000`                | Maximum amount for a single phone transfer                         |
| `TransferFee`           | `flat $5`                | Fee charged on each phone transfer                                 |
| `StepUpThreshold`       | `$10,000`                | Transfers above this amount ask for a PIN confirmation again       |
| `MaxPinAttempts`        | `3`                      | Wrong PIN attempts before the account locks                        |
| `LockoutMinutes`        | `15`                     | How long the account stays locked after too many wrong PINs        |
| `DefaultPin`            | `'1234'`                 | The PIN given to players when they first enrol                     |
| `SessionTimeoutMinutes` | `30`                     | How long before an idle phone session expires                      |
| `AuthorizedJobs`        | `police, doj, bankstaff` | Jobs that can view phone banking records (for law enforcement use) |

***

### Adding Support for a Different Phone Resource

If you use a phone resource not listed above, you can add support by editing two files that are not locked (you are allowed to change them freely):

* `client/editable_functions_cl.lua` — handles how the app is registered and how messages are sent to the phone UI
* `server/editable_functions_sv.lua` — handles server-side hooks

Open `client/editable_functions_cl.lua` and find the `EditableFunctions.RegisterPhoneApp` function. Copy one of the existing `elseif` blocks as a starting point and adjust the export name and parameters to match your phone resource.

The `EditableFunctions.SendPhoneMessage` function directly above it controls how data is sent to the phone's UI — update that too if your phone uses a different message format.
