[ESX] Backpack Plugin | Chezza Inventory

esx_backpack

FiveM Script - Usable Backpack Item

Download: GitHub - Musiker15/esx_backpack: FiveM Script - Backpack Plugins for Chezza Inventory

Preview 1: esx_backpack - secondary inventory | by Musiker15
Preview 2: esx_backpack - expand inventory | by Musiker15

Description

  • You can use the bag Item, then you get nobag Item and a Bag will be added to your Ped.
  • If you use nobag Item then then the Bag will be removed from your Ped an you get the bag Item.
  • Open own Bag with Command
  • Steal Bag from closest Player with Command
  • Works with Character Names not FiveM Names

Config

Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = false
----------------------------------------------------------------
-- If you use the Plugin for Chezza Inventory, make sure this is the same ID
-- as in Config.Bags = {82} in the config.lua from chezza inventory
Config.Bags = {
    male = {bagID_1 = 50, bagID_2 = 0},
    female = {bagID_1 = 50, bagID_2 = 0}
}
Config.ItemsInBag = true -- Set true if you want that players cant use 'nobag' Item if there are Items in the Bag
----------------------------------------------------------------
-- !!! Change this to the same value in config.lua of Chezza Inventory !!!
-- Erweitern Sie den Inventarbereich des Player // Secondary Inventory, indem Sie /openbag Command eingeben
Config.BagInventory = 'expand' -- 'expand' or 'secondary'
Config.BagWeight = 60 -- Set the Value what added to the Inventory Space if Config.BagInventory = 'expand'
----------------------------------------------------------------
-- If set to true go to client.lua and change the IDs to what you set in esx_parachute
Config.useParachute = true -- Set true if you use my esx_parchute Script

Requirements

Chezza Inventory Plugin

Add the following in the config.lua from chezza inventory.

Config.Bags = {82} -- Set you Bag IDs here
Config.BagWeight = 60 -- Secondary Inventory
-- If Config.BagInventory = 'expand' you cant use the Commands /openbag and /stealbag !!!
-- Expand the Inventory Space of the Player // Secondary Inventory by typing /openbag Command
Config.BagInventory = 'expand' -- 'expand' or 'secondary'

Events / Commands

  • /openbag - Open your own Bag
  • /stealbag - Open the Bag from Player next to you

Added Client Events to add the Commands f.e. in a Menu

  • TriggerEvent(‘inventory:openBagViaMenu’)
  • TriggerEvent(‘inventory:openStealBagViaMenu’)

License

GNU General Public License v3.0

My other Scripts

Changelogs

Update v2.5
  • Fixed expand inventory space
Update v2.4

Please read the Readme.md again!
Changed documentation inside Readme.md and config.lua

Added

Config.ItemsInBag = true -- Set true if you want that players cant use 'nobag' Item if there are Items in the Bag
Update v2.3

Added Config.BagInventory

Update v2.2

Completely rework of the plugin

Update v2.0
  • Added that Players can only carry a Weapon if they have a Bag
7 Likes

any way to make it work with linden inventory ?

1 Like

Hey I don’t know that inventory, sorry.

1 Like

Is it possible to give the bag to another person with the items inside?

3 Likes

preview sir

Very good, Very nice!

1 Like

Events / Commands

  • /openbag - Open your own Bag

  • /stealbag - Open the Bag from Player next to you

  • Search Bag - TriggerServerEvent('inventory:updateStealInventoryBag', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer))

Can you show how to import it in Chezza Inventory?

cl_backpack.lua paste in client/plugins
sv_backpack.lua paste in sevrer/plugins

this what name .lua for search sir

i already put cl_backpack and sv_backpack… nothing work

I updated the Plugin for Chezza Inventory and uploaded it to Github :slight_smile:

Chezza Inventory 3 or 4 ???

For both versions.

Hey!

I added the pluggins and the line in the config but it doesnt bring up a “second page” like the glovebox/trunk. The below photo is after I “opened” the bag

Any ideas?

If Config.BagInventory = true then it won’t open a second inventory. It only expands the inventory space but this feature is experimental and doesn’t work corret with chezza inventory.

Disable this Features and use the Commands :slight_smile:

Im working on a few tweaks to it but very good release!

One major bug I found is that when a player dies with the bag on it doesn’t remove the contents of the bag which can be dangerous if used on an economy based server…

Will update if I find a fix:)

Update v2.0

  • Added that Players can only carry a Weapon if they have a Bag

when I check another player’s bag he asks me to have a bag equipped and won’t let me see his bag. That is, I need to have a bag equipped if I want to search another player’s bag. that would be wrong

other error: when you don’t have the bag and they search you they can see what you have and take it away.

other error: when they are searching your bag and you walk away they can continue searching your bag and rob you

I have posted these errors on github

Thanks for that. I will have a look at this and will update it as soon as possible