Sync Scripts
Our Links
  • Welcome To Sync Scripts!
  • Paid Scripts
    • πŸ”«AdvNPC
      • Config
      • Installation
      • Dependencies
  • Free Scripts
    • πŸ—ΊοΈSecret Maps
      • Config
      • Installation
      • Dependencies
    • πŸ’Jewelry Heist
      • Config
      • Installation
      • Dependencies
    • 🏝️Treasure
      • Config
      • Installation
      • Dependencies
Powered by GitBook
On this page
  1. Paid Scripts
  2. AdvNPC

Config

Configuration guide for Sync Scripts

Config = {}

-- Notify Settings
Config.Notifytype   = "qb"  -- 'qb' if using QBNotify

-- Prompt Settings 
Config.PromptType   = "qb" -- Vprompt, qb

-- Debug Settings
Config.Debug        = false  -- Enables/Disables Vprompt Zones for troubleshooting

-- Framework Settings
Config.framework    = 'qbcore'  -- 'qbcore'

-- Police Notify
Config.Dispatch     = "ps"  -- ps, cd

-- Script Settings
Config.minamount    = 0  -- Minimum money for robbing NPCs
Config.maxamount    = 1000  -- Maximum money for robbing NPCs
Config.cooldown     = 30000  -- Cooldown between robbing NPCs (milliseconds)

Config.Chance = {  --  0 - 100 %
    Fleeing = 20, -- Percentage chance for NPC to flee
    FightBack = 20, -- Percentage chance for NPC to fight back
    Enemy = 10, -- Percentage chance for NPC to be an enemy
}

Config.LootItems    = {
    { name = "rolex", chance = 1, minAmount = 1, maxAmount = 2 },
    { name = "radioscanner", chance = 2, minAmount = 1, maxAmount = 1 },
    { name = "weed_brick", chance = 3, minAmount = 1, maxAmount = 2 },
    { name = "moneybag", chance = 4, minAmount = 1, maxAmount = 1 },
    { name = "diamond_ring", chance = 5, minAmount = 1, maxAmount = 1 },
}

-- language (Edit to your liking)

Config.nomoneymsg   = "No cash on NPC."  -- Notification if NPC has no money (only if Config.minamount = 0)
Config.Fightback    = "They pulled a gun."
Config.NPCFleeing   = "They are running."
Config.TooSoon      = "Your last robbery was too recent. Please wait to conduct your next robbery." -- Not working
Config.VictimDead   = "Your victim is dead and cannot be robbed."
Config.TooFar       = "Your target is too far away to rob. Move closer."
Config.Reset        = "You can now rob another NPC."
Config.StealAmount  = "You stole $" --amount stolen is insterted automatically at the end of this text.
Config.StealItem    = "You stole"
Config.BackUp   = "Get out of here they are calling the homies."

If you are using ps-dispatch add this to your /ps-dispatch/client/alerts.lua

local function RobberyWithaGun(camId)
    local coords = GetEntityCoords(cache.ped)

    local dispatchData = {
        message = "Robbery in progress.",
        codeName = 'robberywithgun',
        code = '10-31',
        icon = 'fas fa-store',
        priority = 3,
        coords = coords,
        gender = GetPlayerGender(),
        street = GetStreetAndZone(coords),
        camId = camId,
        alertTime = nil,
        jobs = { 'leo' }
    }

    TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
end
exports('RobberyWithaGun', RobberyWithaGun)

If you are using ps-dispatch add this to your /ps-dispatch/Config/Config.lua

    ['robberywithgun'] = { -- Need to match the codeName in alerts.lua
        radius = 0,
        sprite = 119,
        color = 1,
        scale = 1.5,
        length = 2,
        sound = 'Lose_1st',
        sound2 = 'GTAO_FM_Events_Soundset',
        offset = false,
        flash = false
    },
PreviousAdvNPCNextInstallation

Last updated 10 months ago

πŸ”«