amakuu
September 30, 2020, 7:32pm
1
RedEM:RP Inventory 2.0
Version: 2.0.0
GitHub: GitHub - RedEM-RP/redemrp_inventory: An Inventory System for RedEM:RP
Documentation: RedEM & RedEM:RP | Kane's Documentation
Description
RedEM: RP Inventory is a resource for RedM which adds a inventory system to your RedM server.
Features:
Custom Labels, descriptions, icons.
Weight System
Lockers
Define what items can be dropped and used
Item limit
Drag’n’drop
Easy CSS
Compatibility with crafting system (Minecraft like)
Requirements
RedEM:RP
RedEM:RP Identity
RedEM:RP Respawn
pNotify
Credits
Main contributors: Ktos and @amakuu
Secondary contributor/code quality assurance: @Kanersps
And of course all contributors from GitHub!
Preview
1 Like
Demo89
September 30, 2020, 9:19pm
2
So I just put this on a development server to test it out, and right away am getting an error at line 65 of the Create_items.lua stating…
SCRIPT ERROR: @redemrp_inventory/server/Create_items.lua:65: invalid vector field: meta
> CreateInventory (@redemrp_inventory/server/Create_items.lua:65)
> ref (@redemrp_inventory/server/sv_main.lua:25)
> (@mysql-async/mysql-async.js:14431)
Any input on that? Both database tables are uploaded, and i reverted my inventory back to the stock 3 bread and 3 water just to start off with.
Bysiu
October 1, 2020, 5:00am
3
“reverted my inventory back to the stock 3 bread and 3 water” Dont do it. You need empty DB. Do not put any information in the database
boos
October 15, 2020, 12:57pm
5
What is causing the problem and how can I fix it?
1 Like
this is not problems, only prints.
1 Like
Is anyone made the lockers working? After i create a locker, i cant open it, but i still have the open text at the bottom.
data = {}
TriggerEvent(“redemrp_inventory:getData”,function(call)
data = call
end)
local lockerzone = {
{id=“private”, x=1117.42, y=-1300.58, z=66.38, job=nil}
}
Citizen.CreateThread(function()
while true do
for k,v in pairs(lockerzone) do
data.createLocker(v.id, v.x, v.y, v.z, v.job)
data.updateLockers(-1)
end
break
end
end)
Lockers still not working? I’ve tried everything and it doesn’t work: S
Why am i getting this error when trying to add items?
For ml_needs to work with redemrp_inventory V2, in server.lua you have to do like this:
instead of having this for RegisterUsableItem :
data.delItem(_source, "bread", 1)
you have to put this instead:
local ItemData = data.getItem(_source, 'bread')
ItemData.RemoveItem(1)
and for everything that is refund , instead:
data.addItem(source,"cookedfish", 1)
you have to put this in place for everything:
local ItemData = data.getItem(_source, 'cookedfish')
ItemData.AddItem(1)
1 Like
Thanks for the answer, really helpful!
I’m trying to make this weaponshop to work with the new inventory, maybe you can help me with that
data = {}
TriggerEvent("redemrp_inventory:getData",function(call)
data = call
end)
RegisterServerEvent('fredweap:buyweapon')
AddEventHandler( 'fredweap:buyweapon', function ( args )
local _src = source
local _price = args['Price']
local _level = args['Level']
local _model = args['Model']
local _qty = args['Cantidad']
--local _gold = args['Gold']
TriggerEvent('redemrp:getPlayerFromId', _src, function(user)
u_identifier = user.getIdentifier()
u_level = user.getLevel()
u_charid = user.getSessionVar("charid")
u_money = user.getMoney()
u_gold = user.getGold()
end)
if u_money < _price then
TriggerClientEvent("redemrp_notification:start", source, Config.NoMoney, 1, "error")
return
end
--Para Tienda de Oro
--if u_gold <= _gold then
-- TriggerClientEvent( 'UI:DrawNotification', _src, Config.NoMoney )
-- return
--end
if u_level < _level then
--TriggerClientEvent( 'UI:DrawNotification', _src, Config.LevelMissing )
TriggerClientEvent("redemrp_notification:start", source, Config.LevelMissing, 1, "error")
return
end
data.addItem(_src, _model, _qty, GetHashKey(_model))
TriggerClientEvent("redemrp_notification:start", source, Config.Buy, 1, "success")
TriggerEvent('redemrp:getPlayerFromId', _src, function(user)
user.removeMoney(_price)
--user.removeGold(_gold)
end)
end)
je regarde mais je vois avec inventory v2.3 le shop item marche plus les 2 je comprend pas j ai fait les modif mais sa veut pas il y en a un a me proposai fonctionnel Merci
I do not understand French, sorry
Hello
Put this :
local ItemData = data.getItem(_src, GetHashKey(_model))
ItemData.AddItem(_qty)
in place of:
data.addItem(_src, _model, _qty, GetHashKey(_model))
2 Likes
Anyone else having issues with the weapons in the inventory not displaying?
NVM Check your config.lua and make sure usable, and limit exist.
Hımm. I guess somethings wrong. Any ideas
lowichh
January 16, 2021, 2:55pm
22
When I press b and open the inventory, when I close it, the cursor stays on the screen.