[VORP/RSG] MX-Magics

MX-magics

Discord: Mexicano Scripts
Tebex: https://mexicano-scripts.tebex.io
Preview: https://youtu.be/ZdEK2WjJfl8

RedM resource that adds three **usable-item “spells”**: a short **teleport**, **summon** companions (any ped model per item), and **mind force** (lift, release, or throw a player or NPC). Notifications use **ox_lib** (`lib.notify`).

**Version:** 1.0.0

**Game:** RedM (`rdr3`)

-–

## Requirements

| Dependency | Notes |

|------------|--------|

| [ox_lib]( GitHub - overextended/ox_lib: A FiveM resource and script library for Lua and JS. · GitHub ) | Required (`shared_scripts` + callbacks/notifications). |

| **RSG** | `rsg-core` + `rsg-inventory` when using the RSG bridge. |

| **VORP** | `vorp_core` + `vorp_inventory` when using the VORP bridge. |

Framework is selected with `Config.Framework`:

- `‘auto’` — uses VORP if `vorp_inventory` is started, otherwise RSG.

- `‘rsg’` / `‘vorp’` — force a specific bridge.

-–

## Installation

1. Place the `MX-magics` folder in your `resources` directory.

2. Ensure **ox_lib** starts **before** this resource.

3. Add to `server.cfg` (order matters relative to your framework and inventory):

```cfg

ensure ox_lib

ensure rsg-core # or vorp_core + vorp_inventory

ensure rsg-inventory # if RSG

ensure MX-magics

```

4. **Register items** in your framework so names match `config.lua` (see below). For VORP you can adapt `items_vorp.sql`; item keys in SQL are **examples** — they must match whatever you set in `Config.TeleportItem`, `Config.Summon.summon`, and `Config.MindForceSpellItem`.

5. Optional: add item images to your inventory UI (e.g. VORP: `vorp_inventory/html/img/items/`).

-–

## Features

### Short teleport (`Config.TeleportItem`)

- Use the item → aim at the ground → **Enter** to confirm, **Backspace** to cancel.

- Plays a cast animation, particles, optional **NUI audio** for you and nearby players.

- Item is removed on successful cast (server validates inventory).

- Cooldown, ray length, marker, particles, and invisibility duration are in `config.lua`.

### Summon (`Config.Summon.summon`)

- Each **inventory item name** maps to a profile: ped model, weapon, count, spawn radius, particles, audio, cooldown, etc.

- **First use:** summons allies around you; **G** opens aim mode to **attack** a target, **E** makes them **follow** you.

- **Use the same item again** to dismiss summons (item consumed on dismiss). Using a **different** summon item while minions are active is blocked.

- Cancelling aim with **Backspace** dismisses summons and consumes the item (see client logic).

> Internal names like `SkeletonSpell` / `skeleton*` in config keys are **legacy**; the feature works with **any** ped model, not only skeletons.

### Mind force (`Config.MindForceSpellItem` + `Config.MindForce`)

- Use the item → aim at a player or NPC → **Lift** (default **G**) after server checks range and inventory.

- **Release** (default **Backspace**) drops the target; **Throw** (default **E**) launches them using your camera direction (clamped on server).

- **Consumes the item** when the grab succeeds (player or NPC).

- Highly tunable: animations, throw strength, ragdoll, prompts, and control hashes in `config.lua`.

-–

## Configuration

All behaviour is driven by **`config.lua`**. Do **not** rename keys under `Config.*` — client and server depend on them.

Notable entries:

- `Config.Framework` — `‘auto’ | ‘rsg’ | ‘vorp’`

- `Config.Notify` — all user-facing strings and `lib.notify` types

- `Config.TeleportItem`, `Config.TeleportCooldown`, cast anim, particles, audio paths

- `Config.Summon.summon[‘your_item_name’]` — per-item summon profiles

- `Config.MindForceSpellItem`, `Config.MindForce` — mind force tuning and prompts

Audio files live under `html/audio/` and are referenced as paths like `audio/teleport.mp3` (played via NUI).

-–

## NUI

- `ui_page`: `html/index.html` + `html/script.js` for teleport/summon SFX.

- Keep audio files in `html/audio/` as configured.

-–

## Support

Discord: ( Mexicano Scripts )

-–

## License / escrow

`config.lua` and `html/audio/*` are listed under `escrow_ignore` in `fxmanifest.lua` for escrow builds. Adjust according to your distribution.

1 Like