Discord Silly Scripts

Silly Bandits

Silly Bandits

€5.03

Add to Basket

🤠 Silly_Bandits (RedM)

A lightweight bandit ambush script for RedM: When players enter specific spots, bandits can spawn, attack the player, and depending on the outcome (player dead / escaped / bandits defeated), appropriate messages are displayed.

Preview: Video

✨ Features

  • 📍 Spot-based Triggering: Ambushes start when a player comes near a startPos (distance < 30.0).

  • 🎲 Chance per Trigger: Config.BanditsChance (0–100) controls the trigger probability.

  • ⏱️ Cooldown per Spot: Config.SpotCooldown prevents a spot from triggering too often in succession (client-side per player).

  • 🧍 NPC Spawns: Multiple bandits per spot with configurable ped models.

  • 🐎 Horses + Mounting: Bandits spawn with random horses and ride/dismount.

  • 🔫 Combat Behavior: Bandits actively attack the player.

  • 🧾 Outcome Handling

    • ☠️ Player dies → "robbed" message + server event is triggered.

    • 🏃 Player escapes (too far away) → "escaped" message + cleanup.

    • ✅ All bandits dead → "cleared" message + cleanup.

  • 🧟‍♂️ Loot/Escape Sequence on Player Death: A bandit approaches the body, plays an inspect scenario animation, then the bandits ride away and are removed.

📦 Dependencies

  • VORP Core or RSGCore (Supported — auto-detected at runtime)

    • Server: the script will try to use VORP APIs when available (TriggerEvent("getCore", ...)) or RSGCore equivalents if present. It adapts at runtime.

    • Client: uses the available notify events provided by VORP/RSG (see "Notifications").

Note: If neither framework is present, in-game notifications won't appear — adjust the Notify(...) function in client/client.lua to use your notification system.

🚀 Installation

  1. Place the Silly_Bandits folder in your RedM resources folder.

  2. Start it in your server.cfg:

    • ensure Silly_Bandits
  3. Make sure **VORP or RSG **is started beforehand.

General Settings

  • Config.SpotCooldown

    • Cooldown per spot in milliseconds.

    • Example: 30 * 60 * 1000 = 30 minutes

  • Config.BanditsChance

    • Percentage chance that a spot triggers (0–100).
  • Config.runAwayDis

    • Distance at which you are considered "escaped".

Spots / Bandits

Config.Bandits is a list of spots:

  • startPos = vector3(x, y, z) → Trigger position

  • bandits = { ... } → List of NPCs

    • pos = vector3(x, y, z) → Spawn position

    • npc = "MODEL_NAME" → Ped model (not all models work)

Messages

Config.Messages defines text + display time (ms) for:

  • ambush (at start)

  • robbed (when player dies)

  • escaped (when player escapes)

  • cleared (when all bandits are dead)

If you use a different notification system, adjust the Notify(...) function in client/client.lua.

🧩 Server Event: "robbed"

When the player dies during an ambush, this is triggered:

  • TriggerServerEvent("silly_bandits:server:robbed")

The handler is in server/server.lua. Currently, removing money is only prepared as a comment.

🧰 Notes / Troubleshooting

  • Ped Models: If a model doesn't exist/isn't streamable, the corresponding NPC won't spawn.

  • Cooldown is client-side: The cooldown is stored locally per player. If you want a global cooldown, it would need to be tracked server-side.

  • Balance: Number of bandits, weapons, and horse models are defined in the client script.


Back to category