[ESX] [FREE] BX-NpcRob 👻


Introducing BX-NpcRob, an advanced FiveM script that allows players to engage in dynamic NPC robberies with OX_Target, featuring extensive customization options, configurable police alerts, and top-tier optimization for a seamless gameplay experience


Features

  • :police_car: Rob NPC: Players can rob NPCs.

  • :fire: Blacklist NPC: Ability to add NPCs to a blacklist to make them unrobable.

  • :mega: Configurable Notifications: Supports OX / OKOK or ESX notifications.

  • :lock: Minimum Cops Requirement: Configurable minimum cops.

  • :rotating_light: Police Alerts: Configurable probability and notifications for police alerts when a robbery occurs.

  • :police_car: Npc Attack probability: Probability of an NPC becoming aggressive .

  • :man_mechanic: Multi-language and Easy to Configure: Configurations and messages can be easily adjusted via config.lua.

  • :arrows_counterclockwise: Automated Updates: Automatic update checks to ensure users always have the latest version.

  • :green_circle: Maximum Optimization: Designed for minimal performance impact (0.00 ms).


Update

  • V2 : Add Config.TimeToRobAgain

Dependency

  • ESX
  • OX_LIB
  • OX_TARGET

Configuration

Config.lua
Config = {}

Config.UseOldEsx = false -- false use ESX Export

Config.Notify = 'okok' -- 'ox' / 'okok' / 'esx'

Config.TimeToRobAgain = 30

Config.MinimumCops = 1 -- Minimum cops for rob 

Config.PoliceJobName = 'police' -- Name of police job

Config.PoliceAlertProbability = 30 -- in %

Config.ResistanceChance = 5 -- in % / 0 for disable


Config.NameWeaponNPC = "weapon_snspistol_mk2" --  must be [Handguns]

Config.CheckUpdate = true



Config.BlacklistNpc = { --- Npc can't be rob
    [GetHashKey('s_m_m_highsec_01')] = true,
    [GetHashKey('s_f_m_shop_high')] = true,
    [GetHashKey('mp_m_weapexp_01')] = true,
    [GetHashKey('s_m_m_scientist_01')] = true,
    [GetHashKey('s_m_y_blackops_01')] = true,
    [GetHashKey('u_m_y_babyd')] = true,
    [GetHashKey('mp_m_shopkeep_01')] = true
}

Config.Items = { --- Random Item to rob
    {
        itemName = 'phone',
        itemRandomAmount = {1, 1}
    },
    {
        itemName = 'money',
        itemRandomAmount = {1, 150}
    },
    {
        itemName = 'bread',
        itemRandomAmount = {1, 1} 
    },
    {
        itemName = 'water',
        itemRandomAmount = {1, 1}
    },
}

Strings = { --- translation
    ['racket'] = 'Rob this person',
    ['can_rob_npc_again'] = 'You can\'t rob the same person twice',
    ['rob_complete'] = 'You have rob this person',
    ['police_alert'] = 'A citizen is being racketed, help him!',
    ['police_alert_blip'] = 'Racket',
    ['need_police'] = 'Not enough police officers in town.',
    ['rob_cooldown'] = 'Vous ne pouvez pas ',
}








Live Preview


BX-DOCUMENTATION

DOCUMENTATION


DOWNLOAD

TEBEX ( For support )

Or


Logo BX icon

7 Likes

This looks very cool, great release!

1 Like

Is it a cool down time on this?

If I understand correctly, the question is whether there is a cooldown between two robberies?

Yes sir and the script is great!

1 Like

No, but i can add this

Update

  • V2 : Add Config.TimeToRobAgain
2 Likes

if the job police is in whitelist dont work

What whitelist you talking about?

if i start the script work and after restart i try to rob and crash MainThrd/ ^1SCRIPT ERROR: @BX-NpcRob/client/cl.lua:165: attempt to index a nil value (field ‘job’)^7
MainThrd/ ^3> handler^7 (^5@BX-NpcRob/client/cl.lua^7:165)