[RELEASE] [ESX] Auto Stocking Black Market

RID Black Market

Description

This is the RID (Re-Ignited Development) black market weapon shop that uses a stock system.

When stock runs out players are unable to purchase more weapons from this shop. After 24hrs (at the specified time in config) there is a new delivery of stock.

Weapons are chosen at random from 5 categories; Pistols, Rifles, Shotguns, SMG’s and Snipers.

New weapons are only chosen when stock of the current weapon is 0. So when there is still stock at the specified time the weapon will not be restocked or replaced.

There is also an option for a script restart refill.

Basically if the server or script is restarted you can have the ‘stock’ of weapons refilled to random values specified in Config file.

Again this will only occur to the weapons that have 0 stock at the time of the restart.

You can change what the weapons are changed to and everything about them, price, stock amounts etc.

Read the GitHub README for more information.

Also created a tutorial file in the script. Just open the “OpenMeTutorial.lua” for a full tutorial on EVERY option in the config file!

WIKI

I also just finished creating a detailed WIKI for all the options in the config. Please check it before asking any questions as your config questions could be answered already: Home · deviljin112/rid_blackmarket Wiki · GitHub

Download

GitHub

Demo Images:

Thanks to @BM-CUSTOMS for the Images!

Demo Video:

Thanks to @BM-CUSTOMS for the Demo Video:
https://streamable.com/uj2b6

** If you can take pics/videos, we will credit you and post them here**

Update Plans/Ideas

  • Option to only be available at night! (Suggested by @Orellius)
  • Change of location at specified time to a random from config (Set multiple coordinates AND time in config)
  • Random Chance notification for police when purchasing weapon from black market
  • Police to “shut down” black market sales for 24hrs (config specific)
  • (If you have any suggestions, Please post them here and we can work on adding them in the future)

Bugs

  • Unknown yet.
  • Help us create a bug list so we can fix everything and make this work flawlessly!

Credits

MADE BY : Re-Ignited D3velopment Crew
Author: @Deviljin112 (deviljin112 (D3v) · GitHub)
Co-Author: @BTNGaming (BTNGaming · GitHub)
Special thanks to: @Crumble - Helped with some coding issues :slight_smile:
**Original Idea: @themaskedunicorn

Release History

  • Version 2.2

    • FIX: Job check for some reason broke the script on server restart
    • FIX: Police Job Check Logic
  • Version 2.1

    • ADD: Option to choose normal money or black money
  • Version 2.0

    • ADD: Disc-Inventory Option
    • ADD: Option to get ammo (disc-inventory only)
    • ADD: Change amount of ammo given (non disc-inventory only)
    • ADD: Option to choose when RESTOCK or REFILL occurs
    • ADD: Shotguns, SMGs in Blackmarket
    • ADD: Ability to add any amount of weapons to randomizer
    • ADD: Option to choose how many weapons are in each category ( Removed category limit )
    • ADD: Random values for stock
    • FIX: Removed DEBUG prints and other debugging functionality
  • Version 1.1

    • ADD: Config option for police to use the blackmarket
    • ADD: Config option for police to see the blackmarket marker
  • Version 1.0

    • ADD: Refill stock on server restart
    • ADD: Random weapon delivery at specified time
    • ADD: Random amount of stock added
    • FIX: Multiple tables of data in the menu

Dependencies

ESX
IF USING DISC-INVENTORYHUD THE FOLLOWING ARE DEPENDENCIES
Disc-Ammo
Disc-Base
Disc-InventoryHud

19 Likes

Very nice, about to install this on my server now

Edit: where is it located? no blips or anything showing on the map?

no blips will show as it black market lol

1 Like

True lol no idea where it is though lol

/tp -1297.63 -392.7 35.6 :wink:

for blackmoney to cash edit 43-45 like this;

if xPlayer.getMoney(money) >= price then
   xPlayer.removeMoney(price)
   xPlayer.addWeapon(weaponName, 42)
2 Likes

Another awesome system, well done. Are there weapons are WEAPON_X or as item for disc-inv?

1 Like

These are weapons we will be adding a config option to use it as items for disc-inventoryhud soon

1 Like

How would i alter how much ammo you receive when you buy the weapon?

You can change the location in config.lua file, the location is also available there if you want to know where to find the marker.

(Bottom of the file)

1 Like

Just so you guys know what has changed in the last 24hours

KEY: ADD - Added, FIX - Removed/Debugged.

  • Version 2.0

    • ADD: Disc-Inventory Option (With Disc-Ammo)
    • ADD: Option to get ammo (disc-inventory only)
    • ADD: Change amount of ammo given (non disc-inventory only)
    • ADD: Option to choose when RESTOCK or REFILL occurs
    • ADD: Shotguns, SMGs in Blackmarket
    • ADD: Ability to add any amount of weapons to randomizer
    • ADD: Option to choose how many weapons are in each category ( Removed category limit )
    • ADD: Random values for stock
    • FIX: Removed DEBUG prints and other debugging functionality
  • Version 1.1

    • ADD: Config option for police to use the blackmarket
    • ADD: Config option for police to see the blackmarket marker
2 Likes

See new version :slight_smile: added that to the config

(Version 2.1)

1 Like

Version 2.1

  • ADD: Option to choose normal money or black money

Also added a link to a WIKI that explains EVERY config.lua option available in detail. Please be sure to check it out and let us know if you want that as an option in the future script releases we add!

Also created a tutorial file in the script. Just open the “OpenMeTutorial.lua” for a full tutorial on EVERY option in the config file!

good release :heart_eyes:

1 Like

I found its location now, brilliant realease, thanks for the work :slight_smile:

Version 2.2

  • FIX: Job check for some reason broke the script on server restart
  • FIX: Police Job Check Logic

Download newest version to ensure no errors or script not working :slight_smile:

Actually it works but for normal money me when I set it for normal and I buy nothing to count and I have nothing in my inventory is this normal?

Check that Config.Item_mode = false if you are not using Disc-InventoryHud

Otherwise the weapon will be given to you as an item but you won’t have this item set up in DataBase causing an error.

And that Config.Use_black_money = false

other than that you shouldn’t have any issues.

  • Version 2.2
    • FIX: Job check for some reason broke the script on server restart
    • FIX: Police Job Check Logic

I have configured and nothing is counting nor gives me the weapon :slight_smile: