renzuzu / renzu_motels

Fivem - Motel Management. Hourly Rental System. Supports MLO and Shells. ESX/QBCORE
GNU General Public License v3.0
102 stars 41 forks source link

Keys 🔑 #29

Open hoodz123 opened 1 year ago

hoodz123 commented 1 year ago

Keys don’t work newest Qbcore and using qb inventory gives error add item the KEYS item is in shared lua aswell

renzuzu commented 1 year ago

can you show me the error?

MrDon3 commented 1 year ago

hello, i put keys item in qbcore items.lua. It needs a modification on renzu_motels/server/main.lua line 129 to be able to add the key item in invetory. I fix that by adding this line: xPlayer.Functions.AddItem('keys', 1, nil, {metadata = metadata}) instead: return AddItem(src, 'keys', 1, nil, metadata = metadata)

Now the problem is how to add the metadata stream info to qb-inventory. like you see i put metadata but in inventory i see no info (unknown). And after i request a key from the room i get an error notify.

Other problem is that i get no key ween i rent a room.

[ script:renzu_motels] SCRIPT ERROR: @renzu_motels/server/main.lua:130: attempt to call a nil value (global 'AddItem')