fix(qb-core): add global CreateUsableItem alias for qs-inventory compatibility

qs-inventory apelează CreateUsableItem ca funcție globală, dar qb-core definea doar QBCore.Functions.CreateUseableItem (cu 'e'). Adăugat alias global + fix 16 stringuri sparte în items.lua care blocau parsarea.
This commit is contained in:
2026-04-02 00:08:19 +03:00
parent 096ccb6399
commit 978c9bc759
827 changed files with 3570 additions and 1015 deletions

24
_find_broken.py Normal file
View File

@@ -0,0 +1,24 @@
import re
path = r'E:\FiveMserver\server\resources\[framework]\[core]\qb-core\shared\items.lua'
with open(path, 'r', encoding='utf-8', errors='ignore') as f:
lines = f.readlines()
broken = []
for i, line in enumerate(lines):
stripped = line.strip()
if "['description']" not in stripped:
continue
if "['name']" not in stripped:
continue
# Count single quotes after ['description']
idx = stripped.index("['description']")
after = stripped[idx:]
# Should end with ...'}, or ...'}},
# Check if description value has matching quotes
if after.count("'") % 2 != 0:
broken.append((i+1, stripped[:120]))
print(f"Found {len(broken)} broken strings:")
for ln, txt in broken:
print(f" L{ln}: {txt}")