Kleidung als Gegenstand (QBCore) - FiveMX

Kleidung als Artikel (QBCore)

Dieses Skript ermöglicht es Spielern, Kleidungsstücke in ihrem Inventar in FiveM mithilfe des qbcore-Frameworks zu verwenden. Mit diesem Skript können Spieler mehrere verschiedene Kleidungsstücke besitzen, Kleidungsstücke von anderen Spielern stehlen und Befehle und entfernbare Gegenstände konfigurieren.

Herunterladen

Installieren des Skripts

  1. Datei platzieren:
    • Lege die Skriptdatei in das Ressourcen Ordner deines FiveM-Servers.
  2. Bearbeiten server.cfg:
    • Füge die folgende Zeile zu deinem hinzu server.cfg Datei zum Laden des Skripts:sqlCode kopierenSkriptname starten

Elemente hinzufügen

Um neue Kleidungsstücke hinzuzufügen, füge den folgenden Code in dein qb-coreshareditems.lua Datei:

-- Kleidungsstücke<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.' },

Um Artikelbeschreibungen anzuzeigen, füge Folgendes hinzu qb-inventoryhtmljsapp.js oder eine ähnliche Datei in deinem Inventarsystem:

sonst wenn (itemData.name == &quot;torso&quot;) {<br> $(&quot;.item-info-title&quot;).html(&quot;<p> &quot; + Artikeldatenbezeichnung + &quot;</p> &quot;);<br> $(&quot;.item-info-description&quot;).html(<br> &quot;<p> <strong>Kleidungs-ID:</strong> <span>&quot; + itemData.info.id_clothe + &quot;</span></p><p> <strong>ID-Textur:</strong> <span>&quot; + itemData.info.id_texture + &quot;</span></p><p> <strong>Beschreibung:</strong> <span>&quot; + itemData.info.description + &quot;</span></p> &quot;<br> );<br>} sonst wenn (itemData.name == &quot;t-shirt&quot;) {<br> $(&quot;.item-info-title&quot;).html(&quot;<p> &quot; + Artikeldatenbezeichnung + &quot;</p> &quot;);<br> $(&quot;.item-info-description&quot;).html(<br> &quot;<p> <strong>Kleidungs-ID:</strong> <span>&quot; + itemData.info.id_clothe + &quot;</span></p><p> <strong>ID-Textur:</strong> <span>&quot; + itemData.info.id_texture + &quot;</span></p><p> <strong>Beschreibung:</strong> <span>&quot; + itemData.info.description + &quot;</span></p> &quot;<br> );<br>} sonst wenn (itemData.name == &quot;Waffen&quot;) {<br> $(&quot;.item-info-title&quot;).html(&quot;<p> &quot; + Artikeldatenbezeichnung + &quot;</p> &quot;);<br> $(&quot;.item-info-description&quot;).html(<br> &quot;<p> <strong>Kleidungs-ID:</strong> <span>&quot; + itemData.info.id_clothe + &quot;</span></p><p> <strong>ID-Textur:</strong> <span>&quot; + itemData.info.id_texture + &quot;</span></p><p> <strong>Beschreibung:</strong> <span>&quot; + itemData.info.description + &quot;</span></p> &quot;<br> );

Kleidung als Artikel

Spieler können Kleidungsstücke in ihrem Inventar verwenden, um ihr Aussehen sofort zu ändern.

Mehrere Kleidungsstücke

Trage mehrere Kleidungsstücke und wechsle schnell und einfach die Outfits.

Diebstahl von Kleidungsstücken

Spieler können sich gegenseitig Kleidungsstücke stehlen und so für mehr Interaktion zwischen den Spielern sorgen.

Männliche/weibliche Kompatibilität

Unterstützt sowohl männliche als auch weibliche Charaktere mit entsprechenden Kleidungsoptionen.

Befehlskonfiguration

Administratoren können Befehle zum Anlegen und Ablegen von Kleidungsstücken anpassen.

Konfiguration entfernbarer Elemente

Administratoren können festlegen, ob Kleidungsstücke abnehmbar sind oder nicht, sodass die Spieler neue Kleidungsstücke finden müssen, um ihr Aussehen zu ändern.

Schreibe einen Kommentar