> For the complete documentation index, see [llms.txt](https://rayn-scripts.gitbook.io/rayn-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rayn-scripts.gitbook.io/rayn-scripts-docs/rayn_simcards/how-it-works.md).

# How it works

SIM cards, theft, duplicates and custom numbers.

### A new player

A phone without a SIM card has no number. Using it shows *No SIM card*.

### Buying a card

At the vendor choose **Buy a new SIM card**. If the player carries an empty phone, the card goes straight into it (`AutoInsertOnBuy`). Otherwise the card lands in the inventory.

One character owns one number – to get a different one, use a custom number.

### Inserting and ejecting

| Action                | Result                                                                                |
| --------------------- | ------------------------------------------------------------------------------------- |
| Use the SIM card      | It goes into an empty phone, the phone gets the number, the card leaves the inventory |
| Phone → **Eject SIM** | The card from that phone goes back to the inventory                                   |
| `/simeject`           | Ejects the card from the phone in use                                                 |

If the inventory is full the card stays in the phone, so a card can never disappear.

The number is stored in the phone item. Hand the phone to someone and the number goes with it; take the card out and the phone is empty again.

### Theft, blocking and duplicates

* **Report stolen** blocks the current card. The number stays reserved for the owner.
* **Duplicate** blocks every active card of the number and gives a new card for the **same** number.
* A blocked card is removed from the phone that holds it right away for online players, and for offline players when they log in, use the phone or move it into their inventory.
* Ejecting a blocked card destroys it.

{% hint style="info" %}
Until the owner reports the card, whoever holds it can use the number – that is the point of stealing a SIM. lb-phone's own PIN lock still protects the phone.
{% endhint %}

### Custom numbers

At the vendor the player types the number they want and clicks **Order**.

* The number is checked against the length limits, allowed prefixes, the blacklist and every number already in use (also in lb-phone tables).
* A player who already has a number gets it **replaced**: if their card is in their phone, the phone switches to the new number on the spot. Contacts and messages move with it (`MoveLbData`).
* All cards of the old number are blocked and the old number is released.

Admins can do the same for free with `/setnumber [id] [number]`.

### Phones that already had a number

Phones that got an lb-phone number before installing the script keep it. Change this with:

* `StripLegacyNumbers = true` – all old numbers are removed, everyone needs a SIM card.
* `ReplaceLegacyNumber = true` – a card can be put into a phone with an old number, overwriting it.

### Classic mode

Without ox\_inventory, or with `Config.RequireSim.Enabled = false`, the number belongs to the character instead of the phone item:

* use lb-phone with `Config.Item.Unique = false`,
* apply only `functions_patch.lua` and keep the original `uniquePhones` files.

Buying, blocking, duplicates and custom numbers work the same way. The mode switches off by itself when lb-phone runs with `Unique = false`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://rayn-scripts.gitbook.io/rayn-scripts-docs/rayn_simcards/how-it-works.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
