mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
40 lines
47 KiB
HTML
40 lines
47 KiB
HTML
<!doctype html>
|
||
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-ox_inventory/index">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||
<link rel="search" type="application/opensearchdescription+xml" title="Overextended" href="/opensearch.xml"><title data-rh="true">Getting Started | Overextended</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://overextended.github.io/docs/ox_inventory/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Getting Started | Overextended"><meta data-rh="true" name="description" content="This resource is being designed with the intention of providing advanced functionality while remaining easy to use,"><meta data-rh="true" property="og:description" content="This resource is being designed with the intention of providing advanced functionality while remaining easy to use,"><link data-rh="true" rel="icon" href="/img/ox.ico"><link data-rh="true" rel="canonical" href="https://overextended.github.io/docs/ox_inventory/"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/ox_inventory/" hreflang="en"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/ox_inventory/" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://8XXXVNJ7UW-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.51d1e9a9.css">
|
||
<link rel="preload" href="/assets/js/runtime~main.00d3ffdd.js" as="script">
|
||
<link rel="preload" href="/assets/js/main.f9ac1b57.js" as="script">
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus">
|
||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_W2Cr themedImage--light_TfLj" height="32" width="32"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_W2Cr themedImage--dark_oUvU" height="32" width="32"></div><b class="navbar__title text--truncate">Overextended</b></a><a href="https://www.github.com/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://www.discord.gg/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/">Documentation</a><div class="searchBox_dLyj"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/">Documentation</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/oxmysql/">MySQL</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/ox_lib/ACL/Server">Library</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/docs/ox_inventory/Functions/Client/Inventory/Search">Inventory</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/ox_inventory/Functions/Client/Inventory/Search">Functions</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/docs/ox_inventory/Guides/">Overview</a><button aria-label="Toggle the collapsible sidebar category 'Overview'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/ox_inventory/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/ox_inventory/">Getting Started</a></li></ul></li></ul></nav></div></aside><main class="docMainContainer_uL0j"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_DM6M"><div class="docItemContainer_vinB"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Xlws" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_kU5B"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Inventory</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Getting Started</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_bZGK theme-doc-toc-mobile tocMobile_TmEX"><button type="button" class="clean-btn tocCollapsibleButton_l22C">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Getting Started</h1></header><div class="admonition admonition-caution alert alert--warning"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</h5></div><div class="admonition-content"><p>This resource is being designed with the intention of providing advanced functionality while remaining easy to use,
|
||
however it is not recommended for beginners. You must possess a basic understanding of coding and the ability to read;
|
||
otherwise you <strong>should not</strong> install this resource.</p></div></div><h2 class="anchor anchorWithStickyNavbar_mojV" id="dependencies">Dependencies<a class="hash-link" href="#dependencies" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_mojV" id="oxmysql">OxMySQL<a class="hash-link" href="#oxmysql" title="Direct link to heading"></a></h3><p>We utilise our own resource to communicate with MySQL databases via the node-mysql2 package.
|
||
The backend is actively maintained and updated unlike the package used by mysql-async, providing improved performance, security, and features.
|
||
We provide full backwards compatibility with mysql-async and build for the current Cfx architecture.</p><div style="display:flex"><a href="https://www.github.com/overextended/oxmysql" target="_blank" rel="noopener noreferrer" style="margin-right:0.6rem"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></div><div>GitHub</div></div></a><a href="https://overextended.github.io/docs/oxmysql/Installation/" target="_blank" rel="noopener noreferrer"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"></path></svg></div><div>Documentation</div></div></a></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="ox-lib">Ox Lib<a class="hash-link" href="#ox-lib" title="Direct link to heading"></a></h3><p>Provides easily reusable functions that can be imported into your resource or called with exports.</p><p><strong>Used in the inventory for</strong></p><ul><li>SetInterval</li><li>Server Callbacks</li><li>Requesting models, animations, etc.</li><li>Marker management</li><li>Notifications and progress bar</li></ul><div style="width:fit-content"><a href="https://www.github.com/overextended/ox_lib/releases/latest" target="_blank" rel="noopener noreferrer"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></div><div>GitHub</div></div></a></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="production-build">Production Build<a class="hash-link" href="#production-build" title="Direct link to heading"></a></h3><p>The interface is written in TypeScript using the React library, so the code included in the repository will not work.
|
||
You either need to build the package yourself (more information in <a href="/docs/ox_inventory/Guides">guides</a> section), or download a release.</p><div style="width:fit-content"><a href="https://www.github.com/overextended/ox_inventory/releases/latest" target="_blank" rel="noopener noreferrer" style="margin-right:0.6rem"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></div><div>GitHub</div></div></a></div><h2 class="anchor anchorWithStickyNavbar_mojV" id="optional-resources">Optional resources<a class="hash-link" href="#optional-resources" title="Direct link to heading"></a></h2><p>The resources listed under here <strong>aren't</strong> necessary for the inventory to work but still have full support.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="qtarget">qtarget<a class="hash-link" href="#qtarget" title="Direct link to heading"></a></h3><p>A high performance targeting solution based on bt-target, and the basis for qb-target.
|
||
It is being updated alongside Ox Inventory to improve support as well as add compatibility when using QBCore or migrating from bt-target.
|
||
All stashes and shops will utilise PolyZone's instead of markers to interact with them.</p><div class="admonition admonition-caution alert alert--warning"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</h5></div><div class="admonition-content"><p>If you wish to use it first you must ensure that qtarget is enabled in the resource convars.
|
||
You will need to enable compatibility manually by adjusting your config - more information provided below.</p><p>You must start qtarget before the inventory and after your framework.</p></div></div><div style="display:flex"><a href="https://www.github.com/overextended/qtarget" target="_blank" rel="noopener noreferrer" style="margin-right:0.6rem"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></div><div>GitHub</div></div></a><a href="https://overextended.github.io/qtarget/" target="_blank" rel="noopener noreferrer"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"></path></svg></div><div>Documentation</div></div></a></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="npwd">NPWD<a class="hash-link" href="#npwd" title="Direct link to heading"></a></h3><p>A standalone and feature-rich phone created by Project Error.</p><p>The inventory will handle disabling the phone when the player has no item, and supports toggling the phone through item use.</p><div style="display:flex"><a href="https://www.github.com/project-error/npwd" target="_blank" rel="noopener noreferrer" style="margin-right:0.6rem"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></div><div>GitHub</div></div></a><a href="https://projecterror.dev/docs" target="_blank" rel="noopener noreferrer"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"></path></svg></div><div>Documentation</div></div></a></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="installation">Installation<a class="hash-link" href="#installation" title="Direct link to heading"></a></h3><div class="tabs-container tabList_uSqn"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LplD tabs__item--active">Fresh ESX</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LplD">Convert ESX</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LplD">Upgrade from Linden Inventory</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LplD">Standalone</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_OmH5"><p>Use a compatible version of <a href="https://github.com/esx-framework/esx-legacy" target="_blank" rel="noopener noreferrer">ESX Legacy</a> (1.6.0+)<br>
|
||
<!-- -->Execute the query inside <a href="https://github.com/overextended/ox_inventory/blob/main/setup/install.sql" target="_blank" rel="noopener noreferrer">install.sql</a> and <a href="https://github.com/overextended/ox_inventory/blob/main/setup/vehicle.sql" target="_blank" rel="noopener noreferrer">vehicle.sql</a> </p><p> Start order should look like the following:</p><div class="codeBlockContainer_MPoW theme-code-block" style="--prism-background-color:#282c34;--prism-color:#ffffff"><div class="codeBlockContent_B9tL"><pre tabindex="0" class="prism-code language-text codeBlock__0OG thin-scrollbar"><code class="codeBlockLines_gEuF"><span class="token-line" style="color:#ffffff"><span class="token plain">start oxmysql</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start es_extended</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start ox_lib</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start ox_inventory</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">...</span><br></span></code></pre><div class="buttonGroup_hRr1"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div><div role="tabpanel" class="tabItem_OmH5" hidden=""><p>Use a compatible version of <a href="https://github.com/esx-framework/esx-legacy" target="_blank" rel="noopener noreferrer">ESX Legacy</a> (1.6.0+)<br>
|
||
<!-- -->Execute the query inside <a href="https://github.com/overextended/ox_inventory/blob/main/setup/install.sql" target="_blank" rel="noopener noreferrer">install.sql</a>
|
||
and <a href="https://github.com/overextended/ox_inventory/blob/main/setup/vehicle.sql" target="_blank" rel="noopener noreferrer">vehicle.sql</a><br>
|
||
<!-- -->Open <code>fxmanifest.lua</code> and uncomment <code>server_script 'setup/convert.lua'</code><br>
|
||
<!-- -->Start the server and execute the <code>convertinventory</code> command from the console<br>
|
||
<!-- -->Remove the conversion file </p><p> Start order should look like the following:</p><div class="codeBlockContainer_MPoW theme-code-block" style="--prism-background-color:#282c34;--prism-color:#ffffff"><div class="codeBlockContent_B9tL"><pre tabindex="0" class="prism-code language-text codeBlock__0OG thin-scrollbar"><code class="codeBlockLines_gEuF"><span class="token-line" style="color:#ffffff"><span class="token plain">start oxmysql</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start es_extended</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start ox_lib</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">start ox_inventory</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">everything else</span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain">...</span><br></span></code></pre><div class="buttonGroup_hRr1"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div><div role="tabpanel" class="tabItem_OmH5" hidden=""><p>Execute the query inside <a href="https://github.com/overextended/ox_inventory/blob/main/setup/upgrade.sql" target="_blank" rel="noopener noreferrer">upgrade.sql</a>
|
||
and <a href="https://github.com/overextended/ox_inventory/blob/main/setup/vehicle.sql" target="_blank" rel="noopener noreferrer">vehicle.sql</a><br>
|
||
<!-- -->Open <code>fxmanifest.lua</code> and uncomment <code>server_script 'setup/convert.lua'</code><br>
|
||
<!-- -->Start the server and execute the <code>convertinventory</code> linden command from the console<br>
|
||
<!-- -->Remove the conversion file</p></div><div role="tabpanel" class="tabItem_OmH5" hidden=""><p>Work in progress.</p><p>Refer to the "bridge" module to get an idea of how you setup support for any framework.<br>
|
||
<!-- -->Modifications will need to be made for licenses, owned vehicles, and jobs.</p></div></div></div><div class="admonition admonition-caution alert alert--warning"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</h5></div><div class="admonition-content"><p>You should restart your server after the first startup to ensure everything has been correctly setup</p></div></div><h2 class="anchor anchorWithStickyNavbar_mojV" id="upgrading-esx">Upgrading ESX<a class="hash-link" href="#upgrading-esx" title="Direct link to heading"></a></h2><p>Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from ESX, and is not intended to be used with resources designed around it.</p><ul><li>ESX loadouts do not exist - resources that use them need to remove references or be modified to look for the weapon as an item</li><li>Stashes from resources such as esx_policejob, esx_ambulancejob, etc. should be removed</li><li>Shops from esx_shops or the armoury from esx_policejob should be removed</li><li>Resources like esx_inventoryhud, esx_trunkinventory, esx_addoninventory, etc. should be removed</li></ul><h3 class="anchor anchorWithStickyNavbar_mojV" id="optional-optimisation">Optional optimisation<a class="hash-link" href="#optional-optimisation" title="Direct link to heading"></a></h3><p>All item related functions from xPlayer, such as <code>xPlayer.getInventoryItem</code>, have been modified for compatibility purposes; however they are considered deprecated.</p><p>The reasoning is fairly simple - there's now additional function references and overhead to consider. Fortunately, the new Inventory functions can be used directly and offer a great deal of improvements over the old ones.</p><p>You should read through the functions section for further information, but the following should give you a decent idea.</p><div class="tabs-container tabList_uSqn"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LplD tabs__item--active">ESX</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LplD">Inventory</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_OmH5"><div class="language-lua codeBlockContainer_MPoW theme-code-block" style="--prism-background-color:#282c34;--prism-color:#ffffff"><div class="codeBlockContent_B9tL"><pre tabindex="0" class="prism-code language-lua codeBlock__0OG thin-scrollbar"><code class="codeBlockLines_gEuF"><span class="token-line" style="color:#ffffff"><span class="token keyword" style="color:#c5a5c5">if</span><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">getInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">'acetone'</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">count </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">2</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">and</span><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">getInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">'antifreeze'</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">count </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">4</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">and</span><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">getInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">'sudo'</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">count </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">9</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">then</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">removeInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">"acetone"</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">3</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">removeInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">"antifreeze"</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">5</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> xPlayer</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token function" style="color:#79b6f2">removeInventoryItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token string" style="color:#8dc891">"sudo"</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">10</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"></span><span class="token keyword" style="color:#c5a5c5">end</span><br></span></code></pre><div class="buttonGroup_hRr1"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div><div role="tabpanel" class="tabItem_OmH5" hidden=""><p>Add the following code somewhere in your resource to cache the exports metatable.</p><div class="language-lua codeBlockContainer_MPoW theme-code-block" style="--prism-background-color:#282c34;--prism-color:#ffffff"><div class="codeBlockContent_B9tL"><pre tabindex="0" class="prism-code language-lua codeBlock__0OG thin-scrollbar"><code class="codeBlockLines_gEuF"><span class="token-line" style="color:#ffffff"><span class="token keyword" style="color:#c5a5c5">local</span><span class="token plain"> ox_inventory </span><span class="token operator" style="color:#d7deea">=</span><span class="token plain"> exports</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">ox_inventory</span><br></span></code></pre><div class="buttonGroup_hRr1"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>You will be able to reference any functions exposed through the export.</p><div class="language-lua codeBlockContainer_MPoW theme-code-block" style="--prism-background-color:#282c34;--prism-color:#ffffff"><div class="codeBlockContent_B9tL"><pre tabindex="0" class="prism-code language-lua codeBlock__0OG thin-scrollbar"><code class="codeBlockLines_gEuF"><span class="token-line" style="color:#ffffff"><span class="token keyword" style="color:#c5a5c5">local</span><span class="token plain"> items </span><span class="token operator" style="color:#d7deea">=</span><span class="token plain"> ox_inventory</span><span class="token punctuation" style="color:#8dc891">:</span><span class="token function" style="color:#79b6f2">Search</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token plain">source</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'count'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token punctuation" style="color:#8dc891">{</span><span class="token string" style="color:#8dc891">'acetone'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'antifreeze'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'sudo'</span><span class="token punctuation" style="color:#8dc891">}</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"></span><span class="token keyword" style="color:#c5a5c5">if</span><span class="token plain"> items </span><span class="token keyword" style="color:#c5a5c5">and</span><span class="token plain"> items</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">acetone </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">2</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">and</span><span class="token plain"> items</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">antifreeze </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">4</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">and</span><span class="token plain"> items</span><span class="token punctuation" style="color:#8dc891">.</span><span class="token plain">sudo </span><span class="token operator" style="color:#d7deea">></span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">9</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">then</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> ox_inventory</span><span class="token punctuation" style="color:#8dc891">:</span><span class="token function" style="color:#79b6f2">RemoveItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token plain">source</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'acetone'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">3</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> ox_inventory</span><span class="token punctuation" style="color:#8dc891">:</span><span class="token function" style="color:#79b6f2">RemoveItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token plain">source</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'antifreeze'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">5</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"> ox_inventory</span><span class="token punctuation" style="color:#8dc891">:</span><span class="token function" style="color:#79b6f2">RemoveItem</span><span class="token punctuation" style="color:#8dc891">(</span><span class="token plain">source</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'sudo'</span><span class="token punctuation" style="color:#8dc891">,</span><span class="token plain"> </span><span class="token number" style="color:#5a9bcf">10</span><span class="token punctuation" style="color:#8dc891">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#ffffff"><span class="token plain"></span><span class="token keyword" style="color:#c5a5c5">end</span><br></span></code></pre><div class="buttonGroup_hRr1"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div></div><h2 class="anchor anchorWithStickyNavbar_mojV" id="common-issues">Common Issues<a class="hash-link" href="#common-issues" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_mojV" id="ui-has-not-been-built">UI has not been built<a class="hash-link" href="#ui-has-not-been-built" title="Direct link to heading"></a></h3><p>Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js.</p><p>We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from <a href="https://github.com/overextended/ox_inventory/releases/latest" target="_blank" rel="noopener noreferrer">here</a>.<br>
|
||
<!-- -->Make sure you download the <code>ox_inventory.zip</code> file as that one contains the bundled files and others are raw source code.</p><p>If in case you wanted to edit the inventory UI you would have to build these files yourself.<br>
|
||
<!-- -->To do so please read our <a href="/docs/ox_inventory/Guides/inventory_ui"><em>Building inventory UI</em></a> guide.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="stashes--trunks-are-not-saved-at-server-restart">Stashes / trunks are not saved at server restart<a class="hash-link" href="#stashes--trunks-are-not-saved-at-server-restart" title="Direct link to heading"></a></h3><p>The only supported way of doing a restart is <strong>txAdmin scheduled restart</strong>.<br>
|
||
<!-- -->txAdmin scheduled restart should be your only way of restarting a server in production.</p><p>If you need to do a manual restart, you must use <code>/saveinv</code> before restarting the server.<br>
|
||
<!-- -->If you don't do this, all inventory except players inventory will not be saved.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/index.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_dcUD" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_foO9"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/ox_inventory/config"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Configuration</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#dependencies" class="table-of-contents__link toc-highlight">Dependencies</a><ul><li><a href="#oxmysql" class="table-of-contents__link toc-highlight">OxMySQL</a></li><li><a href="#ox-lib" class="table-of-contents__link toc-highlight">Ox Lib</a></li><li><a href="#production-build" class="table-of-contents__link toc-highlight">Production Build</a></li></ul></li><li><a href="#optional-resources" class="table-of-contents__link toc-highlight">Optional resources</a><ul><li><a href="#qtarget" class="table-of-contents__link toc-highlight">qtarget</a></li><li><a href="#npwd" class="table-of-contents__link toc-highlight">NPWD</a></li><li><a href="#installation" class="table-of-contents__link toc-highlight">Installation</a></li></ul></li><li><a href="#upgrading-esx" class="table-of-contents__link toc-highlight">Upgrading ESX</a><ul><li><a href="#optional-optimisation" class="table-of-contents__link toc-highlight">Optional optimisation</a></li></ul></li><li><a href="#common-issues" class="table-of-contents__link toc-highlight">Common Issues</a><ul><li><a href="#ui-has-not-been-built" class="table-of-contents__link toc-highlight">UI has not been built</a></li><li><a href="#stashes--trunks-are-not-saved-at-server-restart" class="table-of-contents__link toc-highlight">Stashes / trunks are not saved at server restart</a></li></ul></li></ul></div></div></div></div></main></div></div></div>
|
||
<script src="/assets/js/runtime~main.00d3ffdd.js"></script>
|
||
<script src="/assets/js/main.f9ac1b57.js"></script>
|
||
</body>
|
||
</html> |