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

there in my db

and no extras and the config.lua:

Config = {}

Config.DrawDistance = 100
Config.Size         = {x = 1.5, y = 1.5, z = 1.5}
Config.Color        = {r = 0, g = 128, b = 255}
Config.Type         = 1
Config.Locale = 'en'

Config.Map = {
  {name="Tequil-La La",color=27, id=93, x=-565.906, y=276.093, z=100.176},
  {name="Bahamas",color=27, id=93,x =-1388.409, y =-585.624, z =100.319},
  {name="Stripclub",color=27, id=121,x =132.17, y =-1304.42, z =100.319},
  {name="Yellow Jack",color=27, id=93,x =1992.69, y =3058.57, z =100.319},
  {name="Shops",color=2, id=52,x =373.875, y =325.896, z =100.319},
  {name="Shops",color=2, id=52,x =2557.458, y =382.282, z =100.319},
  {name="Shops",color=2, id=52,x =-3038.939, y =585.954, z =6.908},
  {name="Shops",color=2, id=52,x =-3241.927, y =1001.462, z =11.830},
  {name="Shops",color=2, id=52,x =547.431, y =2671.710, z =41.156},
  {name="Shops",color=2, id=52,x =1961.464, y =3740.672, z =31.343},
  {name="Shops",color=2, id=52,x =2678.916, y =3280.671, z =54.241},
  {name="Shops",color=2, id=52,x =1729.216, y =6414.131, z =34.037},
  {name="Shops",color=2, id=52,x =1135.808, y =-982.281, z =45.415},
  {name="Shops",color=2, id=52,x =-1222.915, y =-906.983, z =11.326},
  {name="Shops",color=2, id=52,x =-1487.553, y =-379.107, z =39.163},
  {name="Shops",color=2, id=52,x =-2968.243, y =390.910, z =14.043},
  {name="Shops",color=2, id=52,x =1166.024, y =2708.930, z =37.157},
  {name="Shops",color=2, id=52,x =1392.562, y =3604.648, z =33.980},
  {name="Shops",color=2, id=52,x =-48.519, y =-1757.514, z =28.421},
  {name="Shops",color=2, id=52,x =1163.373, y =-323.801, z =68.205},
  {name="Shops",color=2, id=52,x =-707.501, y =-914.260, z =18.215},
  {name="Shops",color=2, id=52,x =-1820.523, y =792.518, z =137.118},
  {name="Shops",color=2, id=52,x =1698.388, y =4924.404, z =41.063}
}

Config.Zones = {

    TwentyFourSeven = {
        Items = {bread,water,chocolate,sandwich,hamburger,cupcake,cocacola,icetea,redbull,milk,cigarett,lighter},
        Pos = {
            {x = 373.875,   y = 325.896,  z = 102.566},
            {x = 2557.458,  y = 382.282,  z = 107.622},
            {x = -3038.939, y = 585.954,  z = 6.908},
            {x = -3241.927, y = 1001.462, z = 11.830},
            {x = 547.431,   y = 2671.710, z = 41.156},
            {x = 1961.464,  y = 3740.672, z = 31.343},
            {x = 2678.916,  y = 3280.671, z = 54.241},
            {x = 1729.216,  y = 6414.131, z = 34.037}
        }
    },

    RobsLiquor = {
        Items = {bread,water,chocolate,sandwich,hamburger,cupcake,cocacola,icetea,redbull,milk,cigarett,lighter},
        Pos = {
            {x = 1135.808,  y = -982.281,  z = 45.415},
            {x = -1222.915, y = -906.983,  z = 11.326},
            {x = -1487.553, y = -379.107,  z = 39.163},
            {x = -2968.243, y = 390.910,   z = 14.043},
            {x = 1166.024,  y = 2708.930,  z = 37.157},
            {x = 1392.562,  y = 3604.684,  z = 33.980}
        }
    },

    LTDgasoline = {
        Items = {bread,water,chocolate,sandwich,hamburger,cupcake,cocacola,icetea,redbull,milk,cigarett,lighter},
        Pos = {
            {x = -48.519,   y = -1757.514, z = 28.421},
            {x = 1163.373,  y = -323.801,  z = 68.205},
            {x = -707.501,  y = -914.260,  z = 18.215},
            {x = -1820.523, y = 792.518,   z = 137.118},
            {x = 1698.388,  y = 4924.404,  z = 41.063}
        }
    },

    Bar = {
        Items = {wine,beer,vodka,tequila,whisky},
        Pos = {
            {x = 127.830,   y = -1284.796, z = 28.280}, --StripClub
            {x = -1393.409, y = -606.624,  z = 29.319}, --Bahamamas
            {x = -559.906,  y = 287.093,   z = 81.176}, --Tequila la
            {x = 1986.18,   y = 3054.31,   z = 46.32}
        }
    }
}
1 Like

Ok looks good, the items table?
did you cleared the old items and added the new ones?

i deleted the shops and added the db

1 Like

And the items table sir?

oh was i supposed to clear the items?

1 Like

Yes xD
and add the new ones, or just add the new ones manually if you prefer
Attention only clear the items that are from the shops not the other for example the drugs ones and all of that xD

And thanks for using this script!

Hm I follow all the steps above and it broke my server. I can see all the items in the shop, but I cant buy them, the reason seems to be that my inventory is not working, cant get it to pop up on F2. I have cleared the server cache and my client cache… Any ideas of what could of happend?

edit: i cant see my money or bank balance, or my work title either. My character doesnt even load.

inactivated shops and basicneeds in the server.cfg, to see if the inventory and other stuff starts to work again, but it doesnt. The only thing I removed from the server before it break was:

1 Like

Ok so did you update anything more for example for the new version of essentialmode?
because even if the scripts had errors it wouldn’t brake essentialmode and extended mode itself, did you add the 2 sql files? and did they worked?

Yes, I added the 2 sql files to the database, esx_basicneeds.sql and esx_shops.sql, also I could see them working in game, but couldnt buy anything due to my inventory, economy was broken, so in some way i totally broke essentialmode and extended I think. Its weird that the script worked as it supposed to do, but that everything else broke.

Funny thing: I forgot to backup my server so had to reinstall everything, im going to test again tomorrow.

One question, am I supposed to delete the items and shops table in the database before importing the new ones? I did that because it wasnt possible in any other way. Im using heidi.

1 Like

Ohh in that case if you already had inventory erros this of course could helped that problem :confused:

Ok sir good luck

The shops items in items table, not all of them only the shops ones, and the shops table yes, because the new sqls have new things xD

works fine but if i try to add new items the shop doesn’t open anymore

2 Likes

Yes that’s been happening to me lately but if I replace my backup it works fine without it

1 Like

@Gaming_Box_2.0 @rhys19
You need to add them on the database, on the config.lua of esx_shops and in the server/main.lua from esx_basicneeds

@David_Carneiro

Hi again, there is one thing I dont understand that u might be able to help me with.

I want to add more items to a store, for example: I want to add cocacola to LTDgasoline. I go into the database and the shops table, I add a new row, LTDgasoline, cola, 10. But this doesnt pop up in the store. Some of the stores doesnt even have items in them, they are empty, I cant find the logic of why items doesnt appear in the shop. What am i doing wrong if the items doesnt appear in the shop?

1 Like

Do you have any ideas to connect nb_menu to it?

You need to add them on the database shops and items table, on the config.lua of esx_shops and in the server/main.lua from esx_basicneeds

how do i get emojis infront og the drinks?

1 Like

Items table label section on DB

BUT where do you find the code for the emoji. its like only some that is working

1 Like