esx-framework / esx_core

Official Repo For core resources for esx-legacy
https://documentation.esx-framework.org/
GNU General Public License v3.0
368 stars 733 forks source link

[Feature Request] - es_extended - Old default inventory back #1325

Closed east-22 closed 6 months ago

east-22 commented 7 months ago

So, now the inventory works with esx_context, but is there a way to add a option in config that you can choose between esx.ui.menu and esx_context. Because the old inventory was good because it could be used by arrow keys. Esx_context works with mouse and so does other inventories what i have found on the internet (huds) And yeah, i could go back to old versions of es_extended, but i want to use the newest version.

If you could tell me a way to go back with esx ui menu, sure tell me please.

But this feature in my opinion is great, if people would still like to use latest version of es_extended and still use old style default inventory! (found this picture from google, its like that, but its redesigned esx_menu_default) image

Gellipapa commented 7 months ago

@granfuego Hi! I will ask the team how appropriate it would be to do this. If it comes back it will be switched on/off based on a config.

east-22 commented 7 months ago

@granfuego Hi! I will ask the team how appropriate it would be to do this. If it comes back it will be switched on/off based on a config.

Okay, and then there would be a problem with other scripts aswell because other scripts now uses context. Also, is there a way to use context with arrow keys and not with my mouse? that would basically fix the problem.

Example: If i would be a cop and needed to go after someone, the context menu with f6 in policejob isnt great. you cant move while using it, so no handcuffing anyone because of course they can run away. Also, finnish servers usually are more kind of shooting and criminal activity, so we need a inventory that we can use while being in a shooting scenario (bulletproof vests, heals) But i still want to make my server with the latest esx, and not old versions.

and, sorry if my explanation is complicated, english isnt my main language:)

Gellipapa commented 7 months ago

@granfuego

@granfuego Hi! I will ask the team how appropriate it would be to do this. If it comes back it will be switched on/off based on a config.

Okay, and then there would be a problem with other scripts aswell because other scripts now uses context. Also, is there a way to use context with arrow keys and not with my mouse? that would basically fix the problem.

Example: If i would be a cop and needed to go after someone, the context menu with f6 in policejob isnt great. you cant move while using it, so no handcuffing anyone because of course they can run away. Also, finnish servers usually are more kind of shooting and criminal activity, so we need a inventory that we can use while being in a shooting scenario (bulletproof vests, heals) But i still want to make my server with the latest esx, and not old versions.

and, sorry if my explanation is complicated, english isnt my main language:)

Yes, this is exactly the question whether it should be solved globally or locally, i.e. that a given script uses context and a given script does not use context.

This is the questionable part.

Yes we know that context is an obsolete thing, it was a very old rudimentary context menu experiment, but for some reason everything was rewritten for it.

We also know that context is about useless in the future we will work on it to have a usable context menu for ESX.

I'll see how complicated it would be to write a wrapper for it and report back with the results.

east-22 commented 6 months ago

@Gellipapa hey, just wondering how long would it take to add this feature? No rush of course but i just looked and its in pending so i just thought id ask, because i would like to add it on my server as soon as the update comes for es_extended

Gellipapa commented 6 months ago

@granfuego Hi! Sorry for late response but we have discussed it with the team and several people have indicated that it is not a good direction to write a wrapper for this, so that context and menu can be used.

The solution will be to create a new context menu that will support both keyboard presses and clicks. This is the right direction.

So if you want to have the menu system on your server you have to implement it yourself.

You have the exact commit that you can use to reset the inventory by copying its contents into es_extended.

I suggest you do this in a separate lua file so that you only have to copy your custom file every time you update and the inventory will work.

Thanks for your understanding, let's work on the new context menu.

Gellipapa commented 6 months ago

I'll send you a file with this logic in it and you just copy it and the inventory will work for you, I'll write to you soon.

east-22 commented 6 months ago

@Gellipapa okay, i can try my best to make it work myself, and if the context menu will support keyboard inputs then thats just fine. Because then its almost as same as the old one. But no worries, i almost forgot about this because i have been busy with my server, and i know you are busy too to answer every message.

But glad to hear the support for esx context is coming!

Gellipapa commented 6 months ago

@granfuego Hi! Since it will take more time to rewrite the context menu, I have written the old logic for you, so copy the file in this zip in the client/modules folder and replace the fxmanifest file with the one in the .zip file. After that a server restart and then you can use it smoothly by pressing F2 the old esx_menu_default inventory will appear.

default_inventory.zip

UI: So if an esx update comes in the future, you should always copy this file back and enter the file path in fxmanifest and use this kind of inventory with the latest es_extended.

east-22 commented 6 months ago

@Gellipapa Thanks for making it!! I just got off my pc but seems like i gotta go back on it and test it out.😅

east-22 commented 6 months ago

@Gellipapa Im not sure what i did wrong but didnt work, here is what i did.

  1. I put the default_inventory.lua in es_extended/client/modules
  2. I replaced the fxmanifest.lua
  3. restarted my server
  4. tried it but didnt work
  5. Then tried to change Config.EnableDefaultInventory to false and true
Gellipapa commented 6 months ago

@granfuego Hi! Ohh sorry i uploaded bad zip file. I will upload new zip.

Gellipapa commented 6 months ago

This is fixed version.

default_inventory-fixed.zip

east-22 commented 6 months ago

@Gellipapa It worked!! Thank you, you have no idea how helpful you were! Just saying because im not that experienced in lua that i could do that:D

Gellipapa commented 6 months ago

I am glad that it worked.

Pascu4l commented 5 months ago

Hello, I have tried doing the same thing and it doesn't work, could you help me?

east-22 commented 5 months ago

Hello, I have tried doing the same thing and it doesn't work, could you help me?

yeah sure add me on dc: east_22