mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
1 line
4.6 KiB
JavaScript
1 line
4.6 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4434],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return f}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(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,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),u=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(c.Provider,{value:t},e.children)},p={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,o=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=u(n),f=o,m=d["".concat(c,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(m,a(a({ref:t},s),{},{components:n})):r.createElement(m,a({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,a[1]=l;for(var u=2;u<i;u++)a[u]=n[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},2192:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return c},default:function(){return f},frontMatter:function(){return l},metadata:function(){return u},toc:function(){return p}});var r=n(3117),o=n(102),i=(n(7294),n(3905)),a=["components"],l={title:"Getting Started"},c=void 0,u={unversionedId:"ox_lib/index",id:"ox_lib/index",title:"Getting Started",description:"ox_lib is a collection of Lua and UI functions to utilise in other resources.",source:"@site/docs/ox_lib/index.md",sourceDirName:"ox_lib",slug:"/ox_lib/",permalink:"/docs/ox_lib/",draft:!1,editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/ox_lib/index.md",tags:[],version:"current",frontMatter:{title:"Getting Started"},sidebar:"docs",previous:{title:"Client",permalink:"/docs/ox_lib/Zones/Client"},next:{title:"Search",permalink:"/docs/ox_inventory/Functions/Client/Inventory/Search"}},s={},p=[],d={toc:p};function f(e){var t=e.components,n=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"ox_lib is a collection of Lua and UI functions to utilise in other resources."),(0,i.kt)("p",null,"The UI is built in React so the code needs to be compiled into standard JS.",(0,i.kt)("br",{parentName:"p"}),"\n","If you don't know how to do this then please download the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/overextended/ox_lib/releases/latest"},"release")," (ox_lib.zip) which is ",(0,i.kt)("em",{parentName:"p"},"already")," compiled into a working resource."),(0,i.kt)("p",null,"To enable the library inside of your resource just add ",(0,i.kt)("inlineCode",{parentName:"p"},"@ox_lib/init.lua")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"shared_scripts")," or\na ",(0,i.kt)("inlineCode",{parentName:"p"},"shared_script")," in your ",(0,i.kt)("inlineCode",{parentName:"p"},"fxmanifest.lua")," file."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-lua"},"shared_scripts {\n '@ox_lib/init.lua'\n}\n")),(0,i.kt)("p",null,"Or if the library is the only shared script you use you can do:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-lua"},"shared_script '@ox_lib/init.lua'\n")),(0,i.kt)("p",null,"That's it!",(0,i.kt)("br",{parentName:"p"}),"\n","You can now use the library functions inside of your resource, check the rest of the\ndocumentation to see how to utilise them."))}f.isMDXComponent=!0}}]); |