MX-magics
RedM resource: **usable-item spells** — short **teleport**, **summon** companions (any ped model per item), **mind force**, **launch spells** (aimed projectile + optional orbit FX), and **super jump** (stackable buff). Notifications via **ox_lib** (`lib.notify`).
| 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` (RSG bridge). |
| **VORP** | `vorp_core` + `vorp_inventory` (VORP bridge). |
`Config.Framework`: `‘auto’` (VORP if `vorp_inventory` is started, else RSG), or force `‘rsg’` / `‘vorp’`.
4. **Register items** so names match `config.lua`. For VORP, adapt `items_vorp.sql` (examples only). Match: `Config.TeleportItem`, keys under `Config.Summon.summon`, `Config.MindForceSpellItem`, `Config.SuperJumpSpellItem`, and each key in `Config.LaunchSpells.spells`.
5. Optional: item images (e.g. VORP `vorp_inventory/html/img/items/`).
1 · Short teleport
**What it does:** Use item → aim at ground → **Enter** confirm, **Backspace** cancel. Cast anim, particles, optional **NUI audio** for you and nearby players. Item removed on success (server-side check).
**Config:** `Config.TeleportItem`, `Config.TeleportCooldown`, `Config.TeleporteRaiosMira`, `Config.TeleportControls`, `Config.CastAnim`, `Config.EvilParticle`, `Config.TeleportAudio`, `Config.Notify` (`teleport*`).
2 · Summon
**What it does:** Each **inventory item** = one profile (ped model, weapon, count, spawn radius, particles, audio, cooldown). First use spawns allies; **G** = aim to **attack**, **E** = **follow**. Same item again dismisses (consumes item). Different summon item blocked while minions active. **Backspace** in aim can dismiss (see client logic).
**Note:** Internal names `SkeletonSpell` / `skeleton*` are **legacy** — any ped model works.
**Config:** `Config.Summon.summon[‘item_name’]`, `Config.Notify` (`skeleton*`).
3 · Mind force
**What it does:** Use item → aim at player or NPC → **Lift** (default **G**). **Release** (**Backspace**) drops; **Throw** (**E**) uses camera direction (server-clamped). Item consumed when grab succeeds.
**Config:** `Config.MindForceSpellItem`, `Config.MindForce` (range, throw, anims, prompts, control hashes).
4 · Launch spells
**What it does:** Each item key under `Config.LaunchSpells.spells` → `Config.LaunchSpellsByItem`. Aim → **Enter** fires synced projectile, **Backspace** cancel. Optional **orbit session**: props or particles orbit caster; each **Enter** uses a charge until cancel or empty. Explosion / impact particle per spell.
**Visuals:** Orbiting props **or** `useProps = false` + `propParticles` on invisible anchors. Ped particles: `SKEL_*` in `visuals.particles`. On objects/anchors, avoid `SKEL_*` (use bone index or omit `bones`) — see `config.lua` comments.
**Config:** `Config.LaunchSpells`, `Config.Notify` (`launch*`).
### 5 · Super jump
**What it does:** Consumable item adds `durationSeconds` to the buff while active (stacks). Optional move rate and stamina restore while active.
**Config:** `Config.SuperJumpSpellItem`, `Config.SuperJump`, `Config.Notify` (`superJump*`).
Configuration (global)
All behaviour is in **`config.lua`**. **Do not rename** keys under `Config.*`.
| Area | Keys |
|------|------|
| Framework | `Config.Framework` |
| All UI strings | `Config.Notify` |
| Teleport | `Config.TeleportItem`, cooldown, aim, audio, particles |
| Summon | `Config.Summon.summon[…]` |
| Mind force | `Config.MindForceSpellItem`, `Config.MindForce` |
| Launch spells | `Config.LaunchSpells` / `Config.LaunchSpellsByItem` |
| Super jump | `Config.SuperJumpSpellItem`, `Config.SuperJump` |
Audio paths: `html/audio/` (e.g. `audio/teleport.mp3` via NUI).
-–
## NUI
- `html/index.html` + `html/script.js` — teleport / summon SFX.
- Keep files in `html/audio/` as configured.
-–
## Support
Discord: Mexicano Scripts
-–
