This commit is contained in:
github-actions[bot] committed 2022-03-11 15:49:13 +00:00
1 parent 1df7888987
commit 1654ae5a41
143 files changed
+534 -479

No files matched your search

+1
View File
@@ -0,0 +1 @@
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2352],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=u(n),d=a,v=m["".concat(l,".").concat(d)]||m[d]||p[d]||o;return n?r.createElement(v,i(i({ref:t},c),{},{components:n})):r.createElement(v,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var u=2;u<o;u++)i[u]=n[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},5850:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return s},contentTitle:function(){return l},metadata:function(){return u},assets:function(){return c},toc:function(){return p},default:function(){return d}});var r=n(7462),a=n(3366),o=(n(7294),n(3905)),i=["components"],s={},l=void 0,u={unversionedId:"ox_inventory/Functions/External/Server/Inventory/RegisterStash",id:"ox_inventory/Functions/External/Server/Inventory/RegisterStash",title:"RegisterStash",description:"Creates a new custom stash.",source:"@site/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash.md",sourceDirName:"ox_inventory/Functions/External/Server/Inventory",slug:"/ox_inventory/Functions/External/Server/Inventory/RegisterStash",permalink:"/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash",editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash.md",tags:[],version:"current",frontMatter:{},sidebar:"docs",previous:{title:"GetSlot",permalink:"/docs/ox_inventory/Functions/External/Server/Inventory/GetSlot"},next:{title:"RemoveItem",permalink:"/docs/ox_inventory/Functions/External/Server/Inventory/RemoveItem"}},c={},p=[],m={toc:p};function d(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Creates a new custom stash."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},"-- id: string or number\n-- label: string\n-- slots: number\n-- maxWeight: number\n-- owner: string or boolean or nil\n-- groups: table\n-- coords: vector3\nexports.ox_inventory:RegisterStash(id, label, slots, maxWeight, owner, groups, coords)\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"id")," - Stash identifier when loading from the database. "),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"label")," - Display name when inventory is open."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"owner")," - Defines stash permissions. ",(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"string"),": Can only access the stash linked to the owner."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"true"),": Each player has a unique stash but can request other player's stashes."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"nil"),": Always shared."))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"groups")," - Player groups (jobs) able to access the stash.",(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},"Table of grouLine truncated