(UPDATE-11/12/2019) [Release] [ESX] Shops with bars (V.1.7) (OLD ESX)

It does what the tittle says, it is the esx_shops it more items and bars so you can bee an alcoholic

I have this for some time now, I modified some code but everything is working fine.

  • Make sure you’re using my version of esx_basicneeds(the on that comes with the download) or this script’ll not work properly, besides that make sure you have all the items in your database (shops and items table) or this’ll not work.

REQUIREMENTS:

  • Essentialmode
  • Es_extended
  • esx_status

INSTALLATION

  1. Download the file
  2. Stop the server
  3. Add all the files to [esx] folder in the resources folder
  4. Add the sql files to the database
  5. Add the 2 resource names to the server.cfg
  6. Clean the cache and start the server

This is the order how you should have your server.cfg with this scripts

start the rest of extended scripts

start esx_status
start esx_basicneeds
start esx_shops

You have here some screenshots

Blips on the map
mapa

Menus
barmenu
shopmenu
NightClub
nightclub

ESX_SuperMarket Feature


(You’ll need to add your own pictures, check __recource.lua and img folder to see wich ones you’re missing, the name of the pictures need to be the same name as the items in the database.

Download here:
Github version:

Click me

V.1.5esx_shops_with_bars.1.5.rar (39.5 KB)
RECOMMENDED: As i’m tired to say, make sure you have every other script related to ESX updated, then with the database just delete the old SHOPS table and add the new one, in ITEMS table delete only the items related to the shops and run the sql file, alot of people ask me this just read the entire post and some comments!

V.1.4esx_Shops_With_Bars1.4.rar (40.1 KB)
V.1.3esx_Shops_With_Bars.1.3.rar (40.1 KB)
V.1.2esx_shops_with_bars.1.2.rar (146.8 KB)
V.1.1esx_shops_with_bars.1.1.rar (198.6 KB)
V.1.0esx_shops_with_bars.rar (196.3 KB)

Change Log

Change Log

  • V.1.1:

    • Sql files fixed.
    • Config.lua of shops fixed.
    • Lighter and Cigarett added.
    • You can only use the cigarett if you have an lighter.
  • V.1.2:

    • Now you don’t need esx_map anymore.
    • Now you don’t need esx_optionalneeds anymore.
    • Sql files once again fixed and rewrote with the new stuff.
    • Added milk wich removes the drunk effect a little bite if you drink it.
    • I have compressed the code and scripts so now only uses 2, you still need esx_status of course.
  • V.1.3:

    • Sql files rewritten.
    • Some changes in the code itself.
    • Evertyhing was updated and tested.
    • Added cigars and ligthers (scrpit made by: @KandaSorata).
    • Changed the percentages of the drinks so each one will give you different alcohol numbers.
  • V.1.4:

    • Sql files rewritten.
  • V.1.5:

    • Nightclub added to the shops, 2 counters inside the nightclub.
    • Sql files updated.
    • Nightclub has items of their own.
  • V.1.6:

    • ESX_SuperMarket feature added ( Big thanks to @Ali_Ebrahiminejad for the permission and help on this) .
    • Old code for the normal ESX Menu commented ( you can still use it).
    • Sql file once again rewitten and some extra items removed.
    • Pictures not added because I use my own ones and some of them I edited.
    • There’s not any new item so if you already had the 1.5 version of this script you don’t need to add the sql file.
  • V1.7:

    • Added the new ESX weight system.

For the future updates

  • I saw one script about binoculars i was thinking in adding them to the script so you could buy them, give some feedback about this and other ideas to put in this.

Note

  • The Bahamamas club is closed you can use other script to get in, for example: drz_interiors.
  • If you get stuck on the smoking animation press X.
  • In order to you use the nightclub you need to have a script that loads ipls you can use one made from @Bob_74 it does the job, and in order to enter the nightclub you can use another script for example called: drz_interiors you have here the coordinates of the entrance of the club ( x=-1569.39 y=-3016.89 z=-75.40 )
34 Likes

Did you made this? I’ve seen it on ESX Discord.

2 Likes

@Roddan
Yes, just go to #fx_scripts scroll up a little bite you will find this scripts uploaded by me

1 Like

Thanks! :slight_smile:

3 Likes

Cant seem to get the menu to pop up. I see the marker. Tried changing the keybind still nothing.

4 Likes

I have the same issue.

2 Likes

Are there any animations/effects to the player consuming the alcohol?

1 Like

@Scott_Wren @Deveraux
Do you have esx_status? If so do you have it before those 4 on the server.cfg? And check is the 4 are correct with the folder name. xD

1 Like

@SendMeMemes
Yes the player does the animation of drunk

1 Like

Yep - I have the default optionalneeds working, just couldn’t get this one going.

2 Likes

Did you add the sql files from esx_shops and esx_basicneeds to the database?

1 Like

Yep - I even tried yelling at my PC.

4 Likes

Ahahah that was a good one xD

  • Did the sql file gave any error?

  • how do you have your start order on server.cfg? (Including esx_status)

1 Like

Nope, it didn’t throw any errors when linking to the DB.

Start of the list is below:

Default scripts

start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start baseevents
start anticheat

Essentialmode

start mysql-async
start essentialmode
start es_admin2
start esplugin_mysql

Extended defaults

start es_extended
start scoreboard
start esx_menu_dialog
start esx_menu_default
start esx_menu_list
start esx_status
start esx_map
start esx_basicneeds
start esx_optionalneeds
start esx_shops
start esx_service
start esx_voice
start esx_identity
start esx_animations
start esx_aiomenu
start esx_moneywash

3 Likes

@Deveraux
Ok the order is good
In your item table on the database do you have the items? Example: bread, water

1 Like

Hello my table does not want to take utf8mb4_bin

2 Likes

@Baguette_man_bruno
Try this sir. Xd

-- Estrutura da tabela items
--

CREATE TABLE IF NOT EXISTS items (
id int(11) NOT NULL,
  name varchar(255) COLLATE utf8mb4_bin NOT NULL,
  label varchar(255) COLLATE utf8mb4_bin NOT NULL,
  limit int(11) NOT NULL DEFAULT -1,
  rare int(11) NOT NULL DEFAULT 0,
  can_remove int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

--
-- Extraindo dados da tabela items
--

INSERT INTO items (id, name, label, limit, rare, can_remove) VALUES
('bread', '🍞Bread', -1, 0, 1),
('water', '💦Water', -1, 0, 1),
('wine', '🍷Wine', -1, 0, 1),
('beer', '🍺Beer', -1, 0, 1),
('vodka', '🍹Vodka', -1, 0, 1),
('chocolate', '🍫Chocolate', -1, 0, 1),
('sandwich', '🌯Sandwich', -1, 0, 1),
('hamburger', '🍔Hamburger', -1, 0, 1),
('tequila', '🍸Tequila', -1, 0, 1),
('whisky', '🥃Whisky', -1, 0, 1),
('cupcake', 'ðŸregisteredCupcake', -1, 0, 1),
('cocacola', '🥛Coca-Cola', -1, 0, 1),
('icetea', '🍶Ice-Tea', -1, 0, 1),
('redbull', '☕Coffe', -1, 0, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table items
--
ALTER TABLE items
 ADD PRIMARY KEY (id);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table items
--
ALTER TABLE items
MODIFY id int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=52; 
1 Like

Super this works thank you very much the friend

2 Likes

the basic needs bars dont showup for me and the shops when i go to them i click e and nothing happens

2 Likes
  • Do you have esx_status installed and starting before those 4 on server.cfg?

  • Did you add esx_shops.sql and esx_basicnneds.sql to the database?

  • Do you have everything correctlly installed? For example in the database do you have all the items?

  • Any error on console?

1 Like