Ten skrypt pozwala graczom na używanie przedmiotów odzieżowych ze swojego ekwipunku w FiveM przy użyciu frameworka qbcore. Dzięki temu skryptowi gracze mogą mieć wiele różnych przedmiotów odzieżowych, kraść przedmioty odzieżowe od innych graczy oraz konfigurować komendy i usuwalne przedmioty.
Pobierz
Instalacja skryptu
- Umieść plik:
- Umieść plik skryptu w
resourcesswojego serwera FiveM.
- Umieść plik skryptu w
- Edytuj
server.cfg:- Dodaj następującą linię do swojego
server.cfgplik do załadowania skryptu:sqlCode kopierenstart script_name
- Dodaj następującą linię do swojego
Dodawanie przedmiotów
Aby dodać nowe przedmioty odzieżowe, wstaw poniższy kod do swojego qb-coreshareditems.lua plik:
-- 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.' },
Aby wyświetlić opisy przedmiotów, dodaj następujące elementy do qb-inventoryhtmljsapp.js lub podobny plik w swoim systemie ekwipunku:
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> );
Ubranie jako Przedmiot
Gracze mogą używać przedmiotów odzieżowych ze swojego ekwipunku, aby natychmiast zmienić swój wygląd.
Wiele elementów odzieży
Noś wiele przedmiotów odzieżowych i szybko oraz łatwo zmieniaj stroje.
Kradzież przedmiotu odzieżowego
Gracze mogą kraść sobie nawzajem przedmioty odzieżowe, co zwiększa interakcję między graczami.
Kompatybilność Mężczyzna/Kobieta
Obsługuje zarówno postacie męskie, jak i żeńskie z odpowiednimi opcjami odzieży.
Konfiguracja poleceń
Administratorzy mogą dostosowywać polecenia do zakładania i zdejmowania elementów odzieży.
Konfiguracja usuwalnych przedmiotów
Administratorzy mogą ustawić, czy przedmioty odzieżowe można zdejmować, czy nie, wymagając od graczy znalezienia nowych przedmiotów, aby zmienić swój wygląd.
