diff --git a/404.html b/404.html index f9cdc94a..05a23fab 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ Page Not Found | Overextended - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/cfe61e10.f8fc3832.js b/assets/js/cfe61e10.f3a08566.js similarity index 90% rename from assets/js/cfe61e10.f8fc3832.js rename to assets/js/cfe61e10.f3a08566.js index db7bb9d3..e96fc8a3 100644 --- a/assets/js/cfe61e10.f8fc3832.js +++ b/assets/js/cfe61e10.f3a08566.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1800],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return f}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(t),f=o,b=d["".concat(c,".").concat(f)]||d[f]||u[f]||i;return t?r.createElement(b,a(a({ref:n},p),{},{components:t})):r.createElement(b,a({ref:n},p))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,a[1]=l;for(var s=2;s=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(t),f=o,b=d["".concat(c,".").concat(f)]||d[f]||u[f]||i;return t?r.createElement(b,a(a({ref:n},p),{},{components:t})):r.createElement(b,a({ref:n},p))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,a[1]=l;for(var s=2;s=f)&&Object.keys(n.O).every((function(e){return n.O[e](c[r])}))?c.splice(r--,1):(t=!1,f0&&e[u-1][2]>f;u--)e[u]=e[u-1];e[u]=[c,d,f]},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,{a:a}),a},c=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);n.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((function(a){b[a]=function(){return e[a]}}));return b.default=function(){return e},n.d(f,b),f},n.d=function(e,a){for(var c in a)n.o(a,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(a,c){return n.f[c](e,a),a}),[]))},n.u=function(e){return"assets/js/"+({4:"93c95408",53:"935f2afb",81:"068c9ae9",169:"c1cd54ba",308:"90bbe2f2",336:"e836e7f0",394:"3dff68e2",475:"b81a6956",513:"edb13edf",528:"800d88d2",836:"1b758871",838:"37fe4dea",1187:"79c260cf",1303:"626a18ce",1308:"0d195716",1358:"afe7e8e5",1477:"b2f554cd",1521:"0f06fd08",1685:"29e7168c",1800:"cfe61e10",1884:"c8b7a7b8",2031:"dadefd20",2056:"b7dc6626",2062:"1cb966b7",2198:"751a5fce",2202:"34a267b8",2352:"d3c921a8",2384:"a0b4dde4",2446:"831ab327",2457:"58cde3b4",2558:"a3457942",2564:"8af1e1be",2566:"3e2cefe5",2592:"54fb4436",2717:"078b18b7",2961:"38789362",3085:"1f391b9e",3120:"2c127759",3149:"9a9bc35c",3237:"1df93b7f",3256:"b51a0084",3330:"2b610ee2",3471:"95df86d0",3608:"9e4087bc",3656:"1efa5838",3724:"3efe3662",3795:"6ff605af",3821:"488c0227",3964:"67ac35a6",3974:"e3015b82",4064:"6f85e00b",4070:"b29e0fe6",4157:"85dab026",4196:"4e1fc67b",4312:"eb3e3932",4349:"341f8302",4366:"e524ee66",4377:"8bbdd1b6",4434:"c2e48a87",4509:"6140b730",4661:"ca71e2c9",4677:"fe5eec09",4772:"871b43d2",4868:"d03a288b",4982:"a36d1022",5211:"3ea748c7",5231:"8e0f778b",5446:"a674e0fb",5653:"a03a32ac",5792:"3bdd5e55",5981:"42e2cc7c",5990:"c864612b",6103:"9316f824",6193:"d4a6286b",6230:"4edc5f94",6339:"8a67a5a9",6351:"81ff0976",6388:"d4cbf223",6439:"839588fd",6568:"19629ad4",6661:"8c5ee32e",6763:"12ae9db4",6901:"ecb88550",6971:"c377a04b",6995:"56163916",7008:"fd4717da",7199:"7271fec2",7202:"e35d8891",7275:"15c3e15e",7283:"f0998d62",7309:"f402e59b",7364:"cc30541a",7414:"393be207",7535:"318cf738",7653:"27ba855c",7682:"06ebf696",7691:"59106b03",7835:"23a5733a",7882:"dcdd45ce",7918:"17896441",8102:"b9b062d6",8354:"2a70711d",8388:"fcae6a99",8562:"af53bc40",9136:"2339d2f0",9155:"d6b25613",9315:"ba38ef30",9373:"cd20b58f",9414:"5d7eb90d",9490:"6907d369",9491:"adbed512",9514:"1be78505",9586:"85ef8f6b",9666:"863aad54",9730:"daa8642d",9791:"1d131567",9852:"ca118335",9931:"f133530e",9957:"09dc1e0e"}[e]||e)+"."+{4:"f2ff76fa",53:"7e5eeac4",81:"00775169",138:"8c2f12a0",169:"08bb9515",308:"bddc885f",336:"a0b1c040",394:"1e74c20a",475:"a610ee0b",513:"5ecd97e3",528:"09e65ce2",836:"481b561e",838:"6e68fcdf",1187:"bc7e0407",1303:"d4b2ff74",1308:"9b3bbe15",1358:"13c6cbb7",1477:"ef5c39b9",1521:"8556017d",1685:"e2ef1cd1",1800:"f8fc3832",1884:"1244de6b",2031:"c4f33690",2056:"30321aa8",2062:"112f1289",2198:"6feba434",2202:"e7b9b6ba",2352:"ecd36734",2384:"89e302d7",2446:"df09f710",2457:"011cc19e",2558:"6e43eddd",2564:"cf4df98c",2566:"9e4b143d",2592:"11e90a9f",2717:"52c382fd",2961:"37f9ef86",3085:"285892b7",3120:"e46af23e",3149:"8bf9cd6e",3237:"1c5fe22a",3256:"01f49bf8",3330:"6dacdfc3",3471:"28420595",3608:"c4301948",3656:"7abcb9be",3724:"46f89dcd",3795:"730df6d8",3821:"f629aeac",3964:"c69315db",3974:"c352bdc3",4064:"c0b57666",4070:"aabb0c21",4157:"dbcb65f2",4196:"e4dccbeb",4312:"33b51eb5",4349:"dc42fdd1",4366:"0b15cc73",4377:"58751fa3",4434:"1d7952bb",4509:"725b48ef",4608:"622b8e38",4661:"f865d918",4677:"964da253",4772:"e785d0e5",4868:"ef54b5c3",4982:"a4c93d90",5211:"77cbf44e",5231:"f182a378",5446:"0ca1fd06",5653:"6c11e0a1",5792:"bdb97b7d",5897:"cc508d32",5981:"58ca031a",5990:"0c32dca1",6103:"263181d5",6193:"082dce9f",6230:"344bb894",6339:"45a356c1",6351:"253c6064",6385:"4701e2d8",6388:"19a3e4ec",6439:"57018e32",6568:"4b7c9b86",6661:"25e86019",6763:"3b1e8956",6901:"104942f5",6971:"43108ef0",6995:"09d0d563",7008:"31a8476e",7199:"09dc6dd4",7202:"b280ef07",7275:"a23a4bd6",7283:"3aec3e29",7309:"d5492e0e",7364:"a837414f",7414:"7d8576b6",7535:"ba513fa8",7653:"7d9dadcf",7682:"c72d3345",7691:"becbcf94",7835:"df1e6b5a",7882:"5b1b87c4",7918:"8bdb7612",8102:"3b429645",8354:"7444ff87",8388:"85f19861",8562:"c630644e",9136:"eea86e23",9155:"bde68bfc",9315:"816eadce",9373:"1d8471aa",9414:"0c7519fb",9490:"e5f2d07a",9491:"f84c0c4b",9514:"437ca93b",9586:"012012fe",9666:"88e6793b",9730:"d00cf7a5",9791:"aca4441f",9852:"e9b1f3b4",9931:"a6599842",9957:"6d836a34"}[e]+".js"},n.miniCssF=function(e){},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d={},f="website:",n.l=function(e,a,c,b){if(d[e])d[e].push(a);else{var t,r;if(void 0!==c)for(var o=document.getElementsByTagName("script"),u=0;u=f)&&Object.keys(n.O).every((function(e){return n.O[e](c[r])}))?c.splice(r--,1):(t=!1,f0&&e[u-1][2]>f;u--)e[u]=e[u-1];e[u]=[c,d,f]},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,{a:a}),a},c=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);n.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((function(a){b[a]=function(){return e[a]}}));return b.default=function(){return e},n.d(f,b),f},n.d=function(e,a){for(var c in a)n.o(a,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(a,c){return n.f[c](e,a),a}),[]))},n.u=function(e){return"assets/js/"+({4:"93c95408",53:"935f2afb",81:"068c9ae9",169:"c1cd54ba",308:"90bbe2f2",336:"e836e7f0",394:"3dff68e2",475:"b81a6956",513:"edb13edf",528:"800d88d2",836:"1b758871",838:"37fe4dea",1187:"79c260cf",1303:"626a18ce",1308:"0d195716",1358:"afe7e8e5",1477:"b2f554cd",1521:"0f06fd08",1685:"29e7168c",1800:"cfe61e10",1884:"c8b7a7b8",2031:"dadefd20",2056:"b7dc6626",2062:"1cb966b7",2198:"751a5fce",2202:"34a267b8",2352:"d3c921a8",2384:"a0b4dde4",2446:"831ab327",2457:"58cde3b4",2558:"a3457942",2564:"8af1e1be",2566:"3e2cefe5",2592:"54fb4436",2717:"078b18b7",2961:"38789362",3085:"1f391b9e",3120:"2c127759",3149:"9a9bc35c",3237:"1df93b7f",3256:"b51a0084",3330:"2b610ee2",3471:"95df86d0",3608:"9e4087bc",3656:"1efa5838",3724:"3efe3662",3795:"6ff605af",3821:"488c0227",3964:"67ac35a6",3974:"e3015b82",4064:"6f85e00b",4070:"b29e0fe6",4157:"85dab026",4196:"4e1fc67b",4312:"eb3e3932",4349:"341f8302",4366:"e524ee66",4377:"8bbdd1b6",4434:"c2e48a87",4509:"6140b730",4661:"ca71e2c9",4677:"fe5eec09",4772:"871b43d2",4868:"d03a288b",4982:"a36d1022",5211:"3ea748c7",5231:"8e0f778b",5446:"a674e0fb",5653:"a03a32ac",5792:"3bdd5e55",5981:"42e2cc7c",5990:"c864612b",6103:"9316f824",6193:"d4a6286b",6230:"4edc5f94",6339:"8a67a5a9",6351:"81ff0976",6388:"d4cbf223",6439:"839588fd",6568:"19629ad4",6661:"8c5ee32e",6763:"12ae9db4",6901:"ecb88550",6971:"c377a04b",6995:"56163916",7008:"fd4717da",7199:"7271fec2",7202:"e35d8891",7275:"15c3e15e",7283:"f0998d62",7309:"f402e59b",7364:"cc30541a",7414:"393be207",7535:"318cf738",7653:"27ba855c",7682:"06ebf696",7691:"59106b03",7835:"23a5733a",7882:"dcdd45ce",7918:"17896441",8102:"b9b062d6",8354:"2a70711d",8388:"fcae6a99",8562:"af53bc40",9136:"2339d2f0",9155:"d6b25613",9315:"ba38ef30",9373:"cd20b58f",9414:"5d7eb90d",9490:"6907d369",9491:"adbed512",9514:"1be78505",9586:"85ef8f6b",9666:"863aad54",9730:"daa8642d",9791:"1d131567",9852:"ca118335",9931:"f133530e",9957:"09dc1e0e"}[e]||e)+"."+{4:"f2ff76fa",53:"7e5eeac4",81:"00775169",138:"8c2f12a0",169:"08bb9515",308:"bddc885f",336:"a0b1c040",394:"1e74c20a",475:"a610ee0b",513:"5ecd97e3",528:"09e65ce2",836:"481b561e",838:"6e68fcdf",1187:"bc7e0407",1303:"d4b2ff74",1308:"9b3bbe15",1358:"13c6cbb7",1477:"ef5c39b9",1521:"8556017d",1685:"e2ef1cd1",1800:"f3a08566",1884:"1244de6b",2031:"c4f33690",2056:"30321aa8",2062:"112f1289",2198:"6feba434",2202:"e7b9b6ba",2352:"ecd36734",2384:"89e302d7",2446:"df09f710",2457:"011cc19e",2558:"6e43eddd",2564:"cf4df98c",2566:"9e4b143d",2592:"11e90a9f",2717:"52c382fd",2961:"37f9ef86",3085:"285892b7",3120:"e46af23e",3149:"8bf9cd6e",3237:"1c5fe22a",3256:"01f49bf8",3330:"6dacdfc3",3471:"28420595",3608:"c4301948",3656:"7abcb9be",3724:"46f89dcd",3795:"730df6d8",3821:"f629aeac",3964:"c69315db",3974:"c352bdc3",4064:"c0b57666",4070:"aabb0c21",4157:"dbcb65f2",4196:"e4dccbeb",4312:"33b51eb5",4349:"dc42fdd1",4366:"0b15cc73",4377:"58751fa3",4434:"1d7952bb",4509:"725b48ef",4608:"622b8e38",4661:"f865d918",4677:"964da253",4772:"e785d0e5",4868:"ef54b5c3",4982:"a4c93d90",5211:"77cbf44e",5231:"f182a378",5446:"0ca1fd06",5653:"6c11e0a1",5792:"bdb97b7d",5897:"cc508d32",5981:"58ca031a",5990:"0c32dca1",6103:"263181d5",6193:"082dce9f",6230:"344bb894",6339:"45a356c1",6351:"253c6064",6385:"4701e2d8",6388:"19a3e4ec",6439:"57018e32",6568:"4b7c9b86",6661:"25e86019",6763:"3b1e8956",6901:"104942f5",6971:"43108ef0",6995:"09d0d563",7008:"31a8476e",7199:"09dc6dd4",7202:"b280ef07",7275:"a23a4bd6",7283:"3aec3e29",7309:"d5492e0e",7364:"a837414f",7414:"7d8576b6",7535:"ba513fa8",7653:"7d9dadcf",7682:"c72d3345",7691:"becbcf94",7835:"df1e6b5a",7882:"5b1b87c4",7918:"8bdb7612",8102:"3b429645",8354:"7444ff87",8388:"85f19861",8562:"c630644e",9136:"eea86e23",9155:"bde68bfc",9315:"816eadce",9373:"1d8471aa",9414:"0c7519fb",9490:"e5f2d07a",9491:"f84c0c4b",9514:"437ca93b",9586:"012012fe",9666:"88e6793b",9730:"d00cf7a5",9791:"aca4441f",9852:"e9b1f3b4",9931:"a6599842",9957:"6d836a34"}[e]+".js"},n.miniCssF=function(e){},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d={},f="website:",n.l=function(e,a,c,b){if(d[e])d[e].push(a);else{var t,r;if(void 0!==c)for(var o=document.getElementsByTagName("script"),u=0;u Archive | Overextended - +

Archive

Archive

- + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index a4ed1879..a2869a38 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,14 +5,14 @@ Documentation | Overextended - +

Documentation

Here you can find all of the official documentation for resoruces developed by the Overextended team

If you feel like the documentation is lacking in some department then feel free to go onto that page and click the "Edit this page" at the bottom and submit a Pull Request.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Interface/Keyboard/index.html b/docs/ox_inventory/Functions/External/Client/Interface/Keyboard/index.html index 3ced444f..6772a19d 100644 --- a/docs/ox_inventory/Functions/External/Client/Interface/Keyboard/index.html +++ b/docs/ox_inventory/Functions/External/Client/Interface/Keyboard/index.html @@ -5,7 +5,7 @@ Keyboard | Overextended - + @@ -13,7 +13,7 @@

Keyboard

Opens a keyboard input dialog.

The rows param takes a table of strings where each string entry will represent a single row.

-- header: string
-- rows: table
exports.ox_inventory:Keyboard(header, rows)

Returns a table of strings where the first index is going to be the first row of the dialog, the second index the second row and so on.

Example:

local input = exports.ox_inventory:Keyboard('Money transfer', {'Player name', 'Amount'})

if input then
local playerName = input[1]
local amount = tonumber(input[2])

if not playerName or not amount then return end
end
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Interface/Progress/index.html b/docs/ox_inventory/Functions/External/Client/Interface/Progress/index.html index 204e63cd..123a1c4a 100644 --- a/docs/ox_inventory/Functions/External/Client/Interface/Progress/index.html +++ b/docs/ox_inventory/Functions/External/Client/Interface/Progress/index.html @@ -5,13 +5,13 @@ Progress | Overextended - +

Progress

Starts a progress bar that can callback a function upon completion or cancellation.

Prevents actions such as opening the inventory, reloading, etc.

-- options: table
-- completed: function
exports.ox_inventory:Progress(options, completed)

Options table values:

-- duration: number
-- label: string
-- useWhileDead: boolean (optional)
-- canCancel: boolean (optional)
-- anim: table (optional)
-- dict: string
-- clip: string
-- flag: number (optional - default is 49)
-- scenario: string (optional)
-- prop/propTwo: table (optional)
-- model: hash or string
-- bone: number (optional - default is 60309)
-- pos: vector3 (optional)
-- rot: vector3 (optional)
-- disable: table (optional)
-- move: boolean (optional)
-- car: boolean (optional)
-- combat: boolean (optional)
-- mouse: boolean (optional)
danger

If you define a scenario while you have a defined anim table the scenario will be ignored.

Example:

exports.ox_inventory:Progress({
duration = 2000,
label = 'Drinking water',
useWhileDead = false,
canCancel = true,
disable = {
car = true
},
anim = {
dict = 'mp_player_intdrink',
clip = 'loop_bottle',
flag = 49,
},
prop = {
model = 'prop_ld_flow_bottle',
pos = vector3(0.03, 0.03, 0.02),
rot = vector3(0.0, 0.0, -1.5),
bone = 58866
},
}, function(cancel)
if not cancel then
print("You drank some water - that'll quench ya!")
end
end)

CancelProgress​

Cancels the currently active progress bar.

exports.ox_inventory:CancelProgress()

ProgressActive​

Returns true or false whether the progress bar is currently active or not

exports.ox_inventory:ProgressActive()
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Inventory/Search/index.html b/docs/ox_inventory/Functions/External/Client/Inventory/Search/index.html index 73b70de7..65d0333b 100644 --- a/docs/ox_inventory/Functions/External/Client/Inventory/Search/index.html +++ b/docs/ox_inventory/Functions/External/Client/Inventory/Search/index.html @@ -5,7 +5,7 @@ Search | Overextended - + @@ -13,7 +13,7 @@

Search

Searches the inventory for a specified item.

-- search: string
-- item: table or string
-- metadata: table or string (optional)
expors.ox_inventory:Search(search, item, metadata)

If the search argument is defined as 'slots' the return will be a table of slots where the item was found at.

Otherwise if the search argument is defined as 'count' the return value will be the amount of the specified item in player's inventory.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Items/index.html b/docs/ox_inventory/Functions/External/Client/Items/index.html index afc8df2c..bdff97b3 100644 --- a/docs/ox_inventory/Functions/External/Client/Items/index.html +++ b/docs/ox_inventory/Functions/External/Client/Items/index.html @@ -5,13 +5,13 @@ Items | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Utils/notify/index.html b/docs/ox_inventory/Functions/External/Client/Utils/notify/index.html index 2c17be31..ba43e542 100644 --- a/docs/ox_inventory/Functions/External/Client/Utils/notify/index.html +++ b/docs/ox_inventory/Functions/External/Client/Utils/notify/index.html @@ -5,13 +5,13 @@ notify | Overextended - +

notify

Displays the notification used accross the inventory.

The notifications are built using the react-hot-teast library.

-- data: table
exports.ox_inventory:notify(data)

Values for the data table:

-- text: string
-- type: string (optional)
-- 'success'
-- 'info' - default
-- 'error'
-- position: string (optional)
-- 'top-left'
-- 'top-center' - default
-- 'top-right'
-- 'bottom-left'
-- 'bottom-center'
-- 'bottom-right
-- duration: number (optional - default is 4000 ms)

Example:

exports.ox_inventory:notify({type = 'Success', text = 'Making pancakes', duration = 2500})
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/Utils/weaponWheel/index.html b/docs/ox_inventory/Functions/External/Client/Utils/weaponWheel/index.html index 004205a9..c7c187ba 100644 --- a/docs/ox_inventory/Functions/External/Client/Utils/weaponWheel/index.html +++ b/docs/ox_inventory/Functions/External/Client/Utils/weaponWheel/index.html @@ -5,13 +5,13 @@ weaponWheel | Overextended - +

weaponWheel

Enables the weapon wheel, but disables the use of inventory items.

Mostly used for weaponised vehicles, though could be called for "minigames"

-- state: boolean
local exports.ox_inventory:weaponWheel(state)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/displayMetadata/index.html b/docs/ox_inventory/Functions/External/Client/displayMetadata/index.html index 370ed8c6..7a00e4d5 100644 --- a/docs/ox_inventory/Functions/External/Client/displayMetadata/index.html +++ b/docs/ox_inventory/Functions/External/Client/displayMetadata/index.html @@ -5,7 +5,7 @@ displayMetadata | Overextended - + @@ -13,7 +13,7 @@

displayMetadata

Sets a metadata property to display in the tooltip.

-- metadata: table or string
-- value: string (optional)
exports.ox_inventory:displayMetadata(metadata, value)

metadata can either be table or string, if it's a string it's the metadata property that you want to display, value is not optional then.

value represents the label for the property you want to display.

Otherwise metadata can be a table of key value pairs, key being the metadata property and value being the label for that metadata.

Example:

exports.ox_inventory:displayMetadata('mustard', 'Mustard')
exports.ox_inventory:displayMetadata({
mustard = 'Mustard',
ketchup = 'Ketchup'
})
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/openInventory/index.html b/docs/ox_inventory/Functions/External/Client/openInventory/index.html index 60798907..d932dd87 100644 --- a/docs/ox_inventory/Functions/External/Client/openInventory/index.html +++ b/docs/ox_inventory/Functions/External/Client/openInventory/index.html @@ -5,13 +5,13 @@ openInventory | Overextended - +

openInventory

Opens an inventory using on the passed data.

-- inv: string
-- data: any
exports.ox_inventory:openInventory(invType, data)

exports.ox_inventory:openInventory('player', 1)
exports.ox_inventory:openInventory('stash', 1)
exports.ox_inventory:openInventory('shop', { type = 'PoliceArmoury', id = 1 })
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/openNearbyInventory/index.html b/docs/ox_inventory/Functions/External/Client/openNearbyInventory/index.html index 641b8b4e..b8c03471 100644 --- a/docs/ox_inventory/Functions/External/Client/openNearbyInventory/index.html +++ b/docs/ox_inventory/Functions/External/Client/openNearbyInventory/index.html @@ -5,7 +5,7 @@ openNearbyInventory | Overextended - + @@ -13,7 +13,7 @@

openNearbyInventory

If possible opens the nearby player's inventory.

The player trying to open the invenotry must be able to open their own and if the player does not have a police job, the target player must be fatally injured or playing one of the death anims.

exports.ox_inventory:openNearbyInventory()
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/setStashTarget/index.html b/docs/ox_inventory/Functions/External/Client/setStashTarget/index.html index 0a1b698e..068fe68c 100644 --- a/docs/ox_inventory/Functions/External/Client/setStashTarget/index.html +++ b/docs/ox_inventory/Functions/External/Client/setStashTarget/index.html @@ -5,13 +5,13 @@ setStashTarget | Overextended - +

setStashTarget

Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker.

-- id: string or number
-- owner: string or number (optional)
exports.ox_inventory:setStashTarget(id, owner)

exports.ox_inventory:setStashTarget('motel5', 'bobsmith')
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/useItem/index.html b/docs/ox_inventory/Functions/External/Client/useItem/index.html index d9d81407..d1247869 100644 --- a/docs/ox_inventory/Functions/External/Client/useItem/index.html +++ b/docs/ox_inventory/Functions/External/Client/useItem/index.html @@ -5,13 +5,13 @@ useItem | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Client/useSlot/index.html b/docs/ox_inventory/Functions/External/Client/useSlot/index.html index 3b55403e..6fe457cd 100644 --- a/docs/ox_inventory/Functions/External/Client/useSlot/index.html +++ b/docs/ox_inventory/Functions/External/Client/useSlot/index.html @@ -5,13 +5,13 @@ useSlot | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/AddItem/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/AddItem/index.html index 5f962823..c606cea1 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/AddItem/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/AddItem/index.html @@ -5,13 +5,13 @@ AddItem | Overextended - +

AddItem

Adds an item into the specified inventory.

Should be used alongside CanCarryItem.

-- inv: string or number
-- item: table or string
-- count: number
-- metadata: table or string (optional)
-- slot: number (optional)
-- cb: function (optional)
exports.ox_inventory:AddItem(inv, item, count, metadata, slot, cb)

Example:

exports.ox_inventory:AddItem(1, 'bread', 4, nil, nil, function(success, reason)
if not success then
if reason == 'overburdened' then
TriggerClientEvent('ox_inventory:notify', source, {type = 'error', text = shared.locale('cannot_carry', count, data.label), duration = 2500})
end
end
end)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/CanCarryItem/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/CanCarryItem/index.html index b6b2a181..a18bdfd8 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/CanCarryItem/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/CanCarryItem/index.html @@ -5,13 +5,13 @@ CanCarryItem | Overextended - +

CanCarryItem

Returns true or false depending if the inventory can carry the specified item.

The function checks for inventory weight and available slots.

-- inv: string or number
-- item: table or string
-- count: number
-- metadata: table or string (optional)
exports.ox_inventory:CanCarryItem(inv, item, count, metadata)

Example:

-- Checks if the player calling the event can carry 3 water items
if exports.ox_inventory:CanCarryItem(source, 'water', 3) then
-- Do stuff if can carry
else
-- Do stuff if can't carry
end
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/CanSwapItem/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/CanSwapItem/index.html index 64f2f2a4..cfc7b54e 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/CanSwapItem/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/CanSwapItem/index.html @@ -5,13 +5,13 @@ CanSwapItem | Overextended - +

CanSwapItem

Returns true if the item swap is possible based on inventory weight.

-- inv: string or number
-- firstItem: string
-- firstItemCount: number
-- testItem: string
-- testItemCount: number
exports.ox_inventory:CanSwapItem(inv, firstItem, firstItemCount, testItem, testItemCount)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/ClearInventory/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/ClearInventory/index.html index f79a03a2..6c3034d7 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/ClearInventory/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/ClearInventory/index.html @@ -5,13 +5,13 @@ ClearInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/ConfiscateInventory/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/ConfiscateInventory/index.html index 1ad932e0..5716ebc5 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/ConfiscateInventory/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/ConfiscateInventory/index.html @@ -5,14 +5,14 @@ ConfiscateInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/ConvertItems/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/ConvertItems/index.html index 1dc8fd03..883959bc 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/ConvertItems/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/ConvertItems/index.html @@ -5,13 +5,13 @@ ConvertItems | Overextended - +

ConvertItems

Takes traditional item data and updates it to support ox_inventory.

-- playerId: number
-- items: table
exports.ox_inventory:ConvertItems(playerId, items)

Data conversion example:

Old: [{"cola":1, "bread":3}]
New: [{"slot":1,"name":"cola","count":1}, {"slot":2,"name":"bread","count":3}]
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/CustomDrop/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/CustomDrop/index.html index a7410a7b..5ee8626b 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/CustomDrop/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/CustomDrop/index.html @@ -5,14 +5,14 @@ CustomDrop | Overextended - +

CustomDrop

Creates an inventory drop at the specified coords.

-- prefix: string
-- items: table
-- coords: vector3
-- slots: number
-- maxWeight: number
-- instance: ? (optional)
exports.ox_inventory:CustomDrop(prefix, item, coords, slots, maxWeight, instance)

Example: You can find and example showcasing this function into furher detail here.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/GetCurrentWeapon/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/GetCurrentWeapon/index.html index 859cd3fb..6b1b7fb5 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/GetCurrentWeapon/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/GetCurrentWeapon/index.html @@ -5,13 +5,13 @@ GetCurrentWeapon | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/GetItem/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/GetItem/index.html index 95407298..7a79d7e1 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/GetItem/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/GetItem/index.html @@ -5,14 +5,14 @@ GetItem | Overextended - +

GetItem

Returns the item from the specified inventory.

-- inv: string or number
-- item: table or string
-- metadata: any (optional)
-- returnsCount: boolean (optional)
exports.ox_inventory:GetItem(inv, item, metadata, returnsCount)

If returnsCount is set to true, the returned value will be the count based on how many times the item was found.

Otherwise returns the data related to the item and it's total count found in the inventory.

Example:

local item = ox_inventory:GetItem(source, 'water', nil, false)

print(json.encode(item, {indent=true}))
--[[
{
"consume": 1,
"count": 15,
"stack": true,
"name": "water",
"weight": 500,
"label": "Water",
"close": true
}
]]
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/GetItemSlots/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/GetItemSlots/index.html index cd7b564a..4cf3a0d3 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/GetItemSlots/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/GetItemSlots/index.html @@ -5,13 +5,13 @@ GetItemSlots | Overextended - +

GetItemSlots

Returns the number of slots the specified item is in, the item's total count and the remaining empty slots.

-- inv: string or number
-- item: table or string
-- metadata: table (optional)
exports.ox_inventory:GetItemSlots(inv, item, metadata)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/GetSlot/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/GetSlot/index.html index f265f996..db1b5d4b 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/GetSlot/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/GetSlot/index.html @@ -5,13 +5,13 @@ GetSlot | Overextended - +

GetSlot

Returns the specified slot data as a table.

-- inv: string or number
-- slot: number
exports.ox_inventory:GetSlot(inv, slot)

Example:

local slot = exports.ox_inventory:GetSlot(source, 1)

print(json.encode(slot, {indent=true}))
--[[
{
"weight": 2000,
"name": "water",
"metadata": [],
"slot": 1,
"label": "Water",
"close": true,
"stack": true,
"count: 4
}
]]
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash/index.html index fec61d3c..280b745f 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/RegisterStash/index.html @@ -5,13 +5,13 @@ RegisterStash | Overextended - +

RegisterStash

Creates a new custom stash.

-- id: string or number
-- label: string
-- slots: number
-- maxWeight: number
-- owner: string or boolean or nil
-- groups: table
-- coords: vector3
exports.ox_inventory:RegisterStash(id, label, slots, maxWeight, owner, groups, coords)
  • id - Stash identifier when loading from the database.
  • label - Display name when inventory is open.
  • owner - Defines stash permissions.
    • string: Can only access the stash linked to the owner.
    • true: Each player has a unique stash but can request other player's stashes.
    • nil: Always shared.
  • groups - Player groups (jobs) able to access the stash.
    • Table of group names where the numeric value is the minimum grade required.
    • {['police'] = 0, ['ambulance'] = 2}
caution

This function needs to be triggered before a player can open the stash.

Example:

For a use case example on this function check out the written Guide for it.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/RemoveItem/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/RemoveItem/index.html index d44dc000..349dd096 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/RemoveItem/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/RemoveItem/index.html @@ -5,13 +5,13 @@ RemoveItem | Overextended - +

RemoveItem

Removes the specified item from the specified inventory.

-- inv: string or table
-- item: table or string
-- count: number
-- metadata: table or string (optional)
-- slot: number (optional)
exports.ox_inventory:RemoveItem(inv, item, count, metadata, slot)

Example:

-- Removes 1 water from the inventory
exports.ox_inventory:RemoveItem(source, 'water', 1)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/ReturnInventory/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/ReturnInventory/index.html index 5c127eb9..964ebded 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/ReturnInventory/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/ReturnInventory/index.html @@ -5,13 +5,13 @@ ReturnInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/Search/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/Search/index.html index 7dea5319..3dd6aa9d 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/Search/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/Search/index.html @@ -5,14 +5,14 @@ Search | Overextended - +

Search

Searches an inventory for a specified item.

-- inv: string or number
-- search: string
-- item: table or string
-- metadata: table or string (optional)
exports.ox_inventory:Search(inv, search, item, metadata)

search can be either 'slots' or 'count', where slots will return a table of data and count will return the found amount of the specified item.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/SetDurability/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/SetDurability/index.html index 3f921dea..17a0c648 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/SetDurability/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/SetDurability/index.html @@ -5,13 +5,13 @@ SetDurability | Overextended - +

SetDurability

Sets durability onto the specified slot.

Can be used for repairing weapons.

-- inv: string or number
-- slot: number
-- durability: number
exports.ox_inventory:SetDurability(inv, slot, durability)

Example:

local ox_inventory = exports.ox_inventory

-- Set the durability of the item in slot 3 of source player's inventory to 100
ox_inventory:SetDurability(source, 3, 100)

-- Set the durability of the source player's current weapon to 100
local weapon = ox_inventory:GetCurrentWeapon(source)

if weapon then
ox_inventory:SetDurability(source, weapon.slot, 100)
end
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/SetMetadata/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/SetMetadata/index.html index 863f7274..302874a0 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/SetMetadata/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/SetMetadata/index.html @@ -5,13 +5,13 @@ SetMetadata | Overextended - +

SetMetadata

Sets metadata on the specified slot.

-- inv: string or number
-- slot: number
-- metadata: table
ox_inventory:SetMetadata(inv, slot, metadata)

Example:

local ox_inventory = exports.ox_inventory

local water = ox_inventory:Search(source, 1, 'water')
for k, v in pairs(water) do
print('\n______________'..'\n- index '..k)
print(v.name, 'slot: '..v.slot, 'metadata: '..json.encode(v.metadata))
water = v
end
water.metadata.type = 'clean'
ox_inventory:SetMetadata(source, water.slot, water.metadata)
print(('modified %sx water in slot %s with new metadata'):format(water.count, water.slot))
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Inventory/SwapSlots/index.html b/docs/ox_inventory/Functions/External/Server/Inventory/SwapSlots/index.html index 458045f3..309a25c8 100644 --- a/docs/ox_inventory/Functions/External/Server/Inventory/SwapSlots/index.html +++ b/docs/ox_inventory/Functions/External/Server/Inventory/SwapSlots/index.html @@ -5,13 +5,13 @@ SwapSlots | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/Items/index.html b/docs/ox_inventory/Functions/External/Server/Items/index.html index 558a7007..08b0209b 100644 --- a/docs/ox_inventory/Functions/External/Server/Items/index.html +++ b/docs/ox_inventory/Functions/External/Server/Items/index.html @@ -5,13 +5,13 @@ Items | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/External/Server/setPlayerInventory/index.html b/docs/ox_inventory/Functions/External/Server/setPlayerInventory/index.html index 3e91d5a6..aa664b0f 100644 --- a/docs/ox_inventory/Functions/External/Server/setPlayerInventory/index.html +++ b/docs/ox_inventory/Functions/External/Server/setPlayerInventory/index.html @@ -5,13 +5,13 @@ setPlayerInventory | Overextended - +

setPlayerInventory

Creates and sets the player's inventory.

-- player: table
-- source: number
-- identifier: string
-- name: string
-- groups: table (optional)
-- sex: string (optional)
-- dateofbirth: string (optional)
-- data: table
exports.ox_inventory:setPlayerInventory(player, data)
- + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/CanOpenInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/CanOpenInventory/index.html index 61f9e2ec..b1cc9e76 100644 --- a/docs/ox_inventory/Functions/Internal/Client/CanOpenInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/CanOpenInventory/index.html @@ -5,13 +5,13 @@ CanOpenInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/CanOpenTarget/index.html b/docs/ox_inventory/Functions/Internal/Client/CanOpenTarget/index.html index 0cfd8118..d238d963 100644 --- a/docs/ox_inventory/Functions/Internal/Client/CanOpenTarget/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/CanOpenTarget/index.html @@ -5,13 +5,13 @@ CanOpenTarget | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/CloseTrunk/index.html b/docs/ox_inventory/Functions/Internal/Client/CloseTrunk/index.html index 3a6ccc88..e4892c99 100644 --- a/docs/ox_inventory/Functions/Internal/Client/CloseTrunk/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/CloseTrunk/index.html @@ -5,13 +5,13 @@ CloseTrunk | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Interface/Complete/index.html b/docs/ox_inventory/Functions/Internal/Client/Interface/Complete/index.html index a795b2f7..68d3b40a 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Interface/Complete/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Interface/Complete/index.html @@ -5,13 +5,13 @@ Complete | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Interface/Keyboard/index.html b/docs/ox_inventory/Functions/Internal/Client/Interface/Keyboard/index.html index c329d49d..167e383f 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Interface/Keyboard/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Interface/Keyboard/index.html @@ -5,13 +5,13 @@ Keyboard | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Interface/Progress/index.html b/docs/ox_inventory/Functions/Internal/Client/Interface/Progress/index.html index 52964985..ab84f8d0 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Interface/Progress/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Interface/Progress/index.html @@ -5,13 +5,13 @@ Progress | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Interface/resetPlayer/index.html b/docs/ox_inventory/Functions/Internal/Client/Interface/resetPlayer/index.html index 9b43eae8..4ce9a680 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Interface/resetPlayer/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Interface/resetPlayer/index.html @@ -5,13 +5,13 @@ resetPlayer | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Inventory/OpenStash/index.html b/docs/ox_inventory/Functions/Internal/Client/Inventory/OpenStash/index.html index 4533af2c..9902b95b 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Inventory/OpenStash/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Inventory/OpenStash/index.html @@ -5,13 +5,13 @@ OpenStash | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Inventory/Search/index.html b/docs/ox_inventory/Functions/Internal/Client/Inventory/Search/index.html index dd6a4859..faf3c59d 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Inventory/Search/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Inventory/Search/index.html @@ -5,13 +5,13 @@ Search | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Items/GetItem/index.html b/docs/ox_inventory/Functions/Internal/Client/Items/GetItem/index.html index ecd66920..df321eb0 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Items/GetItem/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Items/GetItem/index.html @@ -5,13 +5,13 @@ GetItem | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Items/Item/index.html b/docs/ox_inventory/Functions/Internal/Client/Items/Item/index.html index 8510e358..6d1aaa3b 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Items/Item/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Items/Item/index.html @@ -5,13 +5,13 @@ Item | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/OnPlayerData/index.html b/docs/ox_inventory/Functions/Internal/Client/OnPlayerData/index.html index e53793bd..da096fe7 100644 --- a/docs/ox_inventory/Functions/Internal/Client/OnPlayerData/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/OnPlayerData/index.html @@ -5,13 +5,13 @@ OnPlayerData | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/OpenInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/OpenInventory/index.html index a36a57e4..b56dd4dc 100644 --- a/docs/ox_inventory/Functions/Internal/Client/OpenInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/OpenInventory/index.html @@ -5,13 +5,13 @@ OpenInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/OpenNearbyInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/OpenNearbyInventory/index.html index 34689d43..11ee6978 100644 --- a/docs/ox_inventory/Functions/Internal/Client/OpenNearbyInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/OpenNearbyInventory/index.html @@ -5,13 +5,13 @@ OpenNearbyInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/RegisterCommands/index.html b/docs/ox_inventory/Functions/Internal/Client/RegisterCommands/index.html index 5914cece..7068d527 100644 --- a/docs/ox_inventory/Functions/Internal/Client/RegisterCommands/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/RegisterCommands/index.html @@ -5,13 +5,13 @@ RegisterCommands | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Shops/CreateLocationBlip/index.html b/docs/ox_inventory/Functions/Internal/Client/Shops/CreateLocationBlip/index.html index 57e3bdb6..8837b0e5 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Shops/CreateLocationBlip/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Shops/CreateLocationBlip/index.html @@ -5,13 +5,13 @@ CreateLocationBlip | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Shops/OpenShop/index.html b/docs/ox_inventory/Functions/Internal/Client/Shops/OpenShop/index.html index fdf23028..3966d214 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Shops/OpenShop/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Shops/OpenShop/index.html @@ -5,13 +5,13 @@ OpenShop | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/ClearWeapons/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/ClearWeapons/index.html index fa720ba6..d0d832e4 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/ClearWeapons/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/ClearWeapons/index.html @@ -5,13 +5,13 @@ ClearWeapons | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/DeleteObject/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/DeleteObject/index.html index e7068790..eedcbf9e 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/DeleteObject/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/DeleteObject/index.html @@ -5,13 +5,13 @@ DeleteObject | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/Disarm/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/Disarm/index.html index 36eab80b..1f490b7a 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/Disarm/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/Disarm/index.html @@ -5,13 +5,13 @@ Disarm | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/GetClosestPlayer/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/GetClosestPlayer/index.html index 5b6b3e9d..5f0e5aff 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/GetClosestPlayer/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/GetClosestPlayer/index.html @@ -5,13 +5,13 @@ GetClosestPlayer | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/ItemNotify/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/ItemNotify/index.html index 9652e7c9..d767314e 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/ItemNotify/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/ItemNotify/index.html @@ -5,13 +5,13 @@ ItemNotify | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/Notify/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/Notify/index.html index 80613c78..e0d615c1 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/Notify/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/Notify/index.html @@ -5,13 +5,13 @@ Notify | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnim/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnim/index.html index d58ef5a5..3bc4e8c4 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnim/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnim/index.html @@ -5,13 +5,13 @@ PlayAnim | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnimAdvanced/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnimAdvanced/index.html index d8f23bb4..9552aa42 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnimAdvanced/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/PlayAnimAdvanced/index.html @@ -5,13 +5,13 @@ PlayAnimAdvanced | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/Raycast/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/Raycast/index.html index de26afbc..f62c9e48 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/Raycast/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/Raycast/index.html @@ -5,13 +5,13 @@ Raycast | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/Utils/WeaponWheel/index.html b/docs/ox_inventory/Functions/Internal/Client/Utils/WeaponWheel/index.html index 3e940eca..b8b03899 100644 --- a/docs/ox_inventory/Functions/Internal/Client/Utils/WeaponWheel/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/Utils/WeaponWheel/index.html @@ -5,13 +5,13 @@ WeaponWheel | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/buyItem/index.html b/docs/ox_inventory/Functions/Internal/Client/buyItem/index.html index 620cb143..12c467b9 100644 --- a/docs/ox_inventory/Functions/Internal/Client/buyItem/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/buyItem/index.html @@ -5,13 +5,13 @@ buyItem | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/closeInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/closeInventory/index.html index 52f9a18b..d2d060d0 100644 --- a/docs/ox_inventory/Functions/Internal/Client/closeInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/closeInventory/index.html @@ -5,13 +5,13 @@ closeInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/createDrop/index.html b/docs/ox_inventory/Functions/Internal/Client/createDrop/index.html index 32dbc110..fd250bf1 100644 --- a/docs/ox_inventory/Functions/Internal/Client/createDrop/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/createDrop/index.html @@ -5,13 +5,13 @@ createDrop | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/giveItem/index.html b/docs/ox_inventory/Functions/Internal/Client/giveItem/index.html index 23ac2940..2b6c6b92 100644 --- a/docs/ox_inventory/Functions/Internal/Client/giveItem/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/giveItem/index.html @@ -5,13 +5,13 @@ giveItem | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/inventoryConfiscated/index.html b/docs/ox_inventory/Functions/Internal/Client/inventoryConfiscated/index.html index d4723e08..3f237801 100644 --- a/docs/ox_inventory/Functions/Internal/Client/inventoryConfiscated/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/inventoryConfiscated/index.html @@ -5,13 +5,13 @@ inventoryConfiscated | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/inventoryReturned/index.html b/docs/ox_inventory/Functions/Internal/Client/inventoryReturned/index.html index da4cc028..15869dba 100644 --- a/docs/ox_inventory/Functions/Internal/Client/inventoryReturned/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/inventoryReturned/index.html @@ -5,13 +5,13 @@ inventoryReturned | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/markers/index.html b/docs/ox_inventory/Functions/Internal/Client/markers/index.html index 947f511c..0b52e394 100644 --- a/docs/ox_inventory/Functions/Internal/Client/markers/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/markers/index.html @@ -5,13 +5,13 @@ markers | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/removeComponent/index.html b/docs/ox_inventory/Functions/Internal/Client/removeComponent/index.html index 7515de7b..fc49db37 100644 --- a/docs/ox_inventory/Functions/Internal/Client/removeComponent/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/removeComponent/index.html @@ -5,13 +5,13 @@ removeComponent | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/removeDrop/index.html b/docs/ox_inventory/Functions/Internal/Client/removeDrop/index.html index 4a166015..f9493aa1 100644 --- a/docs/ox_inventory/Functions/Internal/Client/removeDrop/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/removeDrop/index.html @@ -5,13 +5,13 @@ removeDrop | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/setPlayerInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/setPlayerInventory/index.html index ed6bdff6..901f2d68 100644 --- a/docs/ox_inventory/Functions/Internal/Client/setPlayerInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/setPlayerInventory/index.html @@ -5,13 +5,13 @@ setPlayerInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/swapItems/index.html b/docs/ox_inventory/Functions/Internal/Client/swapItems/index.html index ec85904d..deeaafc2 100644 --- a/docs/ox_inventory/Functions/Internal/Client/swapItems/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/swapItems/index.html @@ -5,13 +5,13 @@ swapItems | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/updateInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/updateInventory/index.html index 2a149f58..93edb0be 100644 --- a/docs/ox_inventory/Functions/Internal/Client/updateInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/updateInventory/index.html @@ -5,13 +5,13 @@ updateInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/updateSlots/index.html b/docs/ox_inventory/Functions/Internal/Client/updateSlots/index.html index e76c60b8..32b88628 100644 --- a/docs/ox_inventory/Functions/Internal/Client/updateSlots/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/updateSlots/index.html @@ -5,13 +5,13 @@ updateSlots | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/useItem/index.html b/docs/ox_inventory/Functions/Internal/Client/useItem/index.html index b3c20224..1d02ac71 100644 --- a/docs/ox_inventory/Functions/Internal/Client/useItem/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/useItem/index.html @@ -5,13 +5,13 @@ useItem | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/useSlot/index.html b/docs/ox_inventory/Functions/Internal/Client/useSlot/index.html index c6140b45..1e71d92f 100644 --- a/docs/ox_inventory/Functions/Internal/Client/useSlot/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/useSlot/index.html @@ -5,13 +5,13 @@ useSlot | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Client/viewInventory/index.html b/docs/ox_inventory/Functions/Internal/Client/viewInventory/index.html index 46353799..c99e442f 100644 --- a/docs/ox_inventory/Functions/Internal/Client/viewInventory/index.html +++ b/docs/ox_inventory/Functions/Internal/Client/viewInventory/index.html @@ -5,13 +5,13 @@ viewInventory | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Internal/Server/placeholder/index.html b/docs/ox_inventory/Functions/Internal/Server/placeholder/index.html index 50119855..60afe853 100644 --- a/docs/ox_inventory/Functions/Internal/Server/placeholder/index.html +++ b/docs/ox_inventory/Functions/Internal/Server/placeholder/index.html @@ -5,13 +5,13 @@ Placeholder | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/customDrop/index.html b/docs/ox_inventory/Guides/customDrop/index.html index 4e7964cb..c3e51431 100644 --- a/docs/ox_inventory/Guides/customDrop/index.html +++ b/docs/ox_inventory/Guides/customDrop/index.html @@ -5,13 +5,13 @@ Creating custom drops | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/index.html b/docs/ox_inventory/Guides/index.html index 0dc873e1..524cfb5c 100644 --- a/docs/ox_inventory/Guides/index.html +++ b/docs/ox_inventory/Guides/index.html @@ -5,13 +5,13 @@ Overview | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/inventory_ui/index.html b/docs/ox_inventory/Guides/inventory_ui/index.html index 4fd1ccb6..0ce5e73c 100644 --- a/docs/ox_inventory/Guides/inventory_ui/index.html +++ b/docs/ox_inventory/Guides/inventory_ui/index.html @@ -5,7 +5,7 @@ Building inventory UI | Overextended - + @@ -13,7 +13,7 @@

Building inventory UI

Requirements to build:​

  • Node.js
  • Yarn

Installing Node.js:​

  • Download the LTS version of Node.js.
  • Go through the install and make sure you install all of the features.
  • Run node --version in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly.

Installing Yarn:​

  • Now that you've installed Node.js you can install Yarn by running npm install --global yarn in cmd.

Building the UI:​

  • cd into the web directory of ox_inventory
  • In your cmd type yarn and in will start downloading the node modules.
  • After it's done downloading node modules you can run yarn build to build the UI.
Hot reloads

When working in the browser you can run yarn start, which supports hot reloads meaning that you will see your changes after saving your file.

If you want to work in game you can run yarn start:game which writes changes to disk, so the only thing you have to do is restart the resource for it take affect.

- + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/itemData/index.html b/docs/ox_inventory/Guides/itemData/index.html index f03698fd..df2a9020 100644 --- a/docs/ox_inventory/Guides/itemData/index.html +++ b/docs/ox_inventory/Guides/itemData/index.html @@ -5,13 +5,13 @@ itemData | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/stashes/index.html b/docs/ox_inventory/Guides/stashes/index.html index 76975b0d..f94b2943 100644 --- a/docs/ox_inventory/Guides/stashes/index.html +++ b/docs/ox_inventory/Guides/stashes/index.html @@ -5,13 +5,13 @@ Creating custom stashes | Overextended - +

Creating custom stashes

We can set up custom stashes from outside the resource utilising the exported RegisterStash function. Firstly, we need to define the stashes properties.

-- id: string
-- label: string
-- slots: number
-- weight: number
-- owner: string or boolean (optional)
-- job: table (optional)
-- name: string
-- grade: number
-- coords: vector or table (optional)
  • id - A unique name to identify the stash in the database
  • label - Display name when viewing the stash
  • slots - Number of slots that the stash will have
  • weight - Maximum stash weight
  • owner - See below
  • job - Key-value pairs of job name and minimum grade to access
  • coords - Vector or table containing coordinates

The owner field will set permissions for stash access, with stashes registering to specific identifiers.

  • true: Each player has their own unique stash, but can request to open the stash of another player
  • false: Only a single stash exists and is shared between all players
  • string: The stash explicitly belongs to the given owner, usually a player identifier

You can set the stash coordinates to prevent the stash from being opened if the player isn't close enough.

Example​

Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)

-- Server
local stash = {
id = '42wallabyway',
label = '42 Wallaby Way',
slots = 50,
weight = 100000,
owner = 'char1:license'
}

AddEventHandler('onServerResourceStart', function(resourceName)
if resourceName == 'ox_inventory' or resourceName == GetCurrentResourceName() then
exports.ox_inventory:RegisterStash(stash.id, stash.label, stash.slots, stash.weight, stash.owner)
end
end)

-- Client
exports.ox_inventory:openInventory('stash', {id='42wallabyway', owner=property.owner})

The following sample is based on esx_property's db data.

-- Server
local properties

MySQL.query('SELECT * FROM `properties`', {}, function(result)
properties = result
end

RegisterNetEvent('ox:loadStashes', function(id)
local stash = properties[id]
if stash then
-- id: 1, name: WhispymoundDrive, label: 2677 Whispymound Drive, coords: {"x":118.748,"y":566.573,"z":175.697}
ox_inventory:RegisterStash(stash.name, stash.label, 50, 100000, true, false, json.encode(stash.room_menu))
end
end)

-- Client
local ox_inventory = exports.ox_inventory

if ox_inventory:openInventory('stash', property.id) == false then
TriggerServerEvent('ox:loadStashes')
ox_inventory:openInventory('stash', property.id)
end

Example resource​

We put together an example resoruce showcasing how to properly utilise the stash API:

- + \ No newline at end of file diff --git a/docs/ox_inventory/Guides/usableItems/index.html b/docs/ox_inventory/Guides/usableItems/index.html index 74695eef..f8f5bfd9 100644 --- a/docs/ox_inventory/Guides/usableItems/index.html +++ b/docs/ox_inventory/Guides/usableItems/index.html @@ -5,13 +5,13 @@ usableItems | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_inventory/config/index.html b/docs/ox_inventory/config/index.html index 54be3ed3..62ada177 100644 --- a/docs/ox_inventory/config/index.html +++ b/docs/ox_inventory/config/index.html @@ -5,13 +5,13 @@ Configuration | Overextended - +

Configuration

You can add these settings directly to your 'server.cfg', or add them to a separate file and call it with exec.

caution

Convars must be set before starting ox_inventory.

The values below are defaults and should not be explicitly set unless changing the value.

# Activate specific event handlers and functions (supported: ox, esx)
setr inventory:framework "esx"

# Load specific language file from data/locales
setr inventory:locale "en"

# Number of slots for player inventories
setr inventory:slots 50

# Maximum carry capacity for players, in kilograms
setr inventory:weight 30000

# Weapons will reload after reaching 0 ammo
setr inventory:autoreload false

# Weapons must be aimed before shooting
setr aimedfiring false

# Blur the screen while accessing the inventory
setr inventory:screenblur true

# Trim whitespace from vehicle plates when checking owned vehicles
setr inventory:trimplate true

# Integrated support for qtarget stashes, shops, etc
setr inventory:qtarget false

# Default hotkeys to access primary and secondary inventories, and hotbar
setr inventory:keys ["F2", "K", "TAB"]

# Enable control action when inventory is open
setr inventory:enablekeys [249]

# Jobs with access to police armoury, evidence lockers, etc
setr inventory:police ["police", "sheriff"]

# Item prices fluctuate in shops
set inventory:randomprices true

# Compare current version to latest release on GitHub
set inventory:versioncheck true

# Loot will randomly generate inside unowned vehicles and dumpsters
set inventory:randomloot true

# Minimum job grade to remove items from evidence lockers
set inventory:evidencegrade 2

# Stashes will be wiped after remaining unchanged for the given time
set inventory:clearstashes "6 MONTH"

# Set the contents of randomly generated inventories
# [item name, minimum, maximum, loot chance]
set inventory:vehicleloot [
["cola", 1, 1],
["water", 1, 1],
["garbage", 1, 2, 50],
["panties", 1, 1, 5],
["money", 1, 50],
["money", 200, 400, 5],
["bandage", 1, 1]
]

set inventory:dumpsterloot [
["mustard", 1, 1],
["garbage", 1, 3],
["money", 1, 10],
["burger", 1, 1]
]

# Set datadog API key for inventory logging (https://app.datadoghq.com/organization-settings/api-keys)
set datadog:key ""

# Set server intake (https://docs.datadoghq.com/api/latest/logs/#send-logs)
set datadog:site "datadoghq.com"

# Set server hostname
set datadog:hostname "FXServer"

add_principal group.admin ox_inventory
add_ace resource.ox_inventory command.add_principal allow
add_ace resource.ox_inventory command.remove_principal allow
- + \ No newline at end of file diff --git a/docs/ox_inventory/index.html b/docs/ox_inventory/index.html index 94af7b8b..f2eb201c 100644 --- a/docs/ox_inventory/index.html +++ b/docs/ox_inventory/index.html @@ -5,7 +5,7 @@ Getting Started | Overextended - + @@ -30,7 +30,7 @@ and

​

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.

  • ESX loadouts do not exist - resources that use them need to remove references or be modified to look for the weapon as an item
  • Stashes from resources such as esx_policejob, esx_ambulancejob, etc. should be removed
  • Shops from esx_shops or the armoury from esx_policejob should be removed
  • Resources like esx_inventoryhud, esx_trunkinventory, esx_addoninventory, etc. should be removed

Optional optimisation​

All item related functions from xPlayer, such as xPlayer.getInventoryItem, have been modified for compatibility purposes; however they are considered deprecated.

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.

You should read through the functions section for further information, but the following should give you a decent idea.

if xPlayer.getInventoryItem('acetone').count > 2 and xPlayer.getInventoryItem('antifreeze').count > 4 and xPlayer.getInventoryItem('sudo').count > 9 then
xPlayer.removeInventoryItem("acetone", 3)
xPlayer.removeInventoryItem("antifreeze", 5)
xPlayer.removeInventoryItem("sudo", 10)
end
- + \ No newline at end of file diff --git a/docs/ox_lib/Client/cache/index.html b/docs/ox_lib/Client/cache/index.html index ec10fcab..aeb81136 100644 --- a/docs/ox_lib/Client/cache/index.html +++ b/docs/ox_lib/Client/cache/index.html @@ -5,14 +5,14 @@ Cache | Overextended - +

Cache

Caches data related to the player and handling some events or statebags.
An interval runs every 100ms to update data that cannot be checked via handlers.

https://github.com/overextended/ox_lib/blob/master/resource/cache/client.lua

States​

cache.ped       -- player entity id
cache.vehicle -- vehicle entity id
cache.seat -- vehicle seat index

lib.onCache​

Register a callback function when the value is changed.

lib.onCache('vehicle', function(value)
print('vehicle', value)
end)

lib.onCache('seat', function(value)
print('seat', value)
end)
- + \ No newline at end of file diff --git a/docs/ox_lib/Client/callback/index.html b/docs/ox_lib/Client/callback/index.html index 692ec9bd..6199e1ec 100644 --- a/docs/ox_lib/Client/callback/index.html +++ b/docs/ox_lib/Client/callback/index.html @@ -5,13 +5,13 @@ Callbacks | Overextended - +

Callbacks

Triggers a registered server callback and registers an event handler for the response.

lib.callback​

The response is handled in a separate coroutine.

-- name: string
-- delay: number or false
-- cb: function
lib.callback(name, delay, cb, ...)

lib.callback('ox_inventory:getItemCount', false, function(count)
print(count)
end, 'water', {type = 'fresh'})

lib.callback.await​

The current coroutine is yielded until a response is received.

-- name: string
-- delay: number or false
lib.callback.await(name, delay, ...)

local count = lib.callback('ox_inventory:getItemCount', false, 'water', {type = 'fresh'})
print(count)
- + \ No newline at end of file diff --git a/docs/ox_lib/Client/disableControls/index.html b/docs/ox_lib/Client/disableControls/index.html index fc19ea80..33a12924 100644 --- a/docs/ox_lib/Client/disableControls/index.html +++ b/docs/ox_lib/Client/disableControls/index.html @@ -5,13 +5,13 @@ Disable Controls | Overextended - +

Disable Controls

lib.disableControls​

lib.disableControls()

lib.disableControls:Add​

-- vararg: number
lib.disableControls:Add(...)

lib.disableControls:Remove​

-- vararg: number
lib.disableControls:Remove(...)

lib.disableControls:Clear​

-- vararg: number
lib.disableControls:Clear(...)
- + \ No newline at end of file diff --git a/docs/ox_lib/Client/index.html b/docs/ox_lib/Client/index.html index 4d0fd2ad..0ee18215 100644 --- a/docs/ox_lib/Client/index.html +++ b/docs/ox_lib/Client/index.html @@ -5,13 +5,13 @@ index | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_lib/Client/points/index.html b/docs/ox_lib/Client/points/index.html index 9bfbb2cf..47783bab 100644 --- a/docs/ox_lib/Client/points/index.html +++ b/docs/ox_lib/Client/points/index.html @@ -5,13 +5,13 @@ Points | Overextended - +
-

Points

Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.

-- coords: vector3
-- distance: number
-- data: table
lib.points.new(coords, distance, data)

local point = lib.points.new(playerCoords, 5, {
dunak = 'nerd',
})

function point:onEnter()
print('entered range of point', self.id)
end

function point:onExit()
print('left range of point', self.id)
end

function point:callback()
DrawMarker(2, self.coords.x, self.coords.y, self.coords.z, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 1.0, 1.0, 1.0, 200, 20, 20, 50, false, true, 2, nil, nil, false)

if self.currentDistance < 1 and IsControlJustReleased(0, 38) then
print('inside marker', self.id)
print(self.dunak)
end
end
- +

Points

Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.

-- coords: vector3
-- distance: number
-- data: table
lib.points.new(coords, distance, data)

local point = lib.points.new(playerCoords, 5, {
dunak = 'nerd',
})

function point:onEnter()
print('entered range of point', self.id)
end

function point:onExit()
print('left range of point', self.id)
end

function point:nearby()
DrawMarker(2, self.coords.x, self.coords.y, self.coords.z, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 1.0, 1.0, 1.0, 200, 20, 20, 50, false, true, 2, nil, nil, false)

if self.currentDistance < 1 and IsControlJustReleased(0, 38) then
print('inside marker', self.id)
print(self.dunak)
end
end
+ \ No newline at end of file diff --git a/docs/ox_lib/Client/streaming/index.html b/docs/ox_lib/Client/streaming/index.html index 270272db..5eae597b 100644 --- a/docs/ox_lib/Client/streaming/index.html +++ b/docs/ox_lib/Client/streaming/index.html @@ -5,14 +5,14 @@ Streaming | Overextended - +

Streaming

Check if assets exist, such as models, and loads them into memory.
Throws errors for invalid assets and returns true if the asset is loaded.

lib.requestAnimDict​

-- dict: string
-- timeout: number [default: 100]
lib.requestAnimDict(dict, timeout)

lib.requestAnimSet​

-- set: string
-- timeout: number [default: 100]
lib.requestAnimSet(set, timeout)

lib.requestModel​

-- model: string
-- timeout: number [default: 100]
lib.requestModel(model, timeout)

lib.requestStreamedTextureDict​

-- dict: string
-- timeout: number [default: 100]
lib.requestStreamedTextureDict(dict, timeout)

lib.requestNamedPtfxAsset​

-- fxName: string
-- timeout: number [default: 100]
lib.requestNamedPtfxAsset(fxName, timeout)
- + \ No newline at end of file diff --git a/docs/ox_lib/Client/vehicleProperties/index.html b/docs/ox_lib/Client/vehicleProperties/index.html index e4cdbf92..a0c52fbd 100644 --- a/docs/ox_lib/Client/vehicleProperties/index.html +++ b/docs/ox_lib/Client/vehicleProperties/index.html @@ -5,14 +5,14 @@ Vehicle Properties | Overextended - +

Vehicle Properties

Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.
https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L5

lib.getVehicleProperties​

-- vehicle: entity
lib.getVehicleProperties(vehicle)

lib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))

lib.setVehicleProperties​

Requires the vehicle to belong to the client. Do not use NetworkRequestControlOfEntity.

-- vehicle: entity
-- props: table
lib.setVehicleProperties(vehicle, props)

RegisterNetEvent('lualib:setVehicleProperties', function(netid, data)
lib.setVehicleProperties(NetToVeh(netid), data)
end)

The server should tell the owner of the entity to set properties, using the following trigger.

TriggerClientEvent('lualib:setVehicleProperties', entityOwner, vehNetId, data)
- + \ No newline at end of file diff --git a/docs/ox_lib/Server/acl/index.html b/docs/ox_lib/Server/acl/index.html index 86fab35b..062e66f1 100644 --- a/docs/ox_lib/Server/acl/index.html +++ b/docs/ox_lib/Server/acl/index.html @@ -5,14 +5,14 @@ Permissions | Overextended - +

Permissions

Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.
Refer to Basic Aces & Principals overview/guide for more information.

lib.addAce​

Assigns the ace permission to a principal. Third parameter defaults to 'allow', while false sets the permission to 'deny'.

-- principal: string
-- ace: string
-- allow: boolean
lib.addAce(principal, ace, allow)

lib.addAce('group.admin', 'command.say')

lib.removeAce​

Removes the ace permission from a principal. Third parameter defaults to 'allow', while false sets the permission to 'deny'.

-- principal: string
-- ace: string
-- allow: boolean
lib.removeAce(principal, ace, allow)

lib.removeAce('group.admin', 'command.say')

lib.addPrincipal​

Assigns a principal to a parent principal. Children inherit permissions from the parent.

-- child: string
-- parent: string
lib.addPrincipal(child, parent)

lib.addPrincipal('player.1', 'group.moderator')

lib.removePrincipal​

Removes a principal from a parent principal.

-- child: string
-- parent: string
lib.removePrincipal(child, parent)

lib.removePrincipal('player.1', 'group.moderator')
- + \ No newline at end of file diff --git a/docs/ox_lib/Server/addCommand/index.html b/docs/ox_lib/Server/addCommand/index.html index 17eac421..472e89c9 100644 --- a/docs/ox_lib/Server/addCommand/index.html +++ b/docs/ox_lib/Server/addCommand/index.html @@ -5,13 +5,13 @@ Command | Overextended - +

Command

-- principal: string or false
-- command: string
-- callback: function
-- parameters: table (optional)
-- help: string (optional)
lib.addCommand(principal, command, callback, parameters, help)

lib.addCommand('group.admin', {'additem', 'giveitem'}, function(source, args)
args.item = Items(args.item)
if args.item and args.count > 0 then
Inventory.AddItem(args.target, args.item.name, args.count, args.metatype)
end
end, {'target:number', 'item:string', 'count:number', 'metatype:?string'})
- + \ No newline at end of file diff --git a/docs/ox_lib/Server/callback/index.html b/docs/ox_lib/Server/callback/index.html index de182573..9bcf2022 100644 --- a/docs/ox_lib/Server/callback/index.html +++ b/docs/ox_lib/Server/callback/index.html @@ -5,13 +5,13 @@ Callbacks | Overextended - +

Callbacks

lib.callback.register​

-- name: string
-- cb: function
lib.callback.register(name, cb)

lib.callback.register('ox_inventory:getItemCount', function(source, item, metadata, target)
local inventory = target and Inventory(target) or Inventory(source)
return (inventory and Inventory.GetItem(inventory, item, metadata, true)) or 0
end)
- + \ No newline at end of file diff --git a/docs/ox_lib/Server/index.html b/docs/ox_lib/Server/index.html index 2d1ca77a..f601e1f2 100644 --- a/docs/ox_lib/Server/index.html +++ b/docs/ox_lib/Server/index.html @@ -5,13 +5,13 @@ index | Overextended - + - + \ No newline at end of file diff --git a/docs/ox_lib/Server/version/index.html b/docs/ox_lib/Server/version/index.html index b23b63d1..3122bb36 100644 --- a/docs/ox_lib/Server/version/index.html +++ b/docs/ox_lib/Server/version/index.html @@ -5,13 +5,13 @@ Version check | Overextended - +
- + \ No newline at end of file diff --git a/docs/ox_lib/Shared/version/index.html b/docs/ox_lib/Shared/version/index.html index df859c1e..3f5f6849 100644 --- a/docs/ox_lib/Shared/version/index.html +++ b/docs/ox_lib/Shared/version/index.html @@ -5,13 +5,13 @@ Dependency version | Overextended - +

Dependency version

lib.checkDependency​

Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.

-- repository: string
-- version: string
lib.checkDependency(repository, version)

if not lib.checkDependency('ox_lib', '1.5.0') then error() end
- + \ No newline at end of file diff --git a/docs/ox_lib/index.html b/docs/ox_lib/index.html index 988ca8b3..279b38e4 100644 --- a/docs/ox_lib/index.html +++ b/docs/ox_lib/index.html @@ -5,13 +5,13 @@ index | Overextended - + - + \ No newline at end of file diff --git a/docs/oxmysql/Getting Started/benchmark/index.html b/docs/oxmysql/Getting Started/benchmark/index.html index 551e2508..5ab11cd2 100644 --- a/docs/oxmysql/Getting Started/benchmark/index.html +++ b/docs/oxmysql/Getting Started/benchmark/index.html @@ -5,13 +5,13 @@ Benchmark | Overextended - +

Benchmark

Internal benchmark

Low: 0.1222ms | Avg: 0.14188357ms | Total: 1418.8357ms (10000 queries)

Round-trip-time for exports

Low: 0.1997ms | Avg: 0.25898800ms | Total: 2589.8800ms (10000 queries)

Lua (5.4)​

local val = 10000
RegisterCommand('luasync', function()
local queryTimesLocal = {}
local result
MySQL.prepare.await('SELECT identifier from users WHERE lastname = ?', {'Linden'})

for i=1, val do
local time = os.nanotime()
local r = MySQL.prepare.await('SELECT identifier from users WHERE lastname = ?', {'Linden'})
queryTimesLocal[#queryTimesLocal+1] = (os.nanotime() - time) / 1000000
if i==1 then result = r end
end

local queryMsLow, queryMsSum = 1000, 0

for _, v in pairs(queryTimesLocal) do queryMsSum = queryMsSum + v end
for _, v in pairs(queryTimesLocal) do
if v < queryMsLow then queryMsLow = v end
end

local averageQueryTime = queryMsSum / #queryTimesLocal
print(json.encode(result))
print('Low: '.. queryMsLow ..'ms | Avg: '..averageQueryTime..'ms | Total: '..queryMsSum..'ms ('..#queryTimesLocal..' queries)')
end)

JavaScript​

const val = 10000
RegisterCommand('jssync', async() => {
const queryTimesLocal = [];
let result
await exports.oxmysql.prepare_async('SELECT identifier from users WHERE lastname = ?', ['Linden'])

for(let i=0; i < val; i++) {
const startTime = process.hrtime()
const r = await exports.oxmysql.prepare_async('SELECT identifier from users WHERE lastname = ?', ['Linden'])
queryTimesLocal.push(process.hrtime(startTime)[1] / 1000000)
if (i === 0) result = r
}

const queryMsSum = queryTimesLocal.reduce((a, b) => a + b, 0)
const queryMsLow = queryTimesLocal.sort((a, b) => a - b)[0]
const averageQueryTime = queryMsSum / queryTimesLocal.length

console.log(result)
console.log('Low: '+ queryMsLow +'ms | Avg: '+averageQueryTime+'ms | Total: '+queryMsSum+'ms ('+queryTimesLocal.length+' queries)')
})
- + \ No newline at end of file diff --git a/docs/oxmysql/Getting Started/issues/index.html b/docs/oxmysql/Getting Started/issues/index.html index 1eb3f5e0..c7d7e94b 100644 --- a/docs/oxmysql/Getting Started/issues/index.html +++ b/docs/oxmysql/Getting Started/issues/index.html @@ -5,14 +5,14 @@ Common Issues | Overextended - +

Common Issues

Unable to establish a connection​

This is usually the result of incorrect database settings or your password containing reserved characters (; , / ? : @ & = + $ #).

Solution

Ensure you have entered the correct database settings in the mysql_connection_string convar.
You can try using the semicolon-separated format if your password contains reserved characters.

No such export ... in resource oxmysql​

Typically the result of failing to follow instructions.

Solution

Download the latest release build (not source) of oxmysql, and ensure it is starting before any resources that require it.

- + \ No newline at end of file diff --git a/docs/oxmysql/Getting Started/placeholders/index.html b/docs/oxmysql/Getting Started/placeholders/index.html index c7f2cd34..bfc82a2f 100644 --- a/docs/oxmysql/Getting Started/placeholders/index.html +++ b/docs/oxmysql/Getting Started/placeholders/index.html @@ -5,13 +5,13 @@ Placeholders | Overextended - +

Placeholders

This allows queries to be properly prepared and escaped; the following lines are equivalent.

"SELECT group FROM users WHERE identifier = ?", {identifier}
"SELECT group FROM users WHERE identifier = :identifier", {identifier = identifier}
"SELECT group FROM users WHERE identifier = @identifier", {['@identifier'] = identifier}

Named placeholders are deprecated and should be avoided as much as possible.

- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/index.html b/docs/oxmysql/Usage/index.html index 03491441..a5a7c349 100644 --- a/docs/oxmysql/Usage/index.html +++ b/docs/oxmysql/Usage/index.html @@ -5,13 +5,13 @@ Usage | Overextended - +

Usage

-- Lua
MySQL.query('SELECT * from users WHERE identifier = ?', {identifier}, function(result)
-- callback response
-- same as MySQL.Async.fetchAll
end)
CreateThread(function()
local result = MySQL.query.await('SELECT * from users WHERE identifier = ?', {identifier})
-- await a promise to resolve
-- same as MySQL.Sync.fetchAll
end)
// JS
exports.oxmysql.query('SELECT * from users WHERE identifier = ?', [identifier], (result) => {
// callback response
})(async () => {
const result = await exports.oxmysql.query_async('SELECT * from users WHERE identifier = ?', [identifier]);
// await a promise to resolve
})();
exports.oxmysql.query_async('SELECT * from users WHERE identifier = ?', [identifier]).then((result) => {
// utilise .then to resolve a promise like a callback
});
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/insert/index.html b/docs/oxmysql/Usage/insert/index.html index 71709f45..5a7b0ad1 100644 --- a/docs/oxmysql/Usage/insert/index.html +++ b/docs/oxmysql/Usage/insert/index.html @@ -5,13 +5,13 @@ Insert | Overextended - +

Insert

Inserts a new entry into the database and returns the insert id for the row, if valid.

Lua​

Callback​

-- Alias: exports.oxmysql:insert
-- Alias: MySQL.Async.insert
MySQL.insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?)', {playerIdentifier, firstName, lastName}, function(id)
print(id)
end)

Promise​

-- Alias: exports.oxmysql:insert_async
-- Alias: MySQL.Sync.insert
CreateThread(function()
local id = MySQL.insert.await('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?)', {playerIdentifier, firstName, lastName})
print(id)
end)

JavaScript​

Callback​

exports.oxmysql.insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?)', [playerIdentifier, firstName, lastName], function(id) {
console.log(id)
})

Promise​

(async () => {
const id = exports.oxmysql.insert_async('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?)',
[playerIdentifier, firstName, lastName]) {
console.log(id)
})()
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/prepare/index.html b/docs/oxmysql/Usage/prepare/index.html index 9a74cc7b..f9603677 100644 --- a/docs/oxmysql/Usage/prepare/index.html +++ b/docs/oxmysql/Usage/prepare/index.html @@ -5,14 +5,14 @@ Prepare | Overextended - +

Prepare

The only function that provides true prepared statements, granting native protection and query planning by MySQL.
Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.

  • Date will not return the datestring commonly used in FiveM
  • TINYINT 1 and BIT will not return a boolean
  • You can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error

When using SELECT, the return value will match query, single, or scalar depending on the number of columns and rows selected.

Lua​

Callback​

-- Alias: exports.oxmysql:prepare
-- Alias: MySQL.Async.prepare

MySQL.prepare('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
for _, v in pairs(result) do
print(v.identifier, v.firstname, v.lastname)
end
end
end)

Promise​

-- Alias: exports.oxmysql:prepare_async
-- Alias: MySQL.Sync.prepare

CreateThread(function()
local result = MySQL.prepare.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
for _, v in pairs(result) do
print(v.identifier, v.firstname, v.lastname)
end
end
end)

JavaScript​

Callback​

exports.oxmysql.prepare('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result) {
result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
})
}
})

Promise​

(async () => {
const result = await exports.oxmysql.prepare_async('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result) {
result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
})
}
})()
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/query/index.html b/docs/oxmysql/Usage/query/index.html index ed283383..bc064b35 100644 --- a/docs/oxmysql/Usage/query/index.html +++ b/docs/oxmysql/Usage/query/index.html @@ -5,14 +5,14 @@ Query | Overextended - +

Query

Generic function that can be utilised for any query.
When selecting data it will return all matching rows and columns, otherwise it will return field data such as insertid, affectedRows, etc.

Lua​

Callback​

-- Alias: exports.oxmysql:query
-- Alias: MySQL.Async.query

MySQL.query('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
for _, v in pairs(result) do
print(v.identifier, v.firstname, v.lastname)
end
end
end)

Promise​

-- Alias: exports.oxmysql:query_async
-- Alias: MySQL.Sync.query

CreateThread(function()
local result = MySQL.query.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
for _, v in pairs(result) do
print(v.identifier, v.firstname, v.lastname)
end
end
end)

JavaScript​

Callback​

exports.oxmysql.query('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result) {
result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
})
}
})

Promise​

(async () => {
const result = await exports.oxmysql.query_async('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result) {
result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
})
}
})()
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/scalar/index.html b/docs/oxmysql/Usage/scalar/index.html index 47ba5555..e1717625 100644 --- a/docs/oxmysql/Usage/scalar/index.html +++ b/docs/oxmysql/Usage/scalar/index.html @@ -5,13 +5,13 @@ Scalar | Overextended - +

Scalar

Returns the first column for a single row.

Lua​

Callback​

-- Alias: exports.oxmysql:scalar
-- Alias: MySQL.Async.fetchScalar

MySQL.scalar('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier}, function(firstname)
print(firstname)
end)

Promise​

-- Alias: exports.oxmysql:scalar_async
-- Alias: MySQL.Sync.fetchScalar

CreateThread(function()
local firstname = MySQL.scalar.await('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier})
print(firstname)
end)

JavaScript​

Callback​

exports.oxmysql.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier], function(firstname) {
console.log(firstname)
})

Promise​

(async () => {
const firstname = await exports.oxmysql.scalar_async('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier]) {
console.log(firstname)
})()
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/single/index.html b/docs/oxmysql/Usage/single/index.html index 7d539758..3dd0af4f 100644 --- a/docs/oxmysql/Usage/single/index.html +++ b/docs/oxmysql/Usage/single/index.html @@ -5,13 +5,13 @@ Single | Overextended - +

Single

Returns the columns for a single row.

Lua​

Callback​

-- Alias: exports.oxmysql:single
-- Alias: MySQL.Async.fetchSingle

MySQL.single('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
print(result.identifier, result.firstname, result.lastname)
end
end)

Promise​

-- Alias: exports.oxmysql:single_async
-- Alias: MySQL.Sync.fetchSingle

CreateThread(function()
local result = MySQL.single.await('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
print(result.identifier, result.firstname, result.lastname)
end
end)

JavaScript​

Callback​

exports.oxmysql.single('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result)
console.log(result.identifier, result.firstname, result.lastname)
})

Promise​

setImmediate(async () => {
const result = await exports.oxmysql.single_async('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result)
console.log(result.identifier, result.firstname, result.lastname)
})
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/transaction/index.html b/docs/oxmysql/Usage/transaction/index.html index 6268e9ba..dad83c24 100644 --- a/docs/oxmysql/Usage/transaction/index.html +++ b/docs/oxmysql/Usage/transaction/index.html @@ -5,14 +5,14 @@ Transaction | Overextended - +

Transaction

Transactions​

A transaction executes multiple queries and commits them only if all succeed. If one fails, none of the queries are committed. The return value is a boolean, which is the result of the transaction.

Specific Format​

When using the Specific format you must pass one parameter to the oxmysql export. In this case, the queries parameter contains your queries and the SQL variables unique to each query.

This is useful for transactions where the queries do not share many SQL variables.

Usage​

Lua​

local queries = {
{ query = 'INSERT INTO `test` (id) VALUES (:someid)', values = { ['someid'] = 1 } },
{ query = 'INSERT INTO `test` (id) VALUES (:someid)', values = { ['someid'] = 2 } }
} -- NOTE, the 'values' tables can be named 'parameters' here for MySQL-Async compatibility.

-- Async
-- Alias: exports.oxmysql:transaction
-- Alias: MySQL.Async.transaction
MySQL.transaction(queries, function(result)
print(result)
end)

-- Sync
-- Alias: exports.oxmysql:transaction_async
-- Alias: MySQL.Sync.transaction
local result = MySQL.transaction.await(queries)
print(result)

JavaScript​

const queries = [
{ query = 'INSERT INTO `test` (id) VALUES (:someid)', values = { someid = 1 } },
{ query = 'INSERT INTO `test` (id) VALUES (:someid)', values = { someid = 2 } }
] // NOTE, the 'values' objects can be named 'parameters' here for MySQL-Async compatibility.

// Async
exports.oxmysql.transaction(queries, (result) => {
console.log(result)
})

// Sync
const result = await exports.oxmysql.transactionSync(queries)
console.log(result)

Shared Format​

When using the Shared format you must pass two parameters to the oxmysql export. The queries and the parameters those queries will use.
This is useful if your queries use the same SQL variables.

Lua​

local queries = {
'INSERT INTO `test` (id, name) VALUES (:someid, :somename)',
'SET `name` = :newname IN `test` WHERE `id` = :someid'
}

local parameters = { ['someid'] = 2, ['somename'] = 'John Doe', ['newname'] = 'John Notdoe' }

-- Async
-- Alias: exports.oxmysql:transaction
-- Alias: MySQL.Async.transaction
MySQL.transaction(queries, parameters, function(result)
print(result)
end)

-- Sync
-- Alias: exports.oxmysql:transaction_async
-- Alias: MySQL.Sync.transaction
local result = MySQL.transaction.await(queries, parameters)
print(result)

JavaScript​

const queries = [
'INSERT INTO `test` (id, name) VALUES (:someid, :somename)',
'SET `name` = :newname IN `test` WHERE `id` = :someid'
]

const parameters = { someid = 2, somename = 'John Doe', newname = 'John Notdoe' }

// Async
exports.oxmysql.transaction(queries, parameters, (result) => {
console.log(result)
})

// Sync
const result = await exports.oxmysql.transactionSync(queries, parameters)
console.log(result)

Transaction Isolation Level​

This can be set through the convar mysql_transaction_isolation_level which should be an integer ranging from 1-4. The default convar value set by oxmysql is 2.

Convar ValueResult
1Repeatable Read
2Read Committed
3Read Uncommitted
4Serializable
- + \ No newline at end of file diff --git a/docs/oxmysql/Usage/update/index.html b/docs/oxmysql/Usage/update/index.html index 6f93bfe7..f9c72fca 100644 --- a/docs/oxmysql/Usage/update/index.html +++ b/docs/oxmysql/Usage/update/index.html @@ -5,13 +5,13 @@ Update | Overextended - +

Update

Returns the number of affected rows by the query.

Lua​

Callback​

-- Alias: exports.oxmysql:update
-- Alias: MySQL.Async.execute

MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', {newName, playerIdentifier}, function(affectedRows)
if affectedRows then
print(affectedRows)
end
end)

Promise​

-- Alias: exports.oxmysql:update_async
-- Alias: MySQL.Sync.execute

CreateThread(function()
local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {newName, playerIdentifier})
if affectedRows then
print(affectedRows)
end
end)

JavaScript​

Callback​

exports.oxmysql.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], function(affectedRows) {
if (affectedRows)
console.log(affectedRows)
})

Promise​

setImmediate(async () => {
const id = exports.oxmysql.update_async('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]) {
if (affectedRows)
console.log(affectedRows)
})
- + \ No newline at end of file diff --git a/docs/oxmysql/index.html b/docs/oxmysql/index.html index 0d123ba3..e7072f09 100644 --- a/docs/oxmysql/index.html +++ b/docs/oxmysql/index.html @@ -5,7 +5,7 @@ Getting Started | Overextended - + @@ -15,7 +15,7 @@ Reference the following for an idea of how to set your connection options. You must include one of the following lines, adjusted for your connection and database settings.

set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4"
set mysql_connection_string "user=root;database=es_extended;password=12345;charset=utf8mb4"

Certain special characters are reserved or blocked and may cause issues when used in your password.
For more optional settings (such as multiple statements) you can reference pool.d.ts and connection.d.ts.

You can also add the following convars if you require extra information when testing queries.

set mysql_slow_query_warning 150
set mysql_debug true

Using the UI​

Before using the UI first you have to make sure you have the mysql_ui convar set to true:

set mysql_ui true

Also make sure that you have command ace permission access, then you should be able to use the mysql command in game to open up the UI and see your query data.

- + \ No newline at end of file diff --git a/index.html b/index.html index a496aaf3..f0193bb2 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@ Overextended | Overextended - +
ox

Overextended

Official documentation for Overextended resources

- + \ No newline at end of file diff --git a/markdown-page/index.html b/markdown-page/index.html index f2511676..4d44a3dd 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -5,13 +5,13 @@ Markdown page example | Overextended - +

Markdown page example

You don't need React to write simple standalone pages.

- + \ No newline at end of file