sack-dollarAndrew's RobNPC

Overview

Andrew’s RobNPC is a FiveM script that allows players to rob NPCs (peds) with interactive animations while alerting nearby police officers. It includes configurable loot tables, small weapon chances, and money rewards.

Key Features

  • Rob NPCs with hands-up and other realistic animations.

  • Local police are alerted automatically when a robbery occurs.

  • Configurable loot, weapons, and money rewards.

  • Easy to configure distances, search times, and item chances.


Configuration (config.lua)

Distances & Timings

Option
Value
Description

Config.AimDistance

15.0

Maximum distance (meters) at which a player can aim at an NPC to trigger the hands-up reaction.

Config.WalletDistance

3.0

Distance threshold for wallet interactions; do not modify.

Config.SearchDistance

2.0

Minimum distance required to search a deceased NPC.

Config.SearchTime

4000

Duration of search action in milliseconds (4 seconds). Changing this may break animations.

Config.AimDistance = 15.0
Config.WalletDistance = 3.0
Config.SearchDistance = 2.0
Config.SearchTime = 4000

Loot Items

Define what items NPCs may drop during a robbery. Each item has a chance percentage to drop.


Small Weapons

Configurable table of small weapons that NPCs may drop. Each weapon has a label, hash, and chance to drop.


Money Rolls

Define random money amounts NPCs may drop during a robbery.


Usage

  1. Aim at an NPC within Config.AimDistance to trigger the hands-up animation.

  2. Interact with the NPC to rob them or grab items.

  3. Search deceased NPCs if within Config.SearchDistance (takes Config.SearchTime milliseconds).

  4. Local police are automatically alerted during the robbery.


Tips & Best Practices

  • Do not modify Config.SearchTime or Config.WalletDistance as it may break animations.

  • Adjust loot chances carefully to balance gameplay.

  • Use small weapons and money rolls to create variety in rewards.

  • Test distances in-game to ensure animations trigger correctly.

Last updated