KRILLE
March 2, 2019, 8:07pm
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
Download the files and insert them into your resource folder.
Start the esx-kr-bag-inventory in your server.cfg.
Insert the sql to your database.
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
Watch 2019-03-02 20-47-45 | Streamable
46 Likes
it looks very nice
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
You should probably modify the item table in the sql file so it match yours… Might be that, but I’m not sure…
I’m going to test it. Well done!
+1
Is there a link for the video, just in case if it dont work… Thanks in advance
KRILLE
March 2, 2019, 8:52pm
13
Test the new one, let me know if it worked.
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 ;
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. */