Code Breakdown
π Core Configuration
local reward = 0
local itemControl = false
local atmEntity = nilreward: Stores the calculated reward amount.itemControl: Tracks whether the player possesses a stolen item.atmEntity: The entity of the stolen prop.
π οΈ Robbery Functionality
local function startPropRobbery(prop)Checks if the player has the required item.
Executes a Word Scramble Minigame to simulate hacking.
If successful, removes the prop and attaches it to the player.
π¨ Police Notification System
if math.random(1, 100) <= Config.Props[prop].notify_police_chance then
PoliceNotificationEvent()
endRandomly determines if the police should be notified.
Uses a configurable chance percentage.
π― Targeting System Compatibility
Supports both
qb-targetandox_targetfor easy interaction.Displays an interaction prompt when near the designated prop.
π¦ Drop-Off NPC System
Verifies if the player is carrying a stolen prop.
If successful, removes the prop and grants a cash reward.
π οΈ Drop-Off NPC Creation
Spawns an NPC at a configured location to serve as the fence for stolen items.
Adds interaction compatibility with
qb-targetandox_target.
Last updated