Questo script permette ai giocatori di utilizzare gli articoli di vestiario nel loro inventario in FiveM utilizzando il framework qbcore. Con questo script, i giocatori possono avere diversi articoli di vestiario, rubare articoli di vestiario ad altri giocatori e configurare comandi e oggetti rimovibili.
Scaricamento
Installazione dello script
- Posiziona il file:
- Metti il file script nel
resourcescartella del tuo server FiveM.
- Metti il file script nel
- Modificare
server.cfg:- Aggiungi la seguente riga al tuo
server.cfgfile per caricare lo script: copiare sqlCodestart script_name
- Aggiungi la seguente riga al tuo
Aggiunta di elementi
Per aggiungere nuovi capi di abbigliamento, inserisci il seguente codice nel tuo qb-coreshareditems.lua file:
-- Clothing Items<br>['torso'] = { ['name'] = 'torso', ['label'] = 'Torso', ['weight'] = 100, ['type'] = 'item', ['image'] = 'torso.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable torso item.' },<br>['tshirt'] = { ['name'] = 'tshirt', ['label'] = 'T-Shirt', ['weight'] = 100, ['type'] = 'item', ['image'] = 'tshirt.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable t-shirt item.' },<br>['arms'] = { ['name'] = 'arms', ['label'] = 'Arms', ['weight'] = 100, ['type'] = 'item', ['image'] = 'arms.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wearable arm accessories.' },<br>['jeans'] = { ['name'] = 'jeans', ['label'] = 'Jeans', ['weight'] = 100, ['type'] = 'item', ['image'] = 'jeans.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A pair of wearable jeans.' },<br>['shoes'] = { ['name'] = 'shoes', ['label'] = 'Shoes', ['weight'] = 100, ['type'] = 'item', ['image'] = 'shoes.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wearable shoes.' },<br>['bag'] = { ['name'] = 'bag', ['label'] = 'Bag', ['weight'] = 100, ['type'] = 'item', ['image'] = 'bag.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable bag accessory.' },<br>['chain'] = { ['name'] = 'chain', ['label'] = 'Chain', ['weight'] = 100, ['type'] = 'item', ['image'] = 'chain.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable chain accessory.' },<br>['mask'] = { ['name'] = 'mask', ['label'] = 'Mask', ['weight'] = 100, ['type'] = 'item', ['image'] = 'mask.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable mask.' },<br>['helmet'] = { ['name'] = 'helmet', ['label'] = 'Helmet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'helmet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable helmet.' },<br>['ears'] = { ['name'] = 'ears', ['label'] = 'Ears', ['weight'] = 100, ['type'] = 'item', ['image'] = 'ears.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wearable ear accessories.' },<br>['watches'] = { ['name'] = 'watches', ['label'] = 'Watches', ['weight'] = 100, ['type'] = 'item', ['image'] = 'watches.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wearable watches.' },<br>['glasses'] = { ['name'] = 'glasses', ['label'] = 'Glasses', ['weight'] = 100, ['type'] = 'item', ['image'] = 'glasses.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wearable glasses.' },<br>['bracelet'] = { ['name'] = 'bracelet', ['label'] = 'Bracelet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'bracelet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A wearable bracelet accessory.' },
Per visualizzare le descrizioni degli articoli, aggiungi quanto segue a qb-inventoryhtmljsapp.js o un file simile nel tuo sistema di inventario:
else if (itemData.name == "torso") {<br> $(".item-info-title").html("<p>" + itemData.label + "</p>");<br> $(".item-info-description").html(<br> "<p><strong>Id Clothe: </strong><span>" + itemData.info.id_clothe + "</span></p><p><strong>Id Texture: </strong><span>" + itemData.info.id_texture + "</span></p><p><strong>Description: </strong><span>" + itemData.info.description + "</span></p>"<br> );<br>} else if (itemData.name == "tshirt") {<br> $(".item-info-title").html("<p>" + itemData.label + "</p>");<br> $(".item-info-description").html(<br> "<p><strong>Id Clothe: </strong><span>" + itemData.info.id_clothe + "</span></p><p><strong>Id Texture: </strong><span>" + itemData.info.id_texture + "</span></p><p><strong>Description: </strong><span>" + itemData.info.description + "</span></p>"<br> );<br>} else if (itemData.name == "arms") {<br> $(".item-info-title").html("<p>" + itemData.label + "</p>");<br> $(".item-info-description").html(<br> "<p><strong>Id Clothe: </strong><span>" + itemData.info.id_clothe + "</span></p><p><strong>Id Texture: </strong><span>" + itemData.info.id_texture + "</span></p><p><strong>Description: </strong><span>" + itemData.info.description + "</span></p>"<br> );
Abbigliamento come articolo
I giocatori possono usare gli articoli di vestiario presenti nel loro inventario per cambiare istantaneamente il proprio aspetto.
Articoli di abbigliamento multipli
Trasporta più capi di abbigliamento e cambia rapidamente e facilmente i tuoi vestiti.
Furto di articoli di abbigliamento
I giocatori possono rubarsi a vicenda capi di vestiario, aumentando così l'interazione tra giocatori.
Compatibilità maschio/femmina
Supporta sia personaggi maschili che femminili con opzioni di abbigliamento appropriate.
Configurazione dei comandi
Gli amministratori possono personalizzare i comandi per equipaggiare e rimuovere gli articoli di vestiario.
Configurazione dell'elemento rimovibile
Gli amministratori possono stabilire se i capi d'abbigliamento siano rimovibili o meno, obbligando i giocatori a trovare nuovi capi per cambiare il proprio aspetto.
