Snatch & grab

A dynamic robbery script that allows players to snatch items from NPCs and targeted locations with an interactive minigame system and risk-reward mechanics.

Overview

Version: 1.0.11 Author: Lith Studios | Swizz Type: Crime Script Framework: Standalone (inventory integration recommended)

Features

  • Interactive snatch minigame with directional controls

  • Multiple target types (NPCs, shops, street vendors)

  • Risk-based difficulty scaling

  • Police dispatch integration with wanted levels

  • Dynamic NPC reaction system

  • Item randomization with value tiers

  • Cooldown management for repeated attempts

  • Blip tracking for wanted NPCs

  • Configurable target locations

  • Multi-language locale support

  • Debug mode for development

Installation

  1. Place ls_snatch in your resources folder

  2. Configure the script (see Configuration section)

  3. Add to server.cfg:

  1. Restart your server

Dependencies

  • Required:

    • None (standalone)

  • Recommended:

    • Framework (ESX/QBCore) for inventory integration

    • Dispatch system for police alerts

    • Wanted level system

Configuration

Located in server/editables/editables.lua and client/editables/editables.lua

Main Configuration

Target Types

Minigame Settings

Difficulty Configuration

NPC Reaction System

Police System

Cooldown System

Loot Configuration

Configure snatchable items:

Target Locations

How It Works

Player Experience

1

Target Selection

  • Identify snatchable target (NPC or location)

  • Target marked with blip (if configured)

2

Initiation

  • Approach target within interaction range

  • Press interaction key to start

3

Minigame

  • Directional control system appears

  • Player must follow on-screen prompts

  • Time limit: 15-25 seconds (random)

  • Can exit early (configurable)

4

Outcome

  • Success: Items added to inventory

  • Failure: Wanted level applied

  • Consequences: Police dispatch, NPC pursuit

  • Cooldown: Location locked for duration

5

Escape

  • Evade NPCs and police

  • Hide or travel distance to evade

Risk-Reward System

  • Easy targets: Low wanted level, common items

  • Medium targets: Moderate wanted level, valuable items

  • Hard targets: High wanted level, rare items

Higher difficulty = greater risk but better rewards

Usage Examples

Basic Snatch

1

Locate street vendor in downtown

2

Approach within interaction range

3

Press E to start snatch minigame

4

Complete directional prompts

5

Receive items on success

6

Escape area before police arrive

Shop Robbery

1

Target clothing or jewelry store

2

Initiate snatch at counter

3

Witness alert triggers

4

NPC pursues or calls police

5

Get wanted level based on difficulty

6

Hide for cooldown period

Evading Police

1

Escape pursuit after failed snatch

2

Leave wanted level area

3

Hide for 60 seconds

4

Wanted level decreases

5

Return to continue activities

Customization

Adding Custom Targets

Adjusting Difficulty

Make easier:

Make harder:

Disable Police Response

Modify Cooldown Duration

Enable NPC Pursuit

Police Integration

cd_dispatch

Custom Integration

Modify event in client/client.lua:

Troubleshooting

chevron-rightMinigame Not Startinghashtag
  • Verify target coordinates are correct

  • Check interaction distance settings

  • Ensure script is fully loaded

  • Check console for Lua errors

chevron-rightItems Not Appearinghashtag
  • Verify item names in loot table

  • Check inventory integration

  • Confirm weight limits not exceeded

  • Enable debug mode

chevron-rightPolice Not Respondinghashtag
  • Check dispatch system configuration

  • Verify police job exists on server

  • Confirm wanted level system active

  • Review dispatch integration logs

chevron-rightNPC Not Pursuinghashtag
  • Enable Config.npc_reactions.pursuit_enabled

  • Verify chase distance settings

  • Check NPC model availability

  • Confirm reaction system enabled

Debug Mode

Enable debug output:

Debug information includes:

  • Target detection

  • Minigame events

  • Item spawning

  • Police dispatch calls

  • NPC reactions

  • Cooldown tracking

Performance

  • Optimized target scanning - Only checks nearby locations

  • Efficient minigame - Lightweight UI system

  • Smart NPC pathfinding - Limited pursuit range

  • Idle: 0.00ms

  • Active: 0.02-0.03ms

  • Minigame active: 0.05ms

Locale Support

Customize text in locale/en.lua:

API Reference

Events

Client Events:

  • snatch:start - Start snatch minigame

  • snatch:success - Snatch completed successfully

  • snatch:failed - Snatch attempt failed

Server Events:

  • snatch:reward - Give player items

  • snatch:police_alert - Dispatch police

  • snatch:npc_reaction - NPC response

Exports

Currently no exports. Future versions may include:

  • AddCustomTarget() - Register custom snatch target

  • IsTargetOnCooldown() - Check target cooldown status

Support

For issues or questions:

  • Enable debug mode first

  • Check console for errors

  • Review configuration

  • Contact Lith Studios support

Changelog

v1.0.11 - Latest

  • Improved NPC pathfinding

  • Enhanced police integration

  • Added difficulty scaling

  • Fixed cooldown system

v1.0.0 - Initial Release

  • Basic snatch mechanics

  • Minigame system

  • Police integration

Last updated