[FREE] Rename / Item Tags and Removal for ox_inventory

Did not spend too much time on this, just wanted to bring an open-source alternative to ox_inventory users.

This gives you the possibility of adding and removing item tags, it’s all item-based, since from what I know it’s not possible to define a right-click menu at runtime for an individual item, you could add a right-click feature to all your items, with the label Remove Tag, but would take time, and if no tag is applied it would still be there.

So personally think this solution was the best option for now.

Includes item blacklisting, this is shown with the Pistol in the preview.

Video Preview

Release Download
Github Repository

Code is accessible Yes
Subscription-based No
Lines (approximately) 92
Requirements ox_lib, ox_inventory
Support No
7 Likes

who said that you can’t add button through metadata? go find useButton function from client.lua, and just do add button from that function.

1 Like

Your way of approaching feels a bit hostile just going to be honest with you.

If you go over the ox_inventory codebase, you will notice that buttons are not handled inside metadata and is a subtype of their own, so without altering the ox_inventory codebase, it’s not possible to add right-click buttons/actions via metadata.

You could to it by adding buttons manually to every single item you got, personally, I don’t like that option, so I would rather have an item to remove the tag with.

And keep ox_inventory vanilla without alterations that might break down the line.

there are some smarter way than adding to every single item, i talk about it because i already have these methods. from about several months ago.

But you made alterations to ox_inventory as well then did you not?

better changing 1 line of lua every patch update, than changing multiple lines of lua + multiple lines of ts + build that code.

what i do its simple as replacing Items variable that passing to “init” nui message. that only needs 1 line + external script to process it.

but maybe if i have an opportunity, i will make a PR, so u gonna still stay to vanilla ox_inventory with my additional updates.

Sure thing!

Tried dragging the tag adder over the item in inventory, but nothing happened. No errors or F8. This is after a fresh server restart.

It only worked after a manual restart of the script

Make sure to start it after ox_inventory, and make sure ox_lib is loaded as well.

Should work straight out of the gate, with out having to restart the inventory.

Heay could you help me to make this only as event? Not as swapItems?

The main issue about making it an event, is that you would have to enter the slot id then, and that would be annoying for the user in the end.

I might be able to do so you have to drag the item down on the tag insted, so you can move the tags around freely, but as an event it will be an annoying solution

Script is great! Could I get some help changing it it to use a whitelist instead of a black list though? adding every item i dont want players to be able to rename feels way more tedious than adding every item i do want them to rename