[Release] esx-kr-bag-inventory - A bag inventory script synced with the server


#1

ESX-KR-BAG-INVENTORY

Features
- Synced with all players
- You have the ability to put weapons and items in your bag
- If you drop your bag with the items inside all items will drop with the bag
- All bags and it’s items are saved in a database
- All dropped bags respawn after restarting the server

Usage
- The script was made to promote roleplaying
- Default key to open the bag is F5

Download
Download the script here

Installation

  1. Download the files and insert them into your resource folder.
  2. Start the esx-kr-bag-inventory in your server.cfg.
  3. Insert the sql to your database.
  4. If you want the bag in your shop you’ll have to do it yourself.

UPDATES

- Added a config where you can decide the limit of items in your bag (make sure to reinstall the sql)

- Added inventory access on the bag when it’s dropped @KrizFrost idea.

- Fixed expolits with the new system.

Video
https://streamable.com/a4y2o


#2

good job


#3

sql file dont work


#4

it looks very nice :slight_smile:
But i tried and in line 43 it should look like:

local src = source
local player = ESX.GetPlayerFromId(src)
local identifier = player.identifier

else your identifier is nil

//EDIT
ignore this comment. its just nil at the first connect. the Callback is triggered at Playerspawn. So the console gives error identifier is nil


#5

You should probably modify the item table in the sql file so it match yours… Might be that, but I’m not sure…


#6

I’m going to test it. Well done!

+1


#7

fixed it


#8

Is there a link for the video, just in case if it dont work… Thanks in advance :wink:


#9

Done.


#10


#11


#13

Test the new one, let me know if it worked.


#15


#16

hey @KRILLE
try this code

CREATE TABLE `owned_bags` ( `identifier` VARCHAR(50) NULL DEFAULT NULL, `id` INT(11) NULL DEFAULT NULL, `x` DOUBLE NULL DEFAULT NULL, `y` DOUBLE NULL DEFAULT NULL, `z` DOUBLE NULL DEFAULT NULL ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB ;


#17

Or try the new one


#18

nope


#19

mine works


#20

CREATE TABLE owned_bags ( identifier VARCHAR(50) NULL DEFAULT NULL, id INT(11) NULL DEFAULT NULL, x DOUBLE NULL DEFAULT NULL, y DOUBLE NULL DEFAULT NULL, z DOUBLE NULL DEFAULT NULL ) COLLATE=‘latin1_swedish_ci’ ENGINE=InnoDB ;
/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 1 query: 0,016 sec. */


#21

now then


#22

man do you have discord?