mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6169],{9613:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return y}});var r=n(9496);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 l(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 p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=u(n),y=a,m=d["".concat(p,".").concat(y)]||d[y]||c[y]||o;return n?r.createElement(m,i(i({ref:t},s),{},{components:n})):r.createElement(m,i({ref:t},s))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var u=2;u<o;u++)i[u]=n[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},1299:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return p},default:function(){return y},frontMatter:function(){return l},metadata:function(){return u},toc:function(){return c}});var r=n(5443),a=n(3010),o=(n(9496),n(9613)),i=["components"],l={},p=void 0,u={unversionedId:"ox_inventory/Functions/Client/displayMetadata",id:"ox_inventory/Functions/Client/displayMetadata",title:"displayMetadata",description:"Sets a metadata property to display in the tooltip.",source:"@site/docs/ox_inventory/Functions/Client/displayMetadata.md",sourceDirName:"ox_inventory/Functions/Client",slug:"/ox_inventory/Functions/Client/displayMetadata",permalink:"/docs/ox_inventory/Functions/Client/displayMetadata",draft:!1,editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/Functions/Client/displayMetadata.md",tags:[],version:"current",lastUpdatedAt:1656531847,formattedLastUpdatedAt:"6/29/2022",frontMatter:{},sidebar:"ox_inventory",previous:{title:"weaponWheel",permalink:"/docs/ox_inventory/Functions/Client/Utils/weaponWheel"},next:{title:"openInventory",permalink:"/docs/ox_inventory/Functions/Client/openInventory"}},s={},c=[],d={toc:c};function y(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Sets a metadata property to display in the tooltip."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},"-- metadata: table or string\n-- value: string (optional)\nexports.ox_inventory:displayMetadata(metadata, value)\n")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"metadata")," can either be table or string, if it's a string it's the metadata property\nthat you want to display, ",(0,o.kt)("inlineCode",{parentName:"p"},"value")," is ",(0,o.kt)("strong",{parentName:"p"},"not")," optional then."),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"value")," represents the ",(0,o.kt)("em",{parentName:"p"},"label")," for the property you want to display."),(0,o.kt)("p",null,"Otherwise ",(0,o.kt)("inlineCode",{parentName:"p"},"metadata")," can be a table of key value pairs, key being the metadata property\nand value being the label for that metadata."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Example:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},"exports.ox_inventory:displayMetadata('mustard', 'Mustard')\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-lua"},"exports.ox_inventory:displayMetadata({\n mustard = 'Mustard',\n ketchup = 'Ketchup'\n})\n")))}y.isMDXComponent=!0}}]); |