[Free] K5 Shops

This script uses ESX Framework. The goal of this script is to implement different type of shops on your server, that can accepts multiple types of money. These shops can be used as a pawn shop, a store, or as a buyer only market. You can configure the shop to have a max capacity that players can load with their goods (i.e. iron from mining).

Demo

Watch the demo here: YouTube

Download

Features

  • Highly customizable shop configuration
  • Realtime data editing
  • No SQL
  • Performant

Dependencies

  • es_extended
  • esx_addonaccount
  • esx_society

Check out Discord

16 Likes

Very cool, come on script

hell friend, what a great job, you are an artist, thank you very much for leaving it free, you are great.

In which line of which script can I change the size of the window? it’s bigger than my climbing

Currently the script is optimized only to work with 1920x1080 sceens. You can try to set the .app class’ width and height to fit your screen, but it might break other things.

Try to search for “px” in the css file (html/style.css) and play around with the sizes. I might try to make it responsive or screen relative in the future

1 Like


Thanks for this script but i cant open the shop when i press E :sweat_smile:

Can you check your console? Both server and client.

the ui just flashes open then closed. any reason it would do that? no errors of any kind

Oh i fixed it with the distance check on closing… it was to small of an area and it thought i was out of it the whole time


At Burgershot i get this error and the pawn shop menu cant be opened…

Hey!

The example config contained an old version where only one job could have permissions. Download the repo again, or copy the config file from here: k5_shops/config.lua at main · kac5a/k5_shops · GitHub

nice release! Looks very good


Still dont work… i cant open anything. I use 1.2 btw. NO errors nothing…

It might not work with 1.2, I haven’t tested it with that version, but I think that should not be a problem. Are you sure there’s no errors on the server side either?

if v.sellOnly and v.sellJob ~= nil and not isInJobs then
  ESX.ShowNotification(Config.Locales[Config.Locale].IncorrectJob)
else
  print("TEST")
  ESX.TriggerServerCallback('k5_shops:getInitalData', function(open, shopData, itemsWithInventoryCount, playerJob)
    print("SERVERCALLBACK")
    if open then
      print("OPEN")
      local shopData = v
      shopData.items = itemsWithInventoryCount
      shopData.playerJob = playerJob
      shopData.shopId = k
      openShop = k
      TriggerServerEvent("k5_shops:lockShop", openShop)
      SetNuiFocus(true, true)
      SendNUIMessage({
        action = "open",
        data = shopData
      })
    else
      ESX.ShowNotification(Config.Locales[Config.Locale].AlreadyOpen)
    end
  end, k)
end

Replace this code in client.lua (from line 51 until 72), restart the script and check console. If you see “TEST” only then there should be something on your server console.

Love the script. Tested it and everything works correctly. Love the stock option too!


I found this

1 Like

I sent you a dm

It does that to me too!

Suddenly just happened to me out of nowhere. Worked 4 hours ago then bam that error just whilst testing

Using ESX Legacy and Ox_Inventory

I found the error. You don’t have one of the items registered in your items.lua or in your database. Make sure you only use items that are registered in your item managing script!