[DISCONTINUED] esx-kr-advanced-shops

Create pull request pls check up @krille

  • included de.lua
  • fixed sql insert primerykeys

[ERROR]
If a problem… if i open the boss menu, it freezed.

image How to edit sql , how i can do something edit or copy to make new item * Nevermind xD

Can some1 tell me how to add weapons to shop?

products time change 60 minutes

Keep getting this error when pressing “Get All Your Shipments”. Can anyone tell me why?

Blockquote
cfx> Error running call reference function for resource es_extended: citizen:/scripting/lua/scheduler.lua:405: @es_extended/server/classes/player.lua:320: attempt to index a nil value (local ‘item’)
stack traceback:
@es_extended/server/classes/player.lua:320: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
Error running call reference function for resource esx-kr-advanced-shops: citizen:/scripting/lua/scheduler.lua:405: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:628: in field ‘addInventoryItem’
@esx-kr-advanced-shops/server/main.lua:276: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
Error: Unhandled error in timer: Error: BUFFER_SHORTAGE
Error: BUFFER_SHORTAGE
at n.e [as reserve] (citizen:/scripting/v8/msgpack.js:29:12766)
at h (citizen:/scripting/v8/msgpack.js:29:15761)
at n.r [as decode] (citizen:/scripting/v8/msgpack.js:29:13908)
at n.fetch (citizen:/scripting/v8/msgpack.js:29:6972)
at n.u [as read] (citizen:/scripting/v8/msgpack.js:29:12076)
at Object.n [as decode] (citizen:/scripting/v8/msgpack.js:29:7097)
at unpack (citizen:/scripting/v8/main.js:20:33)
at citizen:/scripting/v8/main.js:51:20
at setImmediate (mysql-async.js:4962:9)
at Object.callback (citizen:/scripting/v8/timer.js:96:21)
Blockquote

Did you find any solution to that?

Error: (node:59884) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
Error: (node:59884) UnhandledPromiseRejectionWarning: Error: ER_BAD_FIELD_ERROR: Unknown column ‘ShopNumber’ in ‘where clause’
at Query.Sequence._packetToError (mysql-async.js:244:14)
at Query.ErrorPacket (mysql-async.js:2109:18)
at Protocol._parsePacket (mysql-async.js:5941:23)
at Parser.write (mysql-async.js:6198:12)
at Protocol.write (mysql-async.js:5701:16)
at Socket. (mysql-async.js:693:28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
--------------------
at Pool.query (mysql-async.js:4728:23)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:96:41
Error: (node:59884) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)

Amazing resource!! Thank you!

There is one thing, SQL error pops up when accidentally item’s price has been set to 0. Maybe rather send notification to player? I’ve overlooked this and was confused. Only after reading console error, I got it.

Also, maybe interesting addition would be, if shops without owner/items on the store, wouldn’t be marked for other players on the map. :slight_smile:

how to put trigger event on gcphone?

It goes on to inform the police about the robbery.
But I’ve got gcphone in use

TriggerServerEvent(‘esx_phone:send’, “police”, "Shop robbery at the " … result.name … '‘s shop’, true, coords)

??

Hi mate just wondering how you fixed this as im having the same issue. You said you deleted shops? But what do you mean by that?

EDIT I managed to work it out.

You must delete “shops” in your database ^^ i see you edit *

Wont open the menu…so when we buy a shop u can just go there and stand by the green tag…it shows press e but wont open it any recon on that
but its a awsome script and good job on it

Is the safe in the package?
Everything works, but I do not have a safe.

  1. Everything I did according to the instructions.

it seems to have a problem… if you spam “E” button it will open the items in shop many times…and it will allow you to order without paying for items…
…is it possible to make the shop open the menu without pressing “E” ??? it wold be nice if you go in the “buy zone” to open the menu automaticaly…

…any idea how to implement this???

Hello, my safe is invisible how to fix it?

Hello, I have a problem, when I buy shop, then I go in that shop it shows me "Press E to open the shop. I press E but nothing happents…
Thanks for help :smiley:

you can edit on client.lua file, or you can fix spam “E” by your self.

well… i was asking for a way (code) to automaticaly open shop when entering the store circle… “fixing the E-spam” will not work, even if you delay the key… it will open shops 15…if you press 15 times that key

If delay key not work , try to use disablekey, its work for me,.

any code for that?