Is there a way we can make all the houses inventory separate? This way the players inventory at one house doesn’t show at another house
I tried it and it didn’t work for some reason
Make a backup of your database… erase all the tables it tells you to add… reupload the sql from the localization folder. I had this same problem, cleared out the DB, reuploaded the EN.sql and it worked for me. I can store anything I wish… Make sure your sql/data base does NOT look like this… If it does change it to the list I put below this code… If you need to, try to change the databases manually. This should work. I had the exact same problem, and this fixed it. The proper SQL file is in LOCALIZATION folder and it’s named en_esx_property.sql Worst case scenario MANUALLY add these tables/rows in your DB. Remember you need to edit the 3 tables below. addon_account - addon_inventory - datastore Make sure they ALL look like the one I posted below the wrong sql. Hope this helps for you, cuz!
This is the right Sql File
en_esx_property.sql (11.8 KB)
Wrong SQL
USE `essentialmode`;
ALTER TABLE `users`
ADD COLUMN `last_property` VARCHAR(255) NULL
;
INSERT INTO `addon_account` (name, label, shared) VALUES
('property_black_money','Argent Sale Propriété',0)
;
INSERT INTO `addon_inventory` (name, label, shared) VALUES
('property','Propriété',0)
;
INSERT INTO `datastore` (name, label, shared) VALUES
('property','Propriété',0)
;
CREATE TABLE `owned_properties` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`price` double NOT NULL,
`rented` int(11) NOT NULL,
`owner` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `properties` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`label` varchar(255) DEFAULT NULL,
`entering` varchar(255) DEFAULT NULL,
`exit` varchar(255) DEFAULT NULL,
`inside` varchar(255) DEFAULT NULL,
`outside` varchar(255) DEFAULT NULL,
`ipls` varchar(255) DEFAULT '[]',
`gateway` varchar(255) DEFAULT NULL,
`is_single` int(11) DEFAULT NULL,
`is_room` int(11) DEFAULT NULL,
`is_gateway` int(11) DEFAULT NULL,
`room_menu` varchar(255) DEFAULT NULL,
`price` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
Right SQL
USE `essentialmode`;
ALTER TABLE `users`
ADD COLUMN `last_property` VARCHAR(255) NULL
;
INSERT INTO `addon_account` (name, label, shared) VALUES
('property_black_money','Money Sale Property',0)
;
INSERT INTO `addon_inventory` (name, label, shared) VALUES
('property','Property',0)
;
INSERT INTO `datastore` (name, label, shared) VALUES
('property','Property',0)
;
CREATE TABLE `owned_properties` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`price` double NOT NULL,
`rented` int(11) NOT NULL,
`owner` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `properties` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`label` varchar(255) DEFAULT NULL,
`entering` varchar(255) DEFAULT NULL,
`exit` varchar(255) DEFAULT NULL,
`inside` varchar(255) DEFAULT NULL,
`outside` varchar(255) DEFAULT NULL,
`ipls` varchar(255) DEFAULT '[]',
`gateway` varchar(255) DEFAULT NULL,
`is_single` int(11) DEFAULT NULL,
`is_room` int(11) DEFAULT NULL,
`is_gateway` int(11) DEFAULT NULL,
`room_menu` varchar(255) DEFAULT NULL,
`price` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
Here it is working.
Hello! I have put the sql qu comments but I still give an error when saving something in a rented apartment, the error that comes in console is:
Error running call reference function for resource esx_addoninventory: citizen:/scripting/lua/scheduler.lua:405: @esx_addoninventory/server/classes/addoninventory.lua:39: attempt to index a nil value (global ‘Items’)
stack traceback:
@esx_addoninventory/server/classes/addoninventory.lua:39: in field ‘getItem’
@esx_addoninventory/server/classes/addoninventory.lua:9: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Error running call reference function for resource esx_property: citizen:/scripting/lua/scheduler.lua:405: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:628: in field ‘addItem’
@esx_property/server/main.lua:354: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Error running system event handling function for resource esx_addoninventory: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:628: in local ‘cb’
@esx_addoninventory/server/main.lua:82: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Do you know what may be due?.. thx!
ok thank you I will try this.
instancer not work under onesync , some one can help me ?
Is this is your single problem with OneSync ?
Yes for this plugin why ?
i see u have motel… do u maybe how do this… ?
Well the only way I know would be to duplicate the actual motel room as like another ymap. So if you rent 3 motels, you have 3 motels or ymaps. I’m sure there’s an easier way, but I don’t know it tbh. Duplicate the motel room model would be the easiest way that I know.
thanks for fast reply and the info… XD
then i will look for something like this…
or i hope some one does read this and know a fast way to make this happen…
Again thanks for the reply
Hello, I too have like Cacote have this storage problems even after I redid the sql but with en_esx_property and i have almost the exact same error:
Error running call reference function for resource esx_addoninventory: citizen:/scripting/lua/scheduler.lua:405: @esx_addoninventory/server/classes/addoninventory.lua:39: attempt to index a nil value (global ‘Items’)
stack traceback:
@esx_addoninventory/server/classes/addoninventory.lua:39: in field ‘getItem’
@esx_addoninventory/server/classes/addoninventory.lua:9: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Error running call reference function for resource esx_property: citizen:/scripting/lua/scheduler.lua:405: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:628: in field ‘addItem’
@esx_property/server/main.lua:281: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Error running system event handling function for resource esx_addoninventory: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
I know you can’t help for the errors but just to know that like Cacote up here same issue.
Could it be because of the client language ?
Update : I tried to store weapons, it worked.
but no ressources
does this have separate storage from actual apartments and stuff?
it has two storage places one is the normal storage spot and one is next to the bed so it has a stash just like on nopixel
I see that but i mean like is the storage in the motels its own instance essentially like if somone were to own a house and a motel, the inventory isn’t shared between the two?
nope not shared
thanks, wow great resource +1
Hi,
I have edited the lines as shown, no change still see the blips if another player owns properties?.
Any ideas?
how do u get the switch command, I can’t find it anywhere, last I heard it doesn’t even work?