God Studios
Discord
  • Welcome
  • GOD - Prop Robbery & Selling System
    • How It Works
    • Code Breakdown
    • Customization
  • GOD -Dynamic Spotlights & Detection System
    • How It Works
    • Code Breakdown
    • Customization
  • GOD - Laser System
    • Overivew
    • Usage
  • GOD - Crosshair Generator
  • God - Impound System
    • How It Works
    • Installation Guide: Impound System
  • GOD - Car Parts Stealing
    • How It Works
    • Installation Guide: Car Parts Stealing
  • GOD - Nail Trap System
    • How It Works
    • Installation Guide: Nail Trap System
    • Configuration Guide: Nail Trap System
Powered by GitBook
On this page
  1. GOD - Prop Robbery & Selling System

Code Breakdown

🌟 Core Configuration

local reward = 0
local itemControl = false
local atmEntity = nil
  • reward: 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()
end
  • Randomly determines if the police should be notified.

  • Uses a configurable chance percentage.

🎯 Targeting System Compatibility

exports['qb-target']:AddTargetModel(prop, {
    options = {
        {
            action = function(entity)
                startPropRobbery(propCategory)
            end,
            icon = "fas fa-hand-holding-usd",
            label = propCategory:gsub("_", " ") .. " Soy",
        },
    },
    distance = 2.0
})
  • Supports both qb-target and ox_target for easy interaction.

  • Displays an interaction prompt when near the designated prop.

📦 Drop-Off NPC System

local function deliverPropToNpc()
  • Verifies if the player is carrying a stolen prop.

  • If successful, removes the prop and grants a cash reward.

🛠️ Drop-Off NPC Creation

local function createDropOffNpc()
  • Spawns an NPC at a configured location to serve as the fence for stolen items.

  • Adds interaction compatibility with qb-target and ox_target.


PreviousHow It WorksNextCustomization

Last updated 4 months ago