From 41494fd67f0b35db19763c9fea8dcc54c6f2caa1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 00:44:46 +0000 Subject: [PATCH] deploy: 62a6a7a679bde5960d9b030d8ee5a6587caaed94 --- 404.html | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 _next/static/chunks/nextra-data-en-US.json | 2 +- ...459e386b5c.js => _app-78117360ab8dcf19.js} | 2 +- ...b5caeba5.js => guides-2a2b35a2c1330c8b.js} | 2 +- ...1c26d20aaaf.js => git-23a2084072d62aed.js} | 2 +- ...aaafd600.js => nodejs-658dc4bc9de75cf4.js} | 2 +- ...8d0ba4e258.js => pnpm-12de05e5722248b1.js} | 2 +- ...4c54424ab.js => types-b34b94dc91de57a9.js} | 2 +- ...f689a400.js => vscode-383ea04695482eee.js} | 2 +- ...cde16afa8.js => index-97f4a5cbc3f1ab48.js} | 2 +- ...75.js => overextended-1ec79392be31acde.js} | 2 +- ...adc3bbe.js => ox_core-de29f7477bbcca0b.js} | 2 +- .../Client/OxPlayer-066f22bc57902a1d.js | 1 + .../Client/OxPlayer-2175c9fa9ae9fca9.js | 1 - .../Server/OxAccount-9ae9501553f8c08b.js | 1 - .../Server/OxAccount-db5be0e5517ea206.js | 1 + ...c246e3.js => OxPlayer-1b26108789033740.js} | 2 +- ...c9a31.js => OxVehicle-e0309a113d655570.js} | 2 +- ...5185abd7.js => client-2960fda8150b7b19.js} | 2 +- ...94e0f6b8.js => server-4113abddbb949bbd.js} | 2 +- ...441249df.js => common-d4e6e94f30150e04.js} | 2 +- ...67883e7b.js => server-585c0d4e95ab760f.js} | 2 +- ...b50.js => ox_doorlock-5268bd03a3224de0.js} | 2 +- ...f8767.js => functions-ac6342c598d96e34.js} | 2 +- ...bf61ee92.js => events-e3393a53b149eda9.js} | 2 +- ...97974.js => functions-3a853fc600c7c40f.js} | 2 +- ...22a6c4.js => settings-f132cd76f07537ba.js} | 2 +- ...c30cee3.js => ox_fuel-d4af57b929cad8e9.js} | 2 +- ...ab415.js => functions-7f783d51cc8e034e.js} | 2 +- ...30294.js => functions-8bc25ddb5a33283f.js} | 2 +- ...fd7902a1.js => Shared-f992b2cd062dd4c0.js} | 2 +- ...ef.js => ox_inventory-f90f3c4a1f166f7c.js} | 2 +- ...7e09cb8e.js => Client-60718e999f94ba2c.js} | 2 +- ...16dc87a0.js => Server-8ae409cf39d7bdee.js} | 2 +- ...4a89e3a01f6.js => esx-2fa2c0d2e67d23a9.js} | 2 +- ...d6066f1a402.js => qbx-e904a8e414d2cbe8.js} | 2 +- ...8719d751.js => Client-18df2b8507471a52.js} | 2 +- ...b09f7ac0.js => Server-00b3a343644f75bd.js} | 2 +- ...167aebf0c.js => Hooks-667d9833725f0007.js} | 2 +- ...2310b7.js => crafting-15196d309caf119e.js} | 2 +- ...0.js => creatingItems-34bc92948a6a8fcb.js} | 2 +- ...850471.js => metadata-0baf86c6925f3958.js} | 2 +- ...32f098c23.js => shops-b7bda7aabafc2150.js} | 2 +- ...f1818b1.js => stashes-9c7eb785783b49f1.js} | 2 +- ...2d6fdf18.js => issues-68e6d5b522009451.js} | 2 +- ...dd53af92.js => ox_lib-bb548fced9172492.js} | 2 +- ...8a35cc2b.js => Server-2b7ff59269e65404.js} | 2 +- ...34544cc9.js => Server-afd543f0f7644dc1.js} | 2 +- ...0caaeee3.js => Client-cf3f05222c191577.js} | 2 +- ...177cc5ef.js => Shared-741dfaf742b47f73.js} | 2 +- ...e3fcf155.js => Client-c855476c8e6daea2.js} | 2 +- ...29b84d4c.js => Shared-53ca75f308ac6590.js} | 2 +- ...e5645327.js => Client-c0434aad3d6e14fd.js} | 2 +- ...03a5f86b.js => Server-77329547a85aebc9.js} | 2 +- ...af89c42d.js => Client-4db1bbc34daa7457.js} | 2 +- ...5fd8553c.js => Server-bc08bd90e27acb35.js} | 2 +- ...37589f63.js => Shared-fdb6ddab64a03452.js} | 2 +- ...9453f4b2.js => Server-5b9d263c2a62eb4b.js} | 2 +- ...847bc8ed.js => Client-a647a4589f2a3350.js} | 2 +- ...0ad28532.js => Client-48033b96b0efc7e2.js} | 2 +- ...c061c69d.js => Client-378f747c06def096.js} | 2 +- ...83bfa334.js => Shared-36f12dbfb997f8ba.js} | 2 +- ...f34191aa.js => Shared-6ea4f5941628fa86.js} | 2 +- ...a70b2b54.js => Shared-43b30475a7fb12bb.js} | 2 +- ...33936527.js => Shared-f4fa2ab23431832d.js} | 2 +- ...15499811.js => Shared-083ef8bff97469bf.js} | 2 +- ...9350e400.js => Shared-90f2034a93c4e434.js} | 2 +- ...a370b80e.js => Shared-66d2505fbde2db34.js} | 2 +- ...9da688c3.js => Shared-dc4e8feaf1a91d9d.js} | 2 +- ...f3448.js => Interface-f74602bc464cfd81.js} | 2 +- ...cf1dc6010.js => alert-3d5035090cc02d89.js} | 2 +- ...67b29.js => clipboard-63da6acbecf78304.js} | 2 +- ...1f7d415.js => context-b8ecc621885ddf48.js} | 2 +- ...995df5808.js => input-9b579a037bf27d7d.js} | 2 +- ...04354720bb.js => menu-1cd15858c4d03ece.js} | 2 +- ...66ae06fe.js => notify-057c7c9e078f3e49.js} | 2 +- ...569e9b.js => progress-59f7bad0664e36b6.js} | 2 +- ...438bf33e.js => radial-16fb5087c8cf8af3.js} | 2 +- ...f309.js => skillcheck-46f4f0aaade26375.js} | 2 +- ...91812a0d.js => textui-d95a65bcaaf58cf6.js} | 2 +- ...32e3c8bb.js => Shared-cc73e668ee89440e.js} | 2 +- ...88e39b58.js => Server-ed893d2b28535dd5.js} | 2 +- ...7d536dc2.js => Client-8713972ace20ad89.js} | 2 +- ...c813929b.js => Shared-da60596d653669f5.js} | 2 +- ...650202b0.js => Client-458f16d484fa238e.js} | 2 +- ...f931315b.js => Client-946dd6bd6dd4ae89.js} | 2 +- ...55813a09.js => Shared-2a964be4123afb68.js} | 2 +- ...bdde0e09.js => Client-f8312cd19ecec3e2.js} | 2 +- ...8b3b1261.js => Shared-23ae413c56ac604b.js} | 2 +- ...a2eee581.js => Client-b14edcd19da9e52f.js} | 2 +- ...43c32574.js => Shared-18e358887ee90bcb.js} | 2 +- ...9da167db.js => Shared-2702beed80a9f3ca.js} | 2 +- ...49f06bc8.js => Shared-636589fc6a2d11b6.js} | 2 +- ...bb2373a3.js => Client-a61b6e3c1afcba25.js} | 2 +- ...3054262d.js => Server-b5eee2eddfc48c52.js} | 2 +- ...f1ca5358.js => Shared-fbb7eb086839725b.js} | 2 +- ...9da2b580.js => Shared-d4fabc107e3aef74.js} | 2 +- ...3b2ef5d0.js => Shared-2aa637b7c5602ca4.js} | 2 +- ...dc160.js => ox_target-26c7e458a2099613.js} | 2 +- ...0c0dcbc6.js => Client-0fba18fcc311c757.js} | 2 +- ...1.js => TargetOptions-887871edc9a6e09f.js} | 2 +- ...449990d.js => oxmysql-c03dc16bcc478bbe.js} | 2 +- ...28e3722e.js => insert-ea622be0d655ad85.js} | 2 +- ...b22ac9b.js => prepare-64bc624b5554d242.js} | 2 +- ...e3b00331b.js => query-56759625e5883c87.js} | 2 +- ...bff7.js => rawExecute-d21eecc194e9e724.js} | 2 +- ...40933181.js => scalar-47546c02dc2a4305.js} | 2 +- ...f4d9611c.js => single-8c3c145f39dee18b.js} | 2 +- ...647.js => transaction-ef3ea93702e5180b.js} | 2 +- ...e9ab54b9.js => update-198bc56f22f88c84.js} | 2 +- ...f9caa.js => benchmark-d007950e68dadaaf.js} | 2 +- ...05.js => placeholders-77e2c7533764c8d9.js} | 2 +- ...636dc4791c1d.js => ui-382b57a2eee94329.js} | 2 +- ...7d59f140c2.js => qbox-92f68baa7af75b8e.js} | 2 +- ...e15c1.js => resources-50d75a0124f260dd.js} | 2 +- guides.html | 4 +- guides/git.html | 4 +- guides/nodejs.html | 4 +- guides/pnpm.html | 4 +- guides/types.html | 4 +- guides/vscode.html | 4 +- index.html | 4 +- overextended.html | 4 +- overextended/ox_core.html | 4 +- .../ox_core/Classes/Client/OxPlayer.html | 64 ++--- .../ox_core/Classes/Server/OxAccount.html | 84 +++---- .../ox_core/Classes/Server/OxPlayer.html | 4 +- .../ox_core/Classes/Server/OxVehicle.html | 4 +- overextended/ox_core/Events/client.html | 4 +- overextended/ox_core/Events/server.html | 4 +- overextended/ox_core/Functions/common.html | 4 +- overextended/ox_core/Functions/server.html | 4 +- overextended/ox_doorlock.html | 4 +- .../ox_doorlock/Client/functions.html | 4 +- overextended/ox_doorlock/Server/events.html | 4 +- .../ox_doorlock/Server/functions.html | 4 +- overextended/ox_doorlock/settings.html | 4 +- overextended/ox_fuel.html | 4 +- overextended/ox_fuel/Client/functions.html | 4 +- overextended/ox_fuel/Server/functions.html | 4 +- overextended/ox_fuel/Shared.html | 4 +- overextended/ox_inventory.html | 4 +- overextended/ox_inventory/Events/Client.html | 4 +- overextended/ox_inventory/Events/Server.html | 4 +- overextended/ox_inventory/Frameworks/esx.html | 4 +- overextended/ox_inventory/Frameworks/qbx.html | 4 +- .../ox_inventory/Functions/Client.html | 4 +- .../ox_inventory/Functions/Server.html | 4 +- .../ox_inventory/Functions/Server/Hooks.html | 4 +- .../ox_inventory/Guides/crafting.html | 4 +- .../ox_inventory/Guides/creatingItems.html | 4 +- .../ox_inventory/Guides/metadata.html | 4 +- overextended/ox_inventory/Guides/shops.html | 4 +- overextended/ox_inventory/Guides/stashes.html | 4 +- overextended/ox_inventory/issues.html | 4 +- overextended/ox_lib.html | 4 +- overextended/ox_lib/Modules/ACL/Server.html | 4 +- .../ox_lib/Modules/AddCommand/Server.html | 4 +- .../ox_lib/Modules/AddKeybind/Client.html | 4 +- overextended/ox_lib/Modules/Array/Shared.html | 4 +- overextended/ox_lib/Modules/Cache/Client.html | 4 +- overextended/ox_lib/Modules/Cache/Shared.html | 4 +- .../Modules/Callback/JavaScript/Client.html | 4 +- .../Modules/Callback/JavaScript/Server.html | 4 +- .../ox_lib/Modules/Callback/Lua/Client.html | 4 +- .../ox_lib/Modules/Callback/Lua/Server.html | 4 +- overextended/ox_lib/Modules/Class/Shared.html | 4 +- overextended/ox_lib/Modules/Cron/Server.html | 4 +- .../Modules/DisableControls/Client.html | 4 +- .../ox_lib/Modules/Dui/Javascript/Client.html | 4 +- .../ox_lib/Modules/Dui/Lua/Client.html | 4 +- .../Modules/GetClosestObject/Shared.html | 4 +- .../ox_lib/Modules/GetClosestPed/Shared.html | 4 +- .../Modules/GetClosestPlayer/Shared.html | 4 +- .../Modules/GetClosestVehicle/Shared.html | 4 +- .../Modules/GetNearbyObjects/Shared.html | 4 +- .../ox_lib/Modules/GetNearbyPeds/Shared.html | 4 +- .../Modules/GetNearbyPlayers/Shared.html | 4 +- .../Modules/GetNearbyVehicles/Shared.html | 4 +- overextended/ox_lib/Modules/Interface.html | 4 +- .../Modules/Interface/Client/alert.html | 4 +- .../Modules/Interface/Client/clipboard.html | 4 +- .../Modules/Interface/Client/context.html | 4 +- .../Modules/Interface/Client/input.html | 4 +- .../ox_lib/Modules/Interface/Client/menu.html | 4 +- .../Modules/Interface/Client/notify.html | 4 +- .../Modules/Interface/Client/progress.html | 4 +- .../Modules/Interface/Client/radial.html | 4 +- .../Modules/Interface/Client/skillcheck.html | 4 +- .../Modules/Interface/Client/textui.html | 4 +- .../ox_lib/Modules/Locale/Shared.html | 4 +- .../ox_lib/Modules/Logger/Server.html | 4 +- .../ox_lib/Modules/Marker/Client.html | 4 +- overextended/ox_lib/Modules/Math/Shared.html | 4 +- .../Modules/Points/JavaScript/Client.html | 4 +- .../ox_lib/Modules/Points/Lua/Client.html | 4 +- overextended/ox_lib/Modules/Print/Shared.html | 4 +- .../ox_lib/Modules/Raycast/Client.html | 4 +- .../ox_lib/Modules/Require/Shared.html | 4 +- .../ox_lib/Modules/Streaming/Client.html | 4 +- .../ox_lib/Modules/String/Shared.html | 4 +- overextended/ox_lib/Modules/Table/Shared.html | 4 +- overextended/ox_lib/Modules/Timer/Shared.html | 4 +- .../Modules/VehicleProperties/Client.html | 4 +- .../ox_lib/Modules/Version/Server.html | 4 +- .../ox_lib/Modules/Version/Shared.html | 4 +- .../ox_lib/Modules/WaitFor/Shared.html | 4 +- overextended/ox_lib/Modules/Zones/Shared.html | 4 +- overextended/ox_target.html | 4 +- overextended/ox_target/Functions/Client.html | 4 +- overextended/ox_target/TargetOptions.html | 4 +- overextended/oxmysql.html | 4 +- overextended/oxmysql/Functions/insert.html | 4 +- overextended/oxmysql/Functions/prepare.html | 4 +- overextended/oxmysql/Functions/query.html | 4 +- .../oxmysql/Functions/rawExecute.html | 4 +- overextended/oxmysql/Functions/scalar.html | 4 +- overextended/oxmysql/Functions/single.html | 4 +- .../oxmysql/Functions/transaction.html | 4 +- overextended/oxmysql/Functions/update.html | 4 +- overextended/oxmysql/benchmark.html | 4 +- overextended/oxmysql/placeholders.html | 4 +- overextended/oxmysql/ui.html | 4 +- qbox.html | 4 +- resources.html | 2 +- sitemap.xml | 220 +++++++++--------- 228 files changed, 513 insertions(+), 513 deletions(-) rename _next/static/{G0fVpycx0BnY30fWgMEyz => JvhzGBwIGnzRse5LIa2xS}/_buildManifest.js (51%) rename _next/static/{G0fVpycx0BnY30fWgMEyz => JvhzGBwIGnzRse5LIa2xS}/_ssgManifest.js (100%) rename _next/static/chunks/pages/{_app-c203bb459e386b5c.js => _app-78117360ab8dcf19.js} (80%) rename _next/static/chunks/pages/{guides-2ee16d13b5caeba5.js => guides-2a2b35a2c1330c8b.js} (95%) rename _next/static/chunks/pages/guides/{git-fe60e1c26d20aaaf.js => git-23a2084072d62aed.js} (96%) rename _next/static/chunks/pages/guides/{nodejs-c4f4fdfaaaafd600.js => nodejs-658dc4bc9de75cf4.js} (96%) rename _next/static/chunks/pages/guides/{pnpm-f33ca18d0ba4e258.js => pnpm-12de05e5722248b1.js} (98%) rename _next/static/chunks/pages/guides/{types-87c0fda4c54424ab.js => types-b34b94dc91de57a9.js} (98%) rename _next/static/chunks/pages/guides/{vscode-f1be7d7cf689a400.js => vscode-383ea04695482eee.js} (99%) rename _next/static/chunks/pages/{index-bd7af27cde16afa8.js => index-97f4a5cbc3f1ab48.js} (98%) rename _next/static/chunks/pages/{overextended-42ba0a692cc78b75.js => overextended-1ec79392be31acde.js} (99%) rename _next/static/chunks/pages/overextended/{ox_core-90db394b4adc3bbe.js => ox_core-de29f7477bbcca0b.js} (99%) create mode 100644 _next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-066f22bc57902a1d.js delete mode 100644 _next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-2175c9fa9ae9fca9.js delete mode 100644 _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-9ae9501553f8c08b.js create mode 100644 _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-db5be0e5517ea206.js rename _next/static/chunks/pages/overextended/ox_core/Classes/Server/{OxPlayer-3815284457c246e3.js => OxPlayer-1b26108789033740.js} (99%) rename _next/static/chunks/pages/overextended/ox_core/Classes/Server/{OxVehicle-23c1ae97eefc9a31.js => OxVehicle-e0309a113d655570.js} (99%) rename _next/static/chunks/pages/overextended/ox_core/Events/{client-5b735beb5185abd7.js => client-2960fda8150b7b19.js} (99%) rename _next/static/chunks/pages/overextended/ox_core/Events/{server-202465b394e0f6b8.js => server-4113abddbb949bbd.js} (99%) rename _next/static/chunks/pages/overextended/ox_core/Functions/{common-61886b81441249df.js => common-d4e6e94f30150e04.js} (98%) rename _next/static/chunks/pages/overextended/ox_core/Functions/{server-c8443aa267883e7b.js => server-585c0d4e95ab760f.js} (99%) rename _next/static/chunks/pages/overextended/{ox_doorlock-8638bab924dc0b50.js => ox_doorlock-5268bd03a3224de0.js} (99%) rename _next/static/chunks/pages/overextended/ox_doorlock/Client/{functions-2e99616017cf8767.js => functions-ac6342c598d96e34.js} (98%) rename _next/static/chunks/pages/overextended/ox_doorlock/Server/{events-bdf1e229bf61ee92.js => events-e3393a53b149eda9.js} (98%) rename _next/static/chunks/pages/overextended/ox_doorlock/Server/{functions-49054d7a86297974.js => functions-3a853fc600c7c40f.js} (98%) rename _next/static/chunks/pages/overextended/ox_doorlock/{settings-2ea7c9e67222a6c4.js => settings-f132cd76f07537ba.js} (99%) rename _next/static/chunks/pages/overextended/{ox_fuel-02e7255d0c30cee3.js => ox_fuel-d4af57b929cad8e9.js} (99%) rename _next/static/chunks/pages/overextended/ox_fuel/Client/{functions-184a719fbdeab415.js => functions-7f783d51cc8e034e.js} (98%) rename _next/static/chunks/pages/overextended/ox_fuel/Server/{functions-a5d8735b0ef30294.js => functions-8bc25ddb5a33283f.js} (99%) rename _next/static/chunks/pages/overextended/ox_fuel/{Shared-f292bef6fd7902a1.js => Shared-f992b2cd062dd4c0.js} (94%) rename _next/static/chunks/pages/overextended/{ox_inventory-e8de91f67874b7ef.js => ox_inventory-f90f3c4a1f166f7c.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Events/{Client-ee339fa97e09cb8e.js => Client-60718e999f94ba2c.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Events/{Server-46aad65316dc87a0.js => Server-8ae409cf39d7bdee.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Frameworks/{esx-a0c014a89e3a01f6.js => esx-2fa2c0d2e67d23a9.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Frameworks/{qbx-cfd45d6066f1a402.js => qbx-e904a8e414d2cbe8.js} (94%) rename _next/static/chunks/pages/overextended/ox_inventory/Functions/{Client-0b0967838719d751.js => Client-18df2b8507471a52.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Functions/{Server-30281090b09f7ac0.js => Server-00b3a343644f75bd.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Functions/Server/{Hooks-b67a624167aebf0c.js => Hooks-667d9833725f0007.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Guides/{crafting-d288acc9f72310b7.js => crafting-15196d309caf119e.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Guides/{creatingItems-7c711b3d35c4fb10.js => creatingItems-34bc92948a6a8fcb.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Guides/{metadata-7ca02f6f32850471.js => metadata-0baf86c6925f3958.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Guides/{shops-9e556e832f098c23.js => shops-b7bda7aabafc2150.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/Guides/{stashes-89e012c27f1818b1.js => stashes-9c7eb785783b49f1.js} (99%) rename _next/static/chunks/pages/overextended/ox_inventory/{issues-de3fcc592d6fdf18.js => issues-68e6d5b522009451.js} (98%) rename _next/static/chunks/pages/overextended/{ox_lib-cad8b245dd53af92.js => ox_lib-bb548fced9172492.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/ACL/{Server-a2567e538a35cc2b.js => Server-2b7ff59269e65404.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/{Server-9235e58a34544cc9.js => Server-afd543f0f7644dc1.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/{Client-a13371c30caaeee3.js => Client-cf3f05222c191577.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Array/{Shared-cb724c85177cc5ef.js => Shared-741dfaf742b47f73.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/{Client-f1457e4de3fcf155.js => Client-c855476c8e6daea2.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/{Shared-b4d18d8429b84d4c.js => Shared-53ca75f308ac6590.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/{Client-28041d5fe5645327.js => Client-c0434aad3d6e14fd.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/{Server-aaee8e0f03a5f86b.js => Server-77329547a85aebc9.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/{Client-a143ca2caf89c42d.js => Client-4db1bbc34daa7457.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/{Server-e866e5ed5fd8553c.js => Server-bc08bd90e27acb35.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Class/{Shared-6816959537589f63.js => Shared-fdb6ddab64a03452.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Cron/{Server-5a7a76059453f4b2.js => Server-5b9d263c2a62eb4b.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/{Client-4e76cb88847bc8ed.js => Client-a647a4589f2a3350.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/{Client-038238710ad28532.js => Client-48033b96b0efc7e2.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/{Client-979cfddac061c69d.js => Client-378f747c06def096.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/{Shared-8d36818d83bfa334.js => Shared-36f12dbfb997f8ba.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/{Shared-ca61543df34191aa.js => Shared-6ea4f5941628fa86.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/{Shared-f95c2156a70b2b54.js => Shared-43b30475a7fb12bb.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/{Shared-24e9037633936527.js => Shared-f4fa2ab23431832d.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/{Shared-061609a515499811.js => Shared-083ef8bff97469bf.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/{Shared-5177fd049350e400.js => Shared-90f2034a93c4e434.js} (94%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/{Shared-26ff6d54a370b80e.js => Shared-66d2505fbde2db34.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/{Shared-f432affe9da688c3.js => Shared-dc4e8feaf1a91d9d.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/{Interface-1ccbecacfcef3448.js => Interface-f74602bc464cfd81.js} (97%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{alert-6d00830cf1dc6010.js => alert-3d5035090cc02d89.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{clipboard-1cfcee9a74767b29.js => clipboard-63da6acbecf78304.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{context-1996d00401f7d415.js => context-b8ecc621885ddf48.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{input-33ef59b995df5808.js => input-9b579a037bf27d7d.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{menu-fd1f8804354720bb.js => menu-1cd15858c4d03ece.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{notify-f6091a2b66ae06fe.js => notify-057c7c9e078f3e49.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{progress-ad69f17b9c569e9b.js => progress-59f7bad0664e36b6.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{radial-6762040e438bf33e.js => radial-16fb5087c8cf8af3.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{skillcheck-cc50001f05c4f309.js => skillcheck-46f4f0aaade26375.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/{textui-7f932bc291812a0d.js => textui-d95a65bcaaf58cf6.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Locale/{Shared-4744f19b32e3c8bb.js => Shared-cc73e668ee89440e.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Logger/{Server-522b4b6d88e39b58.js => Server-ed893d2b28535dd5.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Marker/{Client-fa9dcc5c7d536dc2.js => Client-8713972ace20ad89.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Math/{Shared-1c48384ac813929b.js => Shared-da60596d653669f5.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/{Client-29e259d5650202b0.js => Client-458f16d484fa238e.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/{Client-1a1cfd2df931315b.js => Client-946dd6bd6dd4ae89.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Print/{Shared-eb08e2c855813a09.js => Shared-2a964be4123afb68.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/{Client-0d36fbbbbdde0e09.js => Client-f8312cd19ecec3e2.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Require/{Shared-8f5855b38b3b1261.js => Shared-23ae413c56ac604b.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/{Client-b062721ea2eee581.js => Client-b14edcd19da9e52f.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/String/{Shared-2640bc7a43c32574.js => Shared-18e358887ee90bcb.js} (96%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Table/{Shared-52cd44a59da167db.js => Shared-2702beed80a9f3ca.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Timer/{Shared-2c81057849f06bc8.js => Shared-636589fc6a2d11b6.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/{Client-8c4c4e23bb2373a3.js => Client-a61b6e3c1afcba25.js} (99%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Version/{Server-3fa834b53054262d.js => Server-b5eee2eddfc48c52.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Version/{Shared-daef07b7f1ca5358.js => Shared-fbb7eb086839725b.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/{Shared-265d91e49da2b580.js => Shared-d4fabc107e3aef74.js} (98%) rename _next/static/chunks/pages/overextended/ox_lib/Modules/Zones/{Shared-44354f1a3b2ef5d0.js => Shared-2aa637b7c5602ca4.js} (99%) rename _next/static/chunks/pages/overextended/{ox_target-f06c78fcda3dc160.js => ox_target-26c7e458a2099613.js} (99%) rename _next/static/chunks/pages/overextended/ox_target/Functions/{Client-e3ac83be0c0dcbc6.js => Client-0fba18fcc311c757.js} (99%) rename _next/static/chunks/pages/overextended/ox_target/{TargetOptions-95b6d10a6b71b031.js => TargetOptions-887871edc9a6e09f.js} (99%) rename _next/static/chunks/pages/overextended/{oxmysql-fab2e6f6b449990d.js => oxmysql-c03dc16bcc478bbe.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{insert-0cf5831228e3722e.js => insert-ea622be0d655ad85.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{prepare-f837a40c6b22ac9b.js => prepare-64bc624b5554d242.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{query-8ea6205e3b00331b.js => query-56759625e5883c87.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{rawExecute-3e6203665e43bff7.js => rawExecute-d21eecc194e9e724.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{scalar-c72a484140933181.js => scalar-47546c02dc2a4305.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{single-4428d662f4d9611c.js => single-8c3c145f39dee18b.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{transaction-08afd0f1f3bb5647.js => transaction-ef3ea93702e5180b.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/Functions/{update-e118c127e9ab54b9.js => update-198bc56f22f88c84.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/{benchmark-fd658e54e5af9caa.js => benchmark-d007950e68dadaaf.js} (99%) rename _next/static/chunks/pages/overextended/oxmysql/{placeholders-074c245d516bff05.js => placeholders-77e2c7533764c8d9.js} (98%) rename _next/static/chunks/pages/overextended/oxmysql/{ui-f69f636dc4791c1d.js => ui-382b57a2eee94329.js} (98%) rename _next/static/chunks/pages/{qbox-fa4a2f7d59f140c2.js => qbox-92f68baa7af75b8e.js} (98%) rename _next/static/chunks/pages/{resources-23cc71bc922e15c1.js => resources-50d75a0124f260dd.js} (92%) diff --git a/404.html b/404.html index 91f0bda2e8..ad1ab8b481 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -

404

Redirecionando...

\ No newline at end of file +

404

Redirecionando...

\ No newline at end of file diff --git a/_next/static/G0fVpycx0BnY30fWgMEyz/_buildManifest.js b/_next/static/JvhzGBwIGnzRse5LIa2xS/_buildManifest.js similarity index 51% rename from _next/static/G0fVpycx0BnY30fWgMEyz/_buildManifest.js rename to _next/static/JvhzGBwIGnzRse5LIa2xS/_buildManifest.js index e3ba16bead..a703b58996 100644 --- a/_next/static/G0fVpycx0BnY30fWgMEyz/_buildManifest.js +++ b/_next/static/JvhzGBwIGnzRse5LIa2xS/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-bd7af27cde16afa8.js"],"/404":["static/chunks/pages/404-31f5f073b80435b7.js"],"/_error":["static/chunks/pages/_error-094bb0cfcf67c3f3.js"],"/guides":[e,"static/chunks/pages/guides-2ee16d13b5caeba5.js"],"/guides/git":[e,"static/chunks/pages/guides/git-fe60e1c26d20aaaf.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-c4f4fdfaaaafd600.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-f33ca18d0ba4e258.js"],"/guides/types":[e,"static/chunks/pages/guides/types-87c0fda4c54424ab.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-f1be7d7cf689a400.js"],"/overextended":[e,"static/chunks/pages/overextended-42ba0a692cc78b75.js"],"/overextended/ox_core":[e,"static/chunks/pages/overextended/ox_core-90db394b4adc3bbe.js"],"/overextended/ox_core/Classes/Client/OxPlayer":[e,"static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-2175c9fa9ae9fca9.js"],"/overextended/ox_core/Classes/Server/OxAccount":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-9ae9501553f8c08b.js"],"/overextended/ox_core/Classes/Server/OxPlayer":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-3815284457c246e3.js"],"/overextended/ox_core/Classes/Server/OxVehicle":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-23c1ae97eefc9a31.js"],"/overextended/ox_core/Events/client":[e,"static/chunks/pages/overextended/ox_core/Events/client-5b735beb5185abd7.js"],"/overextended/ox_core/Events/server":[e,"static/chunks/pages/overextended/ox_core/Events/server-202465b394e0f6b8.js"],"/overextended/ox_core/Functions/common":[e,"static/chunks/pages/overextended/ox_core/Functions/common-61886b81441249df.js"],"/overextended/ox_core/Functions/server":[e,"static/chunks/pages/overextended/ox_core/Functions/server-c8443aa267883e7b.js"],"/overextended/ox_doorlock":[e,"static/chunks/pages/overextended/ox_doorlock-8638bab924dc0b50.js"],"/overextended/ox_doorlock/Client/functions":[e,"static/chunks/pages/overextended/ox_doorlock/Client/functions-2e99616017cf8767.js"],"/overextended/ox_doorlock/Server/events":[e,"static/chunks/pages/overextended/ox_doorlock/Server/events-bdf1e229bf61ee92.js"],"/overextended/ox_doorlock/Server/functions":[e,"static/chunks/pages/overextended/ox_doorlock/Server/functions-49054d7a86297974.js"],"/overextended/ox_doorlock/settings":[e,"static/chunks/pages/overextended/ox_doorlock/settings-2ea7c9e67222a6c4.js"],"/overextended/ox_fuel":[e,"static/chunks/pages/overextended/ox_fuel-02e7255d0c30cee3.js"],"/overextended/ox_fuel/Client/functions":[e,"static/chunks/pages/overextended/ox_fuel/Client/functions-184a719fbdeab415.js"],"/overextended/ox_fuel/Server/functions":[e,"static/chunks/pages/overextended/ox_fuel/Server/functions-a5d8735b0ef30294.js"],"/overextended/ox_fuel/Shared":[e,"static/chunks/pages/overextended/ox_fuel/Shared-f292bef6fd7902a1.js"],"/overextended/ox_inventory":[e,"static/chunks/pages/overextended/ox_inventory-e8de91f67874b7ef.js"],"/overextended/ox_inventory/Events/Client":[e,"static/chunks/pages/overextended/ox_inventory/Events/Client-ee339fa97e09cb8e.js"],"/overextended/ox_inventory/Events/Server":[e,"static/chunks/pages/overextended/ox_inventory/Events/Server-46aad65316dc87a0.js"],"/overextended/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/overextended/ox_inventory/Frameworks/esx-a0c014a89e3a01f6.js"],"/overextended/ox_inventory/Frameworks/qbx":[e,"static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-cfd45d6066f1a402.js"],"/overextended/ox_inventory/Functions/Client":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Client-0b0967838719d751.js"],"/overextended/ox_inventory/Functions/Server":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Server-30281090b09f7ac0.js"],"/overextended/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-b67a624167aebf0c.js"],"/overextended/ox_inventory/Guides/crafting":[e,"static/chunks/pages/overextended/ox_inventory/Guides/crafting-d288acc9f72310b7.js"],"/overextended/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-7c711b3d35c4fb10.js"],"/overextended/ox_inventory/Guides/metadata":[e,"static/chunks/pages/overextended/ox_inventory/Guides/metadata-7ca02f6f32850471.js"],"/overextended/ox_inventory/Guides/shops":[e,"static/chunks/pages/overextended/ox_inventory/Guides/shops-9e556e832f098c23.js"],"/overextended/ox_inventory/Guides/stashes":[e,"static/chunks/pages/overextended/ox_inventory/Guides/stashes-89e012c27f1818b1.js"],"/overextended/ox_inventory/issues":[e,"static/chunks/pages/overextended/ox_inventory/issues-de3fcc592d6fdf18.js"],"/overextended/ox_lib":[e,"static/chunks/pages/overextended/ox_lib-cad8b245dd53af92.js"],"/overextended/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-a2567e538a35cc2b.js"],"/overextended/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-9235e58a34544cc9.js"],"/overextended/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-a13371c30caaeee3.js"],"/overextended/ox_lib/Modules/Array/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-cb724c85177cc5ef.js"],"/overextended/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-f1457e4de3fcf155.js"],"/overextended/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-b4d18d8429b84d4c.js"],"/overextended/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-28041d5fe5645327.js"],"/overextended/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-aaee8e0f03a5f86b.js"],"/overextended/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-a143ca2caf89c42d.js"],"/overextended/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-e866e5ed5fd8553c.js"],"/overextended/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-6816959537589f63.js"],"/overextended/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5a7a76059453f4b2.js"],"/overextended/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-4e76cb88847bc8ed.js"],"/overextended/ox_lib/Modules/Dui/Javascript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-038238710ad28532.js"],"/overextended/ox_lib/Modules/Dui/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-979cfddac061c69d.js"],"/overextended/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-8d36818d83bfa334.js"],"/overextended/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-ca61543df34191aa.js"],"/overextended/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-f95c2156a70b2b54.js"],"/overextended/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-24e9037633936527.js"],"/overextended/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-061609a515499811.js"],"/overextended/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-5177fd049350e400.js"],"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-26ff6d54a370b80e.js"],"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-f432affe9da688c3.js"],"/overextended/ox_lib/Modules/Interface":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface-1ccbecacfcef3448.js"],"/overextended/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-6d00830cf1dc6010.js"],"/overextended/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-1cfcee9a74767b29.js"],"/overextended/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-1996d00401f7d415.js"],"/overextended/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-33ef59b995df5808.js"],"/overextended/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-fd1f8804354720bb.js"],"/overextended/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-f6091a2b66ae06fe.js"],"/overextended/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-ad69f17b9c569e9b.js"],"/overextended/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-6762040e438bf33e.js"],"/overextended/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-cc50001f05c4f309.js"],"/overextended/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-7f932bc291812a0d.js"],"/overextended/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-4744f19b32e3c8bb.js"],"/overextended/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-522b4b6d88e39b58.js"],"/overextended/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-fa9dcc5c7d536dc2.js"],"/overextended/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-1c48384ac813929b.js"],"/overextended/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-29e259d5650202b0.js"],"/overextended/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-1a1cfd2df931315b.js"],"/overextended/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-eb08e2c855813a09.js"],"/overextended/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-0d36fbbbbdde0e09.js"],"/overextended/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-8f5855b38b3b1261.js"],"/overextended/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b062721ea2eee581.js"],"/overextended/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/String/Shared-2640bc7a43c32574.js"],"/overextended/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-52cd44a59da167db.js"],"/overextended/ox_lib/Modules/Timer/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-2c81057849f06bc8.js"],"/overextended/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-8c4c4e23bb2373a3.js"],"/overextended/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Version/Server-3fa834b53054262d.js"],"/overextended/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-daef07b7f1ca5358.js"],"/overextended/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-265d91e49da2b580.js"],"/overextended/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-44354f1a3b2ef5d0.js"],"/overextended/ox_target":[e,"static/chunks/pages/overextended/ox_target-f06c78fcda3dc160.js"],"/overextended/ox_target/Functions/Client":[e,"static/chunks/pages/overextended/ox_target/Functions/Client-e3ac83be0c0dcbc6.js"],"/overextended/ox_target/TargetOptions":[e,"static/chunks/pages/overextended/ox_target/TargetOptions-95b6d10a6b71b031.js"],"/overextended/oxmysql":[e,"static/chunks/pages/overextended/oxmysql-fab2e6f6b449990d.js"],"/overextended/oxmysql/Functions/insert":[e,"static/chunks/pages/overextended/oxmysql/Functions/insert-0cf5831228e3722e.js"],"/overextended/oxmysql/Functions/prepare":[e,"static/chunks/pages/overextended/oxmysql/Functions/prepare-f837a40c6b22ac9b.js"],"/overextended/oxmysql/Functions/query":[e,"static/chunks/pages/overextended/oxmysql/Functions/query-8ea6205e3b00331b.js"],"/overextended/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/overextended/oxmysql/Functions/rawExecute-3e6203665e43bff7.js"],"/overextended/oxmysql/Functions/scalar":[e,"static/chunks/pages/overextended/oxmysql/Functions/scalar-c72a484140933181.js"],"/overextended/oxmysql/Functions/single":[e,"static/chunks/pages/overextended/oxmysql/Functions/single-4428d662f4d9611c.js"],"/overextended/oxmysql/Functions/transaction":[e,"static/chunks/pages/overextended/oxmysql/Functions/transaction-08afd0f1f3bb5647.js"],"/overextended/oxmysql/Functions/update":[e,"static/chunks/pages/overextended/oxmysql/Functions/update-e118c127e9ab54b9.js"],"/overextended/oxmysql/benchmark":[e,"static/chunks/pages/overextended/oxmysql/benchmark-fd658e54e5af9caa.js"],"/overextended/oxmysql/placeholders":[e,"static/chunks/pages/overextended/oxmysql/placeholders-074c245d516bff05.js"],"/overextended/oxmysql/ui":[e,"static/chunks/pages/overextended/oxmysql/ui-f69f636dc4791c1d.js"],"/qbox":[e,"static/chunks/pages/qbox-fa4a2f7d59f140c2.js"],"/resources":[e,"static/chunks/pages/resources-23cc71bc922e15c1.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/overextended","/overextended/ox_core","/overextended/ox_core/Classes/Client/OxPlayer","/overextended/ox_core/Classes/Server/OxAccount","/overextended/ox_core/Classes/Server/OxPlayer","/overextended/ox_core/Classes/Server/OxVehicle","/overextended/ox_core/Events/client","/overextended/ox_core/Events/server","/overextended/ox_core/Functions/common","/overextended/ox_core/Functions/server","/overextended/ox_doorlock","/overextended/ox_doorlock/Client/functions","/overextended/ox_doorlock/Server/events","/overextended/ox_doorlock/Server/functions","/overextended/ox_doorlock/settings","/overextended/ox_fuel","/overextended/ox_fuel/Client/functions","/overextended/ox_fuel/Server/functions","/overextended/ox_fuel/Shared","/overextended/ox_inventory","/overextended/ox_inventory/Events/Client","/overextended/ox_inventory/Events/Server","/overextended/ox_inventory/Frameworks/esx","/overextended/ox_inventory/Frameworks/qbx","/overextended/ox_inventory/Functions/Client","/overextended/ox_inventory/Functions/Server","/overextended/ox_inventory/Functions/Server/Hooks","/overextended/ox_inventory/Guides/crafting","/overextended/ox_inventory/Guides/creatingItems","/overextended/ox_inventory/Guides/metadata","/overextended/ox_inventory/Guides/shops","/overextended/ox_inventory/Guides/stashes","/overextended/ox_inventory/issues","/overextended/ox_lib","/overextended/ox_lib/Modules/ACL/Server","/overextended/ox_lib/Modules/AddCommand/Server","/overextended/ox_lib/Modules/AddKeybind/Client","/overextended/ox_lib/Modules/Array/Shared","/overextended/ox_lib/Modules/Cache/Client","/overextended/ox_lib/Modules/Cache/Shared","/overextended/ox_lib/Modules/Callback/JavaScript/Client","/overextended/ox_lib/Modules/Callback/JavaScript/Server","/overextended/ox_lib/Modules/Callback/Lua/Client","/overextended/ox_lib/Modules/Callback/Lua/Server","/overextended/ox_lib/Modules/Class/Shared","/overextended/ox_lib/Modules/Cron/Server","/overextended/ox_lib/Modules/DisableControls/Client","/overextended/ox_lib/Modules/Dui/Javascript/Client","/overextended/ox_lib/Modules/Dui/Lua/Client","/overextended/ox_lib/Modules/GetClosestObject/Shared","/overextended/ox_lib/Modules/GetClosestPed/Shared","/overextended/ox_lib/Modules/GetClosestPlayer/Shared","/overextended/ox_lib/Modules/GetClosestVehicle/Shared","/overextended/ox_lib/Modules/GetNearbyObjects/Shared","/overextended/ox_lib/Modules/GetNearbyPeds/Shared","/overextended/ox_lib/Modules/GetNearbyPlayers/Shared","/overextended/ox_lib/Modules/GetNearbyVehicles/Shared","/overextended/ox_lib/Modules/Interface","/overextended/ox_lib/Modules/Interface/Client/alert","/overextended/ox_lib/Modules/Interface/Client/clipboard","/overextended/ox_lib/Modules/Interface/Client/context","/overextended/ox_lib/Modules/Interface/Client/input","/overextended/ox_lib/Modules/Interface/Client/menu","/overextended/ox_lib/Modules/Interface/Client/notify","/overextended/ox_lib/Modules/Interface/Client/progress","/overextended/ox_lib/Modules/Interface/Client/radial","/overextended/ox_lib/Modules/Interface/Client/skillcheck","/overextended/ox_lib/Modules/Interface/Client/textui","/overextended/ox_lib/Modules/Locale/Shared","/overextended/ox_lib/Modules/Logger/Server","/overextended/ox_lib/Modules/Marker/Client","/overextended/ox_lib/Modules/Math/Shared","/overextended/ox_lib/Modules/Points/JavaScript/Client","/overextended/ox_lib/Modules/Points/Lua/Client","/overextended/ox_lib/Modules/Print/Shared","/overextended/ox_lib/Modules/Raycast/Client","/overextended/ox_lib/Modules/Require/Shared","/overextended/ox_lib/Modules/Streaming/Client","/overextended/ox_lib/Modules/String/Shared","/overextended/ox_lib/Modules/Table/Shared","/overextended/ox_lib/Modules/Timer/Shared","/overextended/ox_lib/Modules/VehicleProperties/Client","/overextended/ox_lib/Modules/Version/Server","/overextended/ox_lib/Modules/Version/Shared","/overextended/ox_lib/Modules/WaitFor/Shared","/overextended/ox_lib/Modules/Zones/Shared","/overextended/ox_target","/overextended/ox_target/Functions/Client","/overextended/ox_target/TargetOptions","/overextended/oxmysql","/overextended/oxmysql/Functions/insert","/overextended/oxmysql/Functions/prepare","/overextended/oxmysql/Functions/query","/overextended/oxmysql/Functions/rawExecute","/overextended/oxmysql/Functions/scalar","/overextended/oxmysql/Functions/single","/overextended/oxmysql/Functions/transaction","/overextended/oxmysql/Functions/update","/overextended/oxmysql/benchmark","/overextended/oxmysql/placeholders","/overextended/oxmysql/ui","/qbox","/resources"]}}("static/chunks/2601-a643f2bef9ecb8af.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-97f4a5cbc3f1ab48.js"],"/404":["static/chunks/pages/404-31f5f073b80435b7.js"],"/_error":["static/chunks/pages/_error-094bb0cfcf67c3f3.js"],"/guides":[e,"static/chunks/pages/guides-2a2b35a2c1330c8b.js"],"/guides/git":[e,"static/chunks/pages/guides/git-23a2084072d62aed.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-658dc4bc9de75cf4.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-12de05e5722248b1.js"],"/guides/types":[e,"static/chunks/pages/guides/types-b34b94dc91de57a9.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-383ea04695482eee.js"],"/overextended":[e,"static/chunks/pages/overextended-1ec79392be31acde.js"],"/overextended/ox_core":[e,"static/chunks/pages/overextended/ox_core-de29f7477bbcca0b.js"],"/overextended/ox_core/Classes/Client/OxPlayer":[e,"static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-066f22bc57902a1d.js"],"/overextended/ox_core/Classes/Server/OxAccount":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-db5be0e5517ea206.js"],"/overextended/ox_core/Classes/Server/OxPlayer":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-1b26108789033740.js"],"/overextended/ox_core/Classes/Server/OxVehicle":[e,"static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-e0309a113d655570.js"],"/overextended/ox_core/Events/client":[e,"static/chunks/pages/overextended/ox_core/Events/client-2960fda8150b7b19.js"],"/overextended/ox_core/Events/server":[e,"static/chunks/pages/overextended/ox_core/Events/server-4113abddbb949bbd.js"],"/overextended/ox_core/Functions/common":[e,"static/chunks/pages/overextended/ox_core/Functions/common-d4e6e94f30150e04.js"],"/overextended/ox_core/Functions/server":[e,"static/chunks/pages/overextended/ox_core/Functions/server-585c0d4e95ab760f.js"],"/overextended/ox_doorlock":[e,"static/chunks/pages/overextended/ox_doorlock-5268bd03a3224de0.js"],"/overextended/ox_doorlock/Client/functions":[e,"static/chunks/pages/overextended/ox_doorlock/Client/functions-ac6342c598d96e34.js"],"/overextended/ox_doorlock/Server/events":[e,"static/chunks/pages/overextended/ox_doorlock/Server/events-e3393a53b149eda9.js"],"/overextended/ox_doorlock/Server/functions":[e,"static/chunks/pages/overextended/ox_doorlock/Server/functions-3a853fc600c7c40f.js"],"/overextended/ox_doorlock/settings":[e,"static/chunks/pages/overextended/ox_doorlock/settings-f132cd76f07537ba.js"],"/overextended/ox_fuel":[e,"static/chunks/pages/overextended/ox_fuel-d4af57b929cad8e9.js"],"/overextended/ox_fuel/Client/functions":[e,"static/chunks/pages/overextended/ox_fuel/Client/functions-7f783d51cc8e034e.js"],"/overextended/ox_fuel/Server/functions":[e,"static/chunks/pages/overextended/ox_fuel/Server/functions-8bc25ddb5a33283f.js"],"/overextended/ox_fuel/Shared":[e,"static/chunks/pages/overextended/ox_fuel/Shared-f992b2cd062dd4c0.js"],"/overextended/ox_inventory":[e,"static/chunks/pages/overextended/ox_inventory-f90f3c4a1f166f7c.js"],"/overextended/ox_inventory/Events/Client":[e,"static/chunks/pages/overextended/ox_inventory/Events/Client-60718e999f94ba2c.js"],"/overextended/ox_inventory/Events/Server":[e,"static/chunks/pages/overextended/ox_inventory/Events/Server-8ae409cf39d7bdee.js"],"/overextended/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/overextended/ox_inventory/Frameworks/esx-2fa2c0d2e67d23a9.js"],"/overextended/ox_inventory/Frameworks/qbx":[e,"static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-e904a8e414d2cbe8.js"],"/overextended/ox_inventory/Functions/Client":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Client-18df2b8507471a52.js"],"/overextended/ox_inventory/Functions/Server":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Server-00b3a343644f75bd.js"],"/overextended/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-667d9833725f0007.js"],"/overextended/ox_inventory/Guides/crafting":[e,"static/chunks/pages/overextended/ox_inventory/Guides/crafting-15196d309caf119e.js"],"/overextended/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-34bc92948a6a8fcb.js"],"/overextended/ox_inventory/Guides/metadata":[e,"static/chunks/pages/overextended/ox_inventory/Guides/metadata-0baf86c6925f3958.js"],"/overextended/ox_inventory/Guides/shops":[e,"static/chunks/pages/overextended/ox_inventory/Guides/shops-b7bda7aabafc2150.js"],"/overextended/ox_inventory/Guides/stashes":[e,"static/chunks/pages/overextended/ox_inventory/Guides/stashes-9c7eb785783b49f1.js"],"/overextended/ox_inventory/issues":[e,"static/chunks/pages/overextended/ox_inventory/issues-68e6d5b522009451.js"],"/overextended/ox_lib":[e,"static/chunks/pages/overextended/ox_lib-bb548fced9172492.js"],"/overextended/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-2b7ff59269e65404.js"],"/overextended/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-afd543f0f7644dc1.js"],"/overextended/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-cf3f05222c191577.js"],"/overextended/ox_lib/Modules/Array/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-741dfaf742b47f73.js"],"/overextended/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-c855476c8e6daea2.js"],"/overextended/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-53ca75f308ac6590.js"],"/overextended/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-c0434aad3d6e14fd.js"],"/overextended/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-77329547a85aebc9.js"],"/overextended/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-4db1bbc34daa7457.js"],"/overextended/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-bc08bd90e27acb35.js"],"/overextended/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-fdb6ddab64a03452.js"],"/overextended/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5b9d263c2a62eb4b.js"],"/overextended/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-a647a4589f2a3350.js"],"/overextended/ox_lib/Modules/Dui/Javascript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-48033b96b0efc7e2.js"],"/overextended/ox_lib/Modules/Dui/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-378f747c06def096.js"],"/overextended/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-36f12dbfb997f8ba.js"],"/overextended/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-6ea4f5941628fa86.js"],"/overextended/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-43b30475a7fb12bb.js"],"/overextended/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-f4fa2ab23431832d.js"],"/overextended/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-083ef8bff97469bf.js"],"/overextended/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-90f2034a93c4e434.js"],"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-66d2505fbde2db34.js"],"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-dc4e8feaf1a91d9d.js"],"/overextended/ox_lib/Modules/Interface":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface-f74602bc464cfd81.js"],"/overextended/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-3d5035090cc02d89.js"],"/overextended/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-63da6acbecf78304.js"],"/overextended/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-b8ecc621885ddf48.js"],"/overextended/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-9b579a037bf27d7d.js"],"/overextended/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-1cd15858c4d03ece.js"],"/overextended/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-057c7c9e078f3e49.js"],"/overextended/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-59f7bad0664e36b6.js"],"/overextended/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-16fb5087c8cf8af3.js"],"/overextended/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-46f4f0aaade26375.js"],"/overextended/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-d95a65bcaaf58cf6.js"],"/overextended/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-cc73e668ee89440e.js"],"/overextended/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-ed893d2b28535dd5.js"],"/overextended/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-8713972ace20ad89.js"],"/overextended/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-da60596d653669f5.js"],"/overextended/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-458f16d484fa238e.js"],"/overextended/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-946dd6bd6dd4ae89.js"],"/overextended/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-2a964be4123afb68.js"],"/overextended/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-f8312cd19ecec3e2.js"],"/overextended/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-23ae413c56ac604b.js"],"/overextended/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b14edcd19da9e52f.js"],"/overextended/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/String/Shared-18e358887ee90bcb.js"],"/overextended/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-2702beed80a9f3ca.js"],"/overextended/ox_lib/Modules/Timer/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-636589fc6a2d11b6.js"],"/overextended/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-a61b6e3c1afcba25.js"],"/overextended/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/overextended/ox_lib/Modules/Version/Server-b5eee2eddfc48c52.js"],"/overextended/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-fbb7eb086839725b.js"],"/overextended/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-d4fabc107e3aef74.js"],"/overextended/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-2aa637b7c5602ca4.js"],"/overextended/ox_target":[e,"static/chunks/pages/overextended/ox_target-26c7e458a2099613.js"],"/overextended/ox_target/Functions/Client":[e,"static/chunks/pages/overextended/ox_target/Functions/Client-0fba18fcc311c757.js"],"/overextended/ox_target/TargetOptions":[e,"static/chunks/pages/overextended/ox_target/TargetOptions-887871edc9a6e09f.js"],"/overextended/oxmysql":[e,"static/chunks/pages/overextended/oxmysql-c03dc16bcc478bbe.js"],"/overextended/oxmysql/Functions/insert":[e,"static/chunks/pages/overextended/oxmysql/Functions/insert-ea622be0d655ad85.js"],"/overextended/oxmysql/Functions/prepare":[e,"static/chunks/pages/overextended/oxmysql/Functions/prepare-64bc624b5554d242.js"],"/overextended/oxmysql/Functions/query":[e,"static/chunks/pages/overextended/oxmysql/Functions/query-56759625e5883c87.js"],"/overextended/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/overextended/oxmysql/Functions/rawExecute-d21eecc194e9e724.js"],"/overextended/oxmysql/Functions/scalar":[e,"static/chunks/pages/overextended/oxmysql/Functions/scalar-47546c02dc2a4305.js"],"/overextended/oxmysql/Functions/single":[e,"static/chunks/pages/overextended/oxmysql/Functions/single-8c3c145f39dee18b.js"],"/overextended/oxmysql/Functions/transaction":[e,"static/chunks/pages/overextended/oxmysql/Functions/transaction-ef3ea93702e5180b.js"],"/overextended/oxmysql/Functions/update":[e,"static/chunks/pages/overextended/oxmysql/Functions/update-198bc56f22f88c84.js"],"/overextended/oxmysql/benchmark":[e,"static/chunks/pages/overextended/oxmysql/benchmark-d007950e68dadaaf.js"],"/overextended/oxmysql/placeholders":[e,"static/chunks/pages/overextended/oxmysql/placeholders-77e2c7533764c8d9.js"],"/overextended/oxmysql/ui":[e,"static/chunks/pages/overextended/oxmysql/ui-382b57a2eee94329.js"],"/qbox":[e,"static/chunks/pages/qbox-92f68baa7af75b8e.js"],"/resources":[e,"static/chunks/pages/resources-50d75a0124f260dd.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/overextended","/overextended/ox_core","/overextended/ox_core/Classes/Client/OxPlayer","/overextended/ox_core/Classes/Server/OxAccount","/overextended/ox_core/Classes/Server/OxPlayer","/overextended/ox_core/Classes/Server/OxVehicle","/overextended/ox_core/Events/client","/overextended/ox_core/Events/server","/overextended/ox_core/Functions/common","/overextended/ox_core/Functions/server","/overextended/ox_doorlock","/overextended/ox_doorlock/Client/functions","/overextended/ox_doorlock/Server/events","/overextended/ox_doorlock/Server/functions","/overextended/ox_doorlock/settings","/overextended/ox_fuel","/overextended/ox_fuel/Client/functions","/overextended/ox_fuel/Server/functions","/overextended/ox_fuel/Shared","/overextended/ox_inventory","/overextended/ox_inventory/Events/Client","/overextended/ox_inventory/Events/Server","/overextended/ox_inventory/Frameworks/esx","/overextended/ox_inventory/Frameworks/qbx","/overextended/ox_inventory/Functions/Client","/overextended/ox_inventory/Functions/Server","/overextended/ox_inventory/Functions/Server/Hooks","/overextended/ox_inventory/Guides/crafting","/overextended/ox_inventory/Guides/creatingItems","/overextended/ox_inventory/Guides/metadata","/overextended/ox_inventory/Guides/shops","/overextended/ox_inventory/Guides/stashes","/overextended/ox_inventory/issues","/overextended/ox_lib","/overextended/ox_lib/Modules/ACL/Server","/overextended/ox_lib/Modules/AddCommand/Server","/overextended/ox_lib/Modules/AddKeybind/Client","/overextended/ox_lib/Modules/Array/Shared","/overextended/ox_lib/Modules/Cache/Client","/overextended/ox_lib/Modules/Cache/Shared","/overextended/ox_lib/Modules/Callback/JavaScript/Client","/overextended/ox_lib/Modules/Callback/JavaScript/Server","/overextended/ox_lib/Modules/Callback/Lua/Client","/overextended/ox_lib/Modules/Callback/Lua/Server","/overextended/ox_lib/Modules/Class/Shared","/overextended/ox_lib/Modules/Cron/Server","/overextended/ox_lib/Modules/DisableControls/Client","/overextended/ox_lib/Modules/Dui/Javascript/Client","/overextended/ox_lib/Modules/Dui/Lua/Client","/overextended/ox_lib/Modules/GetClosestObject/Shared","/overextended/ox_lib/Modules/GetClosestPed/Shared","/overextended/ox_lib/Modules/GetClosestPlayer/Shared","/overextended/ox_lib/Modules/GetClosestVehicle/Shared","/overextended/ox_lib/Modules/GetNearbyObjects/Shared","/overextended/ox_lib/Modules/GetNearbyPeds/Shared","/overextended/ox_lib/Modules/GetNearbyPlayers/Shared","/overextended/ox_lib/Modules/GetNearbyVehicles/Shared","/overextended/ox_lib/Modules/Interface","/overextended/ox_lib/Modules/Interface/Client/alert","/overextended/ox_lib/Modules/Interface/Client/clipboard","/overextended/ox_lib/Modules/Interface/Client/context","/overextended/ox_lib/Modules/Interface/Client/input","/overextended/ox_lib/Modules/Interface/Client/menu","/overextended/ox_lib/Modules/Interface/Client/notify","/overextended/ox_lib/Modules/Interface/Client/progress","/overextended/ox_lib/Modules/Interface/Client/radial","/overextended/ox_lib/Modules/Interface/Client/skillcheck","/overextended/ox_lib/Modules/Interface/Client/textui","/overextended/ox_lib/Modules/Locale/Shared","/overextended/ox_lib/Modules/Logger/Server","/overextended/ox_lib/Modules/Marker/Client","/overextended/ox_lib/Modules/Math/Shared","/overextended/ox_lib/Modules/Points/JavaScript/Client","/overextended/ox_lib/Modules/Points/Lua/Client","/overextended/ox_lib/Modules/Print/Shared","/overextended/ox_lib/Modules/Raycast/Client","/overextended/ox_lib/Modules/Require/Shared","/overextended/ox_lib/Modules/Streaming/Client","/overextended/ox_lib/Modules/String/Shared","/overextended/ox_lib/Modules/Table/Shared","/overextended/ox_lib/Modules/Timer/Shared","/overextended/ox_lib/Modules/VehicleProperties/Client","/overextended/ox_lib/Modules/Version/Server","/overextended/ox_lib/Modules/Version/Shared","/overextended/ox_lib/Modules/WaitFor/Shared","/overextended/ox_lib/Modules/Zones/Shared","/overextended/ox_target","/overextended/ox_target/Functions/Client","/overextended/ox_target/TargetOptions","/overextended/oxmysql","/overextended/oxmysql/Functions/insert","/overextended/oxmysql/Functions/prepare","/overextended/oxmysql/Functions/query","/overextended/oxmysql/Functions/rawExecute","/overextended/oxmysql/Functions/scalar","/overextended/oxmysql/Functions/single","/overextended/oxmysql/Functions/transaction","/overextended/oxmysql/Functions/update","/overextended/oxmysql/benchmark","/overextended/oxmysql/placeholders","/overextended/oxmysql/ui","/qbox","/resources"]}}("static/chunks/2601-a643f2bef9ecb8af.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/G0fVpycx0BnY30fWgMEyz/_ssgManifest.js b/_next/static/JvhzGBwIGnzRse5LIa2xS/_ssgManifest.js similarity index 100% rename from _next/static/G0fVpycx0BnY30fWgMEyz/_ssgManifest.js rename to _next/static/JvhzGBwIGnzRse5LIa2xS/_ssgManifest.js diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index 438552a6b1..2120fa99b8 100644 --- a/_next/static/chunks/nextra-data-en-US.json +++ b/_next/static/chunks/nextra-data-en-US.json @@ -1 +1 @@ -{"/guides":{"title":"Guias","data":{"":"Guias gerais para trabalhar com recursos.\nGit\nNodeJS\nPNPM\nOx Types\nVisual Studio Code"}},"/guides/git":{"title":"Git","data":{"":"Git é um sistema de controle de versão, permitindo que mudanças sejam rastreadas, mescladas e revertidas de maneira eficaz.Como nossos recursos estão hospedados no GitHub, pode ser muito útil aprender a criar seu próprio repositório para acompanhar as alterações e se manter atualizado. Se você planeja fazer suas próprias mudanças em nossos recursos, isso permitirá que você mantenha suas alterações sem risco de perda de dados.\nConsulte o guia do GitHub para configurar o Git.\nVocê pode usar um cliente GUI para Git, como o GitKraken, para melhorar seu fluxo de trabalho e manter as mudanças de forma mais fácil."}},"/guides/pnpm":{"title":"pnpm","data":{"":"pnpm é um gerenciador de pacotes rápido e eficiente em termos de espaço em disco, sendo uma alternativa ao npm e ao yarn.\nCertifique-se de ter instalado o Node.js.\nAbra um terminal de linha de comando (ex.: Terminal, Prompt de Comando).\nDigite npm install -g pnpm para instalar o pacote globalmente.\nVocê pode instalar dependências com o pnpm utilizando pnpm i.\nVocê pode consultar os arquivos package.json para os scripts disponíveis, por exemplo:\n\"scripts\": {\n \"start\": \"vite\",\n \"watch\": \"vite build --watch\",\n \"build\": \"tsc && vite build\",\n \"preview\": \"vite preview\",\n \"format\": \"prettier --write \\\"./src/**/*.{ts,tsx,css}\\\"\"\n},\nUsando o exemplo acima, pnpm build irá rodar o script de build para o pacote fornecido."}},"/guides/types":{"title":"Types","data":{"configurar-git-vscode-e-extensões-do-vscode#Configurar git, vscode e extensões do vscode":"","baixar-nossas-definições-de-tipo-lua#Baixar nossas definições de tipo Lua":"git clone https://github.com/overextended/ox_types.git","atualizar-suas-configurações#Atualizar suas configurações":"Você pode modificar as configurações de usuário, espaço de trabalho ou pasta no vscode.\nCrie uma entrada em Lua.workspace.library apontando para o diretório clonado ou subdiretórios específicos.\n\"Lua.workspace.library\": [\n \"F:/GitHub/ox_types/types\",\n \"F:/GitHub/ox_lib\"\n],"}},"/":{"title":"Introdução","data":{"":"Aqui você pode encontrar a documentação oficial para os recursos desenvolvidos ou traduzidos pela mri-Qbox.Esta documentação foi baseada nas documentações oficiais de Overextended e Qbox e terá os recursos deles traduzidos para o português.Se você acha que algo na documentação não está correto, você pode ir até aquela página, clicar em \"Editar esta página\" e nos enviar um Pull Request.","to-the-overextended-team#To the Overextended team":"We left the links pointing to your original documentation and discount codes/custom URLs in order to thank you for your awesome work. Please reach to us if are there any issues.","to-the-qbox-team#To the Qbox team":"We left the links pointing to your original documentation in order to thank you for your awesome work. Please reach to us if are there any issues.","ajude-nosso-time#Ajude nosso time":"Nós adoramos a ideia de criar e compartilhar recursos gratuitos e abertos, mas eles geralmente requerem tempo e esforço para manterem e suportar.Se você usa nossas resources frequentemente e curte o que a gente faz, considere contribuir para nos ajudar. Nos procure no Discord para saber mais.","fivemanage#Fivemanage":"Fivemanage é um serviço de gerenciamento em nuvem voltado para servidores de jogos, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM.Os serviços incluem um plano gratuito com espaço de armazenamento de mídia limitado, além de vários planos pagos projetados para acomodar servidores maiores que precisam de mais espaço de armazenamento e recursos de registro.Iniciar com Fivemanage E use o código OX10 para obter 10% de desconto na sua assinatura – para sempre!","fivemerr#Fivemerr":"Fivemerr é um serviço de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM."}},"/overextended":{"title":"Introdução","data":{"":"Aqui você pode encontrar toda a documentação oficial dos recursos desenvolvidos pela equipe Overextended.","apoie-a-equipe-overextended#Apoie a equipe Overextended":"Eles gostam de poder criar e compartilhar trabalhos livres e de código aberto, mas eles frequentemente exigem tempo e esforço consideráveis para manutenção e suporte.Se você usa frequentemente esses recursos e gosta do que fazem, considere apoiá-los para que possam continuar o trabalho.","códigos-de-criador#Códigos de Criador":"Os códigos de criador permitem que as lojas Tebex compartilhem uma porcentagem da compra com a Overextended, enquanto oferecem um desconto ao cliente. Eles fazem esses acordos para divulgar criadores confiáveis que atendem aos critérios deles.\nOs recursos são altamente configuráveis ou, preferencialmente, com código-fonte disponível.\nConfiam que os clientes receberão assistência.\nO criador é um membro conhecido da comunidade Overextended.\nMais informações sobre esses criadores estão disponíveis no Discord Overextended.Para acessar os códigos clique aqui"}},"/overextended/ox_core":{"title":"Ox Core","data":{"":"Um framework moderno para FiveM, projetado para oferecer suporte adequado a recursos como OneSync, statebags e entidades no lado do servidor.","receita-txadmin#Receita txAdmin":"Se você está procurando instalar e configurar rapidamente o ox_core, tente usar nossa receita.","instalação#Instalação":"Recomendamos fortemente consultar os Guias para configurar as ferramentas de desenvolvimento necessárias.","instale-todas-as-dependências-do-recurso#Instale todas as dependências do recurso.":"oxmysql\nox_lib","baixe-a-última-versão-ou-compile-o-código-fonte#Baixe a última versão ou compile o código-fonte.":"Configure Git, Node.js, e pnpm.\nBaixe e configure MariaDB 11.4+.\nExecute os seguintes comandos no seu CLI (ex.: Terminal, Prompt de Comando).\ngit clone https://github.com/overextended/ox_core.git\ncd ox_core\npnpm i\npnpm build","instale-dependências-opcionais#Instale dependências opcionais.":"Esses recursos não são estritamente necessários, mas são fortemente recomendados.\nox_inventory\nnpwd\nillenium-appearance","usando-ox_core-nos-seus-recursos#Usando ox_core nos seus recursos":"","lua#Lua":"Você pode importar as definições do ox_core carregando @ox_core/lib/init.lua no seu recurso.\nIsto pode ser um client_script ou server_script, se preferir.\nshared_script '@ox_core/lib/init.lua'\nSe preferir, você pode usar nossa função require do ox_lib.\nlocal Ox = require '@ox_core/lib/init'","javascript#JavaScript":"Para usar o ox_core com seus recursos JavaScript, você precisará do nosso pacote npm, que fornece suporte completo para TypeScript e Intellisense.\nPara começar, experimente nosso fivem-typescript-boilerplate e instale o pacote ox_core.\npnpm i @overextended/ox_core","configuração#Configuração":"A configuração do recurso é gerenciada usando convars.","replicados#Replicados":"Esses convars devem usar o comando setr para serem lidos pelos clientes.\nox:debug\nPadrão: false\nAtiva mensagens e comandos de depuração. Habilitado por padrão ao usar pnpm watch.\nox:characterSlots\nPadrão: 1\nDefine o número de slots de personagem disponíveis para recursos de seleção de personagens (ex.: ox_charselect).\nox:plateFormat\nPadrão: \"........\"\nConsulte SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN.\nox:deathSystem\nPadrão: true\nAtiva o sistema de morte e respawn integrado.\nox:characterSelect\nPadrão: true\nAtiva o registro de personagem integrado e utiliza esse personagem ao entrar.\nox:spawnLocation\nPadrão: [-258.211, -293.077, 21.6132, 206.0]\nDefine o local de spawn padrão para personagens recém-criados."}},"/overextended/ox_core/Classes/Client/OxPlayer":{"title":"OxPlayer","data":{"oxplayer#OxPlayer":"state: StateBagInterface\nuserId: number\ncharId?: number\nstateId?: string","oxplayeraddstatus#OxPlayer.addStatus":"Increases value of a status.\nplayer.addStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nsuccess: boolean","oxplayerget#OxPlayer.get":"Returns a value from the players metadata.\nplayer.get(key)\nParameters\nkey: string\nReturns\nunknown","oxplayergetcoords#OxPlayer.getCoords":"Returns the player's current coordinates.\nplayer.getCoords()\nParameters\nvector3","oxplayergetgroup#OxPlayer.getGroup":"Returns the player's grade of a given group name, or the first matched name and grade in a filter.\nplayer.getGroup(filter)\nParameters\nfilter: string|string[]|{ [string]: number }\nReturns\nunknown","oxplayergetgroupbytype#OxPlayer.getGroupByType":"Returns the player's name and grade of a group with a matching type.\nplayer.getGroupByType(type)\nParameters\ntype: string\nReturns\nstring\nnumber","oxplayergetgroups#OxPlayer.getGroups":"Returns an object of all groups the player is currently in, using the group name as a key.\nplayer.getGroups()\nReturns\n{ [string]: number }","oxplayergetstatus#OxPlayer.getStatus":"Returns the value of the status.\nplayer.getStatus(statusName)\nParameters\nstatusName: string\nReturns\nnumber","oxplayergetstatuses#OxPlayer.getStatuses":"Returns an object containing all statuses, using the status name as the key.\nplayer.getStatuses()\nReturns\n{ [string]: number }","oxplayerhaspermission#OxPlayer.hasPermission":"Checks if a user has been granted a permission by one of their groups.\nplayer.hasPermission(permission)\nParameters\npermission: string\nReturns\nboolean","oxplayerremovestatus#OxPlayer.removeStatus":"Reduces the value of a status.\nplayer.removeStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayeron#OxPlayer.on":"Listens for changes to the players metadata, specified by a key.\nplayer.on(key, cb(data))\nParameters\nkey: string\ncb: function\nReturns\ndata: unknown\nnew value of key"}},"/overextended/ox_core/Classes/Server/OxAccount":{"title":"OxAccount","data":{"oxaccount#OxAccount":"accountId number","oxaccountmetadata#OxAccountMetadata":"id: number\nbalance: number\nisDefault: number\nlabel?: boolean\nowner?: number\ngroup?: string\ntype: personal | shared | group","oxaccountget#OxAccount.get":"Get the value of specific key(s) from the account's metadata.\naccount.get(key)\nParameters\nkey: string | string[]\nReturns\nOxAccountMetadata[key] | OxAccountMetadata[key][]\nReturns an array if passing multiple keys.","oxaccountaddbalance#OxAccount.addBalance":"Add funds to the account.\naccount.addBalance({ amount, message })\nParameters\nobject\namount: number\nmessage?: string\nReturns\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccountremovebalance#OxAccount.removeBalance":"Remove funds from the account.\naccount.removeBalance({ amount, message, overdraw })\nParameters\nobject\namount: number\nmessage?: string\noverdraw?: boolean\nReturns\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccounttransferbalance#OxAccount.transferBalance":"Transfer funds to another account.\naccount.transferBalance({ toId, amount, overdraw, message, note, actorId })\nParameters\nobject\ntoId: number\nThe accountId to transfer funds to.\namount: number\nmessage?: string\noverdraw?: boolean\nnote?: string\nactorId? number\nThe charId of the player initiating the transfer.\nReturns\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccountdepositmoney#OxAccount.depositMoney":"Deposit money into the account.\naccount.transferBalance(playerId, amount, message, note)\nParameters\nplayerId: number\namount: number\nmessage?: string\nnote?: string\nReturns\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'insufficient_funds' | 'no_balance' | 'no_access' | 'something_went_wrong'","oxaccountwithdrawmoney#OxAccount.withdrawMoney":"Withdraw money from the account.\naccount.transferBalance(playerId, amount, message, note)\nParameters\nplayerId: number\namount: number\nmessage?: string\nnote?: string\nReturns\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_charId' | 'insufficient_funds' | 'no_balance' | 'no_access' | 'something_went_wrong'","oxaccountdeleteaccount#OxAccount.deleteAccount":"Mark the account as deleted. It can no longer be accessed, but remains in the database.\naccount.deleteAccount()\nReturns\nobject\nsuccess: boolean\nmessage: 'something_went_wrong'","oxaccountgetcharacterrole#OxAccount.getCharacterRole":"Get the account access role of a character by charId or stateId.\naccount.getCharacterRole(id)\nParameters\nid: number | string\nReturns\nstring","oxaccountsetcharacterrole#OxAccount.setCharacterRole":"Set the account access role of a character by charId or stateId.\naccount.setCharacterRole(id, role)\nParameters\nid: number | string\nrole?: string\nReturns\nobject\nsuccess: boolean\nmessage: 'something_went_wrong'","oxaccountplayerhaspermission#OxAccount.playerHasPermission":"Checks if a player's active character has permission to perform an action on the account.\naccount.playerHasPermission(playerId, permission)\nParameters\nplayerId: number\npermission: string\nReturns\nboolean","oxaccountsetshared#OxAccount.setShared":"Set the account as shared, allowing permissions to be assigned to other characters.\naccount.setShared()\nReturns\nobject\nsuccess: boolean\nmessage: 'update_account_error'","oxaccountcreateinvoice#OxAccount.createInvoice":"Create an unpaid invoice on the account.\naccount.createInvoice(invoice)\nParameters\ninvoice: object\nactorId?: number;\nThe charId of the player creating the invoice.\ntoAccount: number;\nThe accountId of the account receiving the invoice.\namount: number;\nmessage: string;\ndueDate: string;\nReturns\nobject\nsuccess: boolean\nmessage: 'no_charId' | 'no_permission' | 'no_target_account'"}},"/overextended/ox_core/Classes/Server/OxPlayer":{"title":"OxPlayer","data":{"oxplayer#OxPlayer":"charId: number\nidentifier: string\nped: number\nsource: number\nstate: StateBagInterface\nstateId: string\nuserId: number\nusername: string","oxplayeraddlicense#OxPlayer.addLicense":"Grants a license to the player.\nplayer.addLicense(licenseName)\nParameters\nlicenseName: string\nReturns\nboolean","oxplayeraddstatus#OxPlayer.addStatus":"Increases the value of a status.\nplayer.addStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayercreatecharacter#OxPlayer.createCharacter":"Registers a new character for a player that has not already selected a character.\nplayer.createCharacter(data)\nParameters\ndata: object\nfirstName: string\nlastName: string\ngender: string\ndate: number\nReturns\nnumber\nThe index of the new character in an array of all characters owned by the player.","oxplayerdeletecharacter#OxPlayer.deleteCharacter":"Deletes a character with the given charId, if owned by the player and they have not selected a character.\nplayer.deleteCharacter(charId)\nParameters\ncharId: number\nReturns\nboolean","oxplayeremit#OxPlayer.emit":"Triggers a client event for the player.\nplayer.emit(eventName, ...args)\nParameters\neventName: string\n...args: any","oxplayerget#OxPlayer.get":"Get the value of specific key from the player's metadata.\nplayer.get(key)\nParameters\nkey: string\nReturns\nunknown","oxplayergetaccount#OxPlayer.getAccount":"Returns the player's default account.\nplayer.getAccount()\nReturns\nOxAccount","oxplayergetcoords#OxPlayer.getCoords":"Returns the player's current coordinates.\nplayer.getCoords()\nReturns\nvector3","oxplayergetgroup#OxPlayer.getGroup":"Returns the player's grade of a given group name, or the first matched name and grade in a filter.\nplayer.getGroup(filter)\nParameters\nfilter: string | string[] | { [string]: number }\nReturns\nnumber | string\nnumber?","oxplayergetgroupbytype#OxPlayer.getGroupByType":"Returns the player's name and grade of a group with a matching type.\nplayer.getGroupByType(type)\nParameters\ntype: string\nReturns\nstring\nnumber","oxplayergetgroups#OxPlayer.getGroups":"Returns an object of all groups the player is currently in, using the group name as a key.\nplayer.getGroups()\nReturns\n{ [string]: number }","oxplayergetlicense#OxPlayer.getLicense":"Returns an object containing information for the specified license.\nplayer.getLicense(licenseName: string): object\nParameters\nlicenseName: string\nReturns\nobject\nissued: number\nsuspended?: [number, number]\n[key: string]: any","oxplayergetlicenses#OxPlayer.getLicenses":"Returns an object containing information for all licenses.\nplayer.getLicenses()\nReturns\nobject\n{ [string]: object }\nissued: number\nsuspended?: [number, number]\n[key: string]: any","oxplayergetstate#OxPlayer.getState":"Returns the player's statebag interface.\nplayer.getState()\nReturns\nStateBagInterface","oxplayergetstatus#OxPlayer.getStatus":"Returns the value of the status.\nplayer.getStatus(statusName)\nParameters\nstatusName: string\nReturns\nnumber","oxplayergetstatuses#OxPlayer.getStatuses":"Returns an object containing all statuses, using the status name as the key.\nplayer.getStatuses()\nReturns\n{ [string]: number }","oxplayerhaspermission#OxPlayer.hasPermission":"Checks if a user has been granted a permission by one of their groups.\nplayer.hasPermission(permission)\nParameters\npermission: string\nReturns\nboolean","oxplayerlogout#OxPlayer.logout":"Clears data for the active character and transitions the player to character selection, if valid.\nplayer.logout(save, dropped)\nParameters\nsave?: boolean\nIf the active character data should be saved to the database, defaulting to true.\ndropped?: boolean\nIf the player has been disconnected from the server.","oxplayerpayinvoice#OxPlayer.payInvoice":"Pays an account invoice with the given invoiceId.\nplayer.payInvoice(invoiceId)\nParameters\ninvoiceId: number\nReturns\nobject\nsuccess: boolean\nmessage?: \"no_charId\" | \"no_permission\" | \"no_balance\" | \"no_invoice\" | \"invoice_paid\" | \"insufficient_balance\"","oxplayerremovelicense#OxPlayer.removeLicense":"Remove a license from the player.\nplayer.removeLicense(licenseName)\nParameters\nlicenseName: string\nReturns\nboolean","oxplayerremovestatus#OxPlayer.removeStatus":"Reduces the value of a status.\nplayer.removeStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayersave#OxPlayer.save":"Saves the active character to the database.\nplayer.save()","oxplayerset#OxPlayer.set":"Stores a value in the player's metadata, which can be optionally synced with the client.\nplayer.set(key, value, replicated)\nParameters\nkey: string\nvalue: any\nreplicated?: boolean","oxplayersetactivecharacter#OxPlayer.setActiveCharacter":"Loads and sets a character as the player's active character. Takes a charId or an object containing new character data.\nplayer.setActiveCharacter(data)\nParameters\ndata: number | object\nfirstName: string\nlastName: string\ngender: string\ndate: number\nReturns\nobject\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nx?: number\ny?: number\nz?: number\nheading?: number\nlastPlayed?: string\nhealth?: number\narmour?: number\nisNew?: boolean","oxplayersetactivegroup#OxPlayer.setActiveGroup":"Sets a group the player is in as their active or \"primary\" group. If no arguments are passed, no active group will be set.\nplayer.setActiveGroup(groupName?: string, temp?: boolean)\nParameters\ngroupName: string\ntemporary?: boolean\nIf true it will persist through sessions.\nReturns\nboolean","oxplayersetgroup#OxPlayer.setGroup":"Sets the player's grade within a group. If grade is undefined or 0 they will be removed from the group.\nplayer.setGroup(groupName, grade)\nParameters\ngroupName: string\ngrade?: number\nReturns\nboolean","oxplayersetstatus#OxPlayer.setStatus":"Sets the value of a status.\nplayer.setStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayerupdatelicense#OxPlayer.updateLicense":"Sets information on a player license.\nplayer.updateLicense(licenseName, key, value)\nParameters\nlicenseName: string\nkey: string\nvalue: unknown\nReturns\nboolean"}},"/overextended/ox_core/Classes/Server/OxVehicle":{"title":"OxVehicle","data":{"oxvehicle#OxVehicle":"entity: number\nmake: string\nmodel: string\nnetId: number\nplate: string\ngroup?: string\nid?: number\nowner?: number\nvin?: string","oxvehicledelete#OxVehicle.delete":"Despawns the vehicle and removes it from the database.\nvehicle.delete()","oxvehicledespawn#OxVehicle.despawn":"Despawns the vehicle, optionally saving it to the database.\nvehicle.despawn(save)\nParameters\nsave?: boolean","oxvehicleget#OxVehicle.get":"Get the value of specific key from the vehicle's metadata.\nvehicle.get(key)\nParameters\nkey: string\nReturns\nunknown","oxvehiclegetcoords#OxVehicle.getCoords":"Returns the vehicle's current coordinates.\nvehicle.getCoords(): Vector3","oxvehiclegetstate#OxVehicle.getState":"Returns the vehicle's statebag interface.\nvehicle.getState()\nReturns\nStateBagInterface","oxvehiclegetstored#OxVehicle.getStored":"Returns the vehicle's \"stored\" state.\nvehicle.getStored()\nReturns\nstring?","oxvehiclerespawn#OxVehicle.respawn":"Spawns a new entity for the vehicle, removing an existing entity if it exists and reapplying stored vehicle properties.\nvehicle.respawn(coords, rotation)\nParameters\ncoords?: vector3\nrotation?: vector3","oxvehiclesave#OxVehicle.save":"Saves the vehicle to the database.\nvehicle.save()\nReturns\nnumber","oxvehicleset#OxVehicle.set":"Stores a value in the vehicle's metadata, which will be saved to the database (this behaviour is likely to be removed).\nplayer.set(key, value)\nParameters\nkey: string\nvalue: any","oxvehiclesetgroup#OxVehicle.setGroup":"Sets the vehicle as a group vehicle \"owned\" by the given group name, or removes the group if omitted.\nvehicle.setGroup(groupName)\nParameters\ngroupName?: string","oxvehiclesetowner#OxVehicle.setOwner":"Sets the owner of a vehicle as the given charId, or removes the owner if omitted.\nvehicle.setOwner(charId)\nParameters\ncharId?: number","oxvehiclesetplate#OxVehicle.setPlate":"Sets the registered plate of a vehicle to the given value. The plate will be padded or stripped to 8 characters.This plate is not necessarily the displayed plate on vehicle properties.\nvehicle.setPlate(plate: string)","oxvehiclesetproperties#OxVehicle.setProperties":"Saves the properties (mods, extras, etc.) stored on the vehicle, optionally applying them to the entity.\nvehicle.setProperties(properties, apply)\nParameters\nproperties: VehicleProperties\napply?: boolean","oxvehiclesetstored#OxVehicle.setStored":"Sets the vehicle as \"stored\" at the given value (e.g. impound, garage, null), and optionally despawns the vehicle.\nvehicle.setStored(value, despawn)\nParameters\nvalue?: string\ndespawn?: boolean"}},"/overextended/ox_core/Events/client":{"title":"Client Events","data":{"":"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.","oxplayerloaded#ox:playerLoaded":"When a character is loaded\nfunction(playerId: number, isNew: boolean)","oxstatustick#ox:statusTick":"On each status tick\nfunction(statuses: Record)","oxsetgroup#ox:setGroup":"When the character is added or removed from a group\nfunction(groupName: string, grade?: number)","oxlicenseadded#ox:licenseAdded":"When the character got a new license\nfunction(licenseName: string)","oxlicenseremoved#ox:licenseRemoved":"When a character's license is removed.\nfunction(licenseName: string)","oxstartcharacterselect#ox:startCharacterSelect":"When the player has spawned.\nfunction(userId: number, characters: Character[])","oxsetactivecharacter#ox:setActiveCharacter":"When the player has chosen their character.\nfunction(character: Character, groups: Record)"}},"/overextended/ox_core/Events/server":{"title":"Server Events","data":{"":"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.","oxsavedplayers#ox:savedPlayers":"When players are saved to the database.\nfunction(playersSaved: number)","oxsetactivegroup#ox:setActiveGroup":"When the active group of a character has changed.\nfunction(playerId: number, groupName: string)","oxsetgroup#ox:setGroup":"When a character is added or removed from a group.\nfunction(playerId: number, groupName: string, grade?: number)","oxlicenseadded#ox:licenseAdded":"When a character receives a new license.\nfunction(playerId: number, licenseName: string)","oxlicenseremoved#ox:licenseRemoved":"When a character's license is removed.\nfunction(playerId: number, licenseName: string)","oxplayerlogout#ox:playerLogout":"When a player logs out from their current character, crashes, or otherwise disconnects from the server.\nfunction(playerId: number, userId: number, charId: number)","oxcreatedcharacter#ox:createdCharacter":"When a player has created a new character.\nfunction(playerId: number, userId: number, charId: number)","oxplayerloaded#ox:playerLoaded":"When a player selects and loads a character.\nfunction(playerId: number, userId: number, charId: number)","oxdeletedcharacter#ox:deletedCharacter":"When a character is deleted.\nfunction(playerId: number, userId: number, charId: number)","oxsavedvehicles#ox:savedVehicles":"When vehicles are saved to the database.\nfunction(vehiclesSaved: number)","oxspawnedvehicle#ox:spawnedVehicle":"When a OxVehicle has spawned.\nfunction(entityId: number, id: number)"}},"/overextended/ox_core/Functions/common":{"title":"Common","data":{"oxgettopvehiclestats#Ox.GetTopVehicleStats":"Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea).\nOx.GetTopVehicleStats(category)\nParameters\ncategory?: string\nReturns\nVehicleStats | { [string]: VehicleStats }","vehiclestats#VehicleStats":"object\nacceleration: number\nbraking: number\nhandling: number\nspeed: number\ntraction: number","oxgetvehicledata#Ox.GetVehicleData":"Returns VehicleData for all vehicles, or optionally a specific model or array of models.\nOx.GetVehicleData(filter)\nParameters\nfilter?: string | string[]\nReturns\n{ [string]: VehicleData } | VehicleData","vehicledata#VehicleData":"object\nclass: VehicleClasses\ndoors: number\nmake: string\nname: string\nprice: number\nseats: number\ntype: string\nweapons?: true","oxgetvehiclenetworktype#Ox.GetVehicleNetworkType":"Returns the netobj type of a vehicle model, which may differ from the vehicle type (e.g. blimp is networked as heli).\nOx.GetVehicleNetworkType(modelName)\nParameters\nmodelName: string\nReturns\nstring"}},"/overextended/ox_core/Functions/server":{"title":"Server","data":{"oxcreateaccount#Ox.CreateAccount":"Creates a new account for a character with the given charId or stateId.\nOx.CreateAccount(ownerId, label)\nParameters\nownerId: number | string\nlabel: string\nReturns\nOxAccount","oxcreategroup#Ox.CreateGroup":"Creates a new group from the given data, handling all database interactions internally.\nOx.CreateGroup(data)\nParameters\ndata: object\nname: string\nlabel: string\ngrades: object[]\nlabel: string\naccountRole?: string\ntype?: string\ncolour?: number\nhasAccount?: boolean","oxcreatevehicle#Ox.CreateVehicle":"Creates a new vehicle, which will be saved to the database if it has an assigned owner or group.\nOx.CreateVehicle(data, coords, heading)\nParameters\ndata: string | object\nmodel: string\nowner?: number\ngroup?: string\nstored?: string\nproperties?: object\ncoords?: vector3\nheading?: number\nReturns\nOxVehicle","oxdeleteaccountinvoice#Ox.DeleteAccountInvoice":"Deletes the account invoice with the given invoiceId.\nOx.DeleteAccountInvoice(invoiceId)\nParameters\ninvoiceId: number\nReturns\nobject\nsuccess: boolean\nmessage?: string","oxdeletegroup#Ox.DeleteGroup":"Deletes all data associated with the given group name, such as group grades, vehicles, etc.\nOx.DeleteGroup(groupName)\nParameters\ngroupName: string","oxgeneratevehicleplate#Ox.GenerateVehiclePlate":"Generate a unique vehicle plate that doesn't exist in database.\nOx.GenerateVehiclePlate()\nReturns\nstring","oxgeneratevehiclevin#Ox.GenerateVehicleVin":"Generate a unique vehicle identification number that doesn't exist in database.\nOx.GenerateVehicleVin(modelName)\nParameters\nmodelName: string\nVehicle information (i.e. model and make) are used as part of the VIN.\nReturns\nstring","oxgetaccount#Ox.GetAccount":"Get the OxAccount with the given accountId.\nOx.GetAccount(accountId)\nParameters\naccountId: number\nReturns\nOxAccount","oxgetcharacteraccount#Ox.GetCharacterAccount":"Get the default OxAccount for a character by their charId or stateId.\nOx.GetCharacterAccount(id)\nParameters\nid: number | string\nReturns\nOxAccount","oxgetcharidfromstateid#Ox.GetCharIdFromStateId":"Get a character's charId from their stateId.\nNote: This queries the database and shouldn't be used excessively\nOx.GetCharIdFromStateId(stateId)\nParameters\nstateId: string\nReturns\nnumber","oxgetgroupaccount#Ox.GetGroupAccount":"Get the OxAccount for a group.\nOx.GetGroupAccount(groupName)\nParameters\ngroupName: string\nReturns\nOxAccount","oxgetgroupsbytype#Ox.GetGroupsByType":"Returns an array of group names which have the given group type.\nOx.GetGroupsByType(groupType)\nParameters\ngroupType: string\nReturns\nstring[]","oxgetplayer#Ox.GetPlayer":"Get an OxPlayer from its enity id.\nOx.GetPlayer(entityId)\nParameters\nuserId: number\nReturns\nOxPlayer","oxgetplayerfromfilter#Ox.GetPlayerFromFilter":"Get the first OxPlayer matching a filter.\nOx.GetPlayerFromFilter(filter)\nParameters\nfilter?: { [string]: any }\nCompare player fields and metadata against the given key-value pairs.\nGroups can be given as a string or array of strings to match.\nReturns\nOxPlayer","oxgetplayerfromuserid#Ox.GetPlayerFromUserId":"Get an OxPlayer from its user id.\nOx.GetPlayerFromUserId(userId)\nParameters\nuserId: number\nReturns\nOxPlayer","oxgetplayers#Ox.GetPlayers":"Get an array of containing OxPlayer for all players matching a filter, if given.\nOx.GetPlayers(filter)\nParameters\nfilter?: { [string]: any }\nCompare player fields and metadata against the given key-value pairs.\nGroups can be given as a string or array of strings to match.\nReturns\nOxPlayer[]","oxgetvehicle#Ox.GetVehicle":"Get an OxVehicle from its entity id.\nOx.GetVehicle(entityId)\nParameters\nentityId: number\nReturns\nOxVehicle","oxgetvehiclefromnetid#Ox.GetVehicleFromNetId":"Get an OxVehicle from its network id.\nOx.GetVehicleFromNetId(netId)\nParameters\nnetId: number\nReturns\nOxVehicle","oxgetvehiclefromvin#Ox.GetVehicleFromVin":"Get an OxVehicle from its VIN.\nOx.GetVehicleFromVin(vin)\nParameters\nvin: string\nReturns\nOxVehicle","oxremovegrouppermission#Ox.RemoveGroupPermission":"Removes a permission from a specified group and minimum grade.\nOx.RemoveGroupPermission(groupName, grade, permission)\nParameters\ngroupName: string\ngrade: number\npermission: string","oxsaveallplayers#Ox.SaveAllPlayers":"Save all players to the database.\nOx.SaveAllPlayers()","oxsaveallvehicles#Ox.SaveAllVehicles":"Save all vehicles to the database.\nOx.SaveAllVehicles()","oxsetgrouppermission#Ox.SetGroupPermission":"Assigns a permission to a specified group and minimum grade, which will be inherited by higher grades.\nOx.SetGroupPermission(groupName, grade, permission, value)\nParameters\ngroupName: string\ngrade: number\npermission: string\nvalue: allow | deny","oxspawnvehicle#Ox.SpawnVehicle":"Spawns an OxVehicle with the given dbId, if it hasn't already been spawned.\nOx.SpawnVehicle(dbId, coords, heading)\nParameters\ndbId: number\ncoords: vector3\nheading?: number\nReturns\nOxVehicle"}},"/overextended/ox_doorlock":{"title":"Ox Doorlock","data":{"":"Um recurso de gerenciamento de portas que pode ser usado de forma independente ou junto com ox_core, qbx_core e es_extended.","instalação#Instalação":"Recomendamos fortemente que consulte os Guias para configurar Git, Node.js e pnpm.","instale-todas-as-dependências-do-recurso#Instale todas as dependências do recurso.":"oxmysql\nox_lib","baixe-uma-release-ou-compile-o-código-fonte#Baixe uma release ou compile o código-fonte.":"git clone https://github.com/overextended/ox_doorlock.git\ncd ox_doorlock/web\npnpm i\npnpm build","instale-dependências-opcionais#Instale dependências opcionais.":"Esses recursos não são obrigatórios, mas oferecem funcionalidades adicionais.\nox_target","abrindo-a-ui#Abrindo a UI":"Se você instalou e iniciou o recurso, pode usar o comando /doorlock para abrir a interface de usuário.\nCaso o cursor seja exibido, mas a UI não apareça, então você não a construiu corretamente.\nTalvez você não tenha permissão para usar o comando.\nInsira test_ace player.1 command.doorlock no console do servidor (substitua 1 pelo seu ID de servidor).","converter-portas#Converter portas":"Arquivos de configuração de portas escritos para nui_doorlock podem ser automaticamente adicionados ao seu banco de dados MySQL.\nTodos os arquivos com extensão .lua colocados no diretório ox_doorlock/convert serão lidos ao iniciar o recurso.\nSe o diretório não existir, você pode criá-lo.\nA conversão não pode ser garantida, especialmente se o arquivo de configuração não foi escrito para nui_doorlock.","adicionando-novos-áudios-nativos#Adicionando novos áudios nativos":"Um guia pode ser encontrado aqui para adicionar novos áudios nativos."}},"/overextended/ox_doorlock/Client/functions":{"title":"Funções","data":{"pickclosestdoor#pickClosestDoor":"Tenta arrombar a porta mais próxima. Dependente de verificações do lado do servidor e pode falhar.\nexports.ox_doorlock:pickClosestDoor()","useclosestdoor#useClosestDoor":"Interage com a porta mais próxima. Dependente de verificações do lado do servidor e pode falhar.\nexports.ox_doorlock:useClosestDoor()","getclosestdoor#getClosestDoor":"Retorna a porta mais próxima.\nexports.ox_doorlock:getClosestDoor()\nRetorno:\ndoor: number"}},"/overextended/ox_doorlock/Server/events":{"title":"Eventos","data":{"handlers#Handlers":"Esses eventos não devem ser acionados por nenhum outro script.","ox_doorlockstatechanged#ox_doorlock:stateChanged":"Acionado quando o estado de uma porta é atualizado.\nAddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)\nsource: number or nil\ndoorId: number\nstate: boolean\nusedItem: string or false or nil"}},"/overextended/ox_doorlock/settings":{"title":"Configurações da Porta","data":{"geral#Geral":"Nome da porta\nUsado para identificar facilmente a porta.\nCódigo de acesso\nA porta pode ser desbloqueada por qualquer pessoa usando o código ou frase.\nIntervalo de autolock\nA porta será trancada após x segundos.\nDistância de interação\nA porta só pode ser usada quando estiver a x metros de distância.\nTaxa da porta\nVelocidade de movimento da porta para portas deslizantes/garaus/automáticas ou portas de abrir quando trancadas.\nTrancada\nDefine a porta como trancada por padrão.\nDupla\nA porta é um conjunto de duas portas, controladas juntas.\nAutomática\nPorta deslizante/garaus/automática.\nArrombamento\nA porta pode ser arrombada ao interagir com um recurso de mira.\nOcultar UI\nNenhum indicador (ou seja, ícone, texto) será exibido na porta.\nManter aberta\nMantém a porta aberta enquanto estiver desbloqueada.","personagens#Personagens":"Id do personagem\nIdentificador do personagem usado por um framework (ou seja, player.charid, xPlayer.identifier, Player.CitizenId).","grupos#Grupos":"Grupo\nDependente do framework, referindo-se a empregos, gangues, etc.\nGrau\nO grau mínimo para permitir acesso ao grupo (0 para permitir todos).","itens#Itens":"Item\nNome do item.\nTipo de metadata\nRequer suporte a metadata (ou seja, ox_inventory) para verificar slot.metadata.type.\nRemover ao usar\nRemove o item após interagir com a porta.","arrombamento#Arrombamento":"Dificuldade\nDefine a dificuldade do teste de habilidade (veja documentos).\nTamanho da área\nTamanho da área de dificuldade personalizada em graus.\nMultiplicador de velocidade\nMultiplicador de velocidade do indicador de dificuldade personalizado.","som#Som":"Som de trancamento\nSom a ser reproduzido ao trancar a porta.\nSom de desbloqueio\nSom a ser reproduzido ao desbloquear a porta.\nNota: Os sons são armazenados no diretório ./web/public/sounds."}},"/overextended/ox_doorlock/Server/functions":{"title":"Funções","data":{"":"Obtém os dados de uma porta com o ID fornecido, correspondendo ao ID da entrada no banco de dados.","getdoor#getDoor":"exports.ox_doorlock:getDoor(doorId)\nObtém os dados de uma porta com o id fornecido, correspondendo ao ID da entrada no banco de dados.\nid: number\nRetorno:\ndoor: table","getdoorfromname#getDoorFromName":"exports.ox_doorlock:getDoorFromName(name)\nObtém os dados de uma porta com o name fornecido, correspondendo ao nome da entrada no banco de dados.\nname: string\nRetorno:\ndoor: table","editdoor#editDoor":"exports.ox_doorlock:editDoor(doorId, data)\nEdite a configuração para o doorId fornecido.\ndoorId: number\ndata: table","setdoorstate#setDoorState":"exports.ox_doorlock:setDoorState(doorId, state)\nDefine uma porta com o doorId fornecido como trancada se o estado for true ou 1.\ndoorId: number\nstate: 0 or 1 or boolean"}},"/overextended/ox_fuel":{"title":"Ox Fuel","data":{"":"A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item.","installation#Installation":"","install-all-resource-dependencies#Install all resource dependencies.":"ox_lib\nox_inventory","download-a-release-or-clone-the-source-code#Download a release or clone the source code.":"git clone https://github.com/overextended/ox_fuel.git","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_target"}},"/overextended/ox_fuel/Client/functions":{"title":"Functions","data":{"setmoneycheck#setMoneyCheck":"Override the built-in money check.\nexports.ox_fuel:setMoneyCheck(method)","parameters#Parameters":"method: function(): number","example#Example":"exports.ox_fuel:setMoneyCheck(function()\n local accounts = ESX.GetPlayerData().accounts\n for i = 1, #accounts do\n if accounts[i].name == 'bank' then\n return accounts[i].money\n end\n end\n return 0\nend)"}},"/overextended/ox_fuel/Server/functions":{"title":"Functions","data":{"setpaymentmethod#setPaymentMethod":"Override the built-in payment method.\nexports.ox_fuel:setPaymentMethod(method)","parameters#Parameters":"method: function(): boolean?","example#Example":"exports.ox_fuel:setPaymentMethod(function(playerId, amount)\n local xPlayer = ESX.GetPlayerFromId(playerId)\n local bankAmount = xPlayer.getAccount('bank').money\n if bankAmount >= amount then\n xPlayer.removeAccountMoney('bank', amount)\n return true\n end\n TriggerClientEvent('ox_lib:notify', source, {\n type = 'error',\n description = locale('not_enough_money', amount - bankAmount)\n })\nend)"}},"/overextended/ox_fuel/Shared":{"title":"Shared","data":{"get-vehicle-fuel-amount#Get vehicle fuel amount":"local fuel = Entity(vehicleId).state.fuel","set-vehicle-fuel-amount#Set vehicle fuel amount":"Entity(vehicleId).state.fuel = fuelAmount"}},"/overextended/ox_inventory/Events/Client":{"title":"Client","data":{"":"This is not a comprehensive list of events and is missing events intended for internal use only.","event-triggers#Event Triggers":"These events are safe to trigger and handle in other scripts.","ox_inventorydisarm#ox_inventory:disarm":"Can be triggered to force the player to disarm.\nTriggerClientEvent('ox_inventory:disarm', playerId, noAnim)\nplayerId: number\nnoAnim: boolean\nIf true, disarm animation will be skipped","event-handlers#Event Handlers":"These events should not be triggered by any other scripts.","ox_inventoryupdateinventory#ox_inventory:updateInventory":"Triggered after inventory slots have been updated, included on load.\nChanges is a table containing all updated slot data indexed by slotId. Empty slots are false.\nAddEventHandler('ox_inventory:updateInventory', function(changes) end)\nchanges: table","ox_inventorycurrentweapon#ox_inventory:currentWeapon":"Triggered when a weapon is equipped or its metadata is altered.\nAddEventHandler('ox_inventory:currentWeapon', function(weapon) end)\nweapon?: table","ox_inventoryitemcount#ox_inventory:itemCount":"Triggered when the amount of an item in the player's inventory is changed.\nNote: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem.\nAddEventHandler('ox_inventory:itemCount', function(itemName, totalCount) end)\nitemName: string\ntotalCount: number","ox_inventoryupdateweaponcomponent#ox_inventory:updateWeaponComponent":"AddEventHandler('ox_inventory:updateWeaponComponent', function(action, componentHash, componentItem) end)\naction: 'added' | 'removed'\ncomponentHash: number\ncomponentItem: string","ox_inventoryuseditem#ox_inventory:usedItem":"AddEventHandler('ox_inventory:usedItem', function(name, slotId, metadata) end)\nname: string\nslotId: number\nmetadata?: table"}},"/overextended/ox_inventory":{"title":"Ox Inventory","data":{"":"A slot-based inventory with item metadata for \"item uniqueness\".\nIf you are replacing a built-in framework inventory there will be compatibility errors.\nIf you are unwilling or incapable of resolving incompatibilities, do not install this resource.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","install-all-resource-dependencies#Install all resource dependencies":"oxmysql\nox_lib","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_inventory.git\ncd ox_inventory/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies":"These resources aren't required but provide additional functionality.\nox_target","resource-start-order#Resource start order":"It's important for your resources to start in a logical order to prevent errors from missing dependencies.\nstart oxmysql # this should be one of the first resources\nstart ox_lib\nstart framework # the name of your framework (i.e. ox_core, es_extended, qbx_core)\nstart ox_target\nstart ox_inventory","config#Config":"Resource configuration is handled using convars.\n### Shared\n# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)\nsetr inventory:framework \"esx\"\n# Number of slots for player inventories\nsetr inventory:slots 50\n# Maximum carry capacity for players, in grams (frameworks may override this)\nsetr inventory:weight 30000\n# Integrated support for qtarget/ox_target stashes, shops, etc\n# Note: qtarget is deprecated, a future update may drop support (ox_target only, or gated features)\nsetr inventory:target false\n# Jobs with access to police armoury, evidence lockers, etc\nsetr inventory:police [\"police\", \"sheriff\"]\n### Client\n# The URL to load item images from\nsetr inventory:imagepath \"nui://ox_inventory/web/images\"\n# Weapons will reload after reaching 0 ammo\nsetr inventory:autoreload false\n# Blur the screen while accessing the inventory\nsetr inventory:screenblur true\n# Default hotkeys to access primary and secondary inventories, and hotbar\nsetr inventory:keys [\"F2\", \"K\", \"TAB\"]\n# Enable control action when inventory is open\nsetr inventory:enablekeys [249]\n# Weapons must be aimed before shooting\nsetr inventory:aimedfiring false\n# Show a list of all nearby players when giving items\nsetr inventory:giveplayerlist false\n# Toggle weapon draw/holster animations\nsetr inventory:weaponanims true\n# Toggle item notifications (add/remove)\nsetr inventory:itemnotify true\n# Toggle weapon item notifications (equip/holster)\nsetr inventory:weaponnotify true\n# Disable drop markers and spawn a prop instead\nsetr inventory:dropprops true\n# Set the default model used for drop props\nsetr inventory:dropmodel \"prop_med_bag_01b\"\n# Disarm the player if an unexpected weapon is in use (i.e. did not use the weapon item)\nsetr inventory:weaponmismatch true\n# Ignore weapon mismatch checks for the given weapon type (e.g. ['WEAPON_SHOVEL', 'WEAPON_HANDCUFFS'])\nsetr inventory:ignoreweapons []\n# Suppress weapon and ammo pickups\nsetr inventory:suppresspickups 1\n### Server\n# Compare current version to latest release on GitHub\nset inventory:versioncheck true\n# Stashes will be wiped after remaining unchanged for the given time\nset inventory:clearstashes \"6 MONTH\"\n# Discord webhook url, used for imageurl metadata content moderation (image embeds)\nset inventory:webhook \"\"\n# Logging via ox_lib (0: Disable, 1: Standard, 2: Include AddItem/RemoveItem, and all shop purchases)\nset inventory:loglevel 1\n# Item prices fluctuate in shops\nset inventory:randomprices true\n# Loot will randomly generate inside unowned vehicles and dumpsters\nset inventory:randomloot true\n# Minimum job grade to remove items from evidence lockers\nset inventory:evidencegrade 2\n# Trim whitespace from vehicle plates when checking owned vehicles\nsetr inventory:trimplate true\n# Set the contents of randomly generated inventories\n# [item name, minimum, maximum, loot chance]\nset inventory:vehicleloot [\n [\"cola\", 1, 1],\n [\"water\", 1, 1],\n [\"garbage\", 1, 2, 50],\n [\"panties\", 1, 1, 5],\n [\"money\", 1, 50],\n [\"money\", 200, 400, 5],\n [\"bandage\", 1, 1]\n]\nset inventory:dumpsterloot [\n [\"mustard\", 1, 1],\n [\"garbage\", 1, 3],\n [\"money\", 1, 10],\n [\"burger\", 1, 1]\n]\n# Set items to sync with framework accounts\nset inventory:accounts [\"money\"]","framework-incompatibilities#Framework incompatibilities":"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues.\nMoney as an item may conflict with banking/account systems.\nYou can sync these values with server.syncInventory.\nRefer to issue #1297 for known compatibility issues.","using-an-unsupported-framework#Using an unsupported framework":"If your framework does not have official support you'll have to implement it yourself.\nIf you're replacing an existing/built-in inventory system this may be complicated, but is a fairly simple task otherwise.This setup is highly opinionated and rigid, so it's up to your own ability as a developer to make it work.","setup-a-bridge-submodule#Setup a bridge submodule":"You'll want to set the target framework first - this could be the name, an acronym, or just \"custom\".\nsetr inventory:framework \"custom\"\nCopy the ox directory from the bridge directory and give it the name you used above.The bare minimum functions and event handlers are added here, but you'll need to change them to match your framework; we can't provide any help here. You can refer to the other framework bridges if you need inspiration.","setup-database-references#Setup database references":"Take a look at the mysql module. You'll need to reference your player/vehicle tables and id columns.\nelseif shared.framework == 'custom' then\n playerTable = 'characters' -- table storing player / character data\n playerColumn = 'charid' -- primary key for identifying the character (i.e. identifier, citizenid, id)\n vehicleTable = 'vehicles' -- table storing owned vehicle data\n vehicleColumn = 'id' -- primary key for identifying the vehicle (i.e. plate, vin, id)\nend"}},"/overextended/ox_inventory/Events/Server":{"title":"Server","data":{"":"This is not a comprehensive list of events and is missing events intended for internal use only.","handlers#Handlers":"These events should not be triggered by any other scripts.","ox_inventoryopenedinventory#ox_inventory:openedInventory":"Triggered after an inventory is opened by a player.\nAddEventHandler('ox_inventory:openedInventory', function(playerId, inventoryId) end)\nplayerId: number\ninventoryId: string","ox_inventoryclosedinventory#ox_inventory:closedInventory":"Triggered after an inventory is closed by a player.\nAddEventHandler('ox_inventory:closedInventory', function(playerId, inventoryId) end)","ox_inventoryuseditem#ox_inventory:usedItem":"AddEventHandler('ox_inventory:usedItem', function(playerId, name, slotId, metadata) end)\nplayerId: number\nname: string\nslotId: number\nmetadata?: table"}},"/overextended/ox_inventory/Frameworks/esx":{"title":"ESX","data":{"":"You will need a compatible version of ESX Legacy (1.6.0 or higher).\nYou can convert player inventories with convertinventory esx.\nAll items in the database will be migrated to the internal item data.\nAlways restart the resource when items are migrated!","compatibility#Compatibility":"Ox Inventory is a complete replacement for existing item, inventory, and weapon systems; it is inherently incompatible with ESX and any resources that rely on default behaviour.\nLoadouts do not exist and weapons are treated as items.\nStandard shops and stashes (i.e. esx_shops, esx_weaponshop, and esx_policejob).\nResources that alter the default esx inventory or provide a ui (i.e. esx_trunkinventory, esx_inventoryhud).","installation#Installation":"Use a compatible version of ESX Legacy (1.6.0+).\nModify your server.cfg, starting ox_inventory immediately after es_extended.\nstart oxmysql\nstart ox_lib\nstart es_extended\nstart qtarget\nstart ox_inventory","convert-esx-inventory-data#Convert ESX inventory data":"Start the server and type convertinventory esx into the server console.\nOptionally, type convertinventory esxproperty into the server console.\nRestart the server once conversion is complete.","optional-optimisation#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.\nif xPlayer.getInventoryItem('acetone').count > 2 and xPlayer.getInventoryItem('antifreeze').count > 4 and xPlayer.getInventoryItem('sudo').count > 9 then\n xPlayer.removeInventoryItem(\"acetone\", 3)\n xPlayer.removeInventoryItem(\"antifreeze\", 5)\n xPlayer.removeInventoryItem(\"sudo\", 10)\nend\nAdd the following code somewhere in your resource to cache the exports metatable.\nlocal ox_inventory = exports.ox_inventory\nYou will be able to reference any functions exposed through the export.\nlocal items = ox_inventory:Search(source, 'count', {'acetone', 'antifreeze', 'sudo'})\nif items and items.acetone > 2 and items.antifreeze > 4 and items.sudo > 9 then\n ox_inventory:RemoveItem(source, 'acetone', 3)\n ox_inventory:RemoveItem(source, 'antifreeze', 5)\n ox_inventory:RemoveItem(source, 'sudo', 10)\nend"}},"/overextended/ox_inventory/Frameworks/qbx":{"title":"Qbox","data":{"":"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).We strongly advise using Qbox as an alternative to QBCore.\nQbox Project GitHub\nQbox Project Discord","installation#Installation":"Setup qbox.\nEdit your server.cfg.\nAdd setr inventory:framework \"qbx\" before starting your resources.\nStart ox_inventory immediately after qbx_core."}},"/overextended/ox_inventory/Functions/Client":{"title":"Client","data":{"openinventory#openInventory":"Opens an inventory using the passed data.\nexports.ox_inventory:openInventory(invType, data)\ninvType: string\n'player'\n'shop'\n'stash'\n'crafting'\n'container'\n'drop'\n'glovebox'\n'trunk'\n'dumpster'\ndata: number or string or table\nExamples\nOpen the target player's inventory.\nexports.ox_inventory:openInventory('player', 3)\nOpen the fourth \"General Store\" location.\nexports.ox_inventory:openInventory('shop', { type = 'General', id = 4 })\nOpen the first stash in data/stashes.\nexports.ox_inventory:openInventory('stash', 1)\nOpen a custom stash (created on the server with RegisterStash).\nexports.ox_inventory:openInventory('stash', 'society_police')\nOpen a stash with a specific owner.\nexports.ox_inventory:openInventory('stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })","opennearbyinventory#openNearbyInventory":"If possible opens the nearby player's inventory.The player trying to open the inventory must be able to open their own and\nif the player does not have a police job, the target player must be fatally injured or\nplaying one of the death anims.\nexports.ox_inventory:openNearbyInventory()","closeinventory#closeInventory":"Closes the player's inventory.\nexports.ox_inventory:closeInventory()","items#Items":"Returns a table of all registered items. The format is as defined in data/items.lua.Optionally takes the name of an item, returning only data for that item (getting all data is not recommended).\nexports.ox_inventory:Items(itemName)\nitemName?: string\nThe following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than retrieving information from the server.\nlocal itemNames = {}\nfor item, data in pairs(exports.ox_inventory:Items()) do\n itemNames[item] = data.label\nend","useitem#useItem":"Uses the passed item, then triggers the callback function.\nShould be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.).\nexports.ox_inventory:useItem(data, cb)\ndata: table\ncb?: function\nexports('bandage', function(data, slot)\n local playerPed = PlayerPedId()\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Does the ped need to heal?\n if health < maxHealth then\n -- Use the bandage\n exports.ox_inventory:useItem(data, function(data)\n -- The item has been used, so trigger the effects\n if data then\n SetEntityHealth(playerPed, math.min(maxHealth, math.floor(health + maxHealth / 16)))\n lib.notify({description = 'You feel better already'})\n end\n end)\n else\n -- Don't use the item\n lib.notify({type = 'error', description = 'You don\\'t need a bandage right now'})\n end\nend)","useslot#useSlot":"Uses the item in the given inventory slot.\nexports.ox_inventory:useSlot(slot)\nslot: number","setstashtarget#setStashTarget":"Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker.\nexports.ox_inventory:setStashTarget(id, owner)\nid: string or number\nStash id.\nowner?: string or number\nExample\nexports.ox_inventory:setStashTarget('motel5', 'bobsmith')","getcurrentweapon#getCurrentWeapon":"Get data for the currently equipped weapon.\nexports.ox_inventory:getCurrentWeapon()\nYou can also listen for changes to the current weapon using an event handler.\nAddEventHandler('ox_inventory:currentWeapon', function(currentWeapon)\n\tCurrentWeapon = currentWeapon\nend)\ncurrentWeapon?: table\nammo?: string Name of the item used as ammo.\nhash: number\nlabel: string\nmelee: boolean\nmetadata: table\nammo?: number Amount of ammo loaded into the weapon.\ncomponents?: table Array of component item names, used to apply weapon components.\ndurability?: number\nregistered?: string Name of the player that bought the weapon at a shop.\nserial?: string\nname: string Name of the item.\nslot: number\nweight: number","displaymetadata#displayMetadata":"Sets a metadata property to display in the tooltip.\nexports.ox_inventory:displayMetadata(metadata, value)\nmetadata: string or table or { [string], [string] }\nIf metadata is a string then it's the metadata property you want to display, value is not optional then.\nCan be a table of key-value pairs, key being the metadata property and value being the label for that property.\nCan be an array of string arrays, i.e. { {'key', 'label' }, {'key2', 'label2' } to set the display order.\nvalue?: string\nLabel for the string metadata property to be displayed.\nExample\nexports.ox_inventory:displayMetadata('mustard', 'Mustard')\nexports.ox_inventory:displayMetadata({\n mustard = 'Mustard',\n ketchup = 'Ketchup'\n})","giveitemtotarget#giveItemToTarget":"Gives an item from the player's inventory to another player.\nexports.ox_inventory:giveItemToTarget(serverId, slotId, count)\nserverId: number\nThe serverId of the target player.\nslotId: number\nThe slotId of the item to give.\ncount?: number\nThe amount of the item to give, with nil, 0 or a value above the slot count giving the entire stack away.","weaponwheel#weaponWheel":"Enables the weapon wheel, but disables the use of inventory weapons.Mostly used for weaponised vehicles, though could be called for \"minigames\"\nlocal exports.ox_inventory:weaponWheel(state)\nstate: boolean","search#Search":"Searches the inventory for an item, or list of items, with the result varying based on the first argument.\nexports.ox_inventory:Search(search, item, metadata)\nsearch: 'slots' or 'count'\n'slots' returns a table of slots where the item was found at.\n'count' returns the count of the specified item in player's inventory. If searching for multiple items\nreturns key-value pairs of itemName = count.\nitem: table or string\nCan be a single item name or array of item names.\nmetadata?: table or string\nIf metadata is provided as a string it will search the item's metadata.type property.","count#Count":"local count = exports.ox_inventory:Search('count', 'water')\nprint('You have '..count.. ' water')\nlocal inventory = exports.ox_inventory:Search('count', {'meat', 'skin'}, {grade=\"1\"})\nif inventory then\n for name, count in pairs(inventory) do\n print('You have '..count..' '..name)\n end\nend","slots#Slots":"local water = exports.ox_inventory:Search('slots', 'water')\nlocal count = 0\nfor _, v in pairs(water) do\n print(v.slot..' contains '..v.count..' water '..json.encode(v.metadata))\n count = count + v.count\nend\nprint('You have '..count..' water')\nlocal items = exports.ox_inventory:Search('slots', {'meat', 'skin'}, 'deer')\nif items then\n for name, data in pairs(items) do\n local count = 0\n for _, v in pairs(data) do\n if v.slot then\n print(v.slot..' contains '..v.count..' '..name..' '..json.encode(v.metadata))\n count = count + v.count\n end\n end\n print('You have '..count..' '..name)\n end\nend","getitemcount#GetItemCount":"Get the total item count for all items in the player's inventory with the given name and metadata.\nexports.ox_inventory:GetItemCount(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\ncount: number","getplayeritems#GetPlayerItems":"Get all items in the player's inventory.\nexports.ox_inventory:GetPlayerItems()\nReturn:\nitems: table","getplayerweight#GetPlayerWeight":"Get the total weight of all items in the player's inventory.\nexports.ox_inventory:GetPlayerWeight()\nReturn:\ntotalWeight: number","getplayermaxweight#GetPlayerMaxWeight":"Get the maximum carry weight of the player's inventory.\nexports.ox_inventory:GetPlayerMaxWeight()\nReturn:\nmaxWeight: number","getslotidwithitem#GetSlotIdWithItem":"Get a slot id in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotId: number?","getslotsidwithitem#GetSlotsIdWithItem":"Get all slot ids in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdsWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotIds: number[]?","getslotwithitem#GetSlotWithItem":"Get data for a slot in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotData: table?","getslotswithitem#GetSlotsWithItem":"Get data all slots in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotsWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotsData: table[]?","statebags#Statebags":"","invbusy#invBusy":"Returns whether the player's inventory is currently running an action (i.e. using an item).\nCan be set to true to disable opening the inventory.\ninvBusy: boolean\nlocal invBusy = LocalPlayer.state.invBusy\nif invBusy then\n -- Do stuff when busy\nelse\n -- Do stuff when not busy\nend","disable-opening-inventory#Disable opening inventory":"LocalPlayer.state.invBusy = true","invhotkeys#invHotkeys":"Allows you to enable/disable a player's access to inventory hotkeys.\ninvHotkeys: boolean\nLocalPlayer.state.invHotkeys = false","invopen#invOpen":"Returns whether the player's inventory is currently open or not.\ninvOpen: boolean\nlocal invOpen = LocalPlayer.state.invOpen\nif invOpen then\n -- Do stuff when open\nelse\n -- Do stuff when closed\nend","canuseweapons#canUseWeapons":"Allows you to enable/disable the use of weapons for a player.\nLocalPlayer.state.canUseWeapons = false"}},"/overextended/ox_inventory/Functions/Server":{"title":"Server","data":{"setplayerinventory#setPlayerInventory":"Creates and sets the player's inventory.\nexports.ox_inventory:setPlayerInventory(player, data)\nplayer: table\nsource: number\nidentifier: string\nname: string\ngroups?: table\nsex?: string\ndateofbirth?: string\ndata?: table\nIf not provided will load player's inventory data from the db.","forceopeninventory#forceOpenInventory":"Opens an inventory using the passed data.\nForces a player to open an inventory, without usual security checks (groups, coords).\nexports.ox_inventory:forceOpenInventory(playerId, invType, data)\nplayerId: number\ninvType: string\n'player'\n'stash'\n'container'\n'drop'\n'glovebox'\n'trunk'\n'dumpster'\ndata: number or string or table\nOpen the target player's inventory.\nexports.ox_inventory:forceOpenInventory(1, 'player', 3)\nAdmin command to open a player's inventory.\nRegisterCommand('openplayerinv', function(source, args)\n exports.ox_inventory:forceOpenInventory(source, 'player', tonumber(args[1]))\nend, true)\nOpen a custom stash (created on the server with RegisterStash).\nexports.ox_inventory:forceOpenInventory(1, 'stash', 'society_police')\nOpen a stash with a specific owner.\nexports.ox_inventory:forceOpenInventory(1, 'stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })","updatevehicle#UpdateVehicle":"Update the internal reference to vehicle stashes, without triggering a save or updating the database.\nexports.ox_inventory:UpdateVehicle(oldPlate, newPlate)\noldPlate: string\nnewPlate: string","items#Items":"Returns a table of all registered items. The format is as defined in data/items.lua.Optionally takes the name of an item, returning only data for that item (getting all data is not recommended).\nexports.ox_inventory:Items(itemName)\nitemName?: string\nThe following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database.\nlocal itemNames\nESX.RegisterServerCallback('crafting:itemNames', function(source, cb)\n if not itemNames then\n itemNames = {}\n for item, data in pairs(exports.ox_inventory:Items()) do\n itemNames[item] = data.label\n end\n end\n cb(itemNames)\nend)","additem#AddItem":"Adds an item into the specified inventory.Should be used alongside CanCarryItem otherwise, the maximum weight may be exceeded.\nexports.ox_inventory:AddItem(inv, item, count, metadata, slot, cb)\ninv: table or string or number\nThe inventory's unique id, or a table with the id and owner.\nplayerId: 1\ninventoryId: gloveVGH283\n{ id = 'personallocker', owner = 'license:xxxxxx'}\nitem: string\nThe name of the item to add to the target.\ncount: number\nThe number of items to add.\nmetadata?: table or string\nA table of unique data to attach to the item object. A string will create a table with the \"type\" field.\nslot?: number\nA specific slot to add the item to. If the slot is invalid, the first available slot will be used instead.\ncb?: function(success: boolean, response?: string)\nIf used for glovebox, trunk or stash you must first check the inventory is loaded with GetInventoryReturns success, response if cb is undefined, otherwise they are used in the callback only.Possible value of the \"response\" argument, on failure:\n\"invalid_item\": the item doesn't exist\n\"invalid_inventory\": the inventory doesn't exist\n\"inventory_full\": no free slots\nExample\nlocal success, response = exports.ox_inventory:AddItem('gloveVGH283', 'bread', 4)\nif not success then\n -- if no slots are available, the value will be \"inventory_full\"\n return print(response)\nend\nprint(json.encode(response, {indent=true}))\n--[[\n {\n \"metadata\": [],\n \"label\": \"Bread\",\n \"slot\": 1,\n \"stack\": true,\n \"close\": true,\n \"name\": \"bread\",\n \"count\": 1,\n \"weight\": 150\n }\n]]","removeitem#RemoveItem":"Removes the specified item from the specified inventory.\nexports.ox_inventory:RemoveItem(inv, item, count, metadata, slot, ignoreTotal)\ninv: table or string or number\nThe inventory's unique id, or a table with the id and owner.\nplayerId: 1\ninventoryId: gloveVGH283\n{ id = 'personallocker', owner = 'license:xxxxxx'}\nitem: string\nThe name of the item to remove from the target.\ncount: number\nThe number of items to remove.\nmetadata?: table or string\nOnly remove items with matching metadata properties.\nslot?: number\nA specific slot to remove the item from. If the slot is invalid, the first available slot will be used instead.\nignoreTotal?: boolean\nRemoves as many items as possible up to count.\nReturns success: boolean, response: string?.Possible values of \"response\" on failure:\n\"invalid_item\": the item doesn't exist\n\"invalid_inventory\": the inventory doesn't exist\n\"not_enough_items\": inventory did not contain enough of the given item\nExample\n-- Removes 2 water from the glovebox for the given plate.\nlocal success = exports.ox_inventory:RemoveItem('gloveVGH283', 'water', 2)","getitem#GetItem":"Returns generic item data from the specified inventory, with the total count.\nexports.ox_inventory:GetItem(inv, item, metadata, returnsCount)\ninv: table or string or number\nitem: table or string\nCan be items array.\nmetadata?: any\nOnly returns the count of items that strictly match the given metadata.\nreturnsCount?: boolean\nIf returnsCount is set to true, the returned value will be the count based on\nhow many times the item was found.\nOtherwise returns the data related to the item and its total count found in the inventory.\nExample\nlocal item = ox_inventory:GetItem(source, 'water', nil, false)\nprint(json.encode(item, {indent=true}))\n--[[\n {\n \"consume\": 1,\n \"count\": 15,\n \"stack\": true,\n \"name\": \"water\",\n \"weight\": 500,\n \"label\": \"Water\",\n \"close\": true\n }\n]]","convertitems#ConvertItems":"Takes traditional item data and updates it to support ox_inventory.\nexports.ox_inventory:ConvertItems(playerId, items)\nplayerId: number\nitems: table\nData Conversion Example\nOld: [{\"cola\":1, \"bread\":3}]\nNew: [{\"slot\":1,\"name\":\"cola\",\"count\":1},\n{\"slot\":2,\"name\":\"bread\",\"count\":3}]","cancarryitem#CanCarryItem":"Returns true or false depending if the inventory can carry the specified item.The function checks for inventory weight and available slots.\nexports.ox_inventory:CanCarryItem(inv, item, count, metadata)\ninv: table or string or number\nitem table or string\nCan be array of items.\ncount: number\nmetadata?: table or string\nIf metadata is passed as string then metadata.type will be checked.\nExample\n-- Checks if the player calling the event can carry 3 water items\nif exports.ox_inventory:CanCarryItem(source, 'water', 3) then\n -- Do stuff if can carry\nelse\n -- Do stuff if can't carry\nend","cancarryamount#CanCarryAmount":"Returns the amount a player can hold based on available weight.\nexports.ox_inventory:CanCarryAmount(inv, item)\ninv: table or string or number\nitem: table or string\nCan be array to check multiple items.\nExample\n-- Checks how much you can carry\namountToAdd = exports.ox_inventory:CanCarryAmount(inv, 'stone')\n-- Adds the amount\nexports.ox_inventory:AddItem(inv, 'stone', amountToAdd)","cancarryweight#CanCarryWeight":"Returns if inventory can carry specified weight and free inventory weight.\nexports.ox_inventory:CanCarryWeight(inv, weight)\ninv: table or string or number\nweight: number\nExample\n-- Checks if player can carry 1000 grams.\nlocal fillAmount = 1000\nlocal canCarryWeight, freeWeight = ox_inventory:CanCarryWeight(playerId, fillAmount)\nif freeWeight == 0 then\n -- Player can't carry weight.\n return\nelseif not canCarryWeight then\n -- Modify fillAmount, because inventory can't carry specified weight\n fillAmount = freeWeight\nend\n-- Do something","setmaxweight#SetMaxWeight":"Sets the maximum weight available for an inventory.\nexports.ox_inventory:SetMaxWeight(inv, maxWeight)\ninv: table or string or number\nmaxWeight: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the max weight for player 1's inventory to 20kg.\nox_inventory:SetMaxWeight(1, 20000)","canswapitem#CanSwapItem":"Returns true if the item swap is possible based on inventory weight.\nexports.ox_inventory:CanSwapItem(inv, firstItem, firstItemCount, testItem, testItemCount)\ninv: table or string or number\nfirstItem: string\nfirstItemCount: number\ntestItem: string\ntestItemCount: number","getitemcount#GetItemCount":"Get the total item count for all items in an inventory with the given name and metadata.\nexports.ox_inventory:GetItemCount(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nitemCount: number","getitemslots#GetItemSlots":"Returns the number of slots the specified item is in, the item's total count and the remaining empty slots.\nexports.ox_inventory:GetItemSlots(inv, item, metadata)\ninv: table or string or number\nitem: table or string\nmetadata?: table","getslot#GetSlot":"Returns the specified slot data as a table.\nexports.ox_inventory:GetSlot(inv, slot)\ninv: table or string or number\nslot: number\nExample\nlocal slot = exports.ox_inventory:GetSlot(source, 1)\nprint(json.encode(slot, {indent=true}))\n--[[\n {\n \"weight\": 2000,\n \"name\": \"water\",\n \"metadata\": [],\n \"slot\": 1,\n \"label\": \"Water\",\n \"close\": true,\n \"stack\": true,\n \"count: 4\n }\n]]","getslotforitem#GetSlotForItem":"Get the slot id of an existing item matching the given data, or an empty slot.\nexports.ox_inventory:GetSlotForItem(inv, itemName, metadata)\ninv: table or string or number\nitemName: string\nmetadata: table?\nReturn:\nslotId: number?","getslotidwithitem#GetSlotIdWithItem":"Get a slot id in an inventory matching the given item name and metadata.\nexports.ox_inventory:GetSlotIdWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotId: number?","getslotidswithitem#GetSlotIdsWithItem":"Get all slot ids in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdsWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotIds: number[]?","getslotwithitem#GetSlotWithItem":"Get data for a slot in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotData: table?","getslotswithitem#GetSlotsWithItem":"Get data all slots in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotsWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotsData: table[]?","getemptyslot#GetEmptySlot":"Get the first available empty slot in an inventory.\nexports.ox_inventory:GetEmptySlot(inv)\ninv: table or string or number\nReturn:\nslotId: number?","getcontainerfromslot#GetContainerFromSlot":"Returns the inventory associated with the container linked in the slot of the given inventory.\nexports.ox_inventory:GetContainerFromSlot(inv, slotId)\ninv: table or string or number\nslotId: number\nReturn:\ncontainerData: table?","setslotcount#SetSlotCount":"Sets the number of slots available for an inventory.\nexports.ox_inventory:SetSlotCount(inv, slots)\ninv: table or string or number\nslots: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the slot count for player 1's inventory to 10.\nox_inventory:SetSlotCount(1, 10)","getinventory#GetInventory":"Returns the inventory associated with the ID (and owner if defined). Otherwise returns null.\nexports.ox_inventory:GetInventory(inv, owner)\ninv: number or table\nowner?: string or boolean\nExample\nlocal inventory = exports.ox_inventory:GetInventory('example_stash', false)\nprint(json.encode(inventory, {indent = true}))\n--[[\n {\n \"id\": \"example_stash,\n \"label\": \"Police Stash\",\n \"type\": \"stash,\n \"slots\": 50,\n \"weight\": 0,\n \"maxWeight\": 100000,\n \"owner\": false,\n ...\n }\n]]","getinventoryitems#GetInventoryItems":"Returns all slots with items in a inventory.\nexports.ox_inventory:GetInventoryItems(inv, owner)\ninv: number or table\nowner?: string or boolean\nExample\nlocal playerItems = exports.ox_inventory:GetInventoryItems(source)","inspectinventory#InspectInventory":"Inspect the player their inventory. You will not be able to modify the inventory.\nexports.ox_inventory:InspectInventory(target, source)\ntarget: number\nsource: number","confiscateinventory#ConfiscateInventory":"Clears a player's inventory and saves it to a stash.Use ReturnInventory to return the confiscated inventory back to\nthe player.\nexports.ox_inventory:ConfiscateInventory(source)\nsource: number","returninventory#ReturnInventory":"Returns the confiscated inventory back to the player.Use it alongside ConfiscateInventory.\nexports.ox_inventory:ReturnInventory(source)\nsource: number","clearinventory#ClearInventory":"Clears the specified inventory. The keep argument is either a string or an array of strings containing the name(s) of the item(s) to keep in the inventory after clearing.\nexports.ox_inventory:ClearInventory(inv, keep)\ninv: table or string or number\nkeep?: string or string[]","search#Search":"Searches an inventory for a specified item.\nexports.ox_inventory:Search(inv, search, item, metadata)\ninv: table or string or number\nsearch: string\nitem: table or string\nmetadata?: table or string\nsearch can be either 'slots' or 'count', where slots will return a table of data\nand count will return the found amount of the specified item.","registerstash#RegisterStash":"Creates a new custom stash.\nexports.ox_inventory:RegisterStash(id, label, slots, maxWeight, owner, groups, coords)\nid: string or number\nStash identifier when loading from the database.\nlabel: string\nDisplay name when inventory is open.\nslots: number\nmaxWeight: number\nowner: string or boolean or nil\nstring: Can only access the stash linked to the owner.\ntrue: Each player has a unique stash but can request other player's stashes.\nnil: Always shared.\ngroups: table\nTable of player groups (jobs) able to access the stash.\nTable of group names where the numeric value is the minimum grade required.\n{['police'] = 0, ['ambulance'] = 2}\ncoords?: vector3 or vector3[]\nThis function needs to be triggered before a player can open the stash.\nExample\nFor a use case example on this function check out the written Guide for it.","createtemporarystash#CreateTemporaryStash":"Creates a temporary stash which will be removed after some time.\nexports.ox_inventory:CreateTemporaryStash(properties)\nproperties: table\nlabel: string\nslots: number\nmaxWeight: number\nowner?: string number or boolean\nstring: Can only access the stash linked to the owner.\ntrue: Each player has a unique stash but can request other player's stashes.\nThe inventory is always shared if false or nil.\ngroups?: table\nTable of group names (e.g. jobs) where the numeric value is the minimum grade required.\n{['police'] = 0, ['ambulance'] = 2}\ncoords?: vector3\nStash can only be accessed while nearby.\nitems?: { [number]: string, [number]: number, [number]?: table }[]\nAn array of tables, containing a sequence of itemName, count, metadata.\nReturn:\ninventoryId: string\nExample\nlocal mystash = exports.ox_inventory:CreateTemporaryStash({\n label = 'mystash',\n slots = 5,\n maxWeight = 5000,\n items = {\n { 'WEAPON_MINISMG', 1 },\n { 'ammo-9', 69 },\n { 'water', 2, { label = 'Mineral water' } }\n }\n})\nTriggerClientEvent('ox_inventory:openInventory', 1, 'stash', mystash)","customdrop#CustomDrop":"Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648').\nexports.ox_inventory:CustomDrop(prefix, items, coords, slots, maxWeight, instance, model)\nprefix: string\nitems: table\nname: string\ncount: number\nmetadata?: table\ncoords: vector3\nslots?: number\nmaxWeight?: number\ninstance?: string or number\nmodel?: number\n-- Create a generic drop with a marker\nexports.ox_inventory:CustomDrop('Carcass', {\n {'meat', 5, { grade = 2, type = 'deer' }},\n {'hide', 5, { grade = 2, type = 'deer' }}\n}, coords)\n-- Create a drop with an entity\nexports.ox_inventory:CustomDrop('SMG', {\n { 'WEAPON_MINISMG', 1 },\n { 'ammo-9', 69 },\n}, GetEntityCoords(GetPlayerPed(1)), 5, 10000, nil, `w_sb_minismg`)","createdropfromplayer#CreateDropFromPlayer":"Creates a new drop with the contents of a player's inventory.\nexports.ox_inventory:CreateDropFromPlayer(playerId)\nplayerId: number\nReturn:\ndropId: string\nExample\nlocal dropId = exports.ox_inventory:CreateDropFromPlayer(1)","getcurrentweapon#GetCurrentWeapon":"Returns the player's currently equipped weapon as a table.\n-- inv: string or number\nexports.ox_inventory:GetCurrentWeapon(inv)\ninv: table or string or number","setdurability#SetDurability":"Sets durability onto the specified slot.Can be used for repairing weapons.\nexports.ox_inventory:SetDurability(inv, slot, durability)\ninv: table or string or number\nslot: number\ndurability: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the durability of the item in slot 3 of source player's inventory to 100\nox_inventory:SetDurability(source, 3, 100)\n-- Set the durability of the source player's current weapon to 100\nlocal weapon = ox_inventory:GetCurrentWeapon(source)\nif weapon then\n ox_inventory:SetDurability(source, weapon.slot, 100)\nend","setmetadata#SetMetadata":"Sets metadata on the specified slot.\nox_inventory:SetMetadata(inv, slot, metadata)\ninv: table or string or number\nslot: number\nmetadata: table\nExample\nlocal ox_inventory = exports.ox_inventory\nlocal water = ox_inventory:Search(source, 1, 'water')\nfor k, v in pairs(water) do\n print('\\n______________'..'\\n- index '..k)\n print(v.name, 'slot: '..v.slot, 'metadata: '..json.encode(v.metadata))\n water = v\n break\nend\nwater.metadata.type = 'clean'\nox_inventory:SetMetadata(source, water.slot, water.metadata)\nprint(('modified %sx water in slot %s with new metadata'):format(water.count, water.slot))"}},"/overextended/ox_inventory/Functions/Server/Hooks":{"title":"Hooks","data":{"":"Event hooks allow 3rd party resources to define new behaviour without modifying the inventory code directly.","registerhook#registerHook":"exports.ox_inventory:registerHook(eventName, function(payload) end, options)\neventName: string\npayload: table\noptions?: table\nprint?: boolean\nPrint to the console when triggering the event.\nitemFilter?: { [string]: true }\nThe event will only trigger for items defined as keys in a set.\ninventoryFilter?: string[]\nThe event will only trigger for inventories that match one of the patterns in the array.\ntypeFilter?: { [string]: true }\nThe event will only trigger for inventories with one of the provided types (e.g. 'player', 'stash')\nReturn:\nhookId: number","swapitems#swapItems":"Triggered when moving any item from one slot to another, or when \"giving\" an item.\nBy returning false, you can cancel the action and revert the inventory state.\nPayload: table\nsource: number\naction: 'move' or 'stack' or 'swap' or 'give'\nfromInventory: table or string or number\ntoInventory: table or string or number\nfromType: string\ntoType: string\nfromSlot: table\ntoSlot?: table or number\ncount: number\nExampleBlacklists \"water\" from being moved into or from gloveboxes and trunks.\nlocal hookId = exports.ox_inventory:registerHook('swapItems', function(payload)\n print(json.encode(payload, { indent = true }))\n return false\nend, {\n print = true,\n itemFilter = {\n water = true,\n },\n inventoryFilter = {\n '^glove[%w]+',\n '^trunk[%w]+',\n }\n})","openinventory#openInventory":"Payload: table\nsource: number\ninventoryId: number or string\ninventoryType: string\nTriggered when a player tries to open a secondary inventory.\nBy returning false, you can cancel the action and keep the player's inventory closed.ExampleDisables gloveboxes and trunks.\nlocal hookId = exports.ox_inventory:registerHook('openInventory', function(payload)\n print(json.encode(payload, { indent = true }))\n return false\nend, {\n print = true,\n inventoryFilter = {\n '^glove[%w]+',\n '^trunk[%w]+',\n }\n})","createitem#createItem":"Payload: table\ninventoryId?: number or string\nmetadata: table\nitem: table\ncount: number\nTriggered when an item is created, either by buying it, using AddItem, or when converting inventory data.\nBy returning a table you can modify or replace the metadata given to an item.ExampleSets the label for \"water\" to \"Mineral Water\".\nlocal hookId = exports.ox_inventory:registerHook('createItem', function(payload)\n print(json.encode(payload, { indent = true }))\n local metadata = payload.metadata\n metadata.label = 'Mineral Water'\n return metadata\nend, {\n print = true,\n itemFilter = {\n water = true\n }\n})","buyitem#buyItem":"Payload: table\nsource: number\nshopType: string\nshopId: number\ntoInventory: number\ntoSlot: number\nitemName: string\nmetadata: table\ncount: number\nprice: number\ntotalPrice: number\ncurrency?: string\nTriggered when an item is about to be purchased and can return false to prevent the transaction.ExamplePrevents players from purchasing items at General stores.\nlocal hookId = exports.ox_inventory:registerHook('buyItem', function(payload)\n print(json.encode(payload, { indent = true, sort_keys = true }))\n return false\nend, {\n print = true,\n itemFilter = {\n water = true\n\t },\n})","craftitem#craftItem":"Payload: table\nsource: number\nbenchId: number\nbenchIndex: number\nrecipe: table\ncount: number\nduration: number\ningredients: table\nname: string\nslot: number\nweight: number\ntoInventory: number\ntoSlot: number\nExamplePrevent lockpicks from being crafted by players.\nlocal hookId = exports.ox_inventory:registerHook('craftItem', function(payload)\n print(json.encode(payload, { indent = true, sort_keys = true }))\n return false\nend, {\n print = true,\n\titemFilter = {\n\t\tlockpick = true\n\t},\n})","removehooks#removeHooks":"Removes a hook created by the invoking resource with the the specified id.\nIf no id is specified then all hooks registered by the resource are removed.\nexports.ox_inventory:removeHooks(id)\nid?: number"}},"/overextended/ox_inventory/Guides/crafting":{"title":"Crafting","data":{"":"Crafting locations, items and their ingredients are defined in data/crafting.lua.","crafting-definition#Crafting definition":"{\n items = {\n {\n name = 'lockpick',\n ingredients = {\n garbage = 3,\n WEAPON_HAMMER = 0.1\n },\n duration = 5000,\n count = 3,\n metadata = { durability = 20 }\n },\n {\n name = 'garbage',\n ingredients = {\n cola = 1\n },\n metadata = { description = 'An empty soda can.', weight = 20, image = 'trash_can' }\n },\n },\n points = {\n vec3(-1147.083008, -2002.662109, 13.180260),\n },\n zones = {\n {\n coords = vec3(-1146.2, -2002.05, 13.2),\n size = vec3(3.8, 1.05, 0.15),\n distance = 1.5,\n rotation = 315.0,\n },\n },\n blip = { id = 566, colour = 31, scale = 0.8 },\n},\nitems: table\nname: string\ningredients: table\nItem ingredients can be seen in the item tooltip.\nKey-value pairs of item name and consume count\nkey - Item name.\nvalue - If 1 or above it's the consume count, if below 1 and above 0 it's the durability consume amount, if\nset to 0 then the item is required but not consumed.\nduration: number\nCrafting duration in milliseconds.\ncount: number or table (min, max)\nItem amount received upon crafting.\nIf set it to table it requires two number first one is minimum number and second one is maximum, it will generate a random number between those two numbers to add the crafted item to player.\nmetadata: table\nMetadata applied to the item being crafted.\npoints: vector3[]\nInteraction locations that will open the crafting inventory.\ngroups: table\nKey-value pairs of job name and minimum grade to access the crafting location.\n{[\"police\"] = 0, [\"ambulance\"] = 2}\nzones: table\nox_lib targeting zones used for ox_target.\ncoords: vector3\nsize: vector3\ndistance: number\nrotation: number\nblip: table\nid: number\nBlip sprite number.\ncolour: number\nscale: number"}},"/overextended/ox_inventory/Guides/metadata":{"title":"Metadata","data":{"":"Item metadata is a very powerful tool that can be used to create multiple different items out of a single item.In this guide we'll use pokemon cards as an example, but you can find an already integrated example in the inventory\nwith the garbage item.","creating-the-base-item#Creating the base item":"First of all we need to create a base item that we'll use to apply metadata to.\n['pokemon_card'] = {\n label = 'Pokemon card',\n weight = 10,\n consume = 0,\n server = {\n export = 'pokemon.pokemon_card'\n }\n}\nIn this case we define the label and the weight as well since we are going to have all the cards weigh the same, but if you\ndo not want them all to weigh the same you can leave it out and apply weight through metadata.We'll also make the item usable by calling the pokemon_card export in the pokemon resource.\nexports('pokemon_card', function(event, item, inventory, slot, data)\n if event == 'usingItem' then\n local itemSlot = exports.ox_inventory:GetSlot(inventory.id, slot)\n print(json.encode(itemSlot.metadata, {indent=true}))\n end\nend)","special-metadata-properties#Special metadata properties":"You can define any metadata property with any value you want it to have, but there are a couple metadata properties that\nhave special use cases.These properties are:\nlabel: string\nDisplay name of the item\nweight: number\nAmount the item will weigh\ndescription: string\nDescription of the item that will be displayed in the tooltip\nimage: string\nImage inside the image path that the item will use\nimageurl: string\nUrl to the image that the item will use\ntype: any\nItem type that is displayed in top right of the tooltip\nWe'll use these properties to create our pokemon cards out of the pokemon_card item that we created earlier.","creating-metadata-items#Creating metadata items":"We can easily create metadata items by defining a hook using createItem and adding it to a shop as well.\ninventory = {\n {name = 'pokemon_card', price = 300, metadata = {\n label = 'Charizard',\n description = 'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.',\n image = 'panties',\n type = 'Fire',\n hp = 78,\n attack = 84,\n defense = 78\n }}\n}\nlocal pokemonMetadata = {\n charizard = {\n label = 'Charizard',\n description = 'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.',\n image = 'panties',\n type = 'Fire',\n hp = 78,\n attack = 84,\n defense = 78\n }\n}\nlocal hookId = exports.ox_inventory:registerHook('createItem', function(payload)\n local pokemon = pokemonMetadata[payload.metadata.type]\n if not pokemon then return end\n return pokemon\nend, {\n itemFilter = {\n pokemon_card = true\n }\n})\nAs seen above when our item is usable, the metadata properties are all there and accessible through the slot.","displaying-custom-metadata-properties#Displaying custom metadata properties":"We can display our custom metadata we set on our charizard card by either using string concatenation and adding them to\nthe description or by using the displayMetadata client function.\nexports.ox_inventory:displayMetadata({\n hp = 'HP',\n attack = 'ATK',\n defense = 'DEF'\n})"}},"/overextended/ox_inventory/Guides/creatingItems":{"title":"Creating Items","data":{"defining-item-data#Defining item data":"Before being able to see or use an item in game it must first be defined.All of the items are defined in the /data/items.lua file with key, value pairs.\nKey is the name (not the label) of an item and the value is a table containing the\noptions for the item.\nItem options: table\nlabel: string\nweight?: number\nstack?: boolean\nIf set to false will not allow the item to be stacked.\ndegrade?: number\nAmount of time in minutes the item will degrade after.\ndecay?: boolean\nIf true the item will be deleted when durability reaches 0 (not instant for degraded items).\nclose?: boolean\nIf set to false does not close the inventory on item use.\ndescription?: string\nItem description that will be shown in the tooltip\nconsume?: number\nItem count needed and removed use.\nDefault: 1\nIf set to a decimal will consume durability instead (0.2 = 20%).\nallowArmed?: boolean\nIf set to true will allow use of item while armed with a weapon.\nserver?: table\nexport?: string\nclient?: table\nexport?: string\nExport to be triggered after item use.\nevent?: string\nEvent to be triggered after item use.\nstatus?: table\nAdjust esx_status values after use.\nanim?: table\nAnimation that will be played during the progress bar.\ndict: string\nclip: string\nprop?: table\nAttached prop that will be displayed during the progress bar.\nmodel: string or hash\npos: table (x, y, z)\nrot: table (x, y, z)\nbone?: number\nrotOrder?: number\ndisable?: table\nActions to be disabled during the progress bar.\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean\nusetime?: number\ncancel?: boolean\nIf set to true the player canc cancel item use.\nadd?: function(total: number)\nFunction that triggers when receiving an item\nReturns total item count as total\nremove?: function(total: number)\nFunction that triggers when removing an item\nReturns total item count as total\nbuttons?: table\nlabel: string\naction: function(slot: number)\nCallback function when button is clicked in context menu, returns item slot.","examples#Examples":"['burger'] = {\n label = 'Burger',\n weight = 220,\n stack = true,\n close = true,\n client = {\n status = { hunger = 200000 },\n anim = { dict = 'mp_player_inteat@burger', clip = 'mp_player_int_eat_burger_fp' },\n prop = {\n model = 'prop_cs_burger_01',\n pos = { x = 0.02, y = 0.02, y = -0.02},\n rot = { x = 0.0, y = 0.0, y = 0.0}\n },\n usetime = 2500,\n }\n}\nA modified burger item which includes a description.\n['burger'] = {\n label = 'Burger',\n description = 'Just what is the secret formula?'\n weight = 220,\n stack = true,\n close = true,\n client = {\n status = { hunger = 200000 },\n anim = { dict = 'mp_player_inteat@burger', clip = 'mp_player_int_eat_burger_fp' },\n prop = {\n model = 'prop_cs_burger_01',\n pos = { x = 0.02, y = 0.02, y = -0.02},\n rot = { x = 0.0, y = 0.0, y = 0.0}\n },\n usetime = 2500,\n }\n}\nA modified burger item, which gives you notifications on add and remove arguments.\n['burger'] = {\n label = 'Burger',\n weight = 220,\n stack = true,\n consume = 0,\n client = {\n add = function(total)\n if total > 0 then\n lib.notify({description = 'Nice burger you got there!'})\n end\n end,\n remove = function(total)\n if total < 1 then\n lib.notify({description = 'You lost all of your burgers!'})\n end\n end\n }\n}","making-the-item-usable#Making the item usable":"If you are using ESX, you can continue using ESX.RegisterUsableItem.\nIf you are using QBox, you can continue using exports.qbx_core:CreateUseableItem.\nUsing the built-in system is more secure and provides much more functionality.","client-callbacks#Client callbacks":"Item callbacks can be added by defining an export (recommended), or by adding it to items/client.lua.When defining item data, adding client.export will trigger an event on item use.\nThe correct formatting is export = resourceName.exportName.\nexports('bandage', function(data, slot)\n local playerPed = PlayerPedId()\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Does the ped need to heal? We can cancel the item from being used.\n if health < maxHealth then\n -- Triggers internal-code to correctly use items.\n -- This adds security, removes the item on use, adds progressbar support, and is necessary for server callbacks.\n exports.ox_inventory:useItem(data, function(data)\n -- The server has verified the item can be used.\n if data then\n SetEntityHealth(playerPed, math.min(maxHealth, math.floor(health + maxHealth / 16)))\n lib.notify({description = 'You feel better already'})\n end\n end)\n else\n -- Don't use the item\n lib.notify({type = 'error', description = 'You don\\'t need a bandage right now'})\n end\nend)","server-callbacks#Server callbacks":"A callback function can be defined on the server to handle several events (usingItem, usedItem, buyItem).\nThis can either be an export (recommended), or added to the bottom of items/server.lua.\nWhen defining item data, adding server.export will trigger an event for the actions above.\nThe correct formatting is export = resourceName.exportName.\nexports('bandage', function(event, item, inventory, slot, data)\n -- Player is attempting to use the item.\n if event == 'usingItem' then\n local playerPed = GetPlayerPed(inventory.id)\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Check if the player needs to be healed.\n if health >= maxHealth then\n TriggerClientEvent('ox_lib:notify', inventory.id, {type = 'error', description = 'You don\\'t need a bandage right now'})\n -- Returning 'false' will prevent the item from being used\n return false\n end\n return\n end\n -- Player has finished using the item.\n if event == 'usedItem' then\n return TriggerClientEvent('ox_lib:notify', inventory.id, {description = 'You feel better already'})\n end\n -- Player is attempting to purchase the item.\n if event == 'buying' then\n return TriggerClientEvent('ox_lib:notify', inventory.id, {type = 'success', description = 'You bought a bandage'})\n end\nend)","creating-container-items#Creating container items":"Like with other items the item must first be registered.When registered you can define the item as a container in /modules/items/containers.lua\nThe key for the container is the name you gave it when registering the item.\nYou can also define the number of slots, the maximum weight, blacklist and whitelist items.\nitemName:\nslots: number\nThe number represents the amount of slots\nmaxWeight: number\nThe number represents the maximum weight within the container\nblacklist:\nSupports single and multiple items\n{ 'testburger', 'testburger2' }\nwhitelist:\nSupports single and multiple items\n{ 'testburger', 'testburger2' }","example#Example":"['paperbag'] = {\n label = 'Paper Bag',\n weight = 1,\n stack = false,\n close = false,\n consume = 0\n},\nsetContainerProperties('paperbag', {\n\tslots = 5,\n\tmaxWeight = 1000,\n\tblacklist = { 'testburger' }\n})"}},"/overextended/ox_inventory/Guides/stashes":{"title":"Custom Stashes","data":{"":"We can set up custom stashes from outside the resource utilising the exported RegisterStash function.Firstly, we need to define the stashes properties.","stash-properties#Stash properties":"id: string\nUnique name to identify the stash in the database.\nlabel: string\nDisplay name when viewing the stash.\nslots: number\nNumber of slots the stash will have.\nweight: number\nMaximum weight of the stash inventory.\nowner?: string or boolean\ntrue: Each player has their own unique stash, but can request to open the stash of another player\nfalse: Only a single stash exists and is shared between all players\nstring: The stash explicitly belongs to the given owner, usually a player identifier\ngroups?: table\nKey-value pairs of job name and minimum grade to be able to access the stash. ({[\"police\"] = 0, [\"ambulance\"] = 2})\nname: string\ngrade: number\ncoords?: vector3 or table\nYou can set the stash coordinates to prevent the stash from being opened if the player isn't close enough.\nVector or table containing the coordinates of the stash.","example#Example":"Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)\n-- Server\nlocal stash = {\n id = '42wallabyway',\n label = '42 Wallaby Way',\n slots = 50,\n weight = 100000,\n owner = 'char1:license'\n}\nAddEventHandler('onServerResourceStart', function(resourceName)\n if resourceName == 'ox_inventory' or resourceName == GetCurrentResourceName() then\n exports.ox_inventory:RegisterStash(stash.id, stash.label, stash.slots, stash.weight, stash.owner)\n end\nend)\n-- Client\nexports.ox_inventory:openInventory('stash', {id='42wallabyway', owner=property.owner})\nThe following sample is based on esx_property's db data.\n-- Server\nlocal properties\nMySQL.query('SELECT * FROM `properties`', {}, function(result)\n properties = result\nend)\nRegisterNetEvent('ox:loadStashes', function(id)\nlocal stash = properties[id]\n if stash then\n -- id: 1, name: WhispymoundDrive, label: 2677 Whispymound Drive, coords: {\"x\":118.748,\"y\":566.573,\"z\":175.697}\n ox_inventory:RegisterStash(stash.name, stash.label, 50, 100000, true, false, json.encode(stash.room_menu))\n end\nend)\n-- Client\nlocal ox_inventory = exports.ox_inventory\nif ox_inventory:openInventory('stash', property.id) == false then\n TriggerServerEvent('ox:loadStashes')\n ox_inventory:openInventory('stash', property.id)\nend","example-resource#Example Resource":"We put together an example resource showcasing how to properly utilise the stash API:"}},"/overextended/ox_inventory/issues":{"title":"Common Issues","data":{"ui-has-not-been-built#UI has not been built":"Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js.We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from here.\nMake sure you download the ox_inventory.zip file as that one contains the bundled files and others are raw source code.If in case you wanted to edit the inventory UI you would have to build these files yourself.\nTo do so please read our Installation guide.","no-such-export--in-resource-ox_inventory#No such export * in resource ox_inventory":"There are several likely causes for this \"issue\".\nAn error occurred while starting ox_inventory or one of its dependencies (e.g. ox_lib).\nThe resource trying to use the export (e.g. esx_addoninventory) is being started before ox_inventory.\nYou're literally trying to call an export that does not exist, which is a you issue.","stashes--trunks-are-not-saved-at-server-restart#Stashes / trunks are not saved at server restart":"Stopping a server or \"restarting\" it does not trigger any events or allow for saving.\nInventories are saved at a 5 minute interval.\ntxAdmin scheduled restarts and shutdowns will trigger a save.\nThe saveinv command can be used manually or triggered in the console.\nAll inventories are saved when the number of online players hits 0."}},"/overextended/ox_lib":{"title":"Ox Lib","data":{"":"A standalone library for providing easily reusable code as importable modules and exports.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_lib.git\ncd ox_lib/web\npnpm i\npnpm build","config#Config":"Resource configuration is handled using convars.\n# https://v6.mantine.dev/theming/colors/#default-colors\nsetr ox:primaryColor blue\nsetr ox:primaryShade 8\nsetr ox:userLocales 1 # Allow users to select their locales using /ox_lib\nYou'll also need to grant ace permissions to the resource.\nadd_ace resource.ox_lib command.add_ace allow\nadd_ace resource.ox_lib command.remove_ace allow\nadd_ace resource.ox_lib command.add_principal allow\nadd_ace resource.ox_lib command.remove_principal allow","usage#Usage":"To enable the library inside of your resource just add @ox_lib/init.lua as a shared_script in your fxmanifest.lua file.\nshared_scripts {\n '@ox_lib/init.lua',\n}\nOr if the library is the only shared script you use you can do:\nshared_script '@ox_lib/init.lua'\nYou can specify modules to import from inside your fxmanifest.lua, or load them dynamically.\nox_libs {\n 'locale',\n 'math',\n 'table',\n}\nWhen ox_lib has been imported into your script, it will make several new globals available:\nlib for dynamically importing ox_lib modules into your script.\nrequire for importing modules from your own script.\ncache see here.\nNpm package for the lib does not support all the functions that are available for Lua.All supported functions are located inside the resource folder in the lib.\nYou can get the npm package here.Usage:\nYou can either import the whole library object which contains all the functions for that scope (client/server/shared) or you can deconstruct it and import the functions you find needed at the time.\nimport lib from '@overextended/ox_lib/server';\nimport { versionCheck } from '@overextended/ox_lib/server';\nYou can now use the library functions inside of your resource, check the rest of the documentation to see how to utilise them.","using-icons-for-interface-functions#Using icons for interface functions":"The icon library used is Font Awesome 6.0, if for the icon you define only a string the default icon type will be solid.\nIf you want to use a different icon type, i.e apple as a brand, you need to define icon as a table (array) with the first value being the icon type (fas, far, fab) as a string, and the second being the icon name.\nicon = {'fab', 'apple'}\nicon: ['fab', 'apple'];","building-the-ui#Building the UI":"If you wish to edit any of the UI elements you will need to download the source code, edit what you need and then compile it.\nDO NOT de-bundle and un-minify the release CSS and JS files to edit them.\nRequirements:\nNode.js (LTS)\npnpm\nInstalling Node.js:\nDownload the LTS version of Node.js.\nGo through the install and make sure you install all of the features.\nRun 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.\nInstalling pnpm:\nAfter installing NodeJS you can install pnpm by running npm install -g pnpm.\nBuilding the UI:\ncd into the web directory.\nrun pnpm i to install the dependencies.\nrun pnpm build to build the source files.\nWhen working in the browser you can run pnpm start, which supports hot reloads meaning that\nyou will see your changes after saving your file.If you want to work in game you can run pnpm start:game which writes changes to disk, so\nthe only thing you have to do is restart the resource for it take affect."}},"/overextended/ox_lib/Modules/ACL/Server":{"title":"Server","data":{"":"Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.\nRefer to Basic Aces & Principals overview/guide for more information.","libaddace#lib.addAce":"Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing false sets the permission to 'deny'.\nlib.addAce(principal, ace, allow)\nlib.addAce('group.admin', 'command.say')\nimport lib from '@overextended/ox_lib/server'\nlib.addAce(principal, ace, allow)\nlib.addAce('group.admin', 'command.say')\nprincipal: string\nace: string\nallow: boolean","libremoveace#lib.removeAce":"Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing false sets the permission to 'deny'.\nlib.removeAce(principal, ace, allow)\nlib.removeAce('group.admin', 'command.say')\nimport lib from '@overextended/ox_lib/server'\nlib.removeAce(principal, ace, allow)\nlib.removeAce('group.admin', 'command.say')\nprincipal: string\nace: string\nallow: boolean","libaddprincipal#lib.addPrincipal":"Assigns a principal to a parent principal. Children inherit permissions from the parent.\nlib.addPrincipal(child, parent)\nlib.addPrincipal('player.1', 'group.moderator')\nimport lib from '@overextended/ox_lib/server'\nlib.addPrincipal(child, parent)\nlib.addPrincipal('player.1', 'group.moderator')\nchild: string\nparent: string","libremoveprincipal#lib.removePrincipal":"Removes a principal from a parent principal.\nlib.removePrincipal(child, parent)\nlib.removePrincipal('player.1', 'group.moderator')\nimport lib from '@overextended/ox_lib/server'\nlib.removePrincipal(child, parent)\nlib.removePrincipal('player.1', 'group.moderator')\nchild: string\nparent: string"}},"/overextended/ox_lib/Modules/AddCommand/Server":{"title":"Server","data":{"":"Registers commands and simplifies argument validation, permissions, and chat suggestions.\nlib.addCommand(commandName, properties, cb)\ncommandName: string or string[]\nproperties: table or false\nhelp?: string\nrestricted?: boolean or string or string[]\nparams?: table[]\nname: string\nhelp?: string\ntype?: 'number' or 'playerId' or 'string' or 'longString'\noptional?: boolean\nlib.addCommand('giveitem', {\n help = 'Gives an item to a player',\n params = {\n {\n name = 'target',\n type = 'playerId',\n help = 'Target player\\'s server id',\n },\n {\n name = 'item',\n type = 'string',\n help = 'Name of the item to give',\n },\n {\n name = 'count',\n type = 'number',\n help = 'Amount of the item to give, or blank to give 1',\n optional = true,\n },\n {\n name = 'metatype',\n help = 'Sets the item\\'s \"metadata.type\"',\n optional = true,\n },\n },\n restricted = 'group.admin'\n}, function(source, args, raw)\n local item = Items(args.item)\n if item then\n Inventory.AddItem(args.target, item.name, args.count or 1, args.metatype)\n end\nend)"}},"/overextended/ox_lib/Modules/AddKeybind/Client":{"title":"Client","data":{"":"Registers keybinds and simplifies interactions of the keybinds.","ckeybind-class#CKeybind Class":"A table representing a keybind with the following properties.\nname: string\ndescription: string\ncurrentKey: string\nKey that the current user has this keybind set to\ndisabled: boolean\nWhether or not the keybind is currently disabled\nhash: number\nInternal hash of the keybind that is used to reference it within the game itself\ndefaultKey?: string\nDefault key to set the keybind to for new players\nNOTE: Changing this will not change the key for existing players\ndefaultMapper?: string\nSee Input Mapper Ids for more information\nsecondaryKey?: string\nAn optional secondary keybind.\nsecondaryMapper?: string\nAn optional mapper for the secondary key, otherwise using the default mapper.\ndisable: function(self: CKeybind, disable: boolean)\nBuilt-in function to enable / disable a keybind\nonPressed?: function(self: CKeybind)\nUser-defined function triggered on keybind press\nonReleased?: function(self: CKeybind)\nUser-defined function triggered on keybind release","libaddkeybind#lib.addKeybind":"lib.addKeybind(data)\ndata: table\nname: string\ndescription: string\ndefaultKey?: string\nDefault: None\ndefaultMapper?: string\nDefault: keyboard\nsecondaryKey?: string\nsecondaryMapper?: string\ndisabled?: boolean\nWhether or not the keybind should be disabled by default\nonPressed?: function(self: CKeybind)\nFunction triggered on keybind press\nonReleased?: function(self: CKeybind)\nFunction triggered on keybind release\nlocal keybind = lib.addKeybind({\n name = 'respects',\n description = 'press F to pay respects',\n defaultKey = 'F',\n onPressed = function(self)\n print(('pressed %s (%s)'):format(self.currentKey, self.name))\n end,\n onReleased = function(self)\n print(('released %s (%s)'):format(self.currentKey, self.name))\n end\n})","enable--disable-keybinds#Enable / Disable Keybinds":"Keybinds can be enabled / disabled by using the disable method.\nkeybind:disable(true) -- disables the keybind\nkeybind:disable(false) -- enables the keybind"}},"/overextended/ox_lib/Modules/Array/Shared":{"title":"Shared","data":{"libarray#lib.array":"A table used as a prototype for the Array class. Functions can be used as class methods or standard functions.","libarraynew#lib.array:new":"Constructs instance of Array containing the given elements.\nlib.array:new(...)\n...: any\nReturns:\narr: Array","libisarray#lib.isArray":"Determines if the given table is an instance of Array or an array-like table.\nlib.array.isArray(tbl)\ntbl: table\nReturns:\nisArray: boolean","libarraymerge#lib.array.merge":"Combines the elements of two arrays into a new array.\na: Array\nb: Array\nlib.array.merge(a, b)\nReturns:\nArray","libarrayevery#lib.array.every":"Tests if all elements in an array succeed in passing the provided test function.\narr: Array\ntestFn: function\nlib.array.every(arr, testFn)\nReturns:\nsuccess: boolean","libarrayfilter#lib.array.filter":"Creates a new array containing the elements from an array that pass the provided test function.\narr: Array\ntestFn: function\nlib.array.filter(arr, testFn)\nReturns:\narr: Array","libarrayfind#lib.array.find":"Returns the first element of an array the passes the provided test function.\narr: Array\ntestFn: function\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.find(arr, function(element) end, reverse)\nReturns:\nelement: unknown","libarrayfindindex#lib.array.findIndex":"Returns the index of the first element of an array the passes the provided test function.\narr: Array\ntestFn: function\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.findIndex(arr, function(element) end, reverse)\nReturns:\nindex: number","libarrayindexof#lib.array.indexOf":"Returns the index of the first element of an array the matches the provided value.\narr: Array\nvalue: any\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.indexOf(arr, value, reverse)\nReturns:\nindex: number","libarrayforeach#lib.array.forEach":"Executes the provided function for each element in an array.\narr: Array\ncb: function\nlib.array.forEach(arr, function(element) end, reverse)\nReturns:\nindex: number","libarrayjoin#lib.array.join":"Concatenates all elements of an array into a string, separated by commas or the specified seperator.\narr: Array\nseperator?: string\nlib.array.join(arr, seperator)\nReturns:\nstr: string","libarraypop#lib.array.pop":"Removes the last element from an array and returns the value.\narr: Array\nlib.array.pop(arr)\nReturns:\nelement: unknown","libarraypush#lib.array.push":"Adds the given elements to the end of an array and returns the new array length.\narr: Array\n...: any\nlib.array.push(arr, ...)\nReturns:\nlength: number","libarrayshift#lib.array.shift":"Removes the first element from an array and returns the value.\narr: Array\nlib.array.shift(arr)\nReturns:\nelement: unknown","libarrayreduce#lib.array.reduce":"The \"reducer\" function is applied to every element in an array, with the previous result serving as the accumulator.\nIf an initial value is provided it's used as the accumulator for the first index; otherwise iteration starts at the second index, with the first index as the accumulator.\narr: Array\nreducer: function\ninitialValue?: any\nlib.array.reduce(arr, function(accumulator, element, index) end)\nReturns:\naccumulator: unknown"}},"/overextended/ox_lib/Modules/Cache/Client":{"title":"Client","data":{"":"Values and cache functionality available to the client, in addition to the shared values.","default-values#Default values":"ped: number\nplayer entity id\nplayerId: number\nplayer id\nserverId: number\nplayer server id\nweapon: number or false\ncurrent weapon hash\nvehicle: number or false\nvehicle entity id\nseat: number or false\nvehicle seat index\ncoords: vector3\ncurrent player coords\nonly populated if using zones or points\ncannot be listened for with lib.onCache\nmount: number or false (RedM only)\nmount entity id","liboncache#lib.onCache":"Register an event handler that is triggered when the cached value is updated.\nlib.onCache(key, function(value) end)\nkey: string\nped\nvehicle\nseat\nweapon\nmount (RedM only)\nvalue: any\nlib.onCache('vehicle', function(value)\n print('old vehicle:', cache.vehicle)\n print('new vehicle:', value)\nend)\nimport { onCache } from '@overextended/ox_lib/client';\nonCache(key, (value) => {});\nkey: string\nped\nvehicle\nseat\nweapon\nmount (RedM only)\nvalue: any\nimport { cache, onCache } from '@overextended/ox_lib/client';\nlib.onCache('vehicle', (value) => {\n console.log('old vehicle:', cache.vehicle);\n console.log('new vehicle:', value);\n});"}},"/overextended/ox_lib/Modules/Cache/Shared":{"title":"Shared","data":{"":"A table containing cached function results, which may be constants or infrequently changed.","default-values#Default values":"resource: string\nthe value returned by GetCurrentResourceName.\ngame: 'fxserver' | 'fivem' | 'redm'\nthe value returned by GetGameName.","adding-new-cached-values#Adding new cached values":"Values can be cached permanently, or added with a timeout.\ncache(key, func, timeout)\nkey: string\na unique name to store and access the cached state.\nfunc: function\na function to call when the cache is invalidated/empty.\ntimeout?: number\na timer in milliseconds to clear the cached state.\nlocal i = 0\nwhile true do\n Wait(1000)\n i += 1\n print(cache('test', function() return i end, 5000))\nend\n-- output:\n> 1\n> 1\n> 1\n> 1\n> 1\n> 6\n> 6\n> 6"}},"/overextended/ox_lib/Modules/Callback/JavaScript/Server":{"title":"Server","data":{"trigger-client-callback#Trigger Client Callback":"","triggerclientcallback#triggerClientCallback":"triggerClientCallback(eventName, playerId, ...args)\neventName: string\nplayerId: number\n...args: any","register-server-callback#Register Server Callback":"","onclientcallback#onClientCallback":"onClientCallback(eventName, cb)\neventName: string\ncb: function(playerId: number, ...args: any)","usage-example#Usage Example":"For this example to fully make sense take a look at the example on the client page for the callbacks.\nimport { onClientCallback, triggerClientCallback } from '@overextended/ox_lib/server';\nonClientCallback('test:server', (playerId, ...args: [number, null, number, null, null, number]) => {\n console.log('onClientCallback', playerId, ...args);\n return {\n serverValue: 3000,\n };\n});\nsetTimeout(async () => {\n const response = await triggerClientCallback<{ clientValue: string }>('test:client', 1, [1, null, 3, null, null, 6])\n if (!response) return;\n console.log(response.clientValue);\n console.log('Response from client', response);\n}, 100);"}},"/overextended/ox_lib/Modules/Callback/JavaScript/Client":{"title":"Client","data":{"trigger-server-callback#Trigger Server Callback":"","triggerservercallback#triggerServerCallback":"triggerServerCallback(eventName, delay, ...args)\neventName: string\ndelay: number or null\nAmount of time until this callback can be triggered again\n..args: any","register-client-callback#Register Client Callback":"","onservercallback#onServerCallback":"onServerCallback(eventName, cb)\neventName: string\ncb: function(...args: any)","usage-example#Usage Example":"For this example to fully make sense take a look at the example on the server page for the callbacks.\nimport { onServerCallback, triggerServerCallback } from '@overextended/ox_lib/client'\nonServerCallback('test:client', (...args: [number, number, string]) => {\n console.log(args);\n return {\n clientValue: 'Value from the client',\n };\n});\nsetTimeout(async () => {\n const args = [1, null, 3, null, null, 6];\n const response = await triggerServerCallback<{ serverValue: number }>('test:server', 1, args);\n if (!response) return;\n console.log('Response from server', response);\n}, 100);"}},"/overextended/ox_lib/Modules/Callback/Lua/Client":{"title":"Client","data":{"trigger-server-callback#Trigger Server Callback":"","libcallback#lib.callback":"The response is handled in a separate coroutine.\nlib.callback(name, delay, cb, ...)\nname: string\ndelay: number or false\nAmount of time until this callback can be triggered again\ncb: function\n...: any\nlib.callback('ox_inventory:getItemCount', false, function(count)\n print(count)\nend, 'water', {type = 'fresh'})","libcallbackawait#lib.callback.await":"The current coroutine is yielded until a response is received.\nlib.callback.await(name, delay, ...)\nname: string\ndelay: number or false\nAmount of time until this callback can be triggered again\n...: any\nlocal count = lib.callback.await('ox_inventory:getItemCount', false, 'water', {type = 'fresh'})\nprint(count)","register-client-callback#Register Client Callback":"","libcallbackregister#lib.callback.register":"Register an event handler for responding to server requests.\nlib.callback.register(name, cb)\nname: string\ncb: function\nlib.callback.register('ox:getNearbyVehicles', function(radius)\n local nearbyVehicles = lib.getNearbyVehicles(GetEntityCoords(cache.ped), radius, true)\n return nearbyVehicles\nend)"}},"/overextended/ox_lib/Modules/Callback/Lua/Server":{"title":"Server","data":{"trigger-client-callback#Trigger Client Callback":"","libcallback#lib.callback":"The response is handled in a separate coroutine.\nlib.callback(name, playerId, cb, ...)\nname: string\nplayerId: number\ncb: function\n...: any\nlib.callback('ox:getNearbyVehicles', source, function(vehicles)\n for i = 1, #vehicles do\n DeleteEntity(entity)\n end\nend, args.radius)","libcallbackawait#lib.callback.await":"The current coroutine is yielded until a response is received.\nlib.callback.await(name, playerId, ...)\nname: string\nplayerId: number\n...: any\nlocal vehicles = lib.callback.await('ox:getNearbyVehicles', source, args.radius)\nfor i = 1, #vehicles do\n DeleteEntity(entity)\nend","register-server-callback#Register Server Callback":"","libcallbackregister#lib.callback.register":"Register an event handler for responding to client requests.\nlib.callback.register(name, cb)\nname: string\ncb: function\nlib.callback.register('ox_inventory:getItemCount', function(source, item, metadata, target)\n local inventory = target and Inventory(target) or Inventory(source)\n return (inventory and Inventory.GetItem(inventory, item, metadata, true)) or 0\nend)"}},"/overextended/ox_lib/Modules/Class/Shared":{"title":"Shared","data":{"classes#Classes":"A class is a template for creating objects with set attributes and behaviours.\nThough Lua does not typically support object-oriented programming, it is possible to simulate it with metatables.\nOur implementation of classes are loosely based on JavaScript.","inheritance#Inheritance":"Classes can inherit attributes and behaviors from other classes, similar to how instances inherit from their parent class.When specifying a \"super\" class in a class declaration, you create a derived or \"sub\" class. This subclass inherits both fields and methods from its parent. This inheritance extends across multiple levels of derived classes, enabling class attributes to be shared throughout the class hierarchy.","encapsulation#Encapsulation":"Encapsulation is the practice of bundling data (attributes) and methods (behaviors) within a class.This practice helps to organize related functionalities and prevents outside interference with the internal workings of the class. By encapsulating these elements, we promote modularity, maintain data integrity, and control how data is accessed and manipulated within a program.","oxclass#OxClass":"OxClass is a blueprint used for all classes created with lib.class. It provides some some basic attributes and behaviours shared by all classes.","attributes#Attributes":"__name: string\nA protected field representing the name of the class.\nconstructor?: function\nA protected method used to instantiate a new object inheriting from a class.\nCalled by class:new(...) if class:constructor() exists.\nprivate?: table\nA protected field which holds all private data in a class.\nPrivate data cannot be accessed outside of class methods, enforcing security and data integrity.\nsuper?: class\nA protected method referencing the constructor of a superclass.\nMust be called inside a class constructor when instantiating a class.","libclass#lib.class":"This function allows you to define a new class, optionally inheriting from a parent or \"super\" class.\nlocal MyClass = lib.class(name, super)","parameters#Parameters":"name: string\nsuper?: table\nSets the new class as a subset of the super class.","returns#Returns":"table\nThe newly created class.","example#Example":"---@class Person : OxClass\n---@field name string\nlocal Person = lib.class('Person')\nfunction Person:constructor(name)\n print('calling Person constructor for', name)\n self.name = name\nend\n-- Professor Class (extends Person)\n---@class Professor : Person\n---@field teaches string\nlocal Professor = lib.class('Professor', Person)\nfunction Professor:constructor(name, teaches)\n print('calling Professor constructor for', name)\n self:super(name)\n self.teaches = teaches\nend\nfunction Professor:introduceSelf()\n print((\"My name is %s, and I will be your %s professor.\"):format(self.name, self.teaches))\nend\nfunction Professor:grade(paper)\n local grade = math.random(1, 4)\n print(grade)\nend\nCreateThread(function()\n local walter = Professor:new('Walter', 'Chemistry')\n walter:introduceSelf()\n walter:grade('my paper')\nend)\n-- Student Class (extends Person)\n---@class Student : Person\n---@field private private { year: number }\nlocal Student = lib.class('Student', Person)\n---@param name string\n---@param year number\nfunction Student:constructor(name, year)\n print('calling Student constructor for', name)\n self:super(name)\n self.private.year = year\nend\nfunction Student:introduceSelf()\n print((\"Hi! I'm %s, and I'm in year %s.\"):format(self.name, self.private.year))\nend\n---@param year number\nfunction Student:setYear(year)\n self.private.year = year\nend\nCreateThread(function()\n local jesse = Student:new('Jesse', 2)\n jesse:introduceSelf() -- Hi! I'm Jesse, and I'm in year 2.\n jesse:setYear(3)\n jesse:introduceSelf() -- Hi! I'm Jesse, and I'm in year 3.\n print(jesse.private.year) -- nil\n print(getmetatable(jesse.private)) -- private\n jesse.private.year = 4 -- error\nend)"}},"/overextended/ox_lib/Modules/Cron/Server":{"title":"Server","data":{"":"A Lua implementation of cron, allowing tasks to be scheduled to run periodically at fixed times, dates, and intervals.","cron-expression#Cron expression":"A string containing five values separated by white spaces, representing a set of times to execute a task.\nField\tValid values\tMinutes\t0-59\tHours\t0-23\tDay of month\t1-31\tMonth\t1-12 or jan-dec\tDay of week\t1-7 or sun-sat\t\nNote: Day of the week is set to match os.date and starts at 1, unlike the cron-standard which starts at 0.","-wildcards#* Wildcards":"Represents all values, e.g. * * * * * will run every minute, or * * * * 1 will run every minute on Sunday.","-lists#, Lists":"Commas can be used to create a list of values, e.g. * * * * sun,mon,tue will run every minute on Sunday, Monday, and Tuesday.","--ranges#- Ranges":"Dashes define a range of values, e.g. 10-30 * * * * will start running the task at the 10th minute, and every minute until the 30th minute.","-steps#/ Steps":"Slashes can be used for step values, e.g. * */4 * * * will run every 4 hours and is shorthand for * 0,4,8,12,16,20 * * *.","functions#Functions":"","libcronnew#lib.cron.new":"Creates a new cronjob, scheduling a task to run at fixed times or intervals.\nlib.cron.new(expression, job, options)\nexpression: string\nA cron expression such as * * * * * representing minute, hour, day, month, and day of the week\njob: fun(task: OxTask, date: osdate)\noptions?: table\ndebug?: boolean\nReturn:\ntask: OxTask"}},"/overextended/ox_lib/Modules/DisableControls/Client":{"title":"Client","data":{"":"A centralized way to track and disable game controls.","libdisablecontrols#lib.disableControls":"Call on frame to disable all stored controls.\nlib.disableControls()","libdisablecontrolsadd#lib.disableControls:Add":"Adds the specified control(s) to the stored list.\nIf the control is already being tracked, the stored counter will be incremented.\nlib.disableControls:Add(...)\nvararg: number or number[]\nControl(s) to add a stored count of","libdisablecontrolsremove#lib.disableControls:Remove":"Removes the specified control(s) from the stored list.\nIf the stored counter for a given control is greater than one, the stored counter will be decremented.\nlib.disableControls:Remove(...)\nvararg: number or number[]\nControl(s) to remove a stored count of","libdisablecontrolsclear#lib.disableControls:Clear":"Clears the stored counter(s) for the specified control(s).\nlib.disableControls:Clear(...)\nvararg: number or number[]\nControl(s) to clear out from being tracked"}},"/overextended/ox_lib/Modules/GetClosestObject/Shared":{"title":"Shared","data":{"libgetclosestobject#lib.getClosestObject":"Get the object handle and coords of the closest object to a set of coordinates.\nlib.getClosestObject(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nobject?: number\ncoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestPed/Shared":{"title":"Shared","data":{"libgetclosestped#lib.getClosestPed":"Get the ped handle and coords of the closest ped to a set of coordinates.\nlib.getClosestPed(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nped?: number\ncoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestPlayer/Shared":{"title":"Shared","data":{"libgetclosestplayer#lib.getClosestPlayer":"Get the player id, ped handle, and coords of the closest player to a set of coordinates.\nlib.getClosestPlayer(coords, maxDistance, includePlayer)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayer?: boolean\nWhether or not to include the current player. Ignored on the server.\nDefault: false\nReturn:\nplayerId?: number\nplayerPed?: number\nplayerCoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestVehicle/Shared":{"title":"Shared","data":{"libgetclosestvehicle#lib.getClosestVehicle":"Get the vehicle handle and coords of the closest vehicle to a set of coordinates.\nlib.getClosestVehicle(coords, maxDistance, includePlayerVehicle)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayerVehicle?: boolean\nWhether or not to include the player's current vehicle. Ignored on the server.\nDefault: false\nReturn:\nvehicle?: number\nvehicleCoords?: vector3"}},"/overextended/ox_lib/Modules/GetNearbyObjects/Shared":{"title":"Shared","data":{"libgetnearbyobjects#lib.getNearbyObjects":"Get the object handle and coords of all objects within range of a set of coordinates.\nlib.getNearbyObjects(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nobjects: { object: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyPeds/Shared":{"title":"Shared","data":{"libgetnearbypeds#lib.getNearbyPeds":"Get the ped handle and coords of all peds within range of a set of coordinates.\nlib.getNearbyPeds(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\npeds: { ped: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared":{"title":"Shared","data":{"libgetnearbyvehicles#lib.getNearbyVehicles":"Get the vehicle handle and coords of all vehicles within range of a set of coordinates.\nlib.getNearbyVehicles(coords, maxDistance, includePlayerVehicle)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayerVehicle?: boolean\nWhether or not to include the player's current vehicle. Ignored on the server.\nDefault: false\nReturn:\nvehicles: { vehicle: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared":{"title":"Shared","data":{"libgetnearbyplayers#lib.getNearbyPlayers":"Get the player id, ped handle, and coords of all players within range of a set of coordinates.\nlib.getNearbyPlayers(coords, maxDistance, includePlayer)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayer?: boolean\nWhether or not to include the current player. Ignored on the server.\nDefault: false\nReturn:\nplayers: { id: number, ped: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/Interface":{"title":"Interface","data":{"":"If you wish to change the primary colour for the UI to better match your server's theme you can do so easily through the available convars.They don't require you to build the UI, just restart the resource.Convars:\nsetr ox:primaryColor blue\nsetr ox:primaryShade 8\nChanging the primary colour will change the colour in elements such as the progress bar/circle, skill check, radial menu center button and hover,\ndialog confirm buttons, input field focus, and more.You can find the full list of preset colours and shades here:https://v6.mantine.dev/theming/colors/#default-colorsIf you wish to create your own pallete I suggest following the guide on that page.\nKeep in mind doing so will require you to download the source code and build the UI."}},"/overextended/ox_lib/Modules/Interface/Client/alert":{"title":"Alert Dialog","data":{"":"Simple alert dialog that can display a message to the player.\nReturns whether the player pressed the confirm button or canceled the dialog.","libalertdialog#lib.alertDialog":"lib.alertDialog(data)\nTriggerClientEvent('ox_lib:alertDialog', source, data)\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client';\nlib.alertDialog(data);\ndata: table (object)\nheader: string\nDialog title.\ncontent: string\nDialog body content, supports markdown.\ncentered?: boolean\nCenters the dialog vertically and horizontally.\ncancel?: boolean\nDisplays a cancel button (ESC is still available if this is not defined).\nsize?: 'xs' or 'sm' or 'md' or 'lg' or 'xl'\noverflow?: boolean\nlabels?: table\nAllows you to define the displayed labels for cancel and/or confirm buttons.\ncancel?: string\nconfirm?: string\nReturns 'confirm' if the player pressed the confirm button, otherwise if the player pressed the cancel button\nor has exited the dialog with ESC the return will be 'cancel'.","libclosealertdialog#lib.closeAlertDialog":"Force closes the active alert dialog and sets its return data as nil\nlib.closeAlertDialog()\nimport lib from '@overextended/ox_lib/client';\nlib.closeAlertDialog();","example#Example":"local alert = lib.alertDialog({\n header = 'Hello there',\n content = 'General Kenobi \\n Markdown support!',\n centered = true,\n cancel = true\n})\nprint(alert)\nimport lib from '@overextended/ox_lib/client';\nconst alert = await lib.alertDialog({\n header: 'Hello there',\n content: 'General Kenobi \\n Markdown support!',\n centered: true,\n cancel: true,\n});\nconsole.log(alert);"}},"/overextended/ox_lib/Modules/Interface/Client/context":{"title":"Context Menu","data":{"libregistercontext#lib.registerContext":"Used for registering a context menu.\nlib.registerContext(context)\nimport lib from '@overextended/ox_lib/client';\nlib.registerContext(context);\nid: string\nUnique menu identifier, will be used to open the menu.\ntitle: string\nTitle display in the menu; has markdown support.\nmenu?: string\nMenu identifier - if defined there will be a back arrow next to the menu title that will take you to the menu you defined.\ncanClose: boolean\nIf set to false the user won't be able to exit the menu without pressing one of the buttons.\nonExit?: function\nFunction that will be ran when the user closes their context menu with ESC.\nonBack?: function\nFunction that will be ran when the user presses the back button to return to a previous menu.\noptions: table (object or array)\nitem: key (string) or table (object)\ntitle?: string\nIf not using keys then sets the title for the button; has markdown support.\ndisabled?: boolean\nGrays out the button and makes it unclickable.\nreadOnly? boolean\nRemoves all hover and active styles and disables onSelect if it's defined.\nmenu?: string\nMenu identifier that the button will take you to, when defined an arrow.\nonSelect: function\nFunction that's ran when the button is clicked.\nicon?: string\nFontAwesome icon that will be displayed on the left side, works the same as notification and textui icons.\nAlso supports image urls, png and webp files but are not recommend to use over font awesome icons.\niconColor?: string\nColour of the displayed icon.\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nprogress?: number\nAdds a progress bar filled to this percentage\ncolorScheme?: string\nSets the color scheme of the progress bar. Current options can be found here:\nhttps://v6.mantine.dev/theming/colors/#default-colors\nFor example: blue or teal\narrow?: boolean\nShows an arrow on the right side like menu does, useful when you are opening a menu from an event. Can be set to false to hide it.\ndescription?: string\nDescription that will appear under the button title that is defined as a key; has markdown support.\nimage?: string\nUrl to an image that will be displayed in the button's metadata.\nmetadata?: string[] or object or array\nInformation that will display on the side upon hovering a button.\nlabel: string\nvalue: any\nprogress?: number\nDisplay a progress bar in the metadata.\ncolorScheme?: string\nSame as above.\nevent?: string\nEvent that the button is going to trigger.\nserverEvent?: string\nServer event that the button is going to trigger.\nargs?: any\nArguments that will be sent to the events or onSelect function.\nYou can register as many context menus in one lib.registerContext function\nas you'd like.The menu can be either in the order you write it in, or sorted alphabetically.\nTo sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, otherwise not using keys and instead using tables will make the menu be in the order you define it as.","libshowcontext#lib.showContext":"Opens a registered context menu by its id.\nlib.showContext(id)\nimport lib from '@overextended/ox_lib/client';\nlib.showContext(id);\nid: string","libhidecontext#lib.hideContext":"Hides any currently visible context menu.\nlib.hideContext(onExit)\nimport lib from '@overextended/ox_lib/client';\nlib.hideContext(onExit);\nonExit: boolean\nDefines whether the onExit function for the menu should be ran or not.","libgetopencontextmenu#lib.getOpenContextMenu":"Returns the id of the currently open context menu.If no context menu is open returns nil.\nlib.getOpenContextMenu()\nimport lib from '@overextended/ox_lib/client';\nlib.getOpenContextMenu();","usage-example#Usage Example":"First we register the menu with our specified options then we call the show function in the command.\nAvoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu).\nlib.registerContext({\n id = 'some_menu',\n title = 'Some context menu',\n options = {\n {\n title = 'Empty button',\n },\n {\n title = 'Disabled button',\n description = 'This button is disabled',\n icon = 'hand',\n disabled = true\n },\n {\n title = 'Example button',\n description = 'Example button description',\n icon = 'circle',\n onSelect = function()\n print(\"Pressed the button!\")\n end,\n metadata = {\n {label = 'Value 1', value = 'Some value'},\n {label = 'Value 2', value = 300}\n },\n },\n {\n title = 'Menu button',\n description = 'Takes you to another menu!',\n menu = 'other_menu',\n icon = 'bars'\n },\n {\n title = 'Event button',\n description = 'Open a menu from the event and send event data',\n icon = 'check',\n event = 'test_event',\n arrow = true,\n args = {\n someValue = 500\n }\n }\n }\n})\nimport lib from '@overextended/ox_lib/client';\nlib.registerContext({\n id: 'some_menu',\n title: 'Some context menu',\n options: [\n {\n title: 'Empty button',\n },\n {\n title: 'Disabled button',\n description: 'This button is disabled',\n icon: 'hand',\n disabled: true,\n },\n {\n title: 'Example button',\n description: 'Example button description',\n icon: 'circle',\n onSelect: () => {\n console.log('Pressed the button!');\n },\n metadata: [\n { label: 'Value 1', value: 'Some value' },\n { label: 'Value 2', value: 300 },\n ],\n },\n {\n title: 'Menu button',\n description: 'Takes you to another menu!',\n menu: 'other_menu',\n icon: 'bars',\n },\n {\n title: 'Event button',\n description: 'Open a menu from the event and send event data',\n icon: 'check',\n event: 'test_event',\n arrow: true,\n args: {\n someValue: 500,\n },\n },\n ],\n});\nThen we can also register our second menu called other_menu\nlib.registerContext({\n id = 'other_menu',\n title = 'Other context menu',\n menu = 'some_menu',\n onBack = function()\n print('Went back!')\n end,\n options = {\n {\n title = 'Nothing here'\n }\n }\n})\nlib.registerContext({\n id: 'other_menu',\n title: 'Other context menu',\n menu: 'some_menu',\n onBack: () => {\n console.log('Went back!');\n },\n options: [\n {\n title: 'Nothing here',\n },\n ],\n});\nAnd the event that we are going to run from the some_menu menu, which is going to open another menu.\nRegisterNetEvent('test_event', function(args)\n lib.registerContext({\n id = 'event_menu',\n title = 'Event menu',\n menu = 'some_menu',\n options = {\n {\n title = 'Event value: '..args.someValue,\n }\n }\n })\n lib.showContext('event_menu')\nend)\nonNet('test_event', (args: { someValue: number }) => {\n lib.registerContext({\n id: 'event_menu',\n title: 'Event menu',\n menu: 'some_menu',\n options: [\n {\n title: `Event value: ${args.someValue}`,\n },\n ],\n });\n lib.showContext('event_menu');\n});\nLastly we register a test command to show the some_menu menu.\nRegisterCommand('testcontext', function()\n lib.showContext('some_menu')\nend)\nRegisterCommand('testcontext', () => {\n lib.showContext('some_menu');\n});\nThe data from the args table in the menu is passed as a first argument to the event you register.Using this event we also register a new context menu with it's own options.By defining a menu param to be the id of the first menu we can get the back arrow button next to the menu title that will take us back."}},"/overextended/ox_lib/Modules/Interface/Client/clipboard":{"title":"Clipboard","data":{"libsetclipboard#lib.setClipboard":"Sets the player's clipboard to the specified string value.\nWill not work if focus is already taken by some NUI component.\nTo create a new line use \\t\\n not just \\n in your string.\nlib.setClipboard(value)\nimport lib from '@overextended/ox_lib/client';\nlib.setClipboard(value);\nvalue: string"}},"/overextended/ox_lib/Modules/Interface/Client/input":{"title":"Input Dialog","data":{"":"The input dialog window allows you to take data from the user by setting input fields.","libinputdialog#lib.inputDialog":"lib.inputDialog(heading, rows, options)\nimport lib from '@overextended/ox_lib/client';\nlib.inputDialog(heading, rows, options);\nheading: string\nrows: string[] or table (array)\ntype: 'input' or 'number' or 'checkbox' or 'select' or 'slider' or 'color' or 'multi-select' or 'date' or 'date-range' or 'time' or 'textarea'\noptions?: table(object)\nallowCancel: boolean\nIf false the user will not be able to cancel and close the input dialog until submitted.\nIf not defined, the user is able to cancel and close the input dialog.","field-type-properties#Field Type Properties":"input\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\npassword?: boolean\nmin?: number\nmax?: number\nnumber\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nmax?: number\nprecision?: number\nstep?: number\ncheckbox\nlabel: string\nchecked?: boolean\ndisabled?: boolean\nrequired?: boolean\nselect and multi-select\nlabel: string\noptions: table(array)\nvalue: string\nlabel?: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string | table (only for multi-select)\nvalue of the default option.\nclearable?: boolean\nsearchable?: boolean\nmaxSelectedValues?: number (only for multi-select)\nMaxmimum number of options that can be selected.\nslider\nlabel: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nmax?: number\nstep?: number\ncolor\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\nformat?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla';\ndate\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string or true\nTrue defaults to current date\nformat?: string\nDate format to display in the field\nreturnString?: boolean\nReturns the date as a string, default format is DD/MM/YYYY, but if format is defined it will use that.\nclearable?: boolean\nmin?: string\n\"01/01/2000\"\nmax?: string\n\"12/12/2023\"\ndate-range\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: [string, string]\nformat?: string\nDate format to display in the field\nreturnString?: boolean\nReturns the date as a string, default format is DD/MM/YYYY, but if format is defined it will use that.\nclearable?: boolean\ntime\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\nformat?: '12' or '24'\nclearable?: boolean\ntextarea\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nMinimum amount of rows the text area will take.\nmax?: number\nMaxmimum amount of rows the text area will take, when exceeded goes into overflow.\nautosize?: boolean\nIf true text area will grow with content until max rows are reached.\nThe callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup.The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index 1 (0), if we want data from the third field, that would be index 3 (2), etc...\nField types such as date, date-range and time return a unix timestamp on the set value.","libcloseinputdialog#lib.closeInputDialog":"Force closes the active input dialog and sets its return data as nil.\nlib.closeInputDialog()\nimport lib from '@overextended/ox_lib/client';\nlib.closeInputDialog();","usage-example#Usage Example":"","basic#Basic":"local input = lib.inputDialog('Basic dialog', {'First row', 'Second row'})\nif not input then return end\nprint(json.encode(input), input[1], input[2])\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nconst input = await lib.inputDialog('Basic dialog', ['First row', 'Second row']);\nif (!input) return;\nconsole.log(input, input[0], input[1]);","advanced#Advanced":"local input = lib.inputDialog('Dialog title', {\n {type = 'input', label = 'Text input', description = 'Some input description', required = true, min = 4, max = 16},\n {type = 'number', label = 'Number input', description = 'Some number description', icon = 'hashtag'},\n {type = 'checkbox', label = 'Simple checkbox'},\n {type = 'color', label = 'Colour input', default = '#eb4034'},\n {type = 'date', label = 'Date input', icon = {'far', 'calendar'}, default = true, format = \"DD/MM/YYYY\"}\n})\nprint(json.encode(input))\n-- Getting rgb values from colour picker\nlocal rgb = lib.math.torgba(input[4])\n-- Transforming date timestamp to a readable format with Lua's os library (server-only)\nlocal timestamp = math.floor(input[5] / 1000)\nlocal date = os.date('%Y-%m-%d %H:%M:%S', timestamp)\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nconst input = await lib.inputDialog('Police locker', [\n { type: 'input', label: 'Text input', description: 'Some input description', required: true, min: 3, max: 16 },\n { type: 'number', label: 'Number input', description: 'Some number description', icon: 'hashtag' },\n { type: 'checkbox', label: 'Simple checkbox' },\n { type: 'color', label: 'Colour input', default: '#eb4034' },\n { type: 'date', label: 'Date input', icon: ['far', 'calendar'], default: true, format: 'DD/MM/YYYY' },\n]);\nconsole.log(JSON.stringify(input, null, 2));\n// Getting r, g and b values from colour picker\nconst regExp = /rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/;\nconst colourInput = input[3];\nconst color = regExp.exec(colourInput);\nif (!color) return;\nconsole.log(+color[1], +color[2], +color[3]);"}},"/overextended/ox_lib/Modules/Interface/Client/menu":{"title":"Menu","data":{"":"Keyboard navigation menu with specific event functions.","libregistermenu#lib.registerMenu":"Registers and caches a menu under the specified id.\nlib.registerMenu(data, cb)\nimport lib from '@overextended/ox_lib/client';\nlib.registerMenu(data, cb);\ndata: table (object)\nid: string\ntitle: string\noptions: table (array)\nlabel: string\nprogress?: number\ncolorScheme?: string\nicon?: string\nFontAwesome icon that will be displayed on the left side, works the same as notification and textui icons.\nAlso supports image urls, png and webp files but are not recommend to use over font awesome icons.\niconColor?: string\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nvalues?: string[] or { label: string, description: string }[]\nIf provided creates a side scrollable list.\nWhen using object and setting description, the set description will be displayed in the menu tooltip.\nchecked?: boolean\nSetting either true or false will make the button a checkbox, if values is also provided the button will be a\nscrollable list.\ndescription?: string\nDisplays tooltip below menu on hovered item with provided description.\ndefaultIndex?: number\nSets the current index for the list to specified number.\nargs?: {[string]: any}\nAllows you to pass any arguments through the button.\nIf the button has values then isScroll is automatically passed.\nIf the button has checked to either true or false then isCheck is automatically passed.\nclose?: boolean\nIf set to false, it won't close the menu upon interacting with this option.\nposition?: 'top-left' or 'top-right' or 'bottom-left' or 'bottom-right'\nDefault: 'top-left'\ndisableInput?: boolean\nDefault: false\ncanClose: boolean\nIf set to false the user won't be able to exit the menu without pressing one of the buttons.\nonClose: function(keyPressed?: 'Escape' | 'Backspace')\nFunction that runs when the menu is exited via ESC/Backspace.\nonSelected: function(selected: number, secondary: number | boolean, args: {[string]: any})\nFunction being ran when the selected button in the menu changes.\nonSideScroll: function(selected: number, scrollIndex: number, args: {[string]: any})\nFunction ran whenever a scroll list item is changed.\nonCheck: function(selected: number, checked: boolean, args: {[string]: any})\nFunction ran whenever a checkbox is toggled.\ncb: function(selected: number, scrollIndex: number, args: {[string]: any})\nCallback function when the menu item is pressed.","libshowmenu#lib.showMenu":"Displays the menu with the provided id.\nlib.showMenu(id)\nimport lib from '@overextended/ox_lib/client';\nlib.showMenu(id);\nid: string","libhidemenu#lib.hideMenu":"lib.hideMenu(onExit)\nimport lib from '@overextended/ox_lib/client';\nlib.hideMenu(onExit);\nonExit?: boolean\nIf true runs the menu's onClose function.","libgetopenmenu#lib.getOpenMenu":"Returns the id of the currently open menu.\nlib.getOpenMenu()\nimport lib from '@overextended/ox_lib/client';\nlib.getOpenMenu();","libsetmenuoptions#lib.setMenuOptions":"lib.setMenuOptions(id, options, index)\nimport lib from '@overextended/ox_lib/client';\nlib.setMenuOptions(id, options, index);\nid: string\noptions: table (object or array)\nindex?: number\nIf specified only sets the options table on the specified options index.\nExample:\nReplaces the 3rd index option of the specified menu\nlib.setMenuOptions('some_menu_id', {label = 'New option', icon = 'plus'}, 3)\nimport lib from '@overextended/ox_lib/client';\nlib.setMenuOptions('some_menu_id', { label: 'New option', icon: 'plus' }, 3);","usage-example#Usage Example":"First we register the menu with our specified options then we call the show function in the command.\nAvoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu).\nlib.registerMenu({\n id = 'some_menu_id',\n title = 'Menu title',\n position = 'top-right',\n onSideScroll = function(selected, scrollIndex, args)\n print(\"Scroll: \", selected, scrollIndex, args)\n end,\n onSelected = function(selected, secondary, args)\n if not secondary then\n print(\"Normal button\")\n else\n if args.isCheck then\n print(\"Check button\")\n end\n if args.isScroll then\n print(\"Scroll button\")\n end\n end\n print(selected, secondary, json.encode(args, {indent=true}))\n end,\n onCheck = function(selected, checked, args)\n print(\"Check: \", selected, checked, args)\n end,\n onClose = function(keyPressed)\n print('Menu closed')\n if keyPressed then\n print(('Pressed %s to close the menu'):format(keyPressed))\n end\n end,\n options = {\n {label = 'Simple button', description = 'It has a description!'},\n {label = 'Checkbox button', checked = true},\n {label = 'Scroll button with icon', icon = 'arrows-up-down-left-right', values={'hello', 'there'}},\n {label = 'Button with args', args = {someArg = 'nice_button'}},\n {label = 'List button', values = {'You', 'can', 'side', 'scroll', 'this'}, description = 'It also has a description!'},\n {label = 'List button with default index', values = {'You', 'can', 'side', 'scroll', 'this'}, defaultIndex = 5},\n {label = 'List button with args', values = {'You', 'can', 'side', 'scroll', 'this'}, args = {someValue = 3, otherValue = 'value'}},\n }\n}, function(selected, scrollIndex, args)\n print(selected, scrollIndex, args)\nend)\nRegisterCommand('testmenu', function()\n lib.showMenu('some_menu_id')\nend)\nimport lib from '@overextended/ox_lib/client';\nlib.registerMenu(\n {\n id: 'some_menu_id',\n title: 'Menu title',\n position: 'top-right',\n onSideScroll: (selected, scrollIndex, args) => {\n console.log('Scroll: ', selected, scrollIndex, args);\n },\n onSelected: (selected, secondary, args) => {\n if (!secondary) {\n console.log('Normal button');\n } else {\n if (args.isCheck) {\n console.log('Check button');\n }\n if (args.isScroll) {\n console.log('Scroll button');\n }\n }\n console.log(selected, secondary, JSON.stringify(args, null, 2));\n },\n onCheck: (selected, checked, args) => {\n console.log('Check: ', selected, checked, args);\n },\n onClose: (keyPressed) => {\n console.log('Menu closed');\n if (keyPressed) {\n console.log(`Pressed ${keyPressed} to close the menu`);\n }\n },\n options: [\n { label: 'Simple button', description: 'It has a description!' },\n { label: 'Checkbox button', checked: true },\n { label: 'Scroll button with icon', icon: 'arrows-up-down-left-right', values: ['hello', 'there'] },\n { label: 'Button with args', args: { someArg: 'nice_button' } },\n {\n label: 'List button',\n values: ['You', 'can', 'side', 'scroll', 'this'],\n description: 'It also has a description!',\n },\n { label: 'List button with default index', values: ['You', 'can', 'side', 'scroll', 'this'], defaultIndex: 5 },\n {\n label: 'List button with args',\n values: ['You', 'can', 'side', 'scroll', 'this'],\n args: { someValue: 3, otherValue: 'value' },\n },\n ],\n },\n (selected, scrollIndex, args) => {\n console.log(selected, scrollIndex, args);\n }\n);\nRegisterCommand(\n 'testmenu',\n () => {\n lib.showMenu('some_menu_id');\n },\n false\n);"}},"/overextended/ox_lib/Modules/Interface/Client/notify":{"title":"Notifications","data":{"libnotify#lib.notify":"Custom notifications with a lot of styling options.\nlib.notify(data)\nTriggerClientEvent('ox_lib:notify', source, data)\nimport lib from '@overextended/ox_lib/client';\nlib.notify(data);\nid?: string\nWhen set the current notification will be unique and only shown once on screen when spammed.\ntitle?: string\nMust provide if there is no description\ndescription?: string\nMust provide if there is no title\nMarkdown support\nduration?: number\nDefault: 3000\nshowDuration?: boolean\nDefault: true\nposition?: 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'\nDefault: 'top-right'\ntype?: 'inform' or 'error' or 'success'or 'warning'\nDefault: 'inform'\nstyle?: table (object)\nReact CSS styling format\nicon?: string\nFont Awesome 6 icon name\niconColor?: string\nCSS Legal Color Values\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nalignIcon?: 'top' or 'center'\nDefault: 'center'\nsound?: table (object)\nbank?: string\nname of audio bank that contains the soundset provided\nset: string\nSoundset the soundname is a member of.\nname: string\nSetting iconColor will get rid of the contrasted icon colour and it's circular background.","usage-example#Usage Example":"","standard#Standard":"lib.notify({\n title = 'Notification title',\n description = 'Notification description',\n type = 'success'\n})\nimport lib from '@overextended/ox_lib/client';\nlib.notify({\n title: 'Notification title',\n description: 'Notification description',\n type: 'success',\n});","custom#Custom":"lib.notify({\n id = 'some_identifier',\n title = 'Notification title',\n description = 'Notification description',\n showDuration = false,\n position = 'top',\n style = {\n backgroundColor = '#141517',\n color = '#C1C2C5',\n ['.description'] = {\n color = '#909296'\n }\n },\n icon = 'ban',\n iconColor = '#C53030'\n})\nimport lib from '@overextended/ox_lib/client';\nlib.notify({\n id: 'some_identifier',\n title: 'Notification title',\n description: 'Notification description',\n showDuration: false,\n position: 'top',\n style: {\n backgroundColor: '#141517',\n color: '#C1C2C5',\n '.decription': {\n color: '#909296',\n },\n },\n icon: 'ban',\n iconColor: '#C53030',\n});"}},"/overextended/ox_lib/Modules/Interface/Client/progress":{"title":"Progress","data":{"libprogressbar#lib.progressBar":"Displays a running progress bar.\nlib.progressBar(data)\nimport lib from '@overextended/ox_lib/client'\nlib.progressBar(data)\nduration: number\nlabel: string\nuseWhileDead?: boolean\nallowRagdoll?: boolean\nallowSwimming?: boolean\nallowCuffed?: boolean\nallowFalling?: boolean\ncanCancel?: boolean\nanim?: table (object)\ndict?: string\nMust specify either scenario or dict\nclip: string\nflag?: number\nDefault: 49\nblendIn?: float\nDefault: 3.0\nblendOut?: float\nDefault: 1.0\nduration?: number\nDefault: -1\nplaybackRate?: number\nDefault: 0\nlockX?: boolean\nlockY?: boolean\nlockZ?: boolean\nscenario?: string\nMust specify either scenario or dict\nplayEnter?: boolean\nDefault: true\nprop?: table (object or array)\n[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]\nmodel: hash\nbone?: number\nDefault: 60309\npos: table\nx: number\ny: number\nz: number\nrot: table (object)\nx: number\ny: number\nz: number\nrotOrder?: number\nThe order in which yaw, pitch and roll is applied.\nDefault: 0\ndisable?: table (object)\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean","usage-example#Usage Example":"if lib.progressBar({\n duration = 2000,\n label = 'Drinking water',\n useWhileDead = false,\n canCancel = true,\n disable = {\n car = true,\n },\n anim = {\n dict = 'mp_player_intdrink',\n clip = 'loop_bottle'\n },\n prop = {\n model = `prop_ld_flow_bottle`,\n pos = vec3(0.03, 0.03, 0.02),\n rot = vec3(0.0, 0.0, -1.5)\n },\n}) then print('Do stuff when complete') else print('Do stuff when cancelled') end\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client'\nif (await lib.progressBar({\n duration: 2000,\n label: 'Drinking water',\n useWhileDead: false,\n canCancel: true,\n disable: {\n car: true,\n },\n anim: {\n dict: 'mp_player_intdrink',\n clip: 'loop_bottle'\n },\n prop: {\n model: `prop_ld_flow_bottle`,\n pos: {x: 0.03, y: 0.03, z: 0.02},\n rot: {x: 0.0, y: 0.0, z: -1.5}\n },\n})) console.log('Do stuff when complete');\nelse console.log('Do stuff when cancelled')","libprogresscircle#lib.progressCircle":"Similar to lib.progressBar except it displays a circle and you can define a position.\nlib.progressCircle(data)\nimport lib from '@overextended/ox_lib/client'\nlib.progressCircle(data)\nduration: number\nlabel?: string\nposition?: 'middle' or 'bottom'\nDefault: 'middle'\nuseWhileDead?: boolean\nallowRagdoll?: boolean\nallowSwimming?: boolean\nallowCuffed?: boolean\nallowFalling?: boolean\ncanCancel?: boolean\nanim?: table (object)\ndict?: string\nMust specify either scenario or dict\nclip: string\nflag?: number\nDefault: 49\nblendIn?: float\nDefault: 3.0\nblendOut?: float\nDefault: 1.0\nduration?: number\nDefault: -1\nplaybackRate?: number\nDefault: 0\nlockX?: boolean\nlockY?: boolean\nlockZ?: boolean\nscenario?: string\nMust specify either scenario or dict\nplayEnter?: boolean\nDefault: true\nprop?: table (object or array)\n[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]\nmodel: hash\nbone?: number\nDefault: 60309\npos: table\nx: number\ny: number\nz: number\nrot: table (object)\nx: number\ny: number\nz: number\nrotOrder?: number\nThe order in which yaw, pitch and roll is applied.\nDefault: 0\ndisable?: table (object)\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean","usage-example-1#Usage Example":"if lib.progressCircle({\n duration = 2000,\n position = 'bottom',\n useWhileDead = false,\n canCancel = true,\n disable = {\n car = true,\n },\n anim = {\n dict = 'mp_player_intdrink',\n clip = 'loop_bottle'\n },\n prop = {\n model = `prop_ld_flow_bottle`,\n pos = vec3(0.03, 0.03, 0.02),\n rot = vec3(0.0, 0.0, -1.5)\n },\n}) then print('Do stuff when complete') else print('Do stuff when cancelled') end\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client'\nif (await lib.progressCircle({\n duration: 2000,\n position: 'bottom',\n useWhileDead: false,\n canCancel: true,\n disable: {\n car: true,\n },\n anim: {\n dict: 'mp_player_intdrink',\n clip: 'loop_bottle'\n },\n prop: {\n model: `prop_ld_flow_bottle`,\n pos: {x: 0.03, y: 0.03, z: 0.02},\n rot: {x: 0.0, y: 0.0, z: -1.5}\n },\n})) console.log('Do stuff when complete')\nelse console.log('Do stuff when cancelled')","libprogressactive#lib.progressActive":"Returns true if a progress bar is currently active.\nlib.progressActive()\nimport lib from '@overextended/ox_lib/client'\nlib.progressActive()","libcancelprogress#lib.cancelProgress":"If there is a progress bar active and the\nprogress bar can be cancelled then it cancels it.\nlib.cancelProgress()\nimport lib from '@overextended/ox_lib/client'\nlib.cancelProgress()"}},"/overextended/ox_lib/Modules/Interface/Client/radial":{"title":"Radial Menu","data":{"":"Radial menu has a global menu that's by default accessed with z and only displays when there is at least one item.\nYou can add and remove items from the global menu using lib.addRadialItem and lib.removeRadialItem.\nUse lib.registerRadial for creating sub menus and use the menu property on the items to open those sub menus.","libaddradialitem#lib.addRadialItem":"Item or array of items added to the global radial menu.\nlib.addRadialItem(items)\nimport lib from '@overextended/ox_lib/client';\nlib.addRadialItem(items);\nitems: table (object or array)\nid: string\nId that is used for removing options.\nicon: string\nEither a font awesome or a custom URI.1\niconWidth?: number\niconHeight?: number\nIn the case of a custom URI, adjust the size of the icon.\nlabel: string\nLabel uses \\n to insert a newline\nmenu?: string\nId of a menu to open.\nonSelect: function(currentMenu: string | nil, itemIndex: number) | string\nFunction that's ran when a user clicks the item.\nkeepOpen?: boolean","libremoveradialitem#lib.removeRadialItem":"Id of an item to be removed from the global menu.\nlib.removeRadialItem(item)\nimport lib from '@overextended/ox_lib/client';\nlib.removeRadialItem(item);\nid: string","libclearradialitems#lib.clearRadialItems":"Removes all items from the radial menu.\nlib.clearRadialItems()\nimport lib from '@overextended/ox_lib/client';\nlib.clearRadialItems();","libregisterradial#lib.registerRadial":"Registers a radial sub menu with predefined options.\nlib.registerRadial(radial)\nimport lib from '@overextended/ox_lib/client';\nlib.registerRadial(radial);\nradial: table (object)\nid: string\nUnique menu id used to open with menu prop on an item.\nitems: array\nicon: string\nlabel: string\nLabel uses \\n to insert a newline\nmenu?: string\nId of a menu to open.\nonSelect?: function(currentMenu: string | nil, itemIndex: number) | string\nFunction that's ran when a user clicks the item.","libhideradial#lib.hideRadial":"Hides the radial menu if one is open.\nlib.hideRadial()\nimport lib from '@overextended/ox_lib/client';\nlib.hideRadial();","libdisableradial#lib.disableRadial":"Disallow players from opening the radial menu.\nlib.disableRadial(state)\nimport lib from '@overextended/ox_lib/client';\nlib.disableRadial(state);\nstate: boolean\nWhether or not radial menu should be disabled","libgetcurrentradialid#lib.getCurrentRadialId":"Returns the id of the currently open radial menu.\nlocal id = lib.getCurrentRadialId()\nimport lib from '@overextended/ox_lib/client';\nlet id = lib.getCurrentRadialId();","usage-example#Usage Example":"When adding radial menu items whether they are global or for a sub menu, make sure to stick to short as possible labels\nas long labels will look out of place and should not be used with the radial menu because of its density.\nHere's a use case example with some global options and an option utilising the lib's points system.\nexports('myMenuHandler', function(menu, item)\n print(menu, item)\n if menu == 'police_menu' and item == 1 then\n print('Handcuffs')\n end\nend)\nlib.registerRadial({\n id = 'police_menu',\n items = {\n {\n label = 'Handcuff',\n icon = 'handcuffs',\n onSelect = 'myMenuHandler'\n },\n {\n label = 'Frisk',\n icon = 'hand'\n },\n {\n label = 'Fingerprint',\n icon = 'fingerprint'\n },\n {\n label = 'Jail',\n icon = 'bus'\n },\n {\n label = 'Search',\n icon = 'magnifying-glass',\n onSelect = function()\n print('Search')\n end\n }\n }\n})\nlib.addRadialItem({\n {\n id = 'police',\n label = 'Police',\n icon = 'shield-halved',\n menu = 'police_menu'\n },\n {\n id = 'business_stuff',\n label = 'Business',\n icon = 'briefcase',\n onSelect = function()\n print(\"Business\")\n end\n }\n})\nlocal coords = GetEntityCoords(cache.ped)\nlocal point = lib.points.new(coords, 5)\nfunction point:onEnter()\n lib.addRadialItem({\n id = 'garage_access',\n icon = 'warehouse',\n label = 'Garage',\n onSelect = function()\n print('Garage')\n end\n })\nend\nfunction point:onExit()\n lib.removeRadialItem('garage_access')\nend\nPoints system in the lib isn't available for the npm package.\nimport lib from '@overextended/ox_lib/client'\nexports('myMenuHandler', (menu, item) => {\n console.log(menu, item)\n if (menu === 'police_menu' and item === 1) {\n console.log('Handcuffs')\n }\n})\nlib.registerRadial({\n id: 'police_menu',\n items: [\n {\n label: 'Handcuff',\n icon: 'handcuffs',\n onSelect: 'myMenuHandler'\n },\n {\n label: 'Frisk',\n icon: 'hand'\n },\n {\n label: 'Fingerprint',\n icon: 'fingerprint'\n },\n {\n label: 'Jail',\n icon: 'bus'\n },\n {\n label: 'Search',\n icon: 'magnifying-glass',\n onSelect: () => {\n console.log('Search')\n }\n }\n ]\n})\nlib.addRadialItem([\n {\n id: 'police',\n label: 'Police',\n icon: 'shield-halved',\n menu: 'police_menu'\n },\n {\n id: 'business_stuff',\n label: 'Business',\n icon: 'briefcase',\n onSelect: () => {\n console.log('Business')\n }\n }\n])"}},"/overextended/ox_lib/Modules/Interface/Client/skillcheck":{"title":"Skill Check","data":{"libskillcheck#lib.skillCheck":"Runs a skill check with the defined difficulty.\nlib.skillCheck(difficulty, inputs)\nimport lib from '@overextended/ox_lib/client';\nlib.skillCheck(difficulty, inputs);\ndifficulty: 'easy' or 'medium' or 'hard' or table\nPreset difficulties:\n'easy' - { areaSize: 50, speedMultiplier: 1 }\n'medium' - { areaSize: 40, speedMultiplier: 1.5 }\n'hard' - { areaSize: 25, speedMultiplier: 1.75 }\nCustom difficulties can be set by sending an object instead of one of the preset strings above\nareaSize: number\nSize of the success area in degrees\nspeedMultiplier: number\nMultiplier for the speed of the indicator\ninputs?: string[]\nA random key will be picked from the inputs table for each skill check\nIf no inputs are defined the key is defaulted to e","libskillcheckactive#lib.skillCheckActive":"Returns true if a skill check is currently active.\nlib.skillCheckActive()\nimport lib from '@overextended/ox_lib/client'\nlib.skillCheckActive()","libcancelskillcheck#lib.cancelSkillCheck":"Cancels the currently ongoing skill check.\nlib.cancelSkillCheck()\nimport lib from '@overextended/ox_lib/client'\nlib.cancelSkillCheck()","usage-example#Usage Example":"local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})\nimport lib from '@overextended/ox_lib/client';\nconst success = await lib.skillCheck(\n ['easy', 'easy', { areaSize: 60, speedMultiplier: 2 }, 'hard'],\n ['w', 'a', 's', 'd']\n);"}},"/overextended/ox_lib/Modules/Interface/Client/textui":{"title":"TextUI","data":{"libshowtextui#lib.showTextUI":"Show the TextUI window.\nDO NOT run this function every tick, it's intended to be used as a toggle.\nlib.showTextUI(text, options)\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI(text, options);\ntext: string\noptions?: table\nposition?: 'right-center' or 'left-center' or 'top-center' or 'bottom-center'\nDefault: 'right-center'\nicon?: string or table (array)\niconColor?: string\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nstyle?: React.CSSProperties\nalignIcon?: 'top' or 'center'\nDefault: 'center'","libhidetextui#lib.hideTextUI":"Hides the currently visible TextUI window\nlib.hideTextUI()\nimport lib from '@overextended/ox_lib/client';\nlib.hideTextUI();","libistextuiopen#lib.isTextUIOpen":"Returns whether Text UI is opened or not. The currently displayed text is returned as the second value.\nlocal isOpen, text = lib.isTextUIOpen()\nimport lib from '@overextended/ox_lib/client';\nconst [isOpen, text] = lib.isTextUIOpen();","usage-example#Usage Example":"","basic#Basic":"lib.showTextUI('[E] - Fuel vehicle')\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI('[E] - Fuel vehicle');","custom-styling#Custom styling":"lib.showTextUI('[E] - Pick apple', {\n position = \"top-center\",\n icon = 'hand',\n style = {\n borderRadius = 0,\n backgroundColor = '#48BB78',\n color = 'white'\n }\n})\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI('[E] - Pick apple', {\n position: 'top-center',\n icon: 'hand',\n style: {\n borderRadius: 0,\n backgroundColor: '#48BB78',\n color: 'white',\n },\n});"}},"/overextended/ox_lib/Modules/Locale/Shared":{"title":"Shared","data":{"":"Allows servers to set a preferred language and attempt to load locale files in any resources using the module.\nLocale files should use the ISO Language Code and be saved as ./locales/langcode.json","setup#Setup":"To change the preferred language from English, add the convar to your server.cfg and change en to the desired language code.\nsetr ox:locale en\nCreate a locales directory and a file for your language.\n{\n \"grand_theft_auto\": \"grand theft auto\",\n \"male\": \"male\",\n \"female\": \"female\",\n \"suspect_sex\": \"suspect is %s\"\n}\n{\n \"grand_theft_auto\": \"vol de voiture\",\n \"male\": \"homme\",\n \"female\": \"femme\",\n \"suspect_sex\": \"le suspect est %s\"\n}\nfiles {\n 'locales/*.json'\n}","usage#Usage":"Initialise the locale module in your resource (once).\nlib.locale()\nimport {initLocale} from '@overextended/ox_lib/shared'\ninitLocale()\nFormat your strings with the new locale global.\nAdditional arguments can be sent to format the locale output.\nlocale(str, ...)\nimport { locale } from '@overextended/ox_lib/shared'\nlocale(str, ...)\nstr: string\nvararg?: string or number\nExample\n-- Load the locale module\nlib.locale()\nSetInterval(function()\n print(locale('grand_theft_auto'))\n print(locale('suspect_sex', locale('male')))\nend, 5000)\nimport { initLocale, locale } from '@overextended/ox_lib/shared\n// Load the locale module\ninitLocale()\nsetInterval(() => {\n console.log(locale('grand_theft_auto'))\n console.log(locale('suspect_sex', locale('male')))\n}, 5000)","phrases#Phrases":"You can create a locale string that references other locales to construct a phrase, rather than calling locale multiple times.\n{\n \"hello\": \"hello %s\",\n \"my_name_is\": \"my name is %s\",\n \"hello_my_name_is\": \"${hello}! ${my_name_is}.\"\n}\nprint(locale('hello_my_name_is', 'doka', 'linden'))\nimport { locale } from '@overextended/ox_lib/shared'\nconsole.log(locale('hello_my_name_is', 'doka', 'linden'))","libgetlocale#lib.getLocale":"Gets a locale string from another resource and adds it to the dict.\nlib.getLocale(resource, key)\nresource: string\nkey: string"}},"/overextended/ox_lib/Modules/Logger/Server":{"title":"Server","data":{"liblogger#lib.logger":"lib.logger(source, event, message, ...)\nsource: number or string\nPreferably an active player id, otherwise an identifier, or wherever else it originated from.\nevent: string\nA name for the log event (i.e. the trigerring event or a description)\nmessage: string\nThe content for the log.\nvararg: string\nAdditional arguments are converted to tags for additional filtering and searching.\nExample\nlocal vehicle = Ox.CreateVehicle(false, `sultanrs`, vector4(-56.479122, -1116.870362, 26.432250, 0.000030517578))\nlib.logger(-1, 'CreateVehicle', json.encode(vehicle))","datadog#Datadog":"","create-your-datadog-account#Create your Datadog account":"You will receive a free 14 day trial, otherwise refer to their pricing guide.\nFree accounts are limited, however logs will still be retained for 14 days.","create-an-api-key#Create an API key":"This is a UUID used to submit logs to your Datadog organisation.","config#Config":"Set your API key and Datadog site using the following convars.\nset datadog:key \"yourapikey\"\nset datadog:site \"datadoghq.com\"","grafana-loki#Grafana Loki":"Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.\nIt is designed to be very cost effective and easy to operate.\nHas free tier with some restrictions\nEasy to manage\nEasier to setup\nMostly managed by Grafana","create-your-grafana-account#Create your Grafana account":"","head-to-my-account#Head to My Account":"","setup-loki#Setup Loki":"Find the Loki section in your account panel, and click \"Details\".\nGenerate a password and save the API key, as well as your user and url.\nTo setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.\nPlease find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that.Once done, setup authentication and use the username and password securing your endpoint.\nBy default self-hosted loki instances do not provide any authentication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access.","config-1#Config":"Use the following convars to set your logging service, endpoint, and authentication details.\nset ox:logger \"loki\"\nset loki:user \"\"\nset loki:password \"\"\nset loki:endpoint \"\"","fivemanage#Fivemanage":"Fivemanage is an easy-to-use, all-in-one SaaS for game servers that provides logging.","create-an-account#Create an account":"Sign up at Fivemanage.","make-sure-you-have-the-hobby-or-pro-plan#Make sure you have the Hobby or Pro plan.":"You'll get a 14-days free trial if you do not already have an subscription, you can find more information here and on the pricing page.","create-a-new-token#Create a new token":"You'll need to create a new token with the type Logs.","config-2#Config":"set ox:logger \"fivemanage\"\nset fivemanage:key \"YOUR_API_KEY\""}},"/overextended/ox_lib/Modules/Marker/Client":{"title":"Client","data":{"libmarker#lib.marker":"Simple way to create markers","marker-class#Marker Class":"A table representing a marker with the following properties.\ntype: number or string\nThis field accepts either a numerical value representing the marker ID or a string containing the name of a marker as documented on FiveM Docs.\ncoords?: vector3\nwidth?: number\nheight?: number\ncolor?: { r: number, g: number, b: number, a: number}\ndirection?: vector3\nrotation?: vector3","libmarkernew#lib.marker.new":"lib.marker.new(options)\nReturns: Marker","usage-example#Usage Example":"local marker = lib.marker.new({\n\ttype = 1,\n\tcoords = GetEntityCoords(cache.ped),\n\tcolor = { r = 255, g = 0, b = 0, a = 200 },\n})\nCitizen.CreateThread(function()\n\twhile true do\n\t\tmarker:draw()\n\t\tCitizen.Wait(1)\n\tend\nend)","interactive-example#Interactive Example":"local center = vec3(430.452759, -1026.108032, 27.846140)\nlocal uiText = \"Press [E] to get notified\"\nlocal point = lib.points.new({\n coords = center,\n distance = 20,\n})\nlocal marker = lib.marker.new({\n coords = center,\n type = 1,\n})\nfunction point:nearby()\n marker:draw()\n if self.currentDistance < 1.5 then\n if not lib.isTextUIOpen() then\n lib.showTextUI(\"Press [E] to get notified\")\n end\n if IsControlJustPressed(0, 51) then\n lib.notify({\n description = \"Hello, World!\"\n })\n end\n else\n local isOpen, currentText = lib.isTextUIOpen()\n if isOpen and currentText == uiText then\n lib.hideTextUI()\n end\n end\nend"}},"/overextended/ox_lib/Modules/Math/Shared":{"title":"Shared","data":{"libmath#lib.math":"Extends the standard Lua math table with extra functions.\nmath = lib.math","mathtoscalars#math.toscalars":"Takes a string and returns a set of scalar values.\nmath.toscalars(input, min, max, round)\ninput: string\nmin?: number\nmax?: number\nround?: boolean\nReturn:\n...: number","mathtovector#math.tovector":"Takes a string or table and returns a vector value, or a number if only one value was found.\nmath.tovector(input, min, max, round)\ninput: string or table\nmin?: number\nmax?: number\nround?: boolean\nReturn:\nvalue: number or vector2 or vector3 or vector4","mathnormaltorotation#math.normaltorotation":"Takes a surface normal and tries to convert it to a vector3 rotation.\nmath.normaltorotation(input)\ninput: vector3\nReturn:\nvalue: vector3","mathtorgba#math.torgba":"Takes a string or table and returns a vector value, or a number if only one value was found.\nValues are rounded and must be within the range of 0-255.\nmath.torgba(input)\ninput: string or table\nReturn:\nvalue: number or vector2 or vector3 or vector4","mathhextorgb#math.hextorgb":"Takes a hexadecimal string and returns three integers.\nmath.hextorgb(input)\ninput: string\nA hexadecimal value, e.g. 'eb4034'.\nReturn:\nr: number\ng: number\nb: number","mathtohex#math.tohex":"Takes a number or string and formats it as a hexadecimal string.\nmath.tohex(n, upper)\nn: number or string\nupper?: boolean\nReturn:\nhex: string","mathgroupdigits#math.groupdigits":"Takes a number and formats it into grouped digits.\nmath.groupdigits(number, seperator)\nnumber: number\nseperator?: string\nDefault: ,\nReturn:\ngroupedDigits: string","mathclamp#math.clamp":"Clamps a number between a lower and upper limit.\nmath.clamp(number, lower, upper)\nnumber: number\nlower: number\nupper: number\nReturn:\nnumber: number","mathround#math.round":"Rounds a number to a whole number or to the specified number of decimal places.\nmath.round(value, places)\nvalue: number | string\nplaces?: number | string\nReturn:\nroundedValue: number","mathinterp#math.interp":"Calculates an intermediate value between start and finish based on the interpolation factor.\nmath.interp(start, finish, factor)\ngeneric T: number | vector2 | vector3 | vector4\nstart: T\nfinish: T\nfactor: number\nThe interpolation factor between 0 and 1.\nReturn:\nresult: T","mathlerp#math.lerp":"Linearly interpolates between two values over a specified duration, returning an iterator function that will run once per game-frame.\nmath.lerp(start, finish, duration)\ngeneric T: number | table | vector2 | vector3 | vector4\nstart: T\nThe starting value of the interpolation\nfinish: T\nThe ending value of the interpolation\nduration: number\nThe duration over which to interpolate over in milliseconds.\nReturn:\niteratorFunction: fun(): T, number"}},"/overextended/ox_lib/Modules/Points/JavaScript/Client":{"title":"Client","data":{"points#Points":"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.\nPoint({coords, distance, onEnter, onExit, nearby, args})\ncoords: number[]\ndistance: number\nonEnter?: function\nonExit?: function\nnearby?: function\nargs?: T\nimport { Point, cache } from '@overextended/ox_lib/client'\nfunction nearby(this: Point<{dunak: string}>) {\n // @ts-ignore\n DrawMarker(2, this.coords.x, this.coords.y, this.coords.z, 0, 0, 0, 0, 180, 0, 1, 1, 1, 200, 20, 20, 50, false, true, 2, false, null, null, false)\n if (this.currentDistance && this.currentDistance < 1 && IsControlJustReleased(0, 38)) {\n console.log('Inside marker', this.id)\n console.log(this.args?.dunak)\n }\n}\nconst point = new Point({\n coords: GetEntityCoords(cache.ped, false),\n distance: 5,\n nearby: nearby,\n args: {\n dunak: 'nerd'\n }\n})\npoint.onEnter = () => {\n console.log('Entered range of point', point.id)\n}\npoint.onExit = () => {\n console.log('Left range of point', point.id)\n}"}},"/overextended/ox_lib/Modules/Points/Lua/Client":{"title":"Client","data":{"":"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.","cpoint-class#CPoint Class":"A table representing a point with the following properties.\nid: number\ncoords: vector3\ndistance: number\nThe distance for the player to be \"inside\" a point (i.e. the point's radius).\ncurrentDistance: number\nThe players current distance from the centre of the point.\nisClosest?: boolean\nremove: function()\nRemoves the point from the points registry.\nonEnter?: function(self: CPoint)\nFunction triggered when player gets within distance of the point\nonExit?: function(self: CPoint)\nFunction triggered when player goes beyond distance of the point\nnearby?: function(self: CPoint)\nFunction triggered on frame when within distance of the point","libpointsnew#lib.points.new":"lib.points.new(data)\ndata: table\ncoords: vector3\ndistance: number\nReturns:\npoint: CPoint","usage-example#Usage Example":"local point = lib.points.new({\n coords = GetEntityCoords(cache.ped),\n distance = 5,\n dunak = 'nerd',\n})\nfunction point:onEnter()\n print('entered range of point', self.id)\nend\nfunction point:onExit()\n print('left range of point', self.id)\nend\nfunction point:nearby()\n 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, false, nil, nil, false)\n if self.currentDistance < 1 and IsControlJustReleased(0, 38) then\n print('inside marker', self.id, 'dunak is a '.. self.dunak)\n end\nend","libpointsgetallpoints#lib.points.getAllPoints":"Get a table of all points created in the resource.\nlib.points.getAllPoints()\nReturn:\npoints: CPoint[]","libpointsgetnearbypoints#lib.points.getNearbyPoints":"Get an array of all points in range of the player.\nlib.points.getNearbyPoints()\nReturn:\nnearbyPoints: CPoint[]","libpointsgetclosestpoint#lib.points.getClosestPoint":"Get the data for the closest point to the player.\nlib.points.getClosestPoint()\nReturn:\nclosestPoint?: CPoint"}},"/overextended/ox_lib/Modules/Print/Shared":{"title":"Shared","data":{"":"Prints to console conditionally based on convars set.\nDifferent level prints are colored and labeled.\nResource name is always included.","libprint#lib.print":"lib.print.error(...)\nlib.print.warn(...)\nlib.print.info(...)\nlib.print.verbose(...)\nlib.print.debug(...)\nvararg: any\nWhat to print in console. Converts tables into a pretty-print format.","example#Example":"lib.print.warn(\"query latency high: \", latency)","levels#Levels":"Error\nIndicates a failure in the system.\nWarn\nWarns of an unexpected condition, or a state which is likely to cause an error in the future.\nInfo\nInformation about high-level, successful operations.\nVerbose\nMore detailed information containing intermediate steps of high-level, operations\nDebug\nUsed by developers to understand the system and may contain detailed trace information.\nShould generally not be turned on when not debugging.","config#Config":"Use the following convars to set your print level. Prints less severe than the current level will not be executed.\nFor example, a level of info will print error, warn, and info, but not verbose nor debug. Defaults to info if not set.\nResource specific print levels override the global convar.\nset ox:printlevel \"info\"\nset ox:printlevel:ox_inventory \"warn\"\nset ox:printlevel: \"\""}},"/overextended/ox_lib/Modules/Raycast/Client":{"title":"Client","data":{"libraycastfromcoords#lib.raycast.fromCoords":"Starts a shapetest originating from starting coordinates and ending at destination coordinates.\nlib.raycast.fromCoords(coords, destination, flags, ignore)\ncoords: vector3\nStarting coords for raycast\ndestination: vector3\nDestination coords for raycast\nflags?: number\nSee: https://docs.fivem.net/natives/?_0x377906D8A31E5586\nDefault: 511\nignore?: number\nA bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used.\nDefault: 4\nReturn:\nhit: boolean\nWhether or not an entity was hit\nentityHit: number\nEntity handle of hit entity\nendCoords: vector3\nClosest coords to where the raycast hit\nsurfaceNormal: vector3\nNormal to the surface that was hit\nmaterialHash: number","libraycastfromcamera#lib.raycast.fromCamera":"Starts a shapetest originating from the camera, extending to ~10m by default.\nlib.raycast.fromCamera(flags, ignore, distance)\nflags?: number\nSee: https://docs.fivem.net/natives/?_0x377906D8A31E5586\nDefault: 511\nignore?: number\nA bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used.\nDefault: 4\ndistance?: number\nDefault: 10\nReturn:\nhit: boolean\nWhether or not an entity was hit\nentityHit: number\nEntity handle of hit entity\nendCoords: vector3\nClosest coords to where the raycast hit\nsurfaceNormal: vector3\nNormal to the surface that was hit\nmaterialHash: number","libraycastcam#lib.raycast.cam":"lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!"}},"/overextended/ox_lib/Modules/Require/Shared":{"title":"Shared","data":{"":"This module is always loaded by default.","require#require":"Loads the given module. The function starts by indexing the loaded table to determine whether modname is already loaded. If it is, then require returns the value stored at loaded[modname].\nModule names are the path to a file relative to the resource.\nThe module name must point to a .lua file.\nUse . to separate directories in a path.\nModules can be loaded from external resources using @resource.modname.\nrequire 'modname'\nClient modules must be defined in the file section of the resource manifest.\nfile 'modname.lua'\n-- or\nfiles {\n 'modname.lua'\n}","usage-example#Usage Example":"- resources/\n - mylib/\n - import.lua\n - data/\n - events.lua\n - myresource/\n - server.lua\nlocal mylib = {\n events = require 'data.events'\n}\nprint('Loaded mylib')\nreturn mylib\nreturn {\n disconnect = 'onPlayerDropped',\n}\nlocal mylib = require '@mylib.import'\nprint(mylib.events.disconnect)","libload#lib.load":"Loads and runs a Lua file at the given path. Unlike require, the chunk is not cached for future use.\nlib.load(filePath, env)\nfilePath: string\nA path to the Lua file, using the same rules as require.\nenv?: table\nA table to use as the global environment, defaulting to _ENV.","usage-example-1#Usage Example":"local events = lib.load('data.events')\nprint('Loaded events')\nreturn {\n disconnect = 'onPlayerDropped',\n}","libloadjson#lib.loadJson":"Loads a JSON file at the given path and decodes it as a table.\nlib.loadJson(filePath)\nfilePath: string\nA path to the Lua file, using the same rules as require.","usage-example-2#Usage Example":"local events = lib.loadJson('data.events')\nprint('Loaded events')\n{\n \"disconnect\": \"onPlayerDropped\"\n}"}},"/overextended/ox_lib/Modules/Streaming/Client":{"title":"Client","data":{"":"Check if assets exist, such as models, and loads them into memory.\nThrows errors for invalid assets and returns true if the asset is loaded.","librequestanimdict#lib.requestAnimDict":"Remember to call RemoveAnimDict(dict) at the end of you code!\nlib.requestAnimDict(dict, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestAnimDict(dict, timeout)\ndict: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestanimset#lib.requestAnimSet":"Remember to call RemoveAnimSet(set) at the end of you code!\nlib.requestAnimSet(set, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestAnimSet(set, timeout)\nset: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestmodel#lib.requestModel":"Remember to call SetModelAsNoLongerNeeded(model) at the end of you code!\nlib.requestModel(model, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestModel(model, timeout)\nmodel: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequeststreamedtexturedict#lib.requestStreamedTextureDict":"Remember to call SetStreamedTextureDictAsNoLongerNeeded(dict) at the end of you code!\nlib.requestStreamedTextureDict(dict, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestStreamedTextureDict(dict, timeout)\ndict: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestnamedptfxasset#lib.requestNamedPtfxAsset":"Remember to call RemoveNamedPtfxAsset(dict) at the end of you code!\nlib.requestNamedPtfxAsset(ptFxName, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestNamedPtfxAsset(ptFxName, timeout)\nptFxName: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestscaleformmovie#lib.requestScaleformMovie":"Remember to call SetScaleformMovieAsNoLongerNeeded(scaleformName) at the end of you code!\nlib.requestScaleformMovie(scaleformName, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestScaleformMovie(scaleformName, timeout)\nscaleformName: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 1000","librequestweaponasset#lib.requestWeaponAsset":"Remember to call RemoveWeaponAsset(weaponType) at the end of you code!\nlib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)\nimport lib from '@overextended/ox_lib/client'\nlib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)\nweaponType: string | number\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000\nweaponResourceFlags?: WeaponResourceFlags\nDefault: 31\nextraWeaponComponentFlags?: ExtraWeaponComponentFlags\nDefault: 0","weaponresourceflags#WeaponResourceFlags":"1 WRF_REQUEST_BASE_ANIMS\n2 WRF_REQUEST_COVER_ANIMS\n4 WRF_REQUEST_MELEE_ANIMS\n8 WRF_REQUEST_MOTION_ANIMS\n16 WRF_REQUEST_STEALTH_ANIMS\n32 WRF_REQUEST_ALL_MOVEMENT_VARIATION_ANIMS\n31 WRF_REQUEST_ALL_ANIMS","extraweaponcomponentflags#ExtraWeaponComponentFlags":"0 WEAPON_COMPONENT_NONE\n1 WEAPON_COMPONENT_FLASH\n2 WEAPON_COMPONENT_SCOPE\n4 WEAPON_COMPONENT_SUPP\n8 WEAPON_COMPONENT_SCLIP2\n16 WEAPON_COMPONENT_GRIP"}},"/overextended/ox_lib/Modules/String/Shared":{"title":"Shared","data":{"libstring#lib.string":"Extends the standard Lua string table with extra functions.\nstring = lib.string","stringrandom#string.random":"Outputs a random string based on a given pattern.\nstring.random(pattern, length)\npattern: string\n1 will output a random number from 0-9.\nA will output a random letter from A-Z.\na will output a random letter from a-z.\n. will output a random letter or number.\n^ will output the following character literally.\nAny other character will output said character.\nlength?: number\nSets the length of the returned string, either padding it or omitting characters.\nReturn:\nstring: string"}},"/overextended/ox_lib/Modules/Table/Shared":{"title":"Shared","data":{"":"Adds additional functions alongside the standard table library.","libtablecontains#lib.table.contains":"Checks if table contains the given value. Only intended for simple values and unnested tables.\nlib.table.contains(tbl, value)\ntbl: table\nvalue: any\nReturn:\nisContained: boolean","libtablematches#lib.table.matches":"Compares if two values are equal, iterating over tables and matching both keys and values.\nlib.table.matches(tableOne, tableTwo)\ntableOne: table\ntableTwo: table\nReturn:\nmatches: boolean","libtabledeepclone#lib.table.deepclone":"Recursively clones a table to ensure no table references remain.\nlib.table.deepclone(tbl)\ntbl: table\nReturn:\nclonedTable: table","libtablemerge#lib.table.merge":"Merges two tables together. Duplicate keys will be added together if they are numbers, otherwise tableTwo's value will be used.\nlib.table.merge(tableOne, tableTwo)\ntableOne: table\ntableTwo: table\nReturn:\ntableOne: table","libtablefreeze#lib.table.freeze":"Makes a table read-only, preventing further modification. Unfrozen tables stored within table are still mutable.\nlib.table.freeze(tbl)\ntbl: table\nReturn:\nfrozenTable: table","libtableisfrozen#lib.table.isFrozen":"Returns true if tbl is set as read-only.\nlib.table.isFrozen(tbl)\ntbl: table\nReturn:\nisFrozen: boolean"}},"/overextended/ox_lib/Modules/Timer/Shared":{"title":"Shared","data":{"":"Provides a versatile timer system with options for asynchronous operation, pause and resume functionality, and callbacks on timer completion.","timer#Timer":"","libtimer#lib.timer":"lib.timer(time, onEnd, async)\ntime: number\nonEnd: function\nasync?: boolean\nIf true then the timer does not block script execution on the calling thread.\nReturns:\ntimer: OxTimer","example#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend)","methods#Methods":"","pause#pause":"Pauses an active timer until timer:play() or timer:forceEnd() is called.\ntimer:pause()","example-1#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()","play#play":"Resume a timer if it is paused with timer:pause().\ntimer:play()","example-2#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()\nWait(1000)\ntimer:play()\n--timer finishes in 6 seconds rather than 5 because of the pause","forceend#forceEnd":"Immediately ends the timer and optionally triggers the onEnd callback.\ntimer:forceEnd(triggerOnEnd)\ntriggerOnEnd: boolean","example-3#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()\nWait(1000)\ntimer:forceEnd(false)\n--timer finishes in 1 second rather than 5 because of the forceEnd and the call back never runs","ispaused#isPaused":"Checks if the timer is paused from calling timer:pause() previously.\ntimer:isPaused()\nReturns:\nisPaused: boolean","example-4#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\nprint(timer:isPaused()) -- false\ntimer:pause()\nprint(timer:isPaused()) -- true","gettimeleft#getTimeLeft":"Returns the remaining time on the timer in the given format rounded to 2 decimal places\ntimer:getTimeLeft(format)\n-- format: 'ms' = miliseconds, 's' = seconds, 'm' = minutes, 'h' = hours, nil = all returned in a table\nformat?: 'ms' or 's' or 'm' or 'h'\nReturns:\ntime: number | {ms: number, s: number, m: number, h: number}","example-5#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\nprint(timer:getTimeLeft('ms')) -- 5000 miliseconds\nprint(timer:getTimeLeft('s')) -- 5.00 seconds\nprint(timer:getTimeLeft('m')) -- 0.08 minutes\nprint(timer:getTimeLeft('h')) -- 0.00 hours\nprint(timer:getTimeLeft()) -- {ms = 5000, s = 5.00, m = 0.08, h = 0.00 }","restart#restart":"Resets and starts the timer.\ntimer:restart()","example-6#Example":"-- this will create a timer that just keeps restarting itself\nlocal timer\ntimer = lib.timer(5000, function()\n print(\"timer ended\")\n timer:restart()\nend, true)"}},"/overextended/ox_lib/Modules/VehicleProperties/Client":{"title":"Client","data":{"":"Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.\nhttps://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3","libgetvehicleproperties#lib.getVehicleProperties":"lib.getVehicleProperties(vehicle)\nvehicle: number\nvehicle handle of the vehicle to get the properties for\nlib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))\nimport lib from '@overextended/ox_lib/client'\nlib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))","libsetvehicleproperties#lib.setVehicleProperties":"Sets properties on a vehicle (i.e. mods, plate text, etc.) and returns true if the client owns the entity.\nlib.setVehicleProperties(vehicle, props)\nvehicle: entity\nprops: table\nRegisterNetEvent('ox_lib:setVehicleProperties', function(netid, data)\n lib.setVehicleProperties(NetToVeh(netid), data)\nend)\nimport { setVehicleProperties } from '@overextended/ox_lib/client'\nonNet('ox_lib:setVehicleProperties', (netid, data) => {\n setVehicleProperties(NetToVeh(netid), data)\n})\nReturns:\nisEntityOwner: boolean","recommended-usage#Recommended Usage":"The server should tell the owner of the entity to set properties, using the following trigger.\nTriggerClientEvent('ox_lib:setVehicleProperties', entityOwner, vehNetId, data)","vehicle-properties#Vehicle Properties":"model?: number\nplate?: string\nplateIndex?: number\nbodyHealth?: number\nengineHealth?: number\ntankHealth?: number\nfuelLevel?: number\noilLevel?: number\ndirtLevel?: number\ncolor1?: number or number[]\ncolor2?: number or number[]\npearlescentColor?: number\ninteriorColor?: number\ndashboardColor?: number\nwheelColor?: number\nwheelWidth?: number\nwheelSize?: number\nwheels?: number\nwindowTint?: number\nxenonColor?: number\nneonEnabled?: boolean[]\nneonColor?: number or number[]\nextras?: table\ntyreSmokeColor?: number or number[]\nmodSpoilers?: number\nmodFrontBumper?: number\nmodRearBumper?: number\nmodSideSkirt?: number\nmodExhaust?: number\nmodFrame?: number\nmodGrille?: number\nmodHood?: number\nmodFender?: number\nmodRightFender?: number\nmodRoof?: number\nmodEngine?: number\nmodBrakes?: number\nmodTransmission?: number\nmodHorns?: number\nmodSuspension?: number\nmodArmor?: number\nmodNitrous?: number\nmodTurbo?: number\nmodSubwoofer?: boolean\nmodSmokeEnabled?: boolean\nmodHydraulics?: boolean\nmodXenon?: boolean\nmodFrontWheels?: number\nmodBackWheels?: number\nmodCustomTiresF?: boolean\nmodCustomTiresR?: boolean\nmodPlateHolder?: number\nmodVanityPlate?: number\nmodTrimA?: number\nmodOrnaments?: number\nmodDashboard?: number\nmodDial?: number\nmodDoorSpeaker?: number\nmodSeats?: number\nmodSteeringWheel?: number\nmodShifterLeavers?: number\nmodAPlate?: number\nmodSpeakers?: number\nmodTrunk?: number\nmodHydrolic?: number\nmodEngineBlock?: number\nmodAirFilter?: number\nmodStruts?: number\nmodArchCover?: number\nmodAerials?: number\nmodTrimB?: number\nmodTank?: number\nmodWindows?: number\nmodDoorR?: number\nmodLivery?: number\nmodRoofLivery?: number\nmodLightbar?: number\nwindows?: number[]\ndoors?: number[]\ntyres?: table\nbulletProofTyres?: boolean"}},"/overextended/ox_lib/Modules/Version/Server":{"title":"Server","data":{"libversioncheck#lib.versionCheck":"Compares the resource version to the latest published release on GitHub.\nUtilises GitHub's release API\nlib.versionCheck(repository)\nrepository: string\nlib.versionCheck('overextended/ox_lib')\nimport lib from '@overextended/ox_lib/server'\nlib.versionCheck('overextended/ox_lib')"}},"/overextended/ox_lib/Modules/Version/Shared":{"title":"Shared","data":{"libcheckdependency#lib.checkDependency":"Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.\nlib.checkDependency(resource, version)\nresource: string\nversion: string\nif not lib.checkDependency('ox_lib', '1.5.0') then error() end\nimport lib from '@overextended/ox_lib/shared'\n// import { checkDependency } from '@overextended/ox_lib/shared'\nif (!lib.checkDependency('ox_lib', '1.5.0')) error()"}},"/overextended/ox_lib/Modules/Zones/Shared":{"title":"Shared","data":{"":"Faster alternative to PolyZone utilising glm.polygon.\nCurrently zones only have basic support on the server side. Some features will not work such as onEnter, onExit,\nand inside.","libzonespoly#lib.zones.poly":"lib.zones.poly(data)\ndata: table\npoints: vector3[]\nAn array of 3d points defining the polygon's shape.\nthickness?: number\nThe height of the polygon, defaulting to 4.\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","libzonesbox#lib.zones.box":"lib.zones.box(data)\ndata: table\ncoords: vector3\nsize?: vector3\nDefault: vec3(2, 2, 2)\nrotation?: number\nAngle in degrees, defaulting to 0.\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","libzonessphere#lib.zones.sphere":"lib.zones.sphere(data)\ndata: table\ncoords: vector3\nradius?: number\nDefault: 2\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","methods#Methods":"","remove#remove":"Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later.\nlocal zone = lib.zones.box({...})\nzone:remove()\nSetTimeout(500, function()\n lib.zones.poly(zone)\nend)","contains#contains":"Tests if a point exists inside the zone, returning a boolean.\nlocal zone = lib.zones.box({...})\nif zone:contains(vec3(1, 1, 1)) then\n print('point is inside zone!')\nend","usage-examples#Usage Examples":"function onEnter(self)\n print('entered zone', self.id)\nend\nfunction onExit(self)\n print('exited zone', self.id)\nend\nfunction inside(self)\n print('you are inside zone ' .. self.id)\nend\nlocal poly = lib.zones.poly({\n points = {\n vec(413.8, -1026.1, 29),\n vec(411.6, -1023.1, 29),\n vec(412.2, -1018.0, 29),\n vec(417.2, -1016.3, 29),\n vec(422.3, -1020.0, 29),\n vec(426.8, -1015.9, 29),\n vec(431.8, -1013.0, 29),\n vec(437.3, -1018.4, 29),\n vec(432.4, -1027.2, 29),\n vec(424.7, -1023.5, 29),\n vec(420.0, -1030.2, 29),\n vec(409.8, -1028.4, 29),\n },\n thickness = 2,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})\nlocal sphere = lib.zones.sphere({\n coords = vec3(442.5363, -1017.666, 28.65637),\n radius = 1,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})\nlocal box = lib.zones.box({\n coords = vec3(442.5363, -1017.666, 28.65637),\n size = vec3(1, 1, 1),\n rotation = 45,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})","zone-creation-script#Zone creation script":"You can use our builtin zone-creator with /zone - with poly, box or sphere as an argument.\nAvailable controls will be displayed on the right side.Zones will be saved to ox_lib/created_zones.lua with your chosen format.\nlocal poly = lib.zones.poly({\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n})\n{\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n},\nexports.ox_target:addPolyZone({\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n})"}},"/overextended/ox_lib/Modules/WaitFor/Shared":{"title":"Shared","data":{"libwaitfor#lib.waitFor":"Calls a function repeatedly until it receives a non-nil value, or it times out.\nThe function result is then returned.\nlib.waitFor(cb, errMessage, timeout)\ncb: function\nA function to call each frame.\nerrMessage?: string\nThe error message to display if the function times out.\ntimeout?: number | false\nThe duration to run the function for, defaulting to 1000ms, unless set to false.\nlocal value --[['abc']] = lib.waitFor(function()\n if math.random(0, 1) == 1 then return 'abc' end\nend)"}},"/overextended/ox_target":{"title":"Ox Target","data":{"":"A performant and flexible standalone targeting resource or \"third-eye\", with additional functionality for ox_inventory, ox_core, qbx_core, and es_extended.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","install-all-resource-dependencies#Install all resource dependencies":"ox_lib","download-a-release-or-clone-the-source-code#Download a release or clone the source code.":"git clone https://github.com/overextended/ox_target.git","config#Config":"Resource configuration is handled using convars.\n# Toggle targeting when pressing the hotkey, instead of holding it down.\nsetr ox_target:toggleHotkey 0\n# Change the key to enable targeting (https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard)\nsetr ox_target:defaultHotkey LMENU\n# Draw a sprite (circle) at the centroid of a zone.\nsetr ox_target:drawSprite 1\n# Enable built-in targeting options, e.g. toggling vehicle doors.\nsetr ox_target:defaults 1\n# Enable debugging / testing options, entity outlines, and a raycast indicator.\nsetr ox_target:debug 0\n# Enable / Disable leftclick to select options\nsetr ox_target:leftClick 1","supported-frameworks#Supported Frameworks":"These aren't necessary to run ox_target, but they will add additional features.\nox_core\nesx\nqbx_core"}},"/overextended/ox_target/TargetOptions":{"title":"TargetOptions","data":{"":"All target actions are formated as an array containing objects with the following properties.","targetoption#TargetOption":"label: string\nname?: string\nAn identifier used when removing an option.\nicon?: string\nName of a Font Awesome icon.\niconColor?: string\ndistance?: number\nThe max distance to display the option.\nbones?: string or string[]\nA bone name or array of bone names (see GetEntityBoneIndexByName).\noffset?: vector3\nOffset the targetable area of an entity, relative to the model dimensions.\noffsetAbsolute?: vector3\nOffset the targetable area of an entity, relative to the entity's world coords.\noffsetSize?: number\nThe radius of the targetable area for an entity offset.\ngroups?: string or string[] or table\nA group, array of groups, or pairs of groups-grades required to show the option.\nGroups are framework dependent, and may refer to jobs, gangs, etc.\nitems?: string or string[] or table\nAn item, array of items, or pairs of items-count required to show the option.\nItems are framework dependent.\nanyItem?: boolean\nOnly require a single item from the items table to exist.\ncanInteract?: function(entity, distance, coords, name, bone)\nOptions will always display if this is undefined.\nmenuName?: string\nThe option is only displayed when a menu has been set with openMenu.\nopenMenu?: string\nSets the current menu name, displaying only options for the menuName.\nonSelect?: function(data)\nexport?: string\nevent?: string\nserverEvent?: string\ncommand?: string","callback#Callback":"This is the data returned to a registered callback or event for selected option.A selected option will trigger a single action, in order of priority:\nonSelect\nexport\nevent\nserver event\ncommand\ndata: table\nentity: number\nThe id of the entity hit by the shape test. If triggering a server event, this is the network id instead.\ncoords: vector3\nThe resulting coordinates where the shape test hit a collision.\ndistance: number\nThe player's distance from the coords.\nzone?: number\nThe id of the selected zone, if applicable."}},"/overextended/ox_target/Functions/Client":{"title":"Client","data":{"":"All exports with the options argument expect a table with the targeting properties here.For some examples you can refer to defaults.lua or debug.lua.","disabletargeting#disableTargeting":"Toggle the availability of the targeting menu.\nexports.ox_target:disableTargeting(state)\nstate: boolean\nSetting state to true will turn off the targeting eye if it is active and prevent it from reopening until state is set to false again.","addglobaloption#addGlobalOption":"Creates new targetable options which are displayed at all times.\nexports.ox_target:addGlobalOption(options)\noptions: TargetOptions","removeglobaloption#removeGlobalOption":"Removes all options from the global options list with the option names.\nexports.ox_target:removeGlobalOption(optionNames)\noptionNames: string or string[]","addglobalobject#addGlobalObject":"Creates new targetable options for all Object entity types.\nexports.ox_target:addGlobalObject(options)\noptions: TargetOptions","removeglobalobject#removeGlobalObject":"Removes all options from the global Object list with the option names.\nexports.ox_target:removeGlobalObject(optionNames)\noptionNames: string or string[]","addglobalped#addGlobalPed":"Creates new targetable options for all Ped entity types (excluding players).\nexports.ox_target:addGlobalPed(options)\noptions: TargetOptions","removeglobalped#removeGlobalPed":"Removes all options from the global Ped list with the option names.\nexports.ox_target:removeGlobalPed(optionNames)\noptionNames: string or string[]","addglobalplayer#addGlobalPlayer":"Creates new targetable options for all Player entities.\nexports.ox_target:addGlobalPlayer(options)\noptions: TargetOptions","removeglobalplayer#removeGlobalPlayer":"Removes all options from the global Player list with the option names.\nexports.ox_target:removeGlobalPlayer(optionNames)\noptionNames: string or string[]","addglobalvehicle#addGlobalVehicle":"Creates new targetable options for all Vehicle entity types.\nexports.ox_target:addGlobalVehicle(options)\noptions: TargetOptions","removeglobalvehicle#removeGlobalVehicle":"Removes all options from the global Vehicle list with the option names.\nexports.ox_target:removeGlobalVehicle(optionNames)\noptionNames: string or string[]","addmodel#addModel":"Creates new targetable options for a specific model or list of models.\nexports.ox_target:addModel(models, options)\nmodels: number or string or Array\noptions: TargetOptions","removemodel#removeModel":"Removes all options from the models list with the option names.\nexports.ox_target:removeModel(models, optionNames)\nmodels: number or string or Array\noptionNames: string or string[]","addentity#addEntity":"Creates new targetable options for a specific network id or list of network ids (see NetworkGetNetworkIdFromEntity).\nexports.ox_target:addEntity(netIds, options)\nnetIds: number or number[]\noptions: TargetOptions","removeentity#removeEntity":"Removes all options from the networked entities list with the option names.\nexports.ox_target:removeEntity(netIds, optionNames)\nnetIds: number or number[]\noptionNames: string or string[]","addlocalentity#addLocalEntity":"Creates new targetable options for a specific entity handle or list of entity handles.\nexports.ox_target:addLocalEntity(entities, options)\nentities: number or number[]\noptions: TargetOptions","removelocalentity#removeLocalEntity":"Removes all options from the entities list with the option names.\nexports.ox_target:removeLocalEntity(entities, optionNames)\nentities: number or number[]\noptionNames: string or string[]","addspherezone#addSphereZone":"Creates a new targetable sphere zone.\nexports.ox_target:addSphereZone(parameters)\nparameters: table\ncoords: vector3\nname?: string\nAn optional name to refer to the zone instead of using the id.\nradius?: number\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","addboxzone#addBoxZone":"Creates a new targetable box zone.\nexports.ox_target:addBoxZone(parameters)\nparameters: table\ncoords: vector3\nname?: string\nAn optional name to refer to the zone instead of using the id.\nsize?: vector3\nrotation?: number\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","addpolyzone#addPolyZone":"Creates a new targetable poly zone.\nexports.ox_target:addPolyZone(parameters)\nparameters: table\npoints: vector3[]\nAn array of 3d points defining the polygon's shape.\nname?: string\nAn optional name to refer to the zone instead of using the id.\nthickness?: number\nThe height of the polygon, defaulting to 4.\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","removezone#removeZone":"Removes a targetable zone with the given id (returned by addBoxZone/addSphereZone).\nexports.ox_target:removeZone(id)\nid: number or string\nThe number id that is returned by addSphereZone, addBoxZone, or addPolyZone\nOR\nThe string name given to the zone."}},"/overextended/oxmysql":{"title":"OxMySQL","data":{"":"Uma substituição para mysql-async e ghmattimysql com API expandida e compatibilidade aprimorada para MySQL 8.","mysql-ou-mariadb#MySQL ou MariaDB?":"A maioria dos recursos para FiveM foi projetada para ser usada com MySQL 5.7 e pode enfrentar problemas de compatibilidade ao usar MySQL 8, por exemplo:\nMais palavras reservadas, como 'stored' e 'group'.\nCampos Longtext / JSON não suportam valores padrão.\nMariaDB é altamente recomendada por sua compatibilidade e desempenho aprimorado (em relação a todas as versões do MySQL).","devo-usar-o-xampp#Devo usar o XAMPP?":"Não. XAMPP é uma pilha de servidor web destinada a desenvolvimento, permitindo fácil desenvolvimento e teste locais.\nNão instale o XAMPP apenas para rodar seu banco de dados, e instale MariaDB diretamente.","instalação#Instalação":"","baixe-e-instale-mariadb#Baixe e instale MariaDB":"","baixe-a-última-versão-do-oxmysql#Baixe a última versão do oxmysql":"","configure-seu-servidor#Configure seu servidor":"Abra o arquivo de configuração do seu servidor.\nAdicione start oxmysql ao início da sua lista de recursos.\nConfigure sua string de conexão mysql e defina-a antes de iniciar quaisquer recursos.\n# Use seu formato preferido. Certifique-se de sempre usar set.\nset mysql_connection_string \"mysql://root:12345@localhost:3306/fivem\"\nset mysql_connection_string \"user=root;password=12345;host=localhost;port=3306;database=fivem\"\nCertos caracteres especiais são reservados ou não são suportados dependendo da sua string de conexão.\nEvite usar estes caracteres ; , / ? : @ & = + $ # e tente trocar o formato da string de conexão.","avisos-de-consulta-lenta#Avisos de consulta lenta":"Você receberá avisos se uma consulta demorar muito para ser concluída, configurável com uma variável de ambiente.\nO tempo de consulta pode não ser totalmente preciso.\nConsultas lentas podem não indicar um problema de banco de dados (ex.: travamentos do servidor).\nConsultas lentas na inicialização do servidor não são necessariamente problemáticas.\nset mysql_slow_query_warning 150","debug#Debug":"Habilitar a opção de debug imprimirá todas as consultas no console do servidor; você também pode usar uma lista para imprimir apenas de recursos específicos.\nset mysql_debug true\nset mysql_debug [\n \"ox_core\",\n \"ox_inventory\"\n]\nVocê pode modificar temporariamente a lista de recursos com comandos.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","compatibilidade#Compatibilidade":"Você pode deletar os seguintes recursos e permitir que oxmysql forneça sua funcionalidade.\nmysql-async\nghmattimysql","uso#Uso":"Os recursos podem importar métodos oxmysql incluindo nossa biblioteca, fornecendo alguns recursos de verificação de tipos e pequenas melhorias de desempenho sobre chamadas de exportação diretas.","lua#Lua":"Modifique fxmanifest.lua para o seu recurso e adicione o seguinte acima de qualquer outro arquivo de script.\nserver_script '@oxmysql/lib/MySQL.lua'","javascript#JavaScript":"Você pode usar exportações diretas ou instalar nosso pacote npm para intellisense e uso semelhante ao Lua.\n# With pnpm\npnpm add @overextended/oxmysql\n# With Yarn\nyarn add @overextended/oxmysql\n# With npm\nnpm install @overextended/oxmysql\nImporte o objeto oxmysql para o seu recurso.\nimport { oxmysql as MySQL } from '@overextended/oxmysql';","upserting#Upserting":"Quando não tiver certeza se uma linha deve ser inserida no banco de dados ou se uma linha existente deve ser atualizada, as consultas devem verificar a duplicidade de chaves.\nMySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })\nIsso é preferível a verificar a existência de uma linha e, em seguida, inserir ou atualizar dependendo do resultado.\nAlém disso, ao contrário do uso de 'REPLACE INTO', a linha não é deletada e reinserida."}},"/overextended/oxmysql/Functions/insert":{"title":"insert","data":{"":"Insere uma nova entrada no banco de dados e retorna o ID da linha inserida, se válido.","promise#Promise":"local id = MySQL.insert.await('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', {\n identifier, firstName, lastName\n})\nprint(id)\nconst id = await MySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', [\n identifier, firstName, lastName\n])\nconsole.log(id)\nAliases\nMySQL.Sync.insert\nexports.ghmattimysql.executeSync\nexports.oxmysql.insert_async","callback#Callback":"MySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', {\n identifier, firstName, lastName\n}, function(id)\n print(id)\nend)\nMySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', [\n identifier, firstName, lastName\n], (id) => {\n console.log(id)\n})\nAliases\nMySQL.Async.insert\nexports.ghmattimysql.execute\nexports.oxmysql.insert"}},"/overextended/oxmysql/Functions/query":{"title":"query","data":{"":"Quando dados são selecionados, retorna todas as linhas e colunas correspondentes; caso contrário, retorna dados como insertId, affectedRows, etc.","promise#Promise":"local response = MySQL.query.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nif response then\n for i = 1, #response do\n local row = response[i]\n print(row.firstname, row.lastname)\n end\nend\nconst response = await MySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nif (response) {\n response.forEach((row) => {\n console.log(row.identifier, row.firstname, row.lastname)\n })\n}\nAliases\nMySQL.Sync.fetchAll\nexports.ghmattimysql.execute\nexports.oxmysql.query_async","callback#Callback":"MySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n if response then\n for i = 1, #response do\n local row = response[i]\n print(row.firstname, row.lastname)\n end\n end\nend)\nMySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n if (response) {\n response.forEach((row) => {\n console.log(row.firstname, row.lastname)\n })\n }\n})\nAliases\nMySQL.Async.fetchAll\nexports.ghmattimysql.execute\nexports.oxmysql.query"}},"/overextended/oxmysql/Functions/prepare":{"title":"prepare","data":{"":"O método prepare pode ser usado para executar consultas chamadas com frequência de forma mais rápida e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.\nDATE não retornará a string de data comumente usada no FiveM.\nTINYINT 1 e BIT não retornarão um valor booleano.\nVocê só pode usar os marcadores de valor ?; os marcadores de coluna ?? e os marcadores nomeados irão gerar um erro.\nAo contrário de rawExecute, a instrução SELECT retornará uma coluna, linha ou um array de linhas, dependendo do número de colunas e linhas selecionadas.","promise#Promise":"local response = MySQL.prepare.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nprint(json.encode(response, { indent = true, sort_keys = true }))\nconst response = await MySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nconsole.log(JSON.stringify(response))\nAliases\nexports.oxmysql.prepare_async","callback#Callback":"MySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n print(json.encode(response, { indent = true, sort_keys = true }))\nend)\nMySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n console.log(JSON.stringify(response))\n})\nAliases\nexports.oxmysql.prepare"}},"/overextended/oxmysql/Functions/rawExecute":{"title":"rawExecute","data":{"":"rawExecute pode ser usado para executar consultas frequentemente chamadas mais rapidamente e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.\nA data não retornará a string de data normalmente usada no FiveM.\nTINYINT 1 e BIT não retornarão um valor booleano.\nVocê pode usar apenas ? como substituto de valor, os substitutos ?? para colunas e os nomes de parâmetros irão gerar um erro.\nAo contrário do prepare, a instrução SELECT sempre retornará um array de linhas.\nQuando usado com SELECT, o valor de retorno corresponderá a query, single ou scalar, dependendo do número de colunas e linhas selecionadas.","promise#Promise":"local response = MySQL.rawExecute.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nprint(json.encode(response, { indent = true, sort_keys = true }))\nconst response = await MySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nconsole.log(JSON.stringify(response))\nAliases\nexports.oxmysql.rawExecute_async","callback#Callback":"MySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n print(json.encode(response, { indent = true, sort_keys = true }))\nend)\nMySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n console.log(JSON.stringify(response))\n})\nAliases\nexports.oxmysql.rawExecute"}},"/overextended/oxmysql/Functions/scalar":{"title":"scalar","data":{"":"Retorna a primeira coluna de uma única linha.","promise#Promise":"local firstName = MySQL.scalar.await('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n})\nprint(firstName)\nconst firstName = await MySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n])\nconsole.log(firstName)\nAliases\nMySQL.Sync.fetchScalar\nexports.ghmattimysql.scalar\nexports.oxmysql.scalar_async","callback#Callback":"MySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n}, function(firstName)\n print(firstName)\nend)\nMySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n], (firstName) => {\n console.log(firstName)\n})\nAliases\nMySQL.Async.fetchScalar\nexports.ghmattimysql.scalar\nexports.oxmysql.scalar"}},"/overextended/oxmysql/Functions/update":{"title":"update","data":{"":"Retorna o número de linhas afetadas pela consulta.","promise#Promise":"local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {\n newName, identifier\n})\nprint(affectedRows)\nconst affectedRows = await MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [\n newName, identifier\n])\nconsole.log(affectedRows)\nAliases\nMySQL.Sync.execute\nexports.ghmattimysql.executeSync\nexports.oxmysql.update_async","callback#Callback":"MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', {\n newName, identifier\n}, function(affectedRows)\n print(affectedRows)\nend)\nMySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [\n newName, identifier\n], (affectedRows) => {\n console.log(affectedRows)\n})\nAliases\nMySQL.Async.execute\nexports.ghmattimysql.execute\nexports.oxmysql.update"}},"/overextended/oxmysql/Functions/transaction":{"title":"transaction","data":{"":"Uma transação executa várias consultas e as confirma apenas se todas tiverem sucesso.\nSe uma falhar, nenhuma das consultas será confirmada.O valor de retorno é um booleano, que indica o resultado da transação.","formato-específico#Formato específico":"Ao usar este formato, você deve passar um array contendo conjuntos de consultas e parâmetros para o método da transação.\nNeste caso, suas consultas não precisam ser necessariamente iguais, e os valores são exclusivos para cada consulta.\n-- Você pode renomear \"values\" como \"parameters\" para compatibilidade com mysql-async.\nlocal queries = {\n { query = 'INSERT INTO `test` (id) VALUES (?)', values = { 1 }},\n { query = 'INSERT INTO `test` (id, name) VALUES (?, ?)', values = { 2, 'bob' }},\n}\n-- Você também pode passar um array de arrays.\nlocal queries = {\n { 'INSERT INTO `test` (id) VALUES (?)', { 1 } },\n { 'INSERT INTO `test` (id, name) VALUES (?, ?)', { 2, 'bob' } },\n}","formato-compartilhado#Formato compartilhado":"Ao usar este formato, você deve passar um array contendo consultas e um conjunto contendo parâmetros compartilhados para o método da transação.\nNeste caso, suas consultas não precisam ser necessariamente iguais, e os valores são exclusivos para cada consulta.\n-- Você pode renomear \"values\" como \"parameters\" para compatibilidade com mysql-async.\nlocal queries = {\n 'INSERT INTO `test` (id, name) VALUES (@someid, @somename)',\n 'SET `name` = @newname IN `test` WHERE `id` = @someid'\n}\nlocal values = {\n someid = 2,\n somename = 'John Doe',\n newname = 'John Notdoe'\n}","promise#Promise":"local success = MySQL.transaction.await(queries, values --[[deixe nil para formato específico]])\nprint(success)\nconst success = await MySQL.transaction(queries, values /*deixe nil para formato específico*/)\nconsole.log(success)\nAliases\nMySQL.Sync.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction_async","callback#Callback":"-- específico\nMySQL.transaction(queries, values, function(success)\n print(success)\nend)\n-- compartilhado\nMySQL.transaction(queries, function(success)\n print(success)\nend)\n// específico\nMySQL.transaction(queries, (success) => {\n console.log(success)\n})\n// compartilhado\nMySQL.transaction(queries, values, (success) => {\n console.log(success)\n})\nAliases\nMySQL.Async.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction","nível-de-isolamento-da-transação#Nível de Isolamento da Transação":"Isso pode ser configurado através da convar mysql_transaction_isolation_level, que é um número inteiro variando de 1-4.\nO valor padrão é 2.\nValor da Convar\tResultado\t1\tRepeatable Read\t2\tRead Committed\t3\tRead Uncommitted\t4\tSerializable"}},"/overextended/oxmysql/placeholders":{"title":"Placeholders","data":{"":"Placeholders permitem que parâmetros de consulta sejam executados de maneira segura, prevenindo métodos comuns de injeção de SQL.Os parâmetros podem ser passados como um array ou objeto (referido como parâmetros nomeados).\nlocal identifier = 'license:abc123'\nlocal group = 'admin'\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?', { identifier, group })\n-- Placeholders nomeados (descontinuado)\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group', {\n group = group\n identifier = identifier\n})\nEsses placeholders são distintos de declarações preparadas, que são gerenciadas pelo servidor MySQL; você pode usar MySQL.prepare para consultas mais otimizadas e seguras."}},"/overextended/oxmysql/ui":{"title":"Usando a Interface de Depuração (Debug UI)","data":{"":"A interface de depuração permite que você veja facilmente todas as consultas que foram executadas pelos recursos, o tempo de resposta das consultas e as estatísticas por recurso.\nVocê deve ativar essa interface apenas durante o desenvolvimento, ou com um número pequeno de jogadores - para servidores maiores, consulte o registro nativo de MySQL.Antes de usar a interface, você deve garantir que tenha o convar mysql_ui configurado como true:\nset mysql_ui true\nTambém certifique-se de que você tenha permissão de acesso command ou command.mysql, então você deverá ser capaz de usar o comando mysql no jogo.\nVocê não precisa ter o mysql_debug ativado para usar a interface de depuração.\nPágina principal\nA página principal exibe os recursos que executaram consultas, onde você pode filtrá-los através de uma barra de pesquisa. Além disso, mostra seus dados gerais junto a um gráfico de pizza, que indica quais recursos consumiram mais tempo de consulta.Página do recurso\nA página do recurso mostra todas as consultas e seu tempo de execução em uma tabela, das quais o recurso executou, juntamente com a quantidade total de consultas, tempo de execução e consultas lentas para o recurso selecionado.As colunas podem ser ordenadas por ordem crescente ou decrescente, e ao passar o mouse sobre uma consulta, você verá a consulta completa em uma dica de ferramenta.\nConsultas que excedem o valor de mysql_slow_query_warning (por padrão 150ms) são exibidas em laranja.\nPara fins de demonstração, o convar mysql_slow_query_warning foi configurado para 5ms aqui."}},"/qbox":{"title":"Introdução","data":{"":"Qbox é uma framework de roleplay para FiveM criada em 27 de setembro de 2022.Começando como um fork do QBCore, seu objetivo era melhorar o QBCore mantendo a compatibilidade retroativa. \nHoje, esta framework busca ser ainda maior, utilizando os recursos da overextended para alcançar seus objetivos.","suporte--perguntas#Suporte & Perguntas":"O suporte para o Qbox é fornecido pela comunidade nos canais de suporte do Discord do Qbox.Felizmente, o Qbox conta com uma ótima comunidade com experiências variadas.\nIncentivamos todos a se ajudarem de forma amigável e respeitosa.","convertendo-do-qbcore#Convertendo do QBCore":"Já tem um servidor que usa o QBCore? Sem problemas!\nO Qbox é compatível com quase todos os scripts do QBCore, com algumas exceções (saiba mais na FAQ).Pretende migrar para o Qbox para poder utilizar suas novas e modernas funções e recursos?\nAprenda como converter seus recursos para o Qbox em Convertendo do QBCore.","nota-para-desenvolvedores#Nota para Desenvolvedores":"Pretende utilizar o qbx_core no seu próximo recurso?\nCertifique-se de ler o Guia do Desenvolvedor para aprender sobre os princípios que ajudam a evitar más práticas e a melhorar sua experiência de desenvolvimento.","contribuindo-com-o-qbox#Contribuindo com o Qbox":"Contribuições são sempre bem-vindas, mas preferimos qualidade à quantidade!\nPor favor, leia nossas diretrizes de contribuição para aprender a melhor forma de contribuir.","perguntas-frequentes#Perguntas Frequentes":"Confira a FAQ para aprender mais sobre o Qbox."}},"/resources":{"title":"Resources","data":{}},"/guides/nodejs":{"title":"Node.js","data":{"":"Node.js é um runtime de JavaScript utilizado para criar aplicações. No contexto do FiveM, ele é necessário para agrupar recursos em um único pacote que pode ser executado tanto no servidor quanto no cliente.\nBaixe e instale a versão LTS do Node.js.\nAbra um terminal de linha de comando (ex.: Terminal, Prompt de Comando).\nDigite node --version para confirmar a instalação com sucesso."}},"/guides/vscode":{"title":"VS Code","data":{"":"O Visual Studio Code é nosso editor recomendado ao trabalhar com Lua.","extensões-recomendadas#Extensões recomendadas":"As extensões permitem que você adicione linguagens, depuradores e outras ferramentas ao VS Code, melhorando sua experiência como desenvolvedor.","sumnekolua#sumneko.lua":"Cuidado ao usar essa extensão com SSH no vsCode. Ela é conhecida por consumir RAM e CPU excessivamente no servidor e pode travá-lo.\nO Lua Language Server fornece numerosos recursos de linguagem para tornar o desenvolvimento mais fácil e rápido, por exemplo:\nAnotações\nAutocompletar\nFormatação de código\nDiagnósticos/avisos\nVerificação de tipo dinâmica\nVerificação de sintaxe","overextendedcfxlua-vscode#overextended.cfxlua-vscode":"Funciona junto com o Lua Language Server para fornecer declarações de função e tipo do runtime Lua da Cfx, dialeto Lua, globais de ambiente e nativos do jogo."}},"/overextended/ox_inventory/Guides/shops":{"title":"Creating Shops","data":{"":"Builtin shops are defined in data/shops.lua, and more can be added here to benefit from the built-in markers or zones support.","shop-definition#Shop definition":"{\n General = {\n name = 'Shop',\n blip = {\n id = 59,\n colour = 69,\n scale = 0.8\n },\n inventory = {\n { name = 'burger', price = 10 },\n { name = 'water', price = 10 },\n { name = 'cola', price = 10 },\n },\n locations = {\n vec3(25.7, -1347.3, 29.49),\n },\n targets = {\n -- Shop using a BoxZone\n {\n loc = vec3(25.06, -1347.32, 29.5),\n length = 0.7,\n width = 0.5,\n heading = 0.0,\n minZ = 29.5,\n maxZ = 29.9,\n distance = 1.5\n },\n -- Shop using a ped\n {\n ped = `mp_m_shopkeep_01`,\n scenario = 'WORLD_HUMAN_AA_COFFEE',\n loc = vec3(24.407, -1347.283, 28.497),\n heading = 270.311,\n },\n }\n }\n}\nname: string\nThe label to display when the shop is open.\nblip?: table\nCreates a blip with the given settings. Leave it undefined for no blip to be created.\nid: number\ncolour: number\nscale: number\ngroups?: table\nKey-value pairs of job name and minimum grade to access the shop.\n{[\"police\"] = 0, [\"ambulance\"] = 2}\ninventory: table\nname: string\nprice: number\ncurrency?: string\nItem to be used as currency.\ncount?: number\nAmount of the item in the stock.\nlicense?: string\nLicense required to purchase the item.\nmetadata?: table\ngrade?: number | number[]\nMinimal grade required to purchase the item.\nlocations?: vector3[]\nAn array of coordinates to create unique instances of the shop archetype at, using markers.\ntargets?: table[]\nAn array of target settings to create unique instances of the shop archetype at, using peds or BoxZones (PolyZone data structure).\nmodel?: number[]\nAn array of models that can be targetted to open a shop. Used for vending machines.\nTargets and model are only available when using a targeting resource like ox_target.","register-during-runtime#Register during runtime":"Shops can be added using exports.ox_inventory:RegisterShop on the server, however they cannot utilise any client-only features.\nBlips, markers, and zones will not be created.\nMust use \"locations\" and not \"targets\" to define each shop using the archetype.","example#Example":"exports.ox_inventory:RegisterShop('TestShop', {\n name = 'Test shop',\n inventory = {\n { name = 'burger', price = 10 },\n { name = 'water', price = 10 },\n { name = 'cola', price = 10 },\n },\n locations = {\n vec3(223.832962, -792.619751, 30.695190),\n },\n groups = {\n police = 0\n },\n})"}},"/overextended/ox_lib/Modules/Dui/Javascript/Client":{"title":"Client","data":{"":"Simple and centralised dui creation, supporting sending message, change url and deletion\nDui(data)\ndata: object\nurl: string\nwidth: number\nheight: number\ndebug?: boolean\nReturns:\ndui: Dui\nurl: string\nduiObject: number\nduiHandle: string\nruntimeTxd: number\ntxdObject: number\ndictName: string\ntxtName: string\nsetUrl: function(url: string)\nsendMessage: function(data: object)\nremove: function","usage-example#Usage Example":"import { Dui, cache } from '@overextended/ox_lib/client'\nconst dui = new Dui({\n\turl: `nui://${cache.resource}/web/index.html`, \n\twidth: 1920, \n\theight: 1080,\n\tdebug: true\n})\n// Change url\ndui.setUrl(\"https://google.com\")\n// Send a message\ndui.sendMessage({\n\taction: \"display\",\n\tvalue: true\n})\n// Destroy\ndui.remove()"}},"/overextended/ox_lib/Modules/Dui/Lua/Client":{"title":"Client","data":{"":"Simple and centralised dui creation, supporting sending message, change url and deletion","libduinew#lib.dui:new":"Constructs instance of Dui.\nlib.dui:new(data)\ndata: table\nurl: string\nwidth: number\nheight: number\ndebug?: boolean\nReturns:\ndui: Dui\nurl: string\nduiObject: number\nduiHandle: string\nruntimeTxd: number\ntxdObject: number\ndictName: string\ntxtName: string\nsetUrl: function(url: string)\nsendMessage: function(data: table)\nremove: function","usage-example#Usage Example":"local dui = lib.dui:new({\n\turl = (\"nui://%s/web/index.html\"):format(cache.resource), \n\twidth = 1920, \n\theight = 1080,\n\tdebug = true\n})\n-- Change url\ndui:setUrl(\"https://google.com\")\n-- Send a message\ndui:sendMessage({\n\taction = \"display\",\n\tvalue = true\n})\n-- Destroy\ndui:remove()"}},"/overextended/oxmysql/Functions/single":{"title":"single","data":{"":"Retorna todas as colunas selecionadas para uma única linha.","promise#Promise":"local row = MySQL.single.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n})\nif not row then return end\nprint(row.firstname, row.lastname)\nconst row = await MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n])\nif (!row) return;\nconsole.log(row.firstname, row.lastname)\nAliases\nexports.oxmysql.single_async","callback#Callback":"MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n}, function(row)\n if not row then return end\n print(row.firstname, row.lastname)\nend)\nMySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n], (row) => {\n if (!row) return;\n console.log(row.firstname, row.lastname)\n})\nAliases\nexports.oxmysql.single"}},"/overextended/oxmysql/benchmark":{"title":"Benchmark","data":{"":"A medição de desempenho é baseada no tempo gasto para receber uma resposta dos exports.\nAs velocidades reais das consultas serão relatadas na interface de depuração e no console do servidor com mysql_debug ativado.As velocidades podem variar consideravelmente com base no hardware do sistema, configurações do banco de dados, versão do banco de dados e a carga de trabalho atual.","script#Script":"Este script testa os tempos de exportação ao usar o runtime Lua 5.4 com a sintaxe lib/MySQL.lua.\nlocal function execQuery(msg, fn, query, parameters)\n local start = os.nanotime()\n local result = fn(query, parameters)\n local finish = os.nanotime()\n print()\n print(msg)\n print('Executou ' .. (type(query) == 'string' and 1 or #query) .. ' consultas em ' .. (finish - start) / 1e6 .. 'ms')\n return result\nend\nCreateThread(function()\n local initTable = {\n 'DROP TABLE `test_table`',\n [[CREATE TABLE `test_table` (\n `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `username` VARCHAR(50) NOT NULL DEFAULT '0',\n `identifier` VARCHAR(50) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n )]],\n 'TRUNCATE `test_table`',\n 'ALTER TABLE `test_table` AUTO_INCREMENT = 1',\n }\n execQuery('Inicializando test_table', MySQL.transaction.await, initTable)\n local queries = {\n { query = 'INSERT INTO `test_table` (identifier) VALUES (?)', values = { 'abcdef1' }},\n { query = 'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()', values = { 'bob1' }},\n }\n execQuery('{ query: string, values: string }[] transação', MySQL.transaction.await, queries)\n queries = {\n { 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef2' } },\n { 'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()', { 'bob2' } },\n }\n execQuery('[string, any[]][] transação', MySQL.transaction.await, queries)\n queries = {\n 'INSERT INTO `test_table` (identifier) VALUES (\"abcdef3\")',\n 'UPDATE `test_table` SET `username` = \"bob3\" WHERE `id` = LAST_INSERT_ID()',\n }\n execQuery('string[] transação', MySQL.transaction.await, queries)\n local insertUsers = {}\n for i = 1, 10000 do\n insertUsers[i] = { 'INSERT INTO `test_table` (username, identifier) VALUES (?, ?)',\n { 'Testuser_' .. i, 'abcdef' .. i } }\n end\n execQuery('inserir ' .. #insertUsers .. ' test users', MySQL.transaction.await, insertUsers)\n local selectUserIds = {}\n for i = 1, 10000 do\n if i % 4 == 0 then\n selectUserIds[math.tointeger(i / 4)] = { 'abcdef' .. i }\n end\n end\n execQuery('selecionar todo 4º userid', MySQL.prepare.await, 'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1', selectUserIds)\n local insertid = execQuery('inserir', MySQL.insert.await, 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef' })\n local update = execQuery('atualizar', MySQL.update.await, 'UPDATE `test_table` SET `username` = ? WHERE `id` = ?', { 'bobby', insertid })\n local scalar = execQuery('escala', MySQL.scalar.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })\n local single = execQuery('único', MySQL.single.await, 'SELECT * FROM `test_table` WHERE `id` = ?', { insertid })\n print(json.encode(execQuery('preparar', MySQL.prepare.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })))\n print(insertid, update, scalar, json.encode(single))\n execQuery('consulta', MySQL.query.await, 'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1', { 419 })\nend)","resultados#Resultados":"[script:test] initialise test_table\n[script:test] Executed 4 queries in 42.7789ms\n[script:test]\n[script:test] { query: string, values: string }[] transaction\n[script:test] Executed 2 queries in 8.0145ms\n[script:test]\n[script:test] [string, any[]][] transaction\n[script:test] Executed 2 queries in 4.0278ms\n[script:test]\n[script:test] string[] transaction\n[script:test] Executed 2 queries in 3.4743ms\n[script:test]\n[script:test] insert 10000 test users\n[script:test] Executed 10000 queries in 2064.211ms\n[script:test]\n[script:test] select every 4th userid\n[script:test] Executed 1 queries in 2803.7134ms\n[script:test]\n[script:test] insert\n[script:test] Executed 1 queries in 2.8743ms\n[script:test]\n[script:test] update\n[script:test] Executed 1 queries in 2.8675ms\n[script:test]\n[script:test] scalar\n[script:test] Executed 1 queries in 1.5387ms\n[script:test]\n[script:test] single\n[script:test] Executed 1 queries in 1.3389ms\n[script:test]\n[script:test] prepare\n[script:test] Executed 1 queries in 1.6577ms\n[script:test] \"bobby\"\n[script:test] 10004 1 bobby {\"identifier\":\"abcdef\",\"username\":\"bobby\",\"id\":10004}\n[script:test]\n[script:test] query\n[script:test] Executed 1 queries in 1.1588ms"}}} \ No newline at end of file +{"/guides":{"title":"Guias","data":{"":"Guias gerais para trabalhar com recursos.\nGit\nNodeJS\nPNPM\nOx Types\nVisual Studio Code"}},"/guides/git":{"title":"Git","data":{"":"Git é um sistema de controle de versão, permitindo que mudanças sejam rastreadas, mescladas e revertidas de maneira eficaz.Como nossos recursos estão hospedados no GitHub, pode ser muito útil aprender a criar seu próprio repositório para acompanhar as alterações e se manter atualizado. Se você planeja fazer suas próprias mudanças em nossos recursos, isso permitirá que você mantenha suas alterações sem risco de perda de dados.\nConsulte o guia do GitHub para configurar o Git.\nVocê pode usar um cliente GUI para Git, como o GitKraken, para melhorar seu fluxo de trabalho e manter as mudanças de forma mais fácil."}},"/guides/pnpm":{"title":"pnpm","data":{"":"pnpm é um gerenciador de pacotes rápido e eficiente em termos de espaço em disco, sendo uma alternativa ao npm e ao yarn.\nCertifique-se de ter instalado o Node.js.\nAbra um terminal de linha de comando (ex.: Terminal, Prompt de Comando).\nDigite npm install -g pnpm para instalar o pacote globalmente.\nVocê pode instalar dependências com o pnpm utilizando pnpm i.\nVocê pode consultar os arquivos package.json para os scripts disponíveis, por exemplo:\n\"scripts\": {\n \"start\": \"vite\",\n \"watch\": \"vite build --watch\",\n \"build\": \"tsc && vite build\",\n \"preview\": \"vite preview\",\n \"format\": \"prettier --write \\\"./src/**/*.{ts,tsx,css}\\\"\"\n},\nUsando o exemplo acima, pnpm build irá rodar o script de build para o pacote fornecido."}},"/guides/types":{"title":"Types","data":{"configurar-git-vscode-e-extensões-do-vscode#Configurar git, vscode e extensões do vscode":"","baixar-nossas-definições-de-tipo-lua#Baixar nossas definições de tipo Lua":"git clone https://github.com/overextended/ox_types.git","atualizar-suas-configurações#Atualizar suas configurações":"Você pode modificar as configurações de usuário, espaço de trabalho ou pasta no vscode.\nCrie uma entrada em Lua.workspace.library apontando para o diretório clonado ou subdiretórios específicos.\n\"Lua.workspace.library\": [\n \"F:/GitHub/ox_types/types\",\n \"F:/GitHub/ox_lib\"\n],"}},"/overextended":{"title":"Introdução","data":{"":"Aqui você pode encontrar toda a documentação oficial dos recursos desenvolvidos pela equipe Overextended.","apoie-a-equipe-overextended#Apoie a equipe Overextended":"Eles gostam de poder criar e compartilhar trabalhos livres e de código aberto, mas eles frequentemente exigem tempo e esforço consideráveis para manutenção e suporte.Se você usa frequentemente esses recursos e gosta do que fazem, considere apoiá-los para que possam continuar o trabalho.","códigos-de-criador#Códigos de Criador":"Os códigos de criador permitem que as lojas Tebex compartilhem uma porcentagem da compra com a Overextended, enquanto oferecem um desconto ao cliente. Eles fazem esses acordos para divulgar criadores confiáveis que atendem aos critérios deles.\nOs recursos são altamente configuráveis ou, preferencialmente, com código-fonte disponível.\nConfiam que os clientes receberão assistência.\nO criador é um membro conhecido da comunidade Overextended.\nMais informações sobre esses criadores estão disponíveis no Discord Overextended.Para acessar os códigos clique aqui"}},"/":{"title":"Introdução","data":{"":"Aqui você pode encontrar a documentação oficial para os recursos desenvolvidos ou traduzidos pela mri-Qbox.Esta documentação foi baseada nas documentações oficiais de Overextended e Qbox e terá os recursos deles traduzidos para o português.Se você acha que algo na documentação não está correto, você pode ir até aquela página, clicar em \"Editar esta página\" e nos enviar um Pull Request.","to-the-overextended-team#To the Overextended team":"We left the links pointing to your original documentation and discount codes/custom URLs in order to thank you for your awesome work. Please reach to us if are there any issues.","to-the-qbox-team#To the Qbox team":"We left the links pointing to your original documentation in order to thank you for your awesome work. Please reach to us if are there any issues.","ajude-nosso-time#Ajude nosso time":"Nós adoramos a ideia de criar e compartilhar recursos gratuitos e abertos, mas eles geralmente requerem tempo e esforço para manterem e suportar.Se você usa nossas resources frequentemente e curte o que a gente faz, considere contribuir para nos ajudar. Nos procure no Discord para saber mais.","fivemanage#Fivemanage":"Fivemanage é um serviço de gerenciamento em nuvem voltado para servidores de jogos, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM.Os serviços incluem um plano gratuito com espaço de armazenamento de mídia limitado, além de vários planos pagos projetados para acomodar servidores maiores que precisam de mais espaço de armazenamento e recursos de registro.Iniciar com Fivemanage E use o código OX10 para obter 10% de desconto na sua assinatura – para sempre!","fivemerr#Fivemerr":"Fivemerr é um serviço de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM."}},"/overextended/ox_core":{"title":"Ox Core","data":{"":"Um framework moderno para FiveM, projetado para oferecer suporte adequado a recursos como OneSync, statebags e entidades no lado do servidor.","receita-txadmin#Receita txAdmin":"Se você está procurando instalar e configurar rapidamente o ox_core, tente usar nossa receita.","instalação#Instalação":"Recomendamos fortemente consultar os Guias para configurar as ferramentas de desenvolvimento necessárias.","instale-todas-as-dependências-do-recurso#Instale todas as dependências do recurso.":"oxmysql\nox_lib","baixe-a-última-versão-ou-compile-o-código-fonte#Baixe a última versão ou compile o código-fonte.":"Configure Git, Node.js, e pnpm.\nBaixe e configure MariaDB 11.4+.\nExecute os seguintes comandos no seu CLI (ex.: Terminal, Prompt de Comando).\ngit clone https://github.com/overextended/ox_core.git\ncd ox_core\npnpm i\npnpm build","instale-dependências-opcionais#Instale dependências opcionais.":"Esses recursos não são estritamente necessários, mas são fortemente recomendados.\nox_inventory\nnpwd\nillenium-appearance","usando-ox_core-nos-seus-recursos#Usando ox_core nos seus recursos":"","lua#Lua":"Você pode importar as definições do ox_core carregando @ox_core/lib/init.lua no seu recurso.\nIsto pode ser um client_script ou server_script, se preferir.\nshared_script '@ox_core/lib/init.lua'\nSe preferir, você pode usar nossa função require do ox_lib.\nlocal Ox = require '@ox_core/lib/init'","javascript#JavaScript":"Para usar o ox_core com seus recursos JavaScript, você precisará do nosso pacote npm, que fornece suporte completo para TypeScript e Intellisense.\nPara começar, experimente nosso fivem-typescript-boilerplate e instale o pacote ox_core.\npnpm i @overextended/ox_core","configuração#Configuração":"A configuração do recurso é gerenciada usando convars.","replicados#Replicados":"Esses convars devem usar o comando setr para serem lidos pelos clientes.\nox:debug\nPadrão: false\nAtiva mensagens e comandos de depuração. Habilitado por padrão ao usar pnpm watch.\nox:characterSlots\nPadrão: 1\nDefine o número de slots de personagem disponíveis para recursos de seleção de personagens (ex.: ox_charselect).\nox:plateFormat\nPadrão: \"........\"\nConsulte SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN.\nox:deathSystem\nPadrão: true\nAtiva o sistema de morte e respawn integrado.\nox:characterSelect\nPadrão: true\nAtiva o registro de personagem integrado e utiliza esse personagem ao entrar.\nox:spawnLocation\nPadrão: [-258.211, -293.077, 21.6132, 206.0]\nDefine o local de spawn padrão para personagens recém-criados."}},"/overextended/ox_core/Classes/Server/OxAccount":{"title":"OxAccount","data":{"oxaccount#OxAccount":"accountId number","oxaccountmetadata#OxAccountMetadata":"id: number\nbalance: number\nisDefault: number\nlabel?: boolean\nowner?: number\ngroup?: string\ntype: personal | shared | group","oxaccountget#OxAccount.get":"Pega o valor de uma chave específica dos metadados da conta.\naccount.get(key)\nParâmetros\nkey: string | string[]\nRetornos\nOxAccountMetadata[key] | OxAccountMetadata[key][]\nRetorna um array se forem passadas múltiplas chaves.","oxaccountaddbalance#OxAccount.addBalance":"Adiciona fundos a conta.\naccount.addBalance({ amount, message })\nParâmetros\nobject\namount: number\nmessage?: string\nRetornos\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccountremovebalance#OxAccount.removeBalance":"Remove fundos da conta.\naccount.removeBalance({ amount, message, overdraw })\nParâmetros\nobject\namount: number\nmessage?: string\noverdraw?: boolean\nRetornos\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccounttransferbalance#OxAccount.transferBalance":"Transfere fundos para outra conta.\naccount.transferBalance({ toId, amount, overdraw, message, note, actorId })\nParâmetros\nobject\ntoId: number\nO accountId que receberá os fundos.\namount: number\nmessage?: string\noverdraw?: boolean\nnote?: string\nactorId? number\nO charId do player que fez a transferência.\nRetornos\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_balance' | 'something_went_wrong'","oxaccountdepositmoney#OxAccount.depositMoney":"Deposita dinheiro na conta.\naccount.transferBalance(playerId, amount, message, note)\nParâmetros\nplayerId: number\namount: number\nmessage?: string\nnote?: string\nRetornos\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'insufficient_funds' | 'no_balance' | 'no_access' | 'something_went_wrong'","oxaccountwithdrawmoney#OxAccount.withdrawMoney":"Retira dinheiro da conta(saque).\naccount.transferBalance(playerId, amount, message, note)\nParâmetros\nplayerId: number\namount: number\nmessage?: string\nnote?: string\nRetornos\nobject\nsuccess: boolean\nmessage: 'amount_not_number' | 'no_charId' | 'insufficient_funds' | 'no_balance' | 'no_access' | 'something_went_wrong'","oxaccountdeleteaccount#OxAccount.deleteAccount":"Marca a conta como excluída. Ela não pode mais ser acessada, mas permanece no banco de dados.\naccount.deleteAccount()\nRetornos\nobject\nsuccess: boolean\nmessage: 'something_went_wrong'","oxaccountgetcharacterrole#OxAccount.getCharacterRole":"Pega o cargo de acesso de um personagem pelo seu charId ou stateId.\naccount.getCharacterRole(id)\nParâmetros\nid: number | string\nRetornos\nstring","oxaccountsetcharacterrole#OxAccount.setCharacterRole":"Seta o cargo de acesso de um personagem pelo seu charId ou stateId.\naccount.setCharacterRole(id, role)\nParâmetros\nid: number | string\nrole?: string\nRetornos\nobject\nsuccess: boolean\nmessage: 'something_went_wrong'","oxaccountplayerhaspermission#OxAccount.playerHasPermission":"Verifica se o personagem ativo do jogadortem permissão para realizar uma ação na conta.\naccount.playerHasPermission(playerId, permission)\nParâmetros\nplayerId: number\npermission: string\nRetornos\nboolean","oxaccountsetshared#OxAccount.setShared":"Marca a conta como compartilhada, permitindo que permissões sejam atribuidas a outros personagens.\naccount.setShared()\nRetornos\nobject\nsuccess: boolean\nmessage: 'update_account_error'","oxaccountcreateinvoice#OxAccount.createInvoice":"Cria uma nova cobrança na conta.\naccount.createInvoice(invoice)\nParâmetros\ninvoice: object\nactorId?: number;\nO charId do player que fez a cobrança.\ntoAccount: number;\nO accountId da conta que receberá a cobrança.\namount: number;\nmessage: string;\ndueDate: string;\nRetornos\nobject\nsuccess: boolean\nmessage: 'no_charId' | 'no_permission' | 'no_target_account'"}},"/overextended/ox_core/Classes/Client/OxPlayer":{"title":"OxPlayer","data":{"oxplayer#OxPlayer":"state: StateBagInterface\nuserId: number\ncharId?: number\nstateId?: string","oxplayeraddstatus#OxPlayer.addStatus":"Aumenta o valor de um status.\nplayer.addStatus(statusName, value)\nParâmetros\nstatusName: string\nvalue: number\nRetornos\nsuccess: boolean","oxplayerget#OxPlayer.get":"Retorna o valor de uma chave dos metadados do player.\nplayer.get(key)\nParâmetros\nkey: string\nRetornos\nunknown","oxplayergetcoords#OxPlayer.getCoords":"Retorna as coordenadas do player.\nplayer.getCoords()\nParâmetros\nvector3","oxplayergetgroup#OxPlayer.getGroup":"Retorna o grau do player em um dado grupo, ou o primeiro nome e grau em um filtro.\nplayer.getGroup(filter)\nParâmetros\nfilter: string|string[]|{ [string]: number }\nRetornos\nunknown","oxplayergetgroupbytype#OxPlayer.getGroupByType":"Retorna o nome do player e o grau de um grupo com um tipo correspondente.\nplayer.getGroupByType(type)\nParâmetros\ntype: string\nRetornos\nstring\nnumber","oxplayergetgroups#OxPlayer.getGroups":"Retorna um objeto com todos os grupos do player, usando o nome do grupo como chave.\nplayer.getGroups()\nRetornos\n{ [string]: number }","oxplayergetstatus#OxPlayer.getStatus":"Retorna o valor de um status.\nplayer.getStatus(statusName)\nParâmetros\nstatusName: string\nRetornos\nnumber","oxplayergetstatuses#OxPlayer.getStatuses":"Retorna todos os status do player, usando o nome do status como chave.\nplayer.getStatuses()\nRetornos\n{ [string]: number }","oxplayerhaspermission#OxPlayer.hasPermission":"Verifica se um jogador tem uma permissão através de de seus um grupos.\nplayer.hasPermission(permission)\nParâmetros\npermission: string\nRetornos\nboolean","oxplayerremovestatus#OxPlayer.removeStatus":"Reduz o valor de um status.\nplayer.removeStatus(statusName, value)\nParâmetros\nstatusName: string\nvalue: number\nRetornos\nboolean","oxplayeron#OxPlayer.on":"Escuta por alterações nos metadados do player, especificando uma chave.\nplayer.on(key, cb(data))\nParâmetros\nkey: string\ncb: function\nRetornos\ndata: unknown\nnew value of key"}},"/overextended/ox_core/Classes/Server/OxPlayer":{"title":"OxPlayer","data":{"oxplayer#OxPlayer":"charId: number\nidentifier: string\nped: number\nsource: number\nstate: StateBagInterface\nstateId: string\nuserId: number\nusername: string","oxplayeraddlicense#OxPlayer.addLicense":"Grants a license to the player.\nplayer.addLicense(licenseName)\nParameters\nlicenseName: string\nReturns\nboolean","oxplayeraddstatus#OxPlayer.addStatus":"Increases the value of a status.\nplayer.addStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayercreatecharacter#OxPlayer.createCharacter":"Registers a new character for a player that has not already selected a character.\nplayer.createCharacter(data)\nParameters\ndata: object\nfirstName: string\nlastName: string\ngender: string\ndate: number\nReturns\nnumber\nThe index of the new character in an array of all characters owned by the player.","oxplayerdeletecharacter#OxPlayer.deleteCharacter":"Deletes a character with the given charId, if owned by the player and they have not selected a character.\nplayer.deleteCharacter(charId)\nParameters\ncharId: number\nReturns\nboolean","oxplayeremit#OxPlayer.emit":"Triggers a client event for the player.\nplayer.emit(eventName, ...args)\nParameters\neventName: string\n...args: any","oxplayerget#OxPlayer.get":"Get the value of specific key from the player's metadata.\nplayer.get(key)\nParameters\nkey: string\nReturns\nunknown","oxplayergetaccount#OxPlayer.getAccount":"Returns the player's default account.\nplayer.getAccount()\nReturns\nOxAccount","oxplayergetcoords#OxPlayer.getCoords":"Returns the player's current coordinates.\nplayer.getCoords()\nReturns\nvector3","oxplayergetgroup#OxPlayer.getGroup":"Returns the player's grade of a given group name, or the first matched name and grade in a filter.\nplayer.getGroup(filter)\nParameters\nfilter: string | string[] | { [string]: number }\nReturns\nnumber | string\nnumber?","oxplayergetgroupbytype#OxPlayer.getGroupByType":"Returns the player's name and grade of a group with a matching type.\nplayer.getGroupByType(type)\nParameters\ntype: string\nReturns\nstring\nnumber","oxplayergetgroups#OxPlayer.getGroups":"Returns an object of all groups the player is currently in, using the group name as a key.\nplayer.getGroups()\nReturns\n{ [string]: number }","oxplayergetlicense#OxPlayer.getLicense":"Returns an object containing information for the specified license.\nplayer.getLicense(licenseName: string): object\nParameters\nlicenseName: string\nReturns\nobject\nissued: number\nsuspended?: [number, number]\n[key: string]: any","oxplayergetlicenses#OxPlayer.getLicenses":"Returns an object containing information for all licenses.\nplayer.getLicenses()\nReturns\nobject\n{ [string]: object }\nissued: number\nsuspended?: [number, number]\n[key: string]: any","oxplayergetstate#OxPlayer.getState":"Returns the player's statebag interface.\nplayer.getState()\nReturns\nStateBagInterface","oxplayergetstatus#OxPlayer.getStatus":"Returns the value of the status.\nplayer.getStatus(statusName)\nParameters\nstatusName: string\nReturns\nnumber","oxplayergetstatuses#OxPlayer.getStatuses":"Returns an object containing all statuses, using the status name as the key.\nplayer.getStatuses()\nReturns\n{ [string]: number }","oxplayerhaspermission#OxPlayer.hasPermission":"Checks if a user has been granted a permission by one of their groups.\nplayer.hasPermission(permission)\nParameters\npermission: string\nReturns\nboolean","oxplayerlogout#OxPlayer.logout":"Clears data for the active character and transitions the player to character selection, if valid.\nplayer.logout(save, dropped)\nParameters\nsave?: boolean\nIf the active character data should be saved to the database, defaulting to true.\ndropped?: boolean\nIf the player has been disconnected from the server.","oxplayerpayinvoice#OxPlayer.payInvoice":"Pays an account invoice with the given invoiceId.\nplayer.payInvoice(invoiceId)\nParameters\ninvoiceId: number\nReturns\nobject\nsuccess: boolean\nmessage?: \"no_charId\" | \"no_permission\" | \"no_balance\" | \"no_invoice\" | \"invoice_paid\" | \"insufficient_balance\"","oxplayerremovelicense#OxPlayer.removeLicense":"Remove a license from the player.\nplayer.removeLicense(licenseName)\nParameters\nlicenseName: string\nReturns\nboolean","oxplayerremovestatus#OxPlayer.removeStatus":"Reduces the value of a status.\nplayer.removeStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayersave#OxPlayer.save":"Saves the active character to the database.\nplayer.save()","oxplayerset#OxPlayer.set":"Stores a value in the player's metadata, which can be optionally synced with the client.\nplayer.set(key, value, replicated)\nParameters\nkey: string\nvalue: any\nreplicated?: boolean","oxplayersetactivecharacter#OxPlayer.setActiveCharacter":"Loads and sets a character as the player's active character. Takes a charId or an object containing new character data.\nplayer.setActiveCharacter(data)\nParameters\ndata: number | object\nfirstName: string\nlastName: string\ngender: string\ndate: number\nReturns\nobject\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nx?: number\ny?: number\nz?: number\nheading?: number\nlastPlayed?: string\nhealth?: number\narmour?: number\nisNew?: boolean","oxplayersetactivegroup#OxPlayer.setActiveGroup":"Sets a group the player is in as their active or \"primary\" group. If no arguments are passed, no active group will be set.\nplayer.setActiveGroup(groupName?: string, temp?: boolean)\nParameters\ngroupName: string\ntemporary?: boolean\nIf true it will persist through sessions.\nReturns\nboolean","oxplayersetgroup#OxPlayer.setGroup":"Sets the player's grade within a group. If grade is undefined or 0 they will be removed from the group.\nplayer.setGroup(groupName, grade)\nParameters\ngroupName: string\ngrade?: number\nReturns\nboolean","oxplayersetstatus#OxPlayer.setStatus":"Sets the value of a status.\nplayer.setStatus(statusName, value)\nParameters\nstatusName: string\nvalue: number\nReturns\nboolean","oxplayerupdatelicense#OxPlayer.updateLicense":"Sets information on a player license.\nplayer.updateLicense(licenseName, key, value)\nParameters\nlicenseName: string\nkey: string\nvalue: unknown\nReturns\nboolean"}},"/overextended/ox_core/Classes/Server/OxVehicle":{"title":"OxVehicle","data":{"oxvehicle#OxVehicle":"entity: number\nmake: string\nmodel: string\nnetId: number\nplate: string\ngroup?: string\nid?: number\nowner?: number\nvin?: string","oxvehicledelete#OxVehicle.delete":"Despawns the vehicle and removes it from the database.\nvehicle.delete()","oxvehicledespawn#OxVehicle.despawn":"Despawns the vehicle, optionally saving it to the database.\nvehicle.despawn(save)\nParameters\nsave?: boolean","oxvehicleget#OxVehicle.get":"Get the value of specific key from the vehicle's metadata.\nvehicle.get(key)\nParameters\nkey: string\nReturns\nunknown","oxvehiclegetcoords#OxVehicle.getCoords":"Returns the vehicle's current coordinates.\nvehicle.getCoords(): Vector3","oxvehiclegetstate#OxVehicle.getState":"Returns the vehicle's statebag interface.\nvehicle.getState()\nReturns\nStateBagInterface","oxvehiclegetstored#OxVehicle.getStored":"Returns the vehicle's \"stored\" state.\nvehicle.getStored()\nReturns\nstring?","oxvehiclerespawn#OxVehicle.respawn":"Spawns a new entity for the vehicle, removing an existing entity if it exists and reapplying stored vehicle properties.\nvehicle.respawn(coords, rotation)\nParameters\ncoords?: vector3\nrotation?: vector3","oxvehiclesave#OxVehicle.save":"Saves the vehicle to the database.\nvehicle.save()\nReturns\nnumber","oxvehicleset#OxVehicle.set":"Stores a value in the vehicle's metadata, which will be saved to the database (this behaviour is likely to be removed).\nplayer.set(key, value)\nParameters\nkey: string\nvalue: any","oxvehiclesetgroup#OxVehicle.setGroup":"Sets the vehicle as a group vehicle \"owned\" by the given group name, or removes the group if omitted.\nvehicle.setGroup(groupName)\nParameters\ngroupName?: string","oxvehiclesetowner#OxVehicle.setOwner":"Sets the owner of a vehicle as the given charId, or removes the owner if omitted.\nvehicle.setOwner(charId)\nParameters\ncharId?: number","oxvehiclesetplate#OxVehicle.setPlate":"Sets the registered plate of a vehicle to the given value. The plate will be padded or stripped to 8 characters.This plate is not necessarily the displayed plate on vehicle properties.\nvehicle.setPlate(plate: string)","oxvehiclesetproperties#OxVehicle.setProperties":"Saves the properties (mods, extras, etc.) stored on the vehicle, optionally applying them to the entity.\nvehicle.setProperties(properties, apply)\nParameters\nproperties: VehicleProperties\napply?: boolean","oxvehiclesetstored#OxVehicle.setStored":"Sets the vehicle as \"stored\" at the given value (e.g. impound, garage, null), and optionally despawns the vehicle.\nvehicle.setStored(value, despawn)\nParameters\nvalue?: string\ndespawn?: boolean"}},"/overextended/ox_core/Events/server":{"title":"Server Events","data":{"":"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.","oxsavedplayers#ox:savedPlayers":"When players are saved to the database.\nfunction(playersSaved: number)","oxsetactivegroup#ox:setActiveGroup":"When the active group of a character has changed.\nfunction(playerId: number, groupName: string)","oxsetgroup#ox:setGroup":"When a character is added or removed from a group.\nfunction(playerId: number, groupName: string, grade?: number)","oxlicenseadded#ox:licenseAdded":"When a character receives a new license.\nfunction(playerId: number, licenseName: string)","oxlicenseremoved#ox:licenseRemoved":"When a character's license is removed.\nfunction(playerId: number, licenseName: string)","oxplayerlogout#ox:playerLogout":"When a player logs out from their current character, crashes, or otherwise disconnects from the server.\nfunction(playerId: number, userId: number, charId: number)","oxcreatedcharacter#ox:createdCharacter":"When a player has created a new character.\nfunction(playerId: number, userId: number, charId: number)","oxplayerloaded#ox:playerLoaded":"When a player selects and loads a character.\nfunction(playerId: number, userId: number, charId: number)","oxdeletedcharacter#ox:deletedCharacter":"When a character is deleted.\nfunction(playerId: number, userId: number, charId: number)","oxsavedvehicles#ox:savedVehicles":"When vehicles are saved to the database.\nfunction(vehiclesSaved: number)","oxspawnedvehicle#ox:spawnedVehicle":"When a OxVehicle has spawned.\nfunction(entityId: number, id: number)"}},"/overextended/ox_core/Events/client":{"title":"Client Events","data":{"":"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.","oxplayerloaded#ox:playerLoaded":"When a character is loaded\nfunction(playerId: number, isNew: boolean)","oxstatustick#ox:statusTick":"On each status tick\nfunction(statuses: Record)","oxsetgroup#ox:setGroup":"When the character is added or removed from a group\nfunction(groupName: string, grade?: number)","oxlicenseadded#ox:licenseAdded":"When the character got a new license\nfunction(licenseName: string)","oxlicenseremoved#ox:licenseRemoved":"When a character's license is removed.\nfunction(licenseName: string)","oxstartcharacterselect#ox:startCharacterSelect":"When the player has spawned.\nfunction(userId: number, characters: Character[])","oxsetactivecharacter#ox:setActiveCharacter":"When the player has chosen their character.\nfunction(character: Character, groups: Record)"}},"/overextended/ox_core/Functions/common":{"title":"Common","data":{"oxgettopvehiclestats#Ox.GetTopVehicleStats":"Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea).\nOx.GetTopVehicleStats(category)\nParameters\ncategory?: string\nReturns\nVehicleStats | { [string]: VehicleStats }","vehiclestats#VehicleStats":"object\nacceleration: number\nbraking: number\nhandling: number\nspeed: number\ntraction: number","oxgetvehicledata#Ox.GetVehicleData":"Returns VehicleData for all vehicles, or optionally a specific model or array of models.\nOx.GetVehicleData(filter)\nParameters\nfilter?: string | string[]\nReturns\n{ [string]: VehicleData } | VehicleData","vehicledata#VehicleData":"object\nclass: VehicleClasses\ndoors: number\nmake: string\nname: string\nprice: number\nseats: number\ntype: string\nweapons?: true","oxgetvehiclenetworktype#Ox.GetVehicleNetworkType":"Returns the netobj type of a vehicle model, which may differ from the vehicle type (e.g. blimp is networked as heli).\nOx.GetVehicleNetworkType(modelName)\nParameters\nmodelName: string\nReturns\nstring"}},"/overextended/ox_core/Functions/server":{"title":"Server","data":{"oxcreateaccount#Ox.CreateAccount":"Creates a new account for a character with the given charId or stateId.\nOx.CreateAccount(ownerId, label)\nParameters\nownerId: number | string\nlabel: string\nReturns\nOxAccount","oxcreategroup#Ox.CreateGroup":"Creates a new group from the given data, handling all database interactions internally.\nOx.CreateGroup(data)\nParameters\ndata: object\nname: string\nlabel: string\ngrades: object[]\nlabel: string\naccountRole?: string\ntype?: string\ncolour?: number\nhasAccount?: boolean","oxcreatevehicle#Ox.CreateVehicle":"Creates a new vehicle, which will be saved to the database if it has an assigned owner or group.\nOx.CreateVehicle(data, coords, heading)\nParameters\ndata: string | object\nmodel: string\nowner?: number\ngroup?: string\nstored?: string\nproperties?: object\ncoords?: vector3\nheading?: number\nReturns\nOxVehicle","oxdeleteaccountinvoice#Ox.DeleteAccountInvoice":"Deletes the account invoice with the given invoiceId.\nOx.DeleteAccountInvoice(invoiceId)\nParameters\ninvoiceId: number\nReturns\nobject\nsuccess: boolean\nmessage?: string","oxdeletegroup#Ox.DeleteGroup":"Deletes all data associated with the given group name, such as group grades, vehicles, etc.\nOx.DeleteGroup(groupName)\nParameters\ngroupName: string","oxgeneratevehicleplate#Ox.GenerateVehiclePlate":"Generate a unique vehicle plate that doesn't exist in database.\nOx.GenerateVehiclePlate()\nReturns\nstring","oxgeneratevehiclevin#Ox.GenerateVehicleVin":"Generate a unique vehicle identification number that doesn't exist in database.\nOx.GenerateVehicleVin(modelName)\nParameters\nmodelName: string\nVehicle information (i.e. model and make) are used as part of the VIN.\nReturns\nstring","oxgetaccount#Ox.GetAccount":"Get the OxAccount with the given accountId.\nOx.GetAccount(accountId)\nParameters\naccountId: number\nReturns\nOxAccount","oxgetcharacteraccount#Ox.GetCharacterAccount":"Get the default OxAccount for a character by their charId or stateId.\nOx.GetCharacterAccount(id)\nParameters\nid: number | string\nReturns\nOxAccount","oxgetcharidfromstateid#Ox.GetCharIdFromStateId":"Get a character's charId from their stateId.\nNote: This queries the database and shouldn't be used excessively\nOx.GetCharIdFromStateId(stateId)\nParameters\nstateId: string\nReturns\nnumber","oxgetgroupaccount#Ox.GetGroupAccount":"Get the OxAccount for a group.\nOx.GetGroupAccount(groupName)\nParameters\ngroupName: string\nReturns\nOxAccount","oxgetgroupsbytype#Ox.GetGroupsByType":"Returns an array of group names which have the given group type.\nOx.GetGroupsByType(groupType)\nParameters\ngroupType: string\nReturns\nstring[]","oxgetplayer#Ox.GetPlayer":"Get an OxPlayer from its enity id.\nOx.GetPlayer(entityId)\nParameters\nuserId: number\nReturns\nOxPlayer","oxgetplayerfromfilter#Ox.GetPlayerFromFilter":"Get the first OxPlayer matching a filter.\nOx.GetPlayerFromFilter(filter)\nParameters\nfilter?: { [string]: any }\nCompare player fields and metadata against the given key-value pairs.\nGroups can be given as a string or array of strings to match.\nReturns\nOxPlayer","oxgetplayerfromuserid#Ox.GetPlayerFromUserId":"Get an OxPlayer from its user id.\nOx.GetPlayerFromUserId(userId)\nParameters\nuserId: number\nReturns\nOxPlayer","oxgetplayers#Ox.GetPlayers":"Get an array of containing OxPlayer for all players matching a filter, if given.\nOx.GetPlayers(filter)\nParameters\nfilter?: { [string]: any }\nCompare player fields and metadata against the given key-value pairs.\nGroups can be given as a string or array of strings to match.\nReturns\nOxPlayer[]","oxgetvehicle#Ox.GetVehicle":"Get an OxVehicle from its entity id.\nOx.GetVehicle(entityId)\nParameters\nentityId: number\nReturns\nOxVehicle","oxgetvehiclefromnetid#Ox.GetVehicleFromNetId":"Get an OxVehicle from its network id.\nOx.GetVehicleFromNetId(netId)\nParameters\nnetId: number\nReturns\nOxVehicle","oxgetvehiclefromvin#Ox.GetVehicleFromVin":"Get an OxVehicle from its VIN.\nOx.GetVehicleFromVin(vin)\nParameters\nvin: string\nReturns\nOxVehicle","oxremovegrouppermission#Ox.RemoveGroupPermission":"Removes a permission from a specified group and minimum grade.\nOx.RemoveGroupPermission(groupName, grade, permission)\nParameters\ngroupName: string\ngrade: number\npermission: string","oxsaveallplayers#Ox.SaveAllPlayers":"Save all players to the database.\nOx.SaveAllPlayers()","oxsaveallvehicles#Ox.SaveAllVehicles":"Save all vehicles to the database.\nOx.SaveAllVehicles()","oxsetgrouppermission#Ox.SetGroupPermission":"Assigns a permission to a specified group and minimum grade, which will be inherited by higher grades.\nOx.SetGroupPermission(groupName, grade, permission, value)\nParameters\ngroupName: string\ngrade: number\npermission: string\nvalue: allow | deny","oxspawnvehicle#Ox.SpawnVehicle":"Spawns an OxVehicle with the given dbId, if it hasn't already been spawned.\nOx.SpawnVehicle(dbId, coords, heading)\nParameters\ndbId: number\ncoords: vector3\nheading?: number\nReturns\nOxVehicle"}},"/overextended/ox_doorlock":{"title":"Ox Doorlock","data":{"":"Um recurso de gerenciamento de portas que pode ser usado de forma independente ou junto com ox_core, qbx_core e es_extended.","instalação#Instalação":"Recomendamos fortemente que consulte os Guias para configurar Git, Node.js e pnpm.","instale-todas-as-dependências-do-recurso#Instale todas as dependências do recurso.":"oxmysql\nox_lib","baixe-uma-release-ou-compile-o-código-fonte#Baixe uma release ou compile o código-fonte.":"git clone https://github.com/overextended/ox_doorlock.git\ncd ox_doorlock/web\npnpm i\npnpm build","instale-dependências-opcionais#Instale dependências opcionais.":"Esses recursos não são obrigatórios, mas oferecem funcionalidades adicionais.\nox_target","abrindo-a-ui#Abrindo a UI":"Se você instalou e iniciou o recurso, pode usar o comando /doorlock para abrir a interface de usuário.\nCaso o cursor seja exibido, mas a UI não apareça, então você não a construiu corretamente.\nTalvez você não tenha permissão para usar o comando.\nInsira test_ace player.1 command.doorlock no console do servidor (substitua 1 pelo seu ID de servidor).","converter-portas#Converter portas":"Arquivos de configuração de portas escritos para nui_doorlock podem ser automaticamente adicionados ao seu banco de dados MySQL.\nTodos os arquivos com extensão .lua colocados no diretório ox_doorlock/convert serão lidos ao iniciar o recurso.\nSe o diretório não existir, você pode criá-lo.\nA conversão não pode ser garantida, especialmente se o arquivo de configuração não foi escrito para nui_doorlock.","adicionando-novos-áudios-nativos#Adicionando novos áudios nativos":"Um guia pode ser encontrado aqui para adicionar novos áudios nativos."}},"/overextended/ox_doorlock/Client/functions":{"title":"Funções","data":{"pickclosestdoor#pickClosestDoor":"Tenta arrombar a porta mais próxima. Dependente de verificações do lado do servidor e pode falhar.\nexports.ox_doorlock:pickClosestDoor()","useclosestdoor#useClosestDoor":"Interage com a porta mais próxima. Dependente de verificações do lado do servidor e pode falhar.\nexports.ox_doorlock:useClosestDoor()","getclosestdoor#getClosestDoor":"Retorna a porta mais próxima.\nexports.ox_doorlock:getClosestDoor()\nRetorno:\ndoor: number"}},"/overextended/ox_doorlock/Server/events":{"title":"Eventos","data":{"handlers#Handlers":"Esses eventos não devem ser acionados por nenhum outro script.","ox_doorlockstatechanged#ox_doorlock:stateChanged":"Acionado quando o estado de uma porta é atualizado.\nAddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)\nsource: number or nil\ndoorId: number\nstate: boolean\nusedItem: string or false or nil"}},"/overextended/ox_doorlock/Server/functions":{"title":"Funções","data":{"":"Obtém os dados de uma porta com o ID fornecido, correspondendo ao ID da entrada no banco de dados.","getdoor#getDoor":"exports.ox_doorlock:getDoor(doorId)\nObtém os dados de uma porta com o id fornecido, correspondendo ao ID da entrada no banco de dados.\nid: number\nRetorno:\ndoor: table","getdoorfromname#getDoorFromName":"exports.ox_doorlock:getDoorFromName(name)\nObtém os dados de uma porta com o name fornecido, correspondendo ao nome da entrada no banco de dados.\nname: string\nRetorno:\ndoor: table","editdoor#editDoor":"exports.ox_doorlock:editDoor(doorId, data)\nEdite a configuração para o doorId fornecido.\ndoorId: number\ndata: table","setdoorstate#setDoorState":"exports.ox_doorlock:setDoorState(doorId, state)\nDefine uma porta com o doorId fornecido como trancada se o estado for true ou 1.\ndoorId: number\nstate: 0 or 1 or boolean"}},"/overextended/ox_doorlock/settings":{"title":"Configurações da Porta","data":{"geral#Geral":"Nome da porta\nUsado para identificar facilmente a porta.\nCódigo de acesso\nA porta pode ser desbloqueada por qualquer pessoa usando o código ou frase.\nIntervalo de autolock\nA porta será trancada após x segundos.\nDistância de interação\nA porta só pode ser usada quando estiver a x metros de distância.\nTaxa da porta\nVelocidade de movimento da porta para portas deslizantes/garaus/automáticas ou portas de abrir quando trancadas.\nTrancada\nDefine a porta como trancada por padrão.\nDupla\nA porta é um conjunto de duas portas, controladas juntas.\nAutomática\nPorta deslizante/garaus/automática.\nArrombamento\nA porta pode ser arrombada ao interagir com um recurso de mira.\nOcultar UI\nNenhum indicador (ou seja, ícone, texto) será exibido na porta.\nManter aberta\nMantém a porta aberta enquanto estiver desbloqueada.","personagens#Personagens":"Id do personagem\nIdentificador do personagem usado por um framework (ou seja, player.charid, xPlayer.identifier, Player.CitizenId).","grupos#Grupos":"Grupo\nDependente do framework, referindo-se a empregos, gangues, etc.\nGrau\nO grau mínimo para permitir acesso ao grupo (0 para permitir todos).","itens#Itens":"Item\nNome do item.\nTipo de metadata\nRequer suporte a metadata (ou seja, ox_inventory) para verificar slot.metadata.type.\nRemover ao usar\nRemove o item após interagir com a porta.","arrombamento#Arrombamento":"Dificuldade\nDefine a dificuldade do teste de habilidade (veja documentos).\nTamanho da área\nTamanho da área de dificuldade personalizada em graus.\nMultiplicador de velocidade\nMultiplicador de velocidade do indicador de dificuldade personalizado.","som#Som":"Som de trancamento\nSom a ser reproduzido ao trancar a porta.\nSom de desbloqueio\nSom a ser reproduzido ao desbloquear a porta.\nNota: Os sons são armazenados no diretório ./web/public/sounds."}},"/overextended/ox_fuel":{"title":"Ox Fuel","data":{"":"A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item.","installation#Installation":"","install-all-resource-dependencies#Install all resource dependencies.":"ox_lib\nox_inventory","download-a-release-or-clone-the-source-code#Download a release or clone the source code.":"git clone https://github.com/overextended/ox_fuel.git","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_target"}},"/overextended/ox_fuel/Server/functions":{"title":"Functions","data":{"setpaymentmethod#setPaymentMethod":"Override the built-in payment method.\nexports.ox_fuel:setPaymentMethod(method)","parameters#Parameters":"method: function(): boolean?","example#Example":"exports.ox_fuel:setPaymentMethod(function(playerId, amount)\n local xPlayer = ESX.GetPlayerFromId(playerId)\n local bankAmount = xPlayer.getAccount('bank').money\n if bankAmount >= amount then\n xPlayer.removeAccountMoney('bank', amount)\n return true\n end\n TriggerClientEvent('ox_lib:notify', source, {\n type = 'error',\n description = locale('not_enough_money', amount - bankAmount)\n })\nend)"}},"/overextended/ox_fuel/Client/functions":{"title":"Functions","data":{"setmoneycheck#setMoneyCheck":"Override the built-in money check.\nexports.ox_fuel:setMoneyCheck(method)","parameters#Parameters":"method: function(): number","example#Example":"exports.ox_fuel:setMoneyCheck(function()\n local accounts = ESX.GetPlayerData().accounts\n for i = 1, #accounts do\n if accounts[i].name == 'bank' then\n return accounts[i].money\n end\n end\n return 0\nend)"}},"/overextended/ox_fuel/Shared":{"title":"Shared","data":{"get-vehicle-fuel-amount#Get vehicle fuel amount":"local fuel = Entity(vehicleId).state.fuel","set-vehicle-fuel-amount#Set vehicle fuel amount":"Entity(vehicleId).state.fuel = fuelAmount"}},"/overextended/ox_inventory":{"title":"Ox Inventory","data":{"":"A slot-based inventory with item metadata for \"item uniqueness\".\nIf you are replacing a built-in framework inventory there will be compatibility errors.\nIf you are unwilling or incapable of resolving incompatibilities, do not install this resource.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","install-all-resource-dependencies#Install all resource dependencies":"oxmysql\nox_lib","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_inventory.git\ncd ox_inventory/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies":"These resources aren't required but provide additional functionality.\nox_target","resource-start-order#Resource start order":"It's important for your resources to start in a logical order to prevent errors from missing dependencies.\nstart oxmysql # this should be one of the first resources\nstart ox_lib\nstart framework # the name of your framework (i.e. ox_core, es_extended, qbx_core)\nstart ox_target\nstart ox_inventory","config#Config":"Resource configuration is handled using convars.\n### Shared\n# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)\nsetr inventory:framework \"esx\"\n# Number of slots for player inventories\nsetr inventory:slots 50\n# Maximum carry capacity for players, in grams (frameworks may override this)\nsetr inventory:weight 30000\n# Integrated support for qtarget/ox_target stashes, shops, etc\n# Note: qtarget is deprecated, a future update may drop support (ox_target only, or gated features)\nsetr inventory:target false\n# Jobs with access to police armoury, evidence lockers, etc\nsetr inventory:police [\"police\", \"sheriff\"]\n### Client\n# The URL to load item images from\nsetr inventory:imagepath \"nui://ox_inventory/web/images\"\n# Weapons will reload after reaching 0 ammo\nsetr inventory:autoreload false\n# Blur the screen while accessing the inventory\nsetr inventory:screenblur true\n# Default hotkeys to access primary and secondary inventories, and hotbar\nsetr inventory:keys [\"F2\", \"K\", \"TAB\"]\n# Enable control action when inventory is open\nsetr inventory:enablekeys [249]\n# Weapons must be aimed before shooting\nsetr inventory:aimedfiring false\n# Show a list of all nearby players when giving items\nsetr inventory:giveplayerlist false\n# Toggle weapon draw/holster animations\nsetr inventory:weaponanims true\n# Toggle item notifications (add/remove)\nsetr inventory:itemnotify true\n# Toggle weapon item notifications (equip/holster)\nsetr inventory:weaponnotify true\n# Disable drop markers and spawn a prop instead\nsetr inventory:dropprops true\n# Set the default model used for drop props\nsetr inventory:dropmodel \"prop_med_bag_01b\"\n# Disarm the player if an unexpected weapon is in use (i.e. did not use the weapon item)\nsetr inventory:weaponmismatch true\n# Ignore weapon mismatch checks for the given weapon type (e.g. ['WEAPON_SHOVEL', 'WEAPON_HANDCUFFS'])\nsetr inventory:ignoreweapons []\n# Suppress weapon and ammo pickups\nsetr inventory:suppresspickups 1\n### Server\n# Compare current version to latest release on GitHub\nset inventory:versioncheck true\n# Stashes will be wiped after remaining unchanged for the given time\nset inventory:clearstashes \"6 MONTH\"\n# Discord webhook url, used for imageurl metadata content moderation (image embeds)\nset inventory:webhook \"\"\n# Logging via ox_lib (0: Disable, 1: Standard, 2: Include AddItem/RemoveItem, and all shop purchases)\nset inventory:loglevel 1\n# Item prices fluctuate in shops\nset inventory:randomprices true\n# Loot will randomly generate inside unowned vehicles and dumpsters\nset inventory:randomloot true\n# Minimum job grade to remove items from evidence lockers\nset inventory:evidencegrade 2\n# Trim whitespace from vehicle plates when checking owned vehicles\nsetr inventory:trimplate true\n# Set the contents of randomly generated inventories\n# [item name, minimum, maximum, loot chance]\nset inventory:vehicleloot [\n [\"cola\", 1, 1],\n [\"water\", 1, 1],\n [\"garbage\", 1, 2, 50],\n [\"panties\", 1, 1, 5],\n [\"money\", 1, 50],\n [\"money\", 200, 400, 5],\n [\"bandage\", 1, 1]\n]\nset inventory:dumpsterloot [\n [\"mustard\", 1, 1],\n [\"garbage\", 1, 3],\n [\"money\", 1, 10],\n [\"burger\", 1, 1]\n]\n# Set items to sync with framework accounts\nset inventory:accounts [\"money\"]","framework-incompatibilities#Framework incompatibilities":"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues.\nMoney as an item may conflict with banking/account systems.\nYou can sync these values with server.syncInventory.\nRefer to issue #1297 for known compatibility issues.","using-an-unsupported-framework#Using an unsupported framework":"If your framework does not have official support you'll have to implement it yourself.\nIf you're replacing an existing/built-in inventory system this may be complicated, but is a fairly simple task otherwise.This setup is highly opinionated and rigid, so it's up to your own ability as a developer to make it work.","setup-a-bridge-submodule#Setup a bridge submodule":"You'll want to set the target framework first - this could be the name, an acronym, or just \"custom\".\nsetr inventory:framework \"custom\"\nCopy the ox directory from the bridge directory and give it the name you used above.The bare minimum functions and event handlers are added here, but you'll need to change them to match your framework; we can't provide any help here. You can refer to the other framework bridges if you need inspiration.","setup-database-references#Setup database references":"Take a look at the mysql module. You'll need to reference your player/vehicle tables and id columns.\nelseif shared.framework == 'custom' then\n playerTable = 'characters' -- table storing player / character data\n playerColumn = 'charid' -- primary key for identifying the character (i.e. identifier, citizenid, id)\n vehicleTable = 'vehicles' -- table storing owned vehicle data\n vehicleColumn = 'id' -- primary key for identifying the vehicle (i.e. plate, vin, id)\nend"}},"/overextended/ox_inventory/Events/Server":{"title":"Server","data":{"":"This is not a comprehensive list of events and is missing events intended for internal use only.","handlers#Handlers":"These events should not be triggered by any other scripts.","ox_inventoryopenedinventory#ox_inventory:openedInventory":"Triggered after an inventory is opened by a player.\nAddEventHandler('ox_inventory:openedInventory', function(playerId, inventoryId) end)\nplayerId: number\ninventoryId: string","ox_inventoryclosedinventory#ox_inventory:closedInventory":"Triggered after an inventory is closed by a player.\nAddEventHandler('ox_inventory:closedInventory', function(playerId, inventoryId) end)","ox_inventoryuseditem#ox_inventory:usedItem":"AddEventHandler('ox_inventory:usedItem', function(playerId, name, slotId, metadata) end)\nplayerId: number\nname: string\nslotId: number\nmetadata?: table"}},"/overextended/ox_inventory/Events/Client":{"title":"Client","data":{"":"This is not a comprehensive list of events and is missing events intended for internal use only.","event-triggers#Event Triggers":"These events are safe to trigger and handle in other scripts.","ox_inventorydisarm#ox_inventory:disarm":"Can be triggered to force the player to disarm.\nTriggerClientEvent('ox_inventory:disarm', playerId, noAnim)\nplayerId: number\nnoAnim: boolean\nIf true, disarm animation will be skipped","event-handlers#Event Handlers":"These events should not be triggered by any other scripts.","ox_inventoryupdateinventory#ox_inventory:updateInventory":"Triggered after inventory slots have been updated, included on load.\nChanges is a table containing all updated slot data indexed by slotId. Empty slots are false.\nAddEventHandler('ox_inventory:updateInventory', function(changes) end)\nchanges: table","ox_inventorycurrentweapon#ox_inventory:currentWeapon":"Triggered when a weapon is equipped or its metadata is altered.\nAddEventHandler('ox_inventory:currentWeapon', function(weapon) end)\nweapon?: table","ox_inventoryitemcount#ox_inventory:itemCount":"Triggered when the amount of an item in the player's inventory is changed.\nNote: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem.\nAddEventHandler('ox_inventory:itemCount', function(itemName, totalCount) end)\nitemName: string\ntotalCount: number","ox_inventoryupdateweaponcomponent#ox_inventory:updateWeaponComponent":"AddEventHandler('ox_inventory:updateWeaponComponent', function(action, componentHash, componentItem) end)\naction: 'added' | 'removed'\ncomponentHash: number\ncomponentItem: string","ox_inventoryuseditem#ox_inventory:usedItem":"AddEventHandler('ox_inventory:usedItem', function(name, slotId, metadata) end)\nname: string\nslotId: number\nmetadata?: table"}},"/overextended/ox_inventory/Frameworks/qbx":{"title":"Qbox","data":{"":"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).We strongly advise using Qbox as an alternative to QBCore.\nQbox Project GitHub\nQbox Project Discord","installation#Installation":"Setup qbox.\nEdit your server.cfg.\nAdd setr inventory:framework \"qbx\" before starting your resources.\nStart ox_inventory immediately after qbx_core."}},"/overextended/ox_inventory/Frameworks/esx":{"title":"ESX","data":{"":"You will need a compatible version of ESX Legacy (1.6.0 or higher).\nYou can convert player inventories with convertinventory esx.\nAll items in the database will be migrated to the internal item data.\nAlways restart the resource when items are migrated!","compatibility#Compatibility":"Ox Inventory is a complete replacement for existing item, inventory, and weapon systems; it is inherently incompatible with ESX and any resources that rely on default behaviour.\nLoadouts do not exist and weapons are treated as items.\nStandard shops and stashes (i.e. esx_shops, esx_weaponshop, and esx_policejob).\nResources that alter the default esx inventory or provide a ui (i.e. esx_trunkinventory, esx_inventoryhud).","installation#Installation":"Use a compatible version of ESX Legacy (1.6.0+).\nModify your server.cfg, starting ox_inventory immediately after es_extended.\nstart oxmysql\nstart ox_lib\nstart es_extended\nstart qtarget\nstart ox_inventory","convert-esx-inventory-data#Convert ESX inventory data":"Start the server and type convertinventory esx into the server console.\nOptionally, type convertinventory esxproperty into the server console.\nRestart the server once conversion is complete.","optional-optimisation#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.\nif xPlayer.getInventoryItem('acetone').count > 2 and xPlayer.getInventoryItem('antifreeze').count > 4 and xPlayer.getInventoryItem('sudo').count > 9 then\n xPlayer.removeInventoryItem(\"acetone\", 3)\n xPlayer.removeInventoryItem(\"antifreeze\", 5)\n xPlayer.removeInventoryItem(\"sudo\", 10)\nend\nAdd the following code somewhere in your resource to cache the exports metatable.\nlocal ox_inventory = exports.ox_inventory\nYou will be able to reference any functions exposed through the export.\nlocal items = ox_inventory:Search(source, 'count', {'acetone', 'antifreeze', 'sudo'})\nif items and items.acetone > 2 and items.antifreeze > 4 and items.sudo > 9 then\n ox_inventory:RemoveItem(source, 'acetone', 3)\n ox_inventory:RemoveItem(source, 'antifreeze', 5)\n ox_inventory:RemoveItem(source, 'sudo', 10)\nend"}},"/overextended/ox_inventory/Functions/Server":{"title":"Server","data":{"setplayerinventory#setPlayerInventory":"Creates and sets the player's inventory.\nexports.ox_inventory:setPlayerInventory(player, data)\nplayer: table\nsource: number\nidentifier: string\nname: string\ngroups?: table\nsex?: string\ndateofbirth?: string\ndata?: table\nIf not provided will load player's inventory data from the db.","forceopeninventory#forceOpenInventory":"Opens an inventory using the passed data.\nForces a player to open an inventory, without usual security checks (groups, coords).\nexports.ox_inventory:forceOpenInventory(playerId, invType, data)\nplayerId: number\ninvType: string\n'player'\n'stash'\n'container'\n'drop'\n'glovebox'\n'trunk'\n'dumpster'\ndata: number or string or table\nOpen the target player's inventory.\nexports.ox_inventory:forceOpenInventory(1, 'player', 3)\nAdmin command to open a player's inventory.\nRegisterCommand('openplayerinv', function(source, args)\n exports.ox_inventory:forceOpenInventory(source, 'player', tonumber(args[1]))\nend, true)\nOpen a custom stash (created on the server with RegisterStash).\nexports.ox_inventory:forceOpenInventory(1, 'stash', 'society_police')\nOpen a stash with a specific owner.\nexports.ox_inventory:forceOpenInventory(1, 'stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })","updatevehicle#UpdateVehicle":"Update the internal reference to vehicle stashes, without triggering a save or updating the database.\nexports.ox_inventory:UpdateVehicle(oldPlate, newPlate)\noldPlate: string\nnewPlate: string","items#Items":"Returns a table of all registered items. The format is as defined in data/items.lua.Optionally takes the name of an item, returning only data for that item (getting all data is not recommended).\nexports.ox_inventory:Items(itemName)\nitemName?: string\nThe following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database.\nlocal itemNames\nESX.RegisterServerCallback('crafting:itemNames', function(source, cb)\n if not itemNames then\n itemNames = {}\n for item, data in pairs(exports.ox_inventory:Items()) do\n itemNames[item] = data.label\n end\n end\n cb(itemNames)\nend)","additem#AddItem":"Adds an item into the specified inventory.Should be used alongside CanCarryItem otherwise, the maximum weight may be exceeded.\nexports.ox_inventory:AddItem(inv, item, count, metadata, slot, cb)\ninv: table or string or number\nThe inventory's unique id, or a table with the id and owner.\nplayerId: 1\ninventoryId: gloveVGH283\n{ id = 'personallocker', owner = 'license:xxxxxx'}\nitem: string\nThe name of the item to add to the target.\ncount: number\nThe number of items to add.\nmetadata?: table or string\nA table of unique data to attach to the item object. A string will create a table with the \"type\" field.\nslot?: number\nA specific slot to add the item to. If the slot is invalid, the first available slot will be used instead.\ncb?: function(success: boolean, response?: string)\nIf used for glovebox, trunk or stash you must first check the inventory is loaded with GetInventoryReturns success, response if cb is undefined, otherwise they are used in the callback only.Possible value of the \"response\" argument, on failure:\n\"invalid_item\": the item doesn't exist\n\"invalid_inventory\": the inventory doesn't exist\n\"inventory_full\": no free slots\nExample\nlocal success, response = exports.ox_inventory:AddItem('gloveVGH283', 'bread', 4)\nif not success then\n -- if no slots are available, the value will be \"inventory_full\"\n return print(response)\nend\nprint(json.encode(response, {indent=true}))\n--[[\n {\n \"metadata\": [],\n \"label\": \"Bread\",\n \"slot\": 1,\n \"stack\": true,\n \"close\": true,\n \"name\": \"bread\",\n \"count\": 1,\n \"weight\": 150\n }\n]]","removeitem#RemoveItem":"Removes the specified item from the specified inventory.\nexports.ox_inventory:RemoveItem(inv, item, count, metadata, slot, ignoreTotal)\ninv: table or string or number\nThe inventory's unique id, or a table with the id and owner.\nplayerId: 1\ninventoryId: gloveVGH283\n{ id = 'personallocker', owner = 'license:xxxxxx'}\nitem: string\nThe name of the item to remove from the target.\ncount: number\nThe number of items to remove.\nmetadata?: table or string\nOnly remove items with matching metadata properties.\nslot?: number\nA specific slot to remove the item from. If the slot is invalid, the first available slot will be used instead.\nignoreTotal?: boolean\nRemoves as many items as possible up to count.\nReturns success: boolean, response: string?.Possible values of \"response\" on failure:\n\"invalid_item\": the item doesn't exist\n\"invalid_inventory\": the inventory doesn't exist\n\"not_enough_items\": inventory did not contain enough of the given item\nExample\n-- Removes 2 water from the glovebox for the given plate.\nlocal success = exports.ox_inventory:RemoveItem('gloveVGH283', 'water', 2)","getitem#GetItem":"Returns generic item data from the specified inventory, with the total count.\nexports.ox_inventory:GetItem(inv, item, metadata, returnsCount)\ninv: table or string or number\nitem: table or string\nCan be items array.\nmetadata?: any\nOnly returns the count of items that strictly match the given metadata.\nreturnsCount?: boolean\nIf returnsCount is set to true, the returned value will be the count based on\nhow many times the item was found.\nOtherwise returns the data related to the item and its total count found in the inventory.\nExample\nlocal item = ox_inventory:GetItem(source, 'water', nil, false)\nprint(json.encode(item, {indent=true}))\n--[[\n {\n \"consume\": 1,\n \"count\": 15,\n \"stack\": true,\n \"name\": \"water\",\n \"weight\": 500,\n \"label\": \"Water\",\n \"close\": true\n }\n]]","convertitems#ConvertItems":"Takes traditional item data and updates it to support ox_inventory.\nexports.ox_inventory:ConvertItems(playerId, items)\nplayerId: number\nitems: table\nData Conversion Example\nOld: [{\"cola\":1, \"bread\":3}]\nNew: [{\"slot\":1,\"name\":\"cola\",\"count\":1},\n{\"slot\":2,\"name\":\"bread\",\"count\":3}]","cancarryitem#CanCarryItem":"Returns true or false depending if the inventory can carry the specified item.The function checks for inventory weight and available slots.\nexports.ox_inventory:CanCarryItem(inv, item, count, metadata)\ninv: table or string or number\nitem table or string\nCan be array of items.\ncount: number\nmetadata?: table or string\nIf metadata is passed as string then metadata.type will be checked.\nExample\n-- Checks if the player calling the event can carry 3 water items\nif exports.ox_inventory:CanCarryItem(source, 'water', 3) then\n -- Do stuff if can carry\nelse\n -- Do stuff if can't carry\nend","cancarryamount#CanCarryAmount":"Returns the amount a player can hold based on available weight.\nexports.ox_inventory:CanCarryAmount(inv, item)\ninv: table or string or number\nitem: table or string\nCan be array to check multiple items.\nExample\n-- Checks how much you can carry\namountToAdd = exports.ox_inventory:CanCarryAmount(inv, 'stone')\n-- Adds the amount\nexports.ox_inventory:AddItem(inv, 'stone', amountToAdd)","cancarryweight#CanCarryWeight":"Returns if inventory can carry specified weight and free inventory weight.\nexports.ox_inventory:CanCarryWeight(inv, weight)\ninv: table or string or number\nweight: number\nExample\n-- Checks if player can carry 1000 grams.\nlocal fillAmount = 1000\nlocal canCarryWeight, freeWeight = ox_inventory:CanCarryWeight(playerId, fillAmount)\nif freeWeight == 0 then\n -- Player can't carry weight.\n return\nelseif not canCarryWeight then\n -- Modify fillAmount, because inventory can't carry specified weight\n fillAmount = freeWeight\nend\n-- Do something","setmaxweight#SetMaxWeight":"Sets the maximum weight available for an inventory.\nexports.ox_inventory:SetMaxWeight(inv, maxWeight)\ninv: table or string or number\nmaxWeight: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the max weight for player 1's inventory to 20kg.\nox_inventory:SetMaxWeight(1, 20000)","canswapitem#CanSwapItem":"Returns true if the item swap is possible based on inventory weight.\nexports.ox_inventory:CanSwapItem(inv, firstItem, firstItemCount, testItem, testItemCount)\ninv: table or string or number\nfirstItem: string\nfirstItemCount: number\ntestItem: string\ntestItemCount: number","getitemcount#GetItemCount":"Get the total item count for all items in an inventory with the given name and metadata.\nexports.ox_inventory:GetItemCount(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nitemCount: number","getitemslots#GetItemSlots":"Returns the number of slots the specified item is in, the item's total count and the remaining empty slots.\nexports.ox_inventory:GetItemSlots(inv, item, metadata)\ninv: table or string or number\nitem: table or string\nmetadata?: table","getslot#GetSlot":"Returns the specified slot data as a table.\nexports.ox_inventory:GetSlot(inv, slot)\ninv: table or string or number\nslot: number\nExample\nlocal slot = exports.ox_inventory:GetSlot(source, 1)\nprint(json.encode(slot, {indent=true}))\n--[[\n {\n \"weight\": 2000,\n \"name\": \"water\",\n \"metadata\": [],\n \"slot\": 1,\n \"label\": \"Water\",\n \"close\": true,\n \"stack\": true,\n \"count: 4\n }\n]]","getslotforitem#GetSlotForItem":"Get the slot id of an existing item matching the given data, or an empty slot.\nexports.ox_inventory:GetSlotForItem(inv, itemName, metadata)\ninv: table or string or number\nitemName: string\nmetadata: table?\nReturn:\nslotId: number?","getslotidwithitem#GetSlotIdWithItem":"Get a slot id in an inventory matching the given item name and metadata.\nexports.ox_inventory:GetSlotIdWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotId: number?","getslotidswithitem#GetSlotIdsWithItem":"Get all slot ids in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdsWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotIds: number[]?","getslotwithitem#GetSlotWithItem":"Get data for a slot in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotData: table?","getslotswithitem#GetSlotsWithItem":"Get data all slots in an inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotsWithItem(inv, itemName, metadata, strict)\ninv: table or string or number\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotsData: table[]?","getemptyslot#GetEmptySlot":"Get the first available empty slot in an inventory.\nexports.ox_inventory:GetEmptySlot(inv)\ninv: table or string or number\nReturn:\nslotId: number?","getcontainerfromslot#GetContainerFromSlot":"Returns the inventory associated with the container linked in the slot of the given inventory.\nexports.ox_inventory:GetContainerFromSlot(inv, slotId)\ninv: table or string or number\nslotId: number\nReturn:\ncontainerData: table?","setslotcount#SetSlotCount":"Sets the number of slots available for an inventory.\nexports.ox_inventory:SetSlotCount(inv, slots)\ninv: table or string or number\nslots: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the slot count for player 1's inventory to 10.\nox_inventory:SetSlotCount(1, 10)","getinventory#GetInventory":"Returns the inventory associated with the ID (and owner if defined). Otherwise returns null.\nexports.ox_inventory:GetInventory(inv, owner)\ninv: number or table\nowner?: string or boolean\nExample\nlocal inventory = exports.ox_inventory:GetInventory('example_stash', false)\nprint(json.encode(inventory, {indent = true}))\n--[[\n {\n \"id\": \"example_stash,\n \"label\": \"Police Stash\",\n \"type\": \"stash,\n \"slots\": 50,\n \"weight\": 0,\n \"maxWeight\": 100000,\n \"owner\": false,\n ...\n }\n]]","getinventoryitems#GetInventoryItems":"Returns all slots with items in a inventory.\nexports.ox_inventory:GetInventoryItems(inv, owner)\ninv: number or table\nowner?: string or boolean\nExample\nlocal playerItems = exports.ox_inventory:GetInventoryItems(source)","inspectinventory#InspectInventory":"Inspect the player their inventory. You will not be able to modify the inventory.\nexports.ox_inventory:InspectInventory(target, source)\ntarget: number\nsource: number","confiscateinventory#ConfiscateInventory":"Clears a player's inventory and saves it to a stash.Use ReturnInventory to return the confiscated inventory back to\nthe player.\nexports.ox_inventory:ConfiscateInventory(source)\nsource: number","returninventory#ReturnInventory":"Returns the confiscated inventory back to the player.Use it alongside ConfiscateInventory.\nexports.ox_inventory:ReturnInventory(source)\nsource: number","clearinventory#ClearInventory":"Clears the specified inventory. The keep argument is either a string or an array of strings containing the name(s) of the item(s) to keep in the inventory after clearing.\nexports.ox_inventory:ClearInventory(inv, keep)\ninv: table or string or number\nkeep?: string or string[]","search#Search":"Searches an inventory for a specified item.\nexports.ox_inventory:Search(inv, search, item, metadata)\ninv: table or string or number\nsearch: string\nitem: table or string\nmetadata?: table or string\nsearch can be either 'slots' or 'count', where slots will return a table of data\nand count will return the found amount of the specified item.","registerstash#RegisterStash":"Creates a new custom stash.\nexports.ox_inventory:RegisterStash(id, label, slots, maxWeight, owner, groups, coords)\nid: string or number\nStash identifier when loading from the database.\nlabel: string\nDisplay name when inventory is open.\nslots: number\nmaxWeight: number\nowner: string or boolean or nil\nstring: Can only access the stash linked to the owner.\ntrue: Each player has a unique stash but can request other player's stashes.\nnil: Always shared.\ngroups: table\nTable of player groups (jobs) able to access the stash.\nTable of group names where the numeric value is the minimum grade required.\n{['police'] = 0, ['ambulance'] = 2}\ncoords?: vector3 or vector3[]\nThis function needs to be triggered before a player can open the stash.\nExample\nFor a use case example on this function check out the written Guide for it.","createtemporarystash#CreateTemporaryStash":"Creates a temporary stash which will be removed after some time.\nexports.ox_inventory:CreateTemporaryStash(properties)\nproperties: table\nlabel: string\nslots: number\nmaxWeight: number\nowner?: string number or boolean\nstring: Can only access the stash linked to the owner.\ntrue: Each player has a unique stash but can request other player's stashes.\nThe inventory is always shared if false or nil.\ngroups?: table\nTable of group names (e.g. jobs) where the numeric value is the minimum grade required.\n{['police'] = 0, ['ambulance'] = 2}\ncoords?: vector3\nStash can only be accessed while nearby.\nitems?: { [number]: string, [number]: number, [number]?: table }[]\nAn array of tables, containing a sequence of itemName, count, metadata.\nReturn:\ninventoryId: string\nExample\nlocal mystash = exports.ox_inventory:CreateTemporaryStash({\n label = 'mystash',\n slots = 5,\n maxWeight = 5000,\n items = {\n { 'WEAPON_MINISMG', 1 },\n { 'ammo-9', 69 },\n { 'water', 2, { label = 'Mineral water' } }\n }\n})\nTriggerClientEvent('ox_inventory:openInventory', 1, 'stash', mystash)","customdrop#CustomDrop":"Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648').\nexports.ox_inventory:CustomDrop(prefix, items, coords, slots, maxWeight, instance, model)\nprefix: string\nitems: table\nname: string\ncount: number\nmetadata?: table\ncoords: vector3\nslots?: number\nmaxWeight?: number\ninstance?: string or number\nmodel?: number\n-- Create a generic drop with a marker\nexports.ox_inventory:CustomDrop('Carcass', {\n {'meat', 5, { grade = 2, type = 'deer' }},\n {'hide', 5, { grade = 2, type = 'deer' }}\n}, coords)\n-- Create a drop with an entity\nexports.ox_inventory:CustomDrop('SMG', {\n { 'WEAPON_MINISMG', 1 },\n { 'ammo-9', 69 },\n}, GetEntityCoords(GetPlayerPed(1)), 5, 10000, nil, `w_sb_minismg`)","createdropfromplayer#CreateDropFromPlayer":"Creates a new drop with the contents of a player's inventory.\nexports.ox_inventory:CreateDropFromPlayer(playerId)\nplayerId: number\nReturn:\ndropId: string\nExample\nlocal dropId = exports.ox_inventory:CreateDropFromPlayer(1)","getcurrentweapon#GetCurrentWeapon":"Returns the player's currently equipped weapon as a table.\n-- inv: string or number\nexports.ox_inventory:GetCurrentWeapon(inv)\ninv: table or string or number","setdurability#SetDurability":"Sets durability onto the specified slot.Can be used for repairing weapons.\nexports.ox_inventory:SetDurability(inv, slot, durability)\ninv: table or string or number\nslot: number\ndurability: number\nExample\nlocal ox_inventory = exports.ox_inventory\n-- Set the durability of the item in slot 3 of source player's inventory to 100\nox_inventory:SetDurability(source, 3, 100)\n-- Set the durability of the source player's current weapon to 100\nlocal weapon = ox_inventory:GetCurrentWeapon(source)\nif weapon then\n ox_inventory:SetDurability(source, weapon.slot, 100)\nend","setmetadata#SetMetadata":"Sets metadata on the specified slot.\nox_inventory:SetMetadata(inv, slot, metadata)\ninv: table or string or number\nslot: number\nmetadata: table\nExample\nlocal ox_inventory = exports.ox_inventory\nlocal water = ox_inventory:Search(source, 1, 'water')\nfor k, v in pairs(water) do\n print('\\n______________'..'\\n- index '..k)\n print(v.name, 'slot: '..v.slot, 'metadata: '..json.encode(v.metadata))\n water = v\n break\nend\nwater.metadata.type = 'clean'\nox_inventory:SetMetadata(source, water.slot, water.metadata)\nprint(('modified %sx water in slot %s with new metadata'):format(water.count, water.slot))"}},"/overextended/ox_inventory/Functions/Client":{"title":"Client","data":{"openinventory#openInventory":"Opens an inventory using the passed data.\nexports.ox_inventory:openInventory(invType, data)\ninvType: string\n'player'\n'shop'\n'stash'\n'crafting'\n'container'\n'drop'\n'glovebox'\n'trunk'\n'dumpster'\ndata: number or string or table\nExamples\nOpen the target player's inventory.\nexports.ox_inventory:openInventory('player', 3)\nOpen the fourth \"General Store\" location.\nexports.ox_inventory:openInventory('shop', { type = 'General', id = 4 })\nOpen the first stash in data/stashes.\nexports.ox_inventory:openInventory('stash', 1)\nOpen a custom stash (created on the server with RegisterStash).\nexports.ox_inventory:openInventory('stash', 'society_police')\nOpen a stash with a specific owner.\nexports.ox_inventory:openInventory('stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })","opennearbyinventory#openNearbyInventory":"If possible opens the nearby player's inventory.The player trying to open the inventory must be able to open their own and\nif the player does not have a police job, the target player must be fatally injured or\nplaying one of the death anims.\nexports.ox_inventory:openNearbyInventory()","closeinventory#closeInventory":"Closes the player's inventory.\nexports.ox_inventory:closeInventory()","items#Items":"Returns a table of all registered items. The format is as defined in data/items.lua.Optionally takes the name of an item, returning only data for that item (getting all data is not recommended).\nexports.ox_inventory:Items(itemName)\nitemName?: string\nThe following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than retrieving information from the server.\nlocal itemNames = {}\nfor item, data in pairs(exports.ox_inventory:Items()) do\n itemNames[item] = data.label\nend","useitem#useItem":"Uses the passed item, then triggers the callback function.\nShould be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.).\nexports.ox_inventory:useItem(data, cb)\ndata: table\ncb?: function\nexports('bandage', function(data, slot)\n local playerPed = PlayerPedId()\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Does the ped need to heal?\n if health < maxHealth then\n -- Use the bandage\n exports.ox_inventory:useItem(data, function(data)\n -- The item has been used, so trigger the effects\n if data then\n SetEntityHealth(playerPed, math.min(maxHealth, math.floor(health + maxHealth / 16)))\n lib.notify({description = 'You feel better already'})\n end\n end)\n else\n -- Don't use the item\n lib.notify({type = 'error', description = 'You don\\'t need a bandage right now'})\n end\nend)","useslot#useSlot":"Uses the item in the given inventory slot.\nexports.ox_inventory:useSlot(slot)\nslot: number","setstashtarget#setStashTarget":"Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker.\nexports.ox_inventory:setStashTarget(id, owner)\nid: string or number\nStash id.\nowner?: string or number\nExample\nexports.ox_inventory:setStashTarget('motel5', 'bobsmith')","getcurrentweapon#getCurrentWeapon":"Get data for the currently equipped weapon.\nexports.ox_inventory:getCurrentWeapon()\nYou can also listen for changes to the current weapon using an event handler.\nAddEventHandler('ox_inventory:currentWeapon', function(currentWeapon)\n\tCurrentWeapon = currentWeapon\nend)\ncurrentWeapon?: table\nammo?: string Name of the item used as ammo.\nhash: number\nlabel: string\nmelee: boolean\nmetadata: table\nammo?: number Amount of ammo loaded into the weapon.\ncomponents?: table Array of component item names, used to apply weapon components.\ndurability?: number\nregistered?: string Name of the player that bought the weapon at a shop.\nserial?: string\nname: string Name of the item.\nslot: number\nweight: number","displaymetadata#displayMetadata":"Sets a metadata property to display in the tooltip.\nexports.ox_inventory:displayMetadata(metadata, value)\nmetadata: string or table or { [string], [string] }\nIf metadata is a string then it's the metadata property you want to display, value is not optional then.\nCan be a table of key-value pairs, key being the metadata property and value being the label for that property.\nCan be an array of string arrays, i.e. { {'key', 'label' }, {'key2', 'label2' } to set the display order.\nvalue?: string\nLabel for the string metadata property to be displayed.\nExample\nexports.ox_inventory:displayMetadata('mustard', 'Mustard')\nexports.ox_inventory:displayMetadata({\n mustard = 'Mustard',\n ketchup = 'Ketchup'\n})","giveitemtotarget#giveItemToTarget":"Gives an item from the player's inventory to another player.\nexports.ox_inventory:giveItemToTarget(serverId, slotId, count)\nserverId: number\nThe serverId of the target player.\nslotId: number\nThe slotId of the item to give.\ncount?: number\nThe amount of the item to give, with nil, 0 or a value above the slot count giving the entire stack away.","weaponwheel#weaponWheel":"Enables the weapon wheel, but disables the use of inventory weapons.Mostly used for weaponised vehicles, though could be called for \"minigames\"\nlocal exports.ox_inventory:weaponWheel(state)\nstate: boolean","search#Search":"Searches the inventory for an item, or list of items, with the result varying based on the first argument.\nexports.ox_inventory:Search(search, item, metadata)\nsearch: 'slots' or 'count'\n'slots' returns a table of slots where the item was found at.\n'count' returns the count of the specified item in player's inventory. If searching for multiple items\nreturns key-value pairs of itemName = count.\nitem: table or string\nCan be a single item name or array of item names.\nmetadata?: table or string\nIf metadata is provided as a string it will search the item's metadata.type property.","count#Count":"local count = exports.ox_inventory:Search('count', 'water')\nprint('You have '..count.. ' water')\nlocal inventory = exports.ox_inventory:Search('count', {'meat', 'skin'}, {grade=\"1\"})\nif inventory then\n for name, count in pairs(inventory) do\n print('You have '..count..' '..name)\n end\nend","slots#Slots":"local water = exports.ox_inventory:Search('slots', 'water')\nlocal count = 0\nfor _, v in pairs(water) do\n print(v.slot..' contains '..v.count..' water '..json.encode(v.metadata))\n count = count + v.count\nend\nprint('You have '..count..' water')\nlocal items = exports.ox_inventory:Search('slots', {'meat', 'skin'}, 'deer')\nif items then\n for name, data in pairs(items) do\n local count = 0\n for _, v in pairs(data) do\n if v.slot then\n print(v.slot..' contains '..v.count..' '..name..' '..json.encode(v.metadata))\n count = count + v.count\n end\n end\n print('You have '..count..' '..name)\n end\nend","getitemcount#GetItemCount":"Get the total item count for all items in the player's inventory with the given name and metadata.\nexports.ox_inventory:GetItemCount(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\ncount: number","getplayeritems#GetPlayerItems":"Get all items in the player's inventory.\nexports.ox_inventory:GetPlayerItems()\nReturn:\nitems: table","getplayerweight#GetPlayerWeight":"Get the total weight of all items in the player's inventory.\nexports.ox_inventory:GetPlayerWeight()\nReturn:\ntotalWeight: number","getplayermaxweight#GetPlayerMaxWeight":"Get the maximum carry weight of the player's inventory.\nexports.ox_inventory:GetPlayerMaxWeight()\nReturn:\nmaxWeight: number","getslotidwithitem#GetSlotIdWithItem":"Get a slot id in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotId: number?","getslotsidwithitem#GetSlotsIdWithItem":"Get all slot ids in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotIdsWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotIds: number[]?","getslotwithitem#GetSlotWithItem":"Get data for a slot in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotData: table?","getslotswithitem#GetSlotsWithItem":"Get data all slots in the player's inventory matching the given name and metadata.\nexports.ox_inventory:GetSlotsWithItem(itemName, metadata, strict)\nitemName: string\nmetadata?: table\nstrict?: boolean\nStrictly match metadata properties, otherwise use partial matching.\nReturn:\nslotsData: table[]?","statebags#Statebags":"","invbusy#invBusy":"Returns whether the player's inventory is currently running an action (i.e. using an item).\nCan be set to true to disable opening the inventory.\ninvBusy: boolean\nlocal invBusy = LocalPlayer.state.invBusy\nif invBusy then\n -- Do stuff when busy\nelse\n -- Do stuff when not busy\nend","disable-opening-inventory#Disable opening inventory":"LocalPlayer.state.invBusy = true","invhotkeys#invHotkeys":"Allows you to enable/disable a player's access to inventory hotkeys.\ninvHotkeys: boolean\nLocalPlayer.state.invHotkeys = false","invopen#invOpen":"Returns whether the player's inventory is currently open or not.\ninvOpen: boolean\nlocal invOpen = LocalPlayer.state.invOpen\nif invOpen then\n -- Do stuff when open\nelse\n -- Do stuff when closed\nend","canuseweapons#canUseWeapons":"Allows you to enable/disable the use of weapons for a player.\nLocalPlayer.state.canUseWeapons = false"}},"/overextended/ox_inventory/Functions/Server/Hooks":{"title":"Hooks","data":{"":"Event hooks allow 3rd party resources to define new behaviour without modifying the inventory code directly.","registerhook#registerHook":"exports.ox_inventory:registerHook(eventName, function(payload) end, options)\neventName: string\npayload: table\noptions?: table\nprint?: boolean\nPrint to the console when triggering the event.\nitemFilter?: { [string]: true }\nThe event will only trigger for items defined as keys in a set.\ninventoryFilter?: string[]\nThe event will only trigger for inventories that match one of the patterns in the array.\ntypeFilter?: { [string]: true }\nThe event will only trigger for inventories with one of the provided types (e.g. 'player', 'stash')\nReturn:\nhookId: number","swapitems#swapItems":"Triggered when moving any item from one slot to another, or when \"giving\" an item.\nBy returning false, you can cancel the action and revert the inventory state.\nPayload: table\nsource: number\naction: 'move' or 'stack' or 'swap' or 'give'\nfromInventory: table or string or number\ntoInventory: table or string or number\nfromType: string\ntoType: string\nfromSlot: table\ntoSlot?: table or number\ncount: number\nExampleBlacklists \"water\" from being moved into or from gloveboxes and trunks.\nlocal hookId = exports.ox_inventory:registerHook('swapItems', function(payload)\n print(json.encode(payload, { indent = true }))\n return false\nend, {\n print = true,\n itemFilter = {\n water = true,\n },\n inventoryFilter = {\n '^glove[%w]+',\n '^trunk[%w]+',\n }\n})","openinventory#openInventory":"Payload: table\nsource: number\ninventoryId: number or string\ninventoryType: string\nTriggered when a player tries to open a secondary inventory.\nBy returning false, you can cancel the action and keep the player's inventory closed.ExampleDisables gloveboxes and trunks.\nlocal hookId = exports.ox_inventory:registerHook('openInventory', function(payload)\n print(json.encode(payload, { indent = true }))\n return false\nend, {\n print = true,\n inventoryFilter = {\n '^glove[%w]+',\n '^trunk[%w]+',\n }\n})","createitem#createItem":"Payload: table\ninventoryId?: number or string\nmetadata: table\nitem: table\ncount: number\nTriggered when an item is created, either by buying it, using AddItem, or when converting inventory data.\nBy returning a table you can modify or replace the metadata given to an item.ExampleSets the label for \"water\" to \"Mineral Water\".\nlocal hookId = exports.ox_inventory:registerHook('createItem', function(payload)\n print(json.encode(payload, { indent = true }))\n local metadata = payload.metadata\n metadata.label = 'Mineral Water'\n return metadata\nend, {\n print = true,\n itemFilter = {\n water = true\n }\n})","buyitem#buyItem":"Payload: table\nsource: number\nshopType: string\nshopId: number\ntoInventory: number\ntoSlot: number\nitemName: string\nmetadata: table\ncount: number\nprice: number\ntotalPrice: number\ncurrency?: string\nTriggered when an item is about to be purchased and can return false to prevent the transaction.ExamplePrevents players from purchasing items at General stores.\nlocal hookId = exports.ox_inventory:registerHook('buyItem', function(payload)\n print(json.encode(payload, { indent = true, sort_keys = true }))\n return false\nend, {\n print = true,\n itemFilter = {\n water = true\n\t },\n})","craftitem#craftItem":"Payload: table\nsource: number\nbenchId: number\nbenchIndex: number\nrecipe: table\ncount: number\nduration: number\ningredients: table\nname: string\nslot: number\nweight: number\ntoInventory: number\ntoSlot: number\nExamplePrevent lockpicks from being crafted by players.\nlocal hookId = exports.ox_inventory:registerHook('craftItem', function(payload)\n print(json.encode(payload, { indent = true, sort_keys = true }))\n return false\nend, {\n print = true,\n\titemFilter = {\n\t\tlockpick = true\n\t},\n})","removehooks#removeHooks":"Removes a hook created by the invoking resource with the the specified id.\nIf no id is specified then all hooks registered by the resource are removed.\nexports.ox_inventory:removeHooks(id)\nid?: number"}},"/overextended/ox_inventory/Guides/crafting":{"title":"Crafting","data":{"":"Crafting locations, items and their ingredients are defined in data/crafting.lua.","crafting-definition#Crafting definition":"{\n items = {\n {\n name = 'lockpick',\n ingredients = {\n garbage = 3,\n WEAPON_HAMMER = 0.1\n },\n duration = 5000,\n count = 3,\n metadata = { durability = 20 }\n },\n {\n name = 'garbage',\n ingredients = {\n cola = 1\n },\n metadata = { description = 'An empty soda can.', weight = 20, image = 'trash_can' }\n },\n },\n points = {\n vec3(-1147.083008, -2002.662109, 13.180260),\n },\n zones = {\n {\n coords = vec3(-1146.2, -2002.05, 13.2),\n size = vec3(3.8, 1.05, 0.15),\n distance = 1.5,\n rotation = 315.0,\n },\n },\n blip = { id = 566, colour = 31, scale = 0.8 },\n},\nitems: table\nname: string\ningredients: table\nItem ingredients can be seen in the item tooltip.\nKey-value pairs of item name and consume count\nkey - Item name.\nvalue - If 1 or above it's the consume count, if below 1 and above 0 it's the durability consume amount, if\nset to 0 then the item is required but not consumed.\nduration: number\nCrafting duration in milliseconds.\ncount: number or table (min, max)\nItem amount received upon crafting.\nIf set it to table it requires two number first one is minimum number and second one is maximum, it will generate a random number between those two numbers to add the crafted item to player.\nmetadata: table\nMetadata applied to the item being crafted.\npoints: vector3[]\nInteraction locations that will open the crafting inventory.\ngroups: table\nKey-value pairs of job name and minimum grade to access the crafting location.\n{[\"police\"] = 0, [\"ambulance\"] = 2}\nzones: table\nox_lib targeting zones used for ox_target.\ncoords: vector3\nsize: vector3\ndistance: number\nrotation: number\nblip: table\nid: number\nBlip sprite number.\ncolour: number\nscale: number"}},"/overextended/ox_inventory/Guides/creatingItems":{"title":"Creating Items","data":{"defining-item-data#Defining item data":"Before being able to see or use an item in game it must first be defined.All of the items are defined in the /data/items.lua file with key, value pairs.\nKey is the name (not the label) of an item and the value is a table containing the\noptions for the item.\nItem options: table\nlabel: string\nweight?: number\nstack?: boolean\nIf set to false will not allow the item to be stacked.\ndegrade?: number\nAmount of time in minutes the item will degrade after.\ndecay?: boolean\nIf true the item will be deleted when durability reaches 0 (not instant for degraded items).\nclose?: boolean\nIf set to false does not close the inventory on item use.\ndescription?: string\nItem description that will be shown in the tooltip\nconsume?: number\nItem count needed and removed use.\nDefault: 1\nIf set to a decimal will consume durability instead (0.2 = 20%).\nallowArmed?: boolean\nIf set to true will allow use of item while armed with a weapon.\nserver?: table\nexport?: string\nclient?: table\nexport?: string\nExport to be triggered after item use.\nevent?: string\nEvent to be triggered after item use.\nstatus?: table\nAdjust esx_status values after use.\nanim?: table\nAnimation that will be played during the progress bar.\ndict: string\nclip: string\nprop?: table\nAttached prop that will be displayed during the progress bar.\nmodel: string or hash\npos: table (x, y, z)\nrot: table (x, y, z)\nbone?: number\nrotOrder?: number\ndisable?: table\nActions to be disabled during the progress bar.\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean\nusetime?: number\ncancel?: boolean\nIf set to true the player canc cancel item use.\nadd?: function(total: number)\nFunction that triggers when receiving an item\nReturns total item count as total\nremove?: function(total: number)\nFunction that triggers when removing an item\nReturns total item count as total\nbuttons?: table\nlabel: string\naction: function(slot: number)\nCallback function when button is clicked in context menu, returns item slot.","examples#Examples":"['burger'] = {\n label = 'Burger',\n weight = 220,\n stack = true,\n close = true,\n client = {\n status = { hunger = 200000 },\n anim = { dict = 'mp_player_inteat@burger', clip = 'mp_player_int_eat_burger_fp' },\n prop = {\n model = 'prop_cs_burger_01',\n pos = { x = 0.02, y = 0.02, y = -0.02},\n rot = { x = 0.0, y = 0.0, y = 0.0}\n },\n usetime = 2500,\n }\n}\nA modified burger item which includes a description.\n['burger'] = {\n label = 'Burger',\n description = 'Just what is the secret formula?'\n weight = 220,\n stack = true,\n close = true,\n client = {\n status = { hunger = 200000 },\n anim = { dict = 'mp_player_inteat@burger', clip = 'mp_player_int_eat_burger_fp' },\n prop = {\n model = 'prop_cs_burger_01',\n pos = { x = 0.02, y = 0.02, y = -0.02},\n rot = { x = 0.0, y = 0.0, y = 0.0}\n },\n usetime = 2500,\n }\n}\nA modified burger item, which gives you notifications on add and remove arguments.\n['burger'] = {\n label = 'Burger',\n weight = 220,\n stack = true,\n consume = 0,\n client = {\n add = function(total)\n if total > 0 then\n lib.notify({description = 'Nice burger you got there!'})\n end\n end,\n remove = function(total)\n if total < 1 then\n lib.notify({description = 'You lost all of your burgers!'})\n end\n end\n }\n}","making-the-item-usable#Making the item usable":"If you are using ESX, you can continue using ESX.RegisterUsableItem.\nIf you are using QBox, you can continue using exports.qbx_core:CreateUseableItem.\nUsing the built-in system is more secure and provides much more functionality.","client-callbacks#Client callbacks":"Item callbacks can be added by defining an export (recommended), or by adding it to items/client.lua.When defining item data, adding client.export will trigger an event on item use.\nThe correct formatting is export = resourceName.exportName.\nexports('bandage', function(data, slot)\n local playerPed = PlayerPedId()\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Does the ped need to heal? We can cancel the item from being used.\n if health < maxHealth then\n -- Triggers internal-code to correctly use items.\n -- This adds security, removes the item on use, adds progressbar support, and is necessary for server callbacks.\n exports.ox_inventory:useItem(data, function(data)\n -- The server has verified the item can be used.\n if data then\n SetEntityHealth(playerPed, math.min(maxHealth, math.floor(health + maxHealth / 16)))\n lib.notify({description = 'You feel better already'})\n end\n end)\n else\n -- Don't use the item\n lib.notify({type = 'error', description = 'You don\\'t need a bandage right now'})\n end\nend)","server-callbacks#Server callbacks":"A callback function can be defined on the server to handle several events (usingItem, usedItem, buyItem).\nThis can either be an export (recommended), or added to the bottom of items/server.lua.\nWhen defining item data, adding server.export will trigger an event for the actions above.\nThe correct formatting is export = resourceName.exportName.\nexports('bandage', function(event, item, inventory, slot, data)\n -- Player is attempting to use the item.\n if event == 'usingItem' then\n local playerPed = GetPlayerPed(inventory.id)\n local maxHealth = GetEntityMaxHealth(playerPed)\n local health = GetEntityHealth(playerPed)\n -- Check if the player needs to be healed.\n if health >= maxHealth then\n TriggerClientEvent('ox_lib:notify', inventory.id, {type = 'error', description = 'You don\\'t need a bandage right now'})\n -- Returning 'false' will prevent the item from being used\n return false\n end\n return\n end\n -- Player has finished using the item.\n if event == 'usedItem' then\n return TriggerClientEvent('ox_lib:notify', inventory.id, {description = 'You feel better already'})\n end\n -- Player is attempting to purchase the item.\n if event == 'buying' then\n return TriggerClientEvent('ox_lib:notify', inventory.id, {type = 'success', description = 'You bought a bandage'})\n end\nend)","creating-container-items#Creating container items":"Like with other items the item must first be registered.When registered you can define the item as a container in /modules/items/containers.lua\nThe key for the container is the name you gave it when registering the item.\nYou can also define the number of slots, the maximum weight, blacklist and whitelist items.\nitemName:\nslots: number\nThe number represents the amount of slots\nmaxWeight: number\nThe number represents the maximum weight within the container\nblacklist:\nSupports single and multiple items\n{ 'testburger', 'testburger2' }\nwhitelist:\nSupports single and multiple items\n{ 'testburger', 'testburger2' }","example#Example":"['paperbag'] = {\n label = 'Paper Bag',\n weight = 1,\n stack = false,\n close = false,\n consume = 0\n},\nsetContainerProperties('paperbag', {\n\tslots = 5,\n\tmaxWeight = 1000,\n\tblacklist = { 'testburger' }\n})"}},"/overextended/ox_inventory/Guides/metadata":{"title":"Metadata","data":{"":"Item metadata is a very powerful tool that can be used to create multiple different items out of a single item.In this guide we'll use pokemon cards as an example, but you can find an already integrated example in the inventory\nwith the garbage item.","creating-the-base-item#Creating the base item":"First of all we need to create a base item that we'll use to apply metadata to.\n['pokemon_card'] = {\n label = 'Pokemon card',\n weight = 10,\n consume = 0,\n server = {\n export = 'pokemon.pokemon_card'\n }\n}\nIn this case we define the label and the weight as well since we are going to have all the cards weigh the same, but if you\ndo not want them all to weigh the same you can leave it out and apply weight through metadata.We'll also make the item usable by calling the pokemon_card export in the pokemon resource.\nexports('pokemon_card', function(event, item, inventory, slot, data)\n if event == 'usingItem' then\n local itemSlot = exports.ox_inventory:GetSlot(inventory.id, slot)\n print(json.encode(itemSlot.metadata, {indent=true}))\n end\nend)","special-metadata-properties#Special metadata properties":"You can define any metadata property with any value you want it to have, but there are a couple metadata properties that\nhave special use cases.These properties are:\nlabel: string\nDisplay name of the item\nweight: number\nAmount the item will weigh\ndescription: string\nDescription of the item that will be displayed in the tooltip\nimage: string\nImage inside the image path that the item will use\nimageurl: string\nUrl to the image that the item will use\ntype: any\nItem type that is displayed in top right of the tooltip\nWe'll use these properties to create our pokemon cards out of the pokemon_card item that we created earlier.","creating-metadata-items#Creating metadata items":"We can easily create metadata items by defining a hook using createItem and adding it to a shop as well.\ninventory = {\n {name = 'pokemon_card', price = 300, metadata = {\n label = 'Charizard',\n description = 'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.',\n image = 'panties',\n type = 'Fire',\n hp = 78,\n attack = 84,\n defense = 78\n }}\n}\nlocal pokemonMetadata = {\n charizard = {\n label = 'Charizard',\n description = 'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.',\n image = 'panties',\n type = 'Fire',\n hp = 78,\n attack = 84,\n defense = 78\n }\n}\nlocal hookId = exports.ox_inventory:registerHook('createItem', function(payload)\n local pokemon = pokemonMetadata[payload.metadata.type]\n if not pokemon then return end\n return pokemon\nend, {\n itemFilter = {\n pokemon_card = true\n }\n})\nAs seen above when our item is usable, the metadata properties are all there and accessible through the slot.","displaying-custom-metadata-properties#Displaying custom metadata properties":"We can display our custom metadata we set on our charizard card by either using string concatenation and adding them to\nthe description or by using the displayMetadata client function.\nexports.ox_inventory:displayMetadata({\n hp = 'HP',\n attack = 'ATK',\n defense = 'DEF'\n})"}},"/overextended/ox_inventory/issues":{"title":"Common Issues","data":{"ui-has-not-been-built#UI has not been built":"Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js.We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from here.\nMake sure you download the ox_inventory.zip file as that one contains the bundled files and others are raw source code.If in case you wanted to edit the inventory UI you would have to build these files yourself.\nTo do so please read our Installation guide.","no-such-export--in-resource-ox_inventory#No such export * in resource ox_inventory":"There are several likely causes for this \"issue\".\nAn error occurred while starting ox_inventory or one of its dependencies (e.g. ox_lib).\nThe resource trying to use the export (e.g. esx_addoninventory) is being started before ox_inventory.\nYou're literally trying to call an export that does not exist, which is a you issue.","stashes--trunks-are-not-saved-at-server-restart#Stashes / trunks are not saved at server restart":"Stopping a server or \"restarting\" it does not trigger any events or allow for saving.\nInventories are saved at a 5 minute interval.\ntxAdmin scheduled restarts and shutdowns will trigger a save.\nThe saveinv command can be used manually or triggered in the console.\nAll inventories are saved when the number of online players hits 0."}},"/overextended/ox_inventory/Guides/stashes":{"title":"Custom Stashes","data":{"":"We can set up custom stashes from outside the resource utilising the exported RegisterStash function.Firstly, we need to define the stashes properties.","stash-properties#Stash properties":"id: string\nUnique name to identify the stash in the database.\nlabel: string\nDisplay name when viewing the stash.\nslots: number\nNumber of slots the stash will have.\nweight: number\nMaximum weight of the stash inventory.\nowner?: string or boolean\ntrue: Each player has their own unique stash, but can request to open the stash of another player\nfalse: Only a single stash exists and is shared between all players\nstring: The stash explicitly belongs to the given owner, usually a player identifier\ngroups?: table\nKey-value pairs of job name and minimum grade to be able to access the stash. ({[\"police\"] = 0, [\"ambulance\"] = 2})\nname: string\ngrade: number\ncoords?: vector3 or table\nYou can set the stash coordinates to prevent the stash from being opened if the player isn't close enough.\nVector or table containing the coordinates of the stash.","example#Example":"Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)\n-- Server\nlocal stash = {\n id = '42wallabyway',\n label = '42 Wallaby Way',\n slots = 50,\n weight = 100000,\n owner = 'char1:license'\n}\nAddEventHandler('onServerResourceStart', function(resourceName)\n if resourceName == 'ox_inventory' or resourceName == GetCurrentResourceName() then\n exports.ox_inventory:RegisterStash(stash.id, stash.label, stash.slots, stash.weight, stash.owner)\n end\nend)\n-- Client\nexports.ox_inventory:openInventory('stash', {id='42wallabyway', owner=property.owner})\nThe following sample is based on esx_property's db data.\n-- Server\nlocal properties\nMySQL.query('SELECT * FROM `properties`', {}, function(result)\n properties = result\nend)\nRegisterNetEvent('ox:loadStashes', function(id)\nlocal stash = properties[id]\n if stash then\n -- id: 1, name: WhispymoundDrive, label: 2677 Whispymound Drive, coords: {\"x\":118.748,\"y\":566.573,\"z\":175.697}\n ox_inventory:RegisterStash(stash.name, stash.label, 50, 100000, true, false, json.encode(stash.room_menu))\n end\nend)\n-- Client\nlocal ox_inventory = exports.ox_inventory\nif ox_inventory:openInventory('stash', property.id) == false then\n TriggerServerEvent('ox:loadStashes')\n ox_inventory:openInventory('stash', property.id)\nend","example-resource#Example Resource":"We put together an example resource showcasing how to properly utilise the stash API:"}},"/overextended/ox_lib":{"title":"Ox Lib","data":{"":"A standalone library for providing easily reusable code as importable modules and exports.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_lib.git\ncd ox_lib/web\npnpm i\npnpm build","config#Config":"Resource configuration is handled using convars.\n# https://v6.mantine.dev/theming/colors/#default-colors\nsetr ox:primaryColor blue\nsetr ox:primaryShade 8\nsetr ox:userLocales 1 # Allow users to select their locales using /ox_lib\nYou'll also need to grant ace permissions to the resource.\nadd_ace resource.ox_lib command.add_ace allow\nadd_ace resource.ox_lib command.remove_ace allow\nadd_ace resource.ox_lib command.add_principal allow\nadd_ace resource.ox_lib command.remove_principal allow","usage#Usage":"To enable the library inside of your resource just add @ox_lib/init.lua as a shared_script in your fxmanifest.lua file.\nshared_scripts {\n '@ox_lib/init.lua',\n}\nOr if the library is the only shared script you use you can do:\nshared_script '@ox_lib/init.lua'\nYou can specify modules to import from inside your fxmanifest.lua, or load them dynamically.\nox_libs {\n 'locale',\n 'math',\n 'table',\n}\nWhen ox_lib has been imported into your script, it will make several new globals available:\nlib for dynamically importing ox_lib modules into your script.\nrequire for importing modules from your own script.\ncache see here.\nNpm package for the lib does not support all the functions that are available for Lua.All supported functions are located inside the resource folder in the lib.\nYou can get the npm package here.Usage:\nYou can either import the whole library object which contains all the functions for that scope (client/server/shared) or you can deconstruct it and import the functions you find needed at the time.\nimport lib from '@overextended/ox_lib/server';\nimport { versionCheck } from '@overextended/ox_lib/server';\nYou can now use the library functions inside of your resource, check the rest of the documentation to see how to utilise them.","using-icons-for-interface-functions#Using icons for interface functions":"The icon library used is Font Awesome 6.0, if for the icon you define only a string the default icon type will be solid.\nIf you want to use a different icon type, i.e apple as a brand, you need to define icon as a table (array) with the first value being the icon type (fas, far, fab) as a string, and the second being the icon name.\nicon = {'fab', 'apple'}\nicon: ['fab', 'apple'];","building-the-ui#Building the UI":"If you wish to edit any of the UI elements you will need to download the source code, edit what you need and then compile it.\nDO NOT de-bundle and un-minify the release CSS and JS files to edit them.\nRequirements:\nNode.js (LTS)\npnpm\nInstalling Node.js:\nDownload the LTS version of Node.js.\nGo through the install and make sure you install all of the features.\nRun 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.\nInstalling pnpm:\nAfter installing NodeJS you can install pnpm by running npm install -g pnpm.\nBuilding the UI:\ncd into the web directory.\nrun pnpm i to install the dependencies.\nrun pnpm build to build the source files.\nWhen working in the browser you can run pnpm start, which supports hot reloads meaning that\nyou will see your changes after saving your file.If you want to work in game you can run pnpm start:game which writes changes to disk, so\nthe only thing you have to do is restart the resource for it take affect."}},"/overextended/ox_lib/Modules/ACL/Server":{"title":"Server","data":{"":"Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.\nRefer to Basic Aces & Principals overview/guide for more information.","libaddace#lib.addAce":"Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing false sets the permission to 'deny'.\nlib.addAce(principal, ace, allow)\nlib.addAce('group.admin', 'command.say')\nimport lib from '@overextended/ox_lib/server'\nlib.addAce(principal, ace, allow)\nlib.addAce('group.admin', 'command.say')\nprincipal: string\nace: string\nallow: boolean","libremoveace#lib.removeAce":"Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing false sets the permission to 'deny'.\nlib.removeAce(principal, ace, allow)\nlib.removeAce('group.admin', 'command.say')\nimport lib from '@overextended/ox_lib/server'\nlib.removeAce(principal, ace, allow)\nlib.removeAce('group.admin', 'command.say')\nprincipal: string\nace: string\nallow: boolean","libaddprincipal#lib.addPrincipal":"Assigns a principal to a parent principal. Children inherit permissions from the parent.\nlib.addPrincipal(child, parent)\nlib.addPrincipal('player.1', 'group.moderator')\nimport lib from '@overextended/ox_lib/server'\nlib.addPrincipal(child, parent)\nlib.addPrincipal('player.1', 'group.moderator')\nchild: string\nparent: string","libremoveprincipal#lib.removePrincipal":"Removes a principal from a parent principal.\nlib.removePrincipal(child, parent)\nlib.removePrincipal('player.1', 'group.moderator')\nimport lib from '@overextended/ox_lib/server'\nlib.removePrincipal(child, parent)\nlib.removePrincipal('player.1', 'group.moderator')\nchild: string\nparent: string"}},"/overextended/ox_lib/Modules/AddCommand/Server":{"title":"Server","data":{"":"Registers commands and simplifies argument validation, permissions, and chat suggestions.\nlib.addCommand(commandName, properties, cb)\ncommandName: string or string[]\nproperties: table or false\nhelp?: string\nrestricted?: boolean or string or string[]\nparams?: table[]\nname: string\nhelp?: string\ntype?: 'number' or 'playerId' or 'string' or 'longString'\noptional?: boolean\nlib.addCommand('giveitem', {\n help = 'Gives an item to a player',\n params = {\n {\n name = 'target',\n type = 'playerId',\n help = 'Target player\\'s server id',\n },\n {\n name = 'item',\n type = 'string',\n help = 'Name of the item to give',\n },\n {\n name = 'count',\n type = 'number',\n help = 'Amount of the item to give, or blank to give 1',\n optional = true,\n },\n {\n name = 'metatype',\n help = 'Sets the item\\'s \"metadata.type\"',\n optional = true,\n },\n },\n restricted = 'group.admin'\n}, function(source, args, raw)\n local item = Items(args.item)\n if item then\n Inventory.AddItem(args.target, item.name, args.count or 1, args.metatype)\n end\nend)"}},"/overextended/ox_lib/Modules/AddKeybind/Client":{"title":"Client","data":{"":"Registers keybinds and simplifies interactions of the keybinds.","ckeybind-class#CKeybind Class":"A table representing a keybind with the following properties.\nname: string\ndescription: string\ncurrentKey: string\nKey that the current user has this keybind set to\ndisabled: boolean\nWhether or not the keybind is currently disabled\nhash: number\nInternal hash of the keybind that is used to reference it within the game itself\ndefaultKey?: string\nDefault key to set the keybind to for new players\nNOTE: Changing this will not change the key for existing players\ndefaultMapper?: string\nSee Input Mapper Ids for more information\nsecondaryKey?: string\nAn optional secondary keybind.\nsecondaryMapper?: string\nAn optional mapper for the secondary key, otherwise using the default mapper.\ndisable: function(self: CKeybind, disable: boolean)\nBuilt-in function to enable / disable a keybind\nonPressed?: function(self: CKeybind)\nUser-defined function triggered on keybind press\nonReleased?: function(self: CKeybind)\nUser-defined function triggered on keybind release","libaddkeybind#lib.addKeybind":"lib.addKeybind(data)\ndata: table\nname: string\ndescription: string\ndefaultKey?: string\nDefault: None\ndefaultMapper?: string\nDefault: keyboard\nsecondaryKey?: string\nsecondaryMapper?: string\ndisabled?: boolean\nWhether or not the keybind should be disabled by default\nonPressed?: function(self: CKeybind)\nFunction triggered on keybind press\nonReleased?: function(self: CKeybind)\nFunction triggered on keybind release\nlocal keybind = lib.addKeybind({\n name = 'respects',\n description = 'press F to pay respects',\n defaultKey = 'F',\n onPressed = function(self)\n print(('pressed %s (%s)'):format(self.currentKey, self.name))\n end,\n onReleased = function(self)\n print(('released %s (%s)'):format(self.currentKey, self.name))\n end\n})","enable--disable-keybinds#Enable / Disable Keybinds":"Keybinds can be enabled / disabled by using the disable method.\nkeybind:disable(true) -- disables the keybind\nkeybind:disable(false) -- enables the keybind"}},"/overextended/ox_lib/Modules/Array/Shared":{"title":"Shared","data":{"libarray#lib.array":"A table used as a prototype for the Array class. Functions can be used as class methods or standard functions.","libarraynew#lib.array:new":"Constructs instance of Array containing the given elements.\nlib.array:new(...)\n...: any\nReturns:\narr: Array","libisarray#lib.isArray":"Determines if the given table is an instance of Array or an array-like table.\nlib.array.isArray(tbl)\ntbl: table\nReturns:\nisArray: boolean","libarraymerge#lib.array.merge":"Combines the elements of two arrays into a new array.\na: Array\nb: Array\nlib.array.merge(a, b)\nReturns:\nArray","libarrayevery#lib.array.every":"Tests if all elements in an array succeed in passing the provided test function.\narr: Array\ntestFn: function\nlib.array.every(arr, testFn)\nReturns:\nsuccess: boolean","libarrayfilter#lib.array.filter":"Creates a new array containing the elements from an array that pass the provided test function.\narr: Array\ntestFn: function\nlib.array.filter(arr, testFn)\nReturns:\narr: Array","libarrayfind#lib.array.find":"Returns the first element of an array the passes the provided test function.\narr: Array\ntestFn: function\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.find(arr, function(element) end, reverse)\nReturns:\nelement: unknown","libarrayfindindex#lib.array.findIndex":"Returns the index of the first element of an array the passes the provided test function.\narr: Array\ntestFn: function\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.findIndex(arr, function(element) end, reverse)\nReturns:\nindex: number","libarrayindexof#lib.array.indexOf":"Returns the index of the first element of an array the matches the provided value.\narr: Array\nvalue: any\nreverse?: boolean\nIterate over the array in reverse order.\nlib.array.indexOf(arr, value, reverse)\nReturns:\nindex: number","libarrayforeach#lib.array.forEach":"Executes the provided function for each element in an array.\narr: Array\ncb: function\nlib.array.forEach(arr, function(element) end, reverse)\nReturns:\nindex: number","libarrayjoin#lib.array.join":"Concatenates all elements of an array into a string, separated by commas or the specified seperator.\narr: Array\nseperator?: string\nlib.array.join(arr, seperator)\nReturns:\nstr: string","libarraypop#lib.array.pop":"Removes the last element from an array and returns the value.\narr: Array\nlib.array.pop(arr)\nReturns:\nelement: unknown","libarraypush#lib.array.push":"Adds the given elements to the end of an array and returns the new array length.\narr: Array\n...: any\nlib.array.push(arr, ...)\nReturns:\nlength: number","libarrayshift#lib.array.shift":"Removes the first element from an array and returns the value.\narr: Array\nlib.array.shift(arr)\nReturns:\nelement: unknown","libarrayreduce#lib.array.reduce":"The \"reducer\" function is applied to every element in an array, with the previous result serving as the accumulator.\nIf an initial value is provided it's used as the accumulator for the first index; otherwise iteration starts at the second index, with the first index as the accumulator.\narr: Array\nreducer: function\ninitialValue?: any\nlib.array.reduce(arr, function(accumulator, element, index) end)\nReturns:\naccumulator: unknown"}},"/overextended/ox_lib/Modules/Cache/Client":{"title":"Client","data":{"":"Values and cache functionality available to the client, in addition to the shared values.","default-values#Default values":"ped: number\nplayer entity id\nplayerId: number\nplayer id\nserverId: number\nplayer server id\nweapon: number or false\ncurrent weapon hash\nvehicle: number or false\nvehicle entity id\nseat: number or false\nvehicle seat index\ncoords: vector3\ncurrent player coords\nonly populated if using zones or points\ncannot be listened for with lib.onCache\nmount: number or false (RedM only)\nmount entity id","liboncache#lib.onCache":"Register an event handler that is triggered when the cached value is updated.\nlib.onCache(key, function(value) end)\nkey: string\nped\nvehicle\nseat\nweapon\nmount (RedM only)\nvalue: any\nlib.onCache('vehicle', function(value)\n print('old vehicle:', cache.vehicle)\n print('new vehicle:', value)\nend)\nimport { onCache } from '@overextended/ox_lib/client';\nonCache(key, (value) => {});\nkey: string\nped\nvehicle\nseat\nweapon\nmount (RedM only)\nvalue: any\nimport { cache, onCache } from '@overextended/ox_lib/client';\nlib.onCache('vehicle', (value) => {\n console.log('old vehicle:', cache.vehicle);\n console.log('new vehicle:', value);\n});"}},"/overextended/ox_lib/Modules/Cache/Shared":{"title":"Shared","data":{"":"A table containing cached function results, which may be constants or infrequently changed.","default-values#Default values":"resource: string\nthe value returned by GetCurrentResourceName.\ngame: 'fxserver' | 'fivem' | 'redm'\nthe value returned by GetGameName.","adding-new-cached-values#Adding new cached values":"Values can be cached permanently, or added with a timeout.\ncache(key, func, timeout)\nkey: string\na unique name to store and access the cached state.\nfunc: function\na function to call when the cache is invalidated/empty.\ntimeout?: number\na timer in milliseconds to clear the cached state.\nlocal i = 0\nwhile true do\n Wait(1000)\n i += 1\n print(cache('test', function() return i end, 5000))\nend\n-- output:\n> 1\n> 1\n> 1\n> 1\n> 1\n> 6\n> 6\n> 6"}},"/overextended/ox_lib/Modules/Callback/JavaScript/Client":{"title":"Client","data":{"trigger-server-callback#Trigger Server Callback":"","triggerservercallback#triggerServerCallback":"triggerServerCallback(eventName, delay, ...args)\neventName: string\ndelay: number or null\nAmount of time until this callback can be triggered again\n..args: any","register-client-callback#Register Client Callback":"","onservercallback#onServerCallback":"onServerCallback(eventName, cb)\neventName: string\ncb: function(...args: any)","usage-example#Usage Example":"For this example to fully make sense take a look at the example on the server page for the callbacks.\nimport { onServerCallback, triggerServerCallback } from '@overextended/ox_lib/client'\nonServerCallback('test:client', (...args: [number, number, string]) => {\n console.log(args);\n return {\n clientValue: 'Value from the client',\n };\n});\nsetTimeout(async () => {\n const args = [1, null, 3, null, null, 6];\n const response = await triggerServerCallback<{ serverValue: number }>('test:server', 1, args);\n if (!response) return;\n console.log('Response from server', response);\n}, 100);"}},"/overextended/ox_lib/Modules/Callback/JavaScript/Server":{"title":"Server","data":{"trigger-client-callback#Trigger Client Callback":"","triggerclientcallback#triggerClientCallback":"triggerClientCallback(eventName, playerId, ...args)\neventName: string\nplayerId: number\n...args: any","register-server-callback#Register Server Callback":"","onclientcallback#onClientCallback":"onClientCallback(eventName, cb)\neventName: string\ncb: function(playerId: number, ...args: any)","usage-example#Usage Example":"For this example to fully make sense take a look at the example on the client page for the callbacks.\nimport { onClientCallback, triggerClientCallback } from '@overextended/ox_lib/server';\nonClientCallback('test:server', (playerId, ...args: [number, null, number, null, null, number]) => {\n console.log('onClientCallback', playerId, ...args);\n return {\n serverValue: 3000,\n };\n});\nsetTimeout(async () => {\n const response = await triggerClientCallback<{ clientValue: string }>('test:client', 1, [1, null, 3, null, null, 6])\n if (!response) return;\n console.log(response.clientValue);\n console.log('Response from client', response);\n}, 100);"}},"/overextended/ox_lib/Modules/Callback/Lua/Client":{"title":"Client","data":{"trigger-server-callback#Trigger Server Callback":"","libcallback#lib.callback":"The response is handled in a separate coroutine.\nlib.callback(name, delay, cb, ...)\nname: string\ndelay: number or false\nAmount of time until this callback can be triggered again\ncb: function\n...: any\nlib.callback('ox_inventory:getItemCount', false, function(count)\n print(count)\nend, 'water', {type = 'fresh'})","libcallbackawait#lib.callback.await":"The current coroutine is yielded until a response is received.\nlib.callback.await(name, delay, ...)\nname: string\ndelay: number or false\nAmount of time until this callback can be triggered again\n...: any\nlocal count = lib.callback.await('ox_inventory:getItemCount', false, 'water', {type = 'fresh'})\nprint(count)","register-client-callback#Register Client Callback":"","libcallbackregister#lib.callback.register":"Register an event handler for responding to server requests.\nlib.callback.register(name, cb)\nname: string\ncb: function\nlib.callback.register('ox:getNearbyVehicles', function(radius)\n local nearbyVehicles = lib.getNearbyVehicles(GetEntityCoords(cache.ped), radius, true)\n return nearbyVehicles\nend)"}},"/overextended/ox_lib/Modules/Callback/Lua/Server":{"title":"Server","data":{"trigger-client-callback#Trigger Client Callback":"","libcallback#lib.callback":"The response is handled in a separate coroutine.\nlib.callback(name, playerId, cb, ...)\nname: string\nplayerId: number\ncb: function\n...: any\nlib.callback('ox:getNearbyVehicles', source, function(vehicles)\n for i = 1, #vehicles do\n DeleteEntity(entity)\n end\nend, args.radius)","libcallbackawait#lib.callback.await":"The current coroutine is yielded until a response is received.\nlib.callback.await(name, playerId, ...)\nname: string\nplayerId: number\n...: any\nlocal vehicles = lib.callback.await('ox:getNearbyVehicles', source, args.radius)\nfor i = 1, #vehicles do\n DeleteEntity(entity)\nend","register-server-callback#Register Server Callback":"","libcallbackregister#lib.callback.register":"Register an event handler for responding to client requests.\nlib.callback.register(name, cb)\nname: string\ncb: function\nlib.callback.register('ox_inventory:getItemCount', function(source, item, metadata, target)\n local inventory = target and Inventory(target) or Inventory(source)\n return (inventory and Inventory.GetItem(inventory, item, metadata, true)) or 0\nend)"}},"/overextended/ox_lib/Modules/Class/Shared":{"title":"Shared","data":{"classes#Classes":"A class is a template for creating objects with set attributes and behaviours.\nThough Lua does not typically support object-oriented programming, it is possible to simulate it with metatables.\nOur implementation of classes are loosely based on JavaScript.","inheritance#Inheritance":"Classes can inherit attributes and behaviors from other classes, similar to how instances inherit from their parent class.When specifying a \"super\" class in a class declaration, you create a derived or \"sub\" class. This subclass inherits both fields and methods from its parent. This inheritance extends across multiple levels of derived classes, enabling class attributes to be shared throughout the class hierarchy.","encapsulation#Encapsulation":"Encapsulation is the practice of bundling data (attributes) and methods (behaviors) within a class.This practice helps to organize related functionalities and prevents outside interference with the internal workings of the class. By encapsulating these elements, we promote modularity, maintain data integrity, and control how data is accessed and manipulated within a program.","oxclass#OxClass":"OxClass is a blueprint used for all classes created with lib.class. It provides some some basic attributes and behaviours shared by all classes.","attributes#Attributes":"__name: string\nA protected field representing the name of the class.\nconstructor?: function\nA protected method used to instantiate a new object inheriting from a class.\nCalled by class:new(...) if class:constructor() exists.\nprivate?: table\nA protected field which holds all private data in a class.\nPrivate data cannot be accessed outside of class methods, enforcing security and data integrity.\nsuper?: class\nA protected method referencing the constructor of a superclass.\nMust be called inside a class constructor when instantiating a class.","libclass#lib.class":"This function allows you to define a new class, optionally inheriting from a parent or \"super\" class.\nlocal MyClass = lib.class(name, super)","parameters#Parameters":"name: string\nsuper?: table\nSets the new class as a subset of the super class.","returns#Returns":"table\nThe newly created class.","example#Example":"---@class Person : OxClass\n---@field name string\nlocal Person = lib.class('Person')\nfunction Person:constructor(name)\n print('calling Person constructor for', name)\n self.name = name\nend\n-- Professor Class (extends Person)\n---@class Professor : Person\n---@field teaches string\nlocal Professor = lib.class('Professor', Person)\nfunction Professor:constructor(name, teaches)\n print('calling Professor constructor for', name)\n self:super(name)\n self.teaches = teaches\nend\nfunction Professor:introduceSelf()\n print((\"My name is %s, and I will be your %s professor.\"):format(self.name, self.teaches))\nend\nfunction Professor:grade(paper)\n local grade = math.random(1, 4)\n print(grade)\nend\nCreateThread(function()\n local walter = Professor:new('Walter', 'Chemistry')\n walter:introduceSelf()\n walter:grade('my paper')\nend)\n-- Student Class (extends Person)\n---@class Student : Person\n---@field private private { year: number }\nlocal Student = lib.class('Student', Person)\n---@param name string\n---@param year number\nfunction Student:constructor(name, year)\n print('calling Student constructor for', name)\n self:super(name)\n self.private.year = year\nend\nfunction Student:introduceSelf()\n print((\"Hi! I'm %s, and I'm in year %s.\"):format(self.name, self.private.year))\nend\n---@param year number\nfunction Student:setYear(year)\n self.private.year = year\nend\nCreateThread(function()\n local jesse = Student:new('Jesse', 2)\n jesse:introduceSelf() -- Hi! I'm Jesse, and I'm in year 2.\n jesse:setYear(3)\n jesse:introduceSelf() -- Hi! I'm Jesse, and I'm in year 3.\n print(jesse.private.year) -- nil\n print(getmetatable(jesse.private)) -- private\n jesse.private.year = 4 -- error\nend)"}},"/overextended/ox_lib/Modules/Cron/Server":{"title":"Server","data":{"":"A Lua implementation of cron, allowing tasks to be scheduled to run periodically at fixed times, dates, and intervals.","cron-expression#Cron expression":"A string containing five values separated by white spaces, representing a set of times to execute a task.\nField\tValid values\tMinutes\t0-59\tHours\t0-23\tDay of month\t1-31\tMonth\t1-12 or jan-dec\tDay of week\t1-7 or sun-sat\t\nNote: Day of the week is set to match os.date and starts at 1, unlike the cron-standard which starts at 0.","-wildcards#* Wildcards":"Represents all values, e.g. * * * * * will run every minute, or * * * * 1 will run every minute on Sunday.","-lists#, Lists":"Commas can be used to create a list of values, e.g. * * * * sun,mon,tue will run every minute on Sunday, Monday, and Tuesday.","--ranges#- Ranges":"Dashes define a range of values, e.g. 10-30 * * * * will start running the task at the 10th minute, and every minute until the 30th minute.","-steps#/ Steps":"Slashes can be used for step values, e.g. * */4 * * * will run every 4 hours and is shorthand for * 0,4,8,12,16,20 * * *.","functions#Functions":"","libcronnew#lib.cron.new":"Creates a new cronjob, scheduling a task to run at fixed times or intervals.\nlib.cron.new(expression, job, options)\nexpression: string\nA cron expression such as * * * * * representing minute, hour, day, month, and day of the week\njob: fun(task: OxTask, date: osdate)\noptions?: table\ndebug?: boolean\nReturn:\ntask: OxTask"}},"/overextended/ox_lib/Modules/DisableControls/Client":{"title":"Client","data":{"":"A centralized way to track and disable game controls.","libdisablecontrols#lib.disableControls":"Call on frame to disable all stored controls.\nlib.disableControls()","libdisablecontrolsadd#lib.disableControls:Add":"Adds the specified control(s) to the stored list.\nIf the control is already being tracked, the stored counter will be incremented.\nlib.disableControls:Add(...)\nvararg: number or number[]\nControl(s) to add a stored count of","libdisablecontrolsremove#lib.disableControls:Remove":"Removes the specified control(s) from the stored list.\nIf the stored counter for a given control is greater than one, the stored counter will be decremented.\nlib.disableControls:Remove(...)\nvararg: number or number[]\nControl(s) to remove a stored count of","libdisablecontrolsclear#lib.disableControls:Clear":"Clears the stored counter(s) for the specified control(s).\nlib.disableControls:Clear(...)\nvararg: number or number[]\nControl(s) to clear out from being tracked"}},"/overextended/ox_lib/Modules/GetClosestObject/Shared":{"title":"Shared","data":{"libgetclosestobject#lib.getClosestObject":"Get the object handle and coords of the closest object to a set of coordinates.\nlib.getClosestObject(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nobject?: number\ncoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestPed/Shared":{"title":"Shared","data":{"libgetclosestped#lib.getClosestPed":"Get the ped handle and coords of the closest ped to a set of coordinates.\nlib.getClosestPed(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nped?: number\ncoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestVehicle/Shared":{"title":"Shared","data":{"libgetclosestvehicle#lib.getClosestVehicle":"Get the vehicle handle and coords of the closest vehicle to a set of coordinates.\nlib.getClosestVehicle(coords, maxDistance, includePlayerVehicle)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayerVehicle?: boolean\nWhether or not to include the player's current vehicle. Ignored on the server.\nDefault: false\nReturn:\nvehicle?: number\nvehicleCoords?: vector3"}},"/overextended/ox_lib/Modules/GetClosestPlayer/Shared":{"title":"Shared","data":{"libgetclosestplayer#lib.getClosestPlayer":"Get the player id, ped handle, and coords of the closest player to a set of coordinates.\nlib.getClosestPlayer(coords, maxDistance, includePlayer)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayer?: boolean\nWhether or not to include the current player. Ignored on the server.\nDefault: false\nReturn:\nplayerId?: number\nplayerPed?: number\nplayerCoords?: vector3"}},"/overextended/ox_lib/Modules/GetNearbyObjects/Shared":{"title":"Shared","data":{"libgetnearbyobjects#lib.getNearbyObjects":"Get the object handle and coords of all objects within range of a set of coordinates.\nlib.getNearbyObjects(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\nobjects: { object: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyPeds/Shared":{"title":"Shared","data":{"libgetnearbypeds#lib.getNearbyPeds":"Get the ped handle and coords of all peds within range of a set of coordinates.\nlib.getNearbyPeds(coords, maxDistance)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nReturn:\npeds: { ped: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared":{"title":"Shared","data":{"libgetnearbyplayers#lib.getNearbyPlayers":"Get the player id, ped handle, and coords of all players within range of a set of coordinates.\nlib.getNearbyPlayers(coords, maxDistance, includePlayer)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayer?: boolean\nWhether or not to include the current player. Ignored on the server.\nDefault: false\nReturn:\nplayers: { id: number, ped: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared":{"title":"Shared","data":{"libgetnearbyvehicles#lib.getNearbyVehicles":"Get the vehicle handle and coords of all vehicles within range of a set of coordinates.\nlib.getNearbyVehicles(coords, maxDistance, includePlayerVehicle)\ncoords: vector3\nThe coords to check from.\nmaxDistance?: number\nThe max distance to check.\nDefault: 2.0\nincludePlayerVehicle?: boolean\nWhether or not to include the player's current vehicle. Ignored on the server.\nDefault: false\nReturn:\nvehicles: { vehicle: number, coords: vector3 }[]"}},"/overextended/ox_lib/Modules/Interface":{"title":"Interface","data":{"":"If you wish to change the primary colour for the UI to better match your server's theme you can do so easily through the available convars.They don't require you to build the UI, just restart the resource.Convars:\nsetr ox:primaryColor blue\nsetr ox:primaryShade 8\nChanging the primary colour will change the colour in elements such as the progress bar/circle, skill check, radial menu center button and hover,\ndialog confirm buttons, input field focus, and more.You can find the full list of preset colours and shades here:https://v6.mantine.dev/theming/colors/#default-colorsIf you wish to create your own pallete I suggest following the guide on that page.\nKeep in mind doing so will require you to download the source code and build the UI."}},"/overextended/ox_lib/Modules/Interface/Client/clipboard":{"title":"Clipboard","data":{"libsetclipboard#lib.setClipboard":"Sets the player's clipboard to the specified string value.\nWill not work if focus is already taken by some NUI component.\nTo create a new line use \\t\\n not just \\n in your string.\nlib.setClipboard(value)\nimport lib from '@overextended/ox_lib/client';\nlib.setClipboard(value);\nvalue: string"}},"/overextended/ox_lib/Modules/Interface/Client/alert":{"title":"Alert Dialog","data":{"":"Simple alert dialog that can display a message to the player.\nReturns whether the player pressed the confirm button or canceled the dialog.","libalertdialog#lib.alertDialog":"lib.alertDialog(data)\nTriggerClientEvent('ox_lib:alertDialog', source, data)\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client';\nlib.alertDialog(data);\ndata: table (object)\nheader: string\nDialog title.\ncontent: string\nDialog body content, supports markdown.\ncentered?: boolean\nCenters the dialog vertically and horizontally.\ncancel?: boolean\nDisplays a cancel button (ESC is still available if this is not defined).\nsize?: 'xs' or 'sm' or 'md' or 'lg' or 'xl'\noverflow?: boolean\nlabels?: table\nAllows you to define the displayed labels for cancel and/or confirm buttons.\ncancel?: string\nconfirm?: string\nReturns 'confirm' if the player pressed the confirm button, otherwise if the player pressed the cancel button\nor has exited the dialog with ESC the return will be 'cancel'.","libclosealertdialog#lib.closeAlertDialog":"Force closes the active alert dialog and sets its return data as nil\nlib.closeAlertDialog()\nimport lib from '@overextended/ox_lib/client';\nlib.closeAlertDialog();","example#Example":"local alert = lib.alertDialog({\n header = 'Hello there',\n content = 'General Kenobi \\n Markdown support!',\n centered = true,\n cancel = true\n})\nprint(alert)\nimport lib from '@overextended/ox_lib/client';\nconst alert = await lib.alertDialog({\n header: 'Hello there',\n content: 'General Kenobi \\n Markdown support!',\n centered: true,\n cancel: true,\n});\nconsole.log(alert);"}},"/overextended/ox_lib/Modules/Interface/Client/context":{"title":"Context Menu","data":{"libregistercontext#lib.registerContext":"Used for registering a context menu.\nlib.registerContext(context)\nimport lib from '@overextended/ox_lib/client';\nlib.registerContext(context);\nid: string\nUnique menu identifier, will be used to open the menu.\ntitle: string\nTitle display in the menu; has markdown support.\nmenu?: string\nMenu identifier - if defined there will be a back arrow next to the menu title that will take you to the menu you defined.\ncanClose: boolean\nIf set to false the user won't be able to exit the menu without pressing one of the buttons.\nonExit?: function\nFunction that will be ran when the user closes their context menu with ESC.\nonBack?: function\nFunction that will be ran when the user presses the back button to return to a previous menu.\noptions: table (object or array)\nitem: key (string) or table (object)\ntitle?: string\nIf not using keys then sets the title for the button; has markdown support.\ndisabled?: boolean\nGrays out the button and makes it unclickable.\nreadOnly? boolean\nRemoves all hover and active styles and disables onSelect if it's defined.\nmenu?: string\nMenu identifier that the button will take you to, when defined an arrow.\nonSelect: function\nFunction that's ran when the button is clicked.\nicon?: string\nFontAwesome icon that will be displayed on the left side, works the same as notification and textui icons.\nAlso supports image urls, png and webp files but are not recommend to use over font awesome icons.\niconColor?: string\nColour of the displayed icon.\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nprogress?: number\nAdds a progress bar filled to this percentage\ncolorScheme?: string\nSets the color scheme of the progress bar. Current options can be found here:\nhttps://v6.mantine.dev/theming/colors/#default-colors\nFor example: blue or teal\narrow?: boolean\nShows an arrow on the right side like menu does, useful when you are opening a menu from an event. Can be set to false to hide it.\ndescription?: string\nDescription that will appear under the button title that is defined as a key; has markdown support.\nimage?: string\nUrl to an image that will be displayed in the button's metadata.\nmetadata?: string[] or object or array\nInformation that will display on the side upon hovering a button.\nlabel: string\nvalue: any\nprogress?: number\nDisplay a progress bar in the metadata.\ncolorScheme?: string\nSame as above.\nevent?: string\nEvent that the button is going to trigger.\nserverEvent?: string\nServer event that the button is going to trigger.\nargs?: any\nArguments that will be sent to the events or onSelect function.\nYou can register as many context menus in one lib.registerContext function\nas you'd like.The menu can be either in the order you write it in, or sorted alphabetically.\nTo sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, otherwise not using keys and instead using tables will make the menu be in the order you define it as.","libshowcontext#lib.showContext":"Opens a registered context menu by its id.\nlib.showContext(id)\nimport lib from '@overextended/ox_lib/client';\nlib.showContext(id);\nid: string","libhidecontext#lib.hideContext":"Hides any currently visible context menu.\nlib.hideContext(onExit)\nimport lib from '@overextended/ox_lib/client';\nlib.hideContext(onExit);\nonExit: boolean\nDefines whether the onExit function for the menu should be ran or not.","libgetopencontextmenu#lib.getOpenContextMenu":"Returns the id of the currently open context menu.If no context menu is open returns nil.\nlib.getOpenContextMenu()\nimport lib from '@overextended/ox_lib/client';\nlib.getOpenContextMenu();","usage-example#Usage Example":"First we register the menu with our specified options then we call the show function in the command.\nAvoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu).\nlib.registerContext({\n id = 'some_menu',\n title = 'Some context menu',\n options = {\n {\n title = 'Empty button',\n },\n {\n title = 'Disabled button',\n description = 'This button is disabled',\n icon = 'hand',\n disabled = true\n },\n {\n title = 'Example button',\n description = 'Example button description',\n icon = 'circle',\n onSelect = function()\n print(\"Pressed the button!\")\n end,\n metadata = {\n {label = 'Value 1', value = 'Some value'},\n {label = 'Value 2', value = 300}\n },\n },\n {\n title = 'Menu button',\n description = 'Takes you to another menu!',\n menu = 'other_menu',\n icon = 'bars'\n },\n {\n title = 'Event button',\n description = 'Open a menu from the event and send event data',\n icon = 'check',\n event = 'test_event',\n arrow = true,\n args = {\n someValue = 500\n }\n }\n }\n})\nimport lib from '@overextended/ox_lib/client';\nlib.registerContext({\n id: 'some_menu',\n title: 'Some context menu',\n options: [\n {\n title: 'Empty button',\n },\n {\n title: 'Disabled button',\n description: 'This button is disabled',\n icon: 'hand',\n disabled: true,\n },\n {\n title: 'Example button',\n description: 'Example button description',\n icon: 'circle',\n onSelect: () => {\n console.log('Pressed the button!');\n },\n metadata: [\n { label: 'Value 1', value: 'Some value' },\n { label: 'Value 2', value: 300 },\n ],\n },\n {\n title: 'Menu button',\n description: 'Takes you to another menu!',\n menu: 'other_menu',\n icon: 'bars',\n },\n {\n title: 'Event button',\n description: 'Open a menu from the event and send event data',\n icon: 'check',\n event: 'test_event',\n arrow: true,\n args: {\n someValue: 500,\n },\n },\n ],\n});\nThen we can also register our second menu called other_menu\nlib.registerContext({\n id = 'other_menu',\n title = 'Other context menu',\n menu = 'some_menu',\n onBack = function()\n print('Went back!')\n end,\n options = {\n {\n title = 'Nothing here'\n }\n }\n})\nlib.registerContext({\n id: 'other_menu',\n title: 'Other context menu',\n menu: 'some_menu',\n onBack: () => {\n console.log('Went back!');\n },\n options: [\n {\n title: 'Nothing here',\n },\n ],\n});\nAnd the event that we are going to run from the some_menu menu, which is going to open another menu.\nRegisterNetEvent('test_event', function(args)\n lib.registerContext({\n id = 'event_menu',\n title = 'Event menu',\n menu = 'some_menu',\n options = {\n {\n title = 'Event value: '..args.someValue,\n }\n }\n })\n lib.showContext('event_menu')\nend)\nonNet('test_event', (args: { someValue: number }) => {\n lib.registerContext({\n id: 'event_menu',\n title: 'Event menu',\n menu: 'some_menu',\n options: [\n {\n title: `Event value: ${args.someValue}`,\n },\n ],\n });\n lib.showContext('event_menu');\n});\nLastly we register a test command to show the some_menu menu.\nRegisterCommand('testcontext', function()\n lib.showContext('some_menu')\nend)\nRegisterCommand('testcontext', () => {\n lib.showContext('some_menu');\n});\nThe data from the args table in the menu is passed as a first argument to the event you register.Using this event we also register a new context menu with it's own options.By defining a menu param to be the id of the first menu we can get the back arrow button next to the menu title that will take us back."}},"/overextended/ox_lib/Modules/Interface/Client/menu":{"title":"Menu","data":{"":"Keyboard navigation menu with specific event functions.","libregistermenu#lib.registerMenu":"Registers and caches a menu under the specified id.\nlib.registerMenu(data, cb)\nimport lib from '@overextended/ox_lib/client';\nlib.registerMenu(data, cb);\ndata: table (object)\nid: string\ntitle: string\noptions: table (array)\nlabel: string\nprogress?: number\ncolorScheme?: string\nicon?: string\nFontAwesome icon that will be displayed on the left side, works the same as notification and textui icons.\nAlso supports image urls, png and webp files but are not recommend to use over font awesome icons.\niconColor?: string\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nvalues?: string[] or { label: string, description: string }[]\nIf provided creates a side scrollable list.\nWhen using object and setting description, the set description will be displayed in the menu tooltip.\nchecked?: boolean\nSetting either true or false will make the button a checkbox, if values is also provided the button will be a\nscrollable list.\ndescription?: string\nDisplays tooltip below menu on hovered item with provided description.\ndefaultIndex?: number\nSets the current index for the list to specified number.\nargs?: {[string]: any}\nAllows you to pass any arguments through the button.\nIf the button has values then isScroll is automatically passed.\nIf the button has checked to either true or false then isCheck is automatically passed.\nclose?: boolean\nIf set to false, it won't close the menu upon interacting with this option.\nposition?: 'top-left' or 'top-right' or 'bottom-left' or 'bottom-right'\nDefault: 'top-left'\ndisableInput?: boolean\nDefault: false\ncanClose: boolean\nIf set to false the user won't be able to exit the menu without pressing one of the buttons.\nonClose: function(keyPressed?: 'Escape' | 'Backspace')\nFunction that runs when the menu is exited via ESC/Backspace.\nonSelected: function(selected: number, secondary: number | boolean, args: {[string]: any})\nFunction being ran when the selected button in the menu changes.\nonSideScroll: function(selected: number, scrollIndex: number, args: {[string]: any})\nFunction ran whenever a scroll list item is changed.\nonCheck: function(selected: number, checked: boolean, args: {[string]: any})\nFunction ran whenever a checkbox is toggled.\ncb: function(selected: number, scrollIndex: number, args: {[string]: any})\nCallback function when the menu item is pressed.","libshowmenu#lib.showMenu":"Displays the menu with the provided id.\nlib.showMenu(id)\nimport lib from '@overextended/ox_lib/client';\nlib.showMenu(id);\nid: string","libhidemenu#lib.hideMenu":"lib.hideMenu(onExit)\nimport lib from '@overextended/ox_lib/client';\nlib.hideMenu(onExit);\nonExit?: boolean\nIf true runs the menu's onClose function.","libgetopenmenu#lib.getOpenMenu":"Returns the id of the currently open menu.\nlib.getOpenMenu()\nimport lib from '@overextended/ox_lib/client';\nlib.getOpenMenu();","libsetmenuoptions#lib.setMenuOptions":"lib.setMenuOptions(id, options, index)\nimport lib from '@overextended/ox_lib/client';\nlib.setMenuOptions(id, options, index);\nid: string\noptions: table (object or array)\nindex?: number\nIf specified only sets the options table on the specified options index.\nExample:\nReplaces the 3rd index option of the specified menu\nlib.setMenuOptions('some_menu_id', {label = 'New option', icon = 'plus'}, 3)\nimport lib from '@overextended/ox_lib/client';\nlib.setMenuOptions('some_menu_id', { label: 'New option', icon: 'plus' }, 3);","usage-example#Usage Example":"First we register the menu with our specified options then we call the show function in the command.\nAvoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu).\nlib.registerMenu({\n id = 'some_menu_id',\n title = 'Menu title',\n position = 'top-right',\n onSideScroll = function(selected, scrollIndex, args)\n print(\"Scroll: \", selected, scrollIndex, args)\n end,\n onSelected = function(selected, secondary, args)\n if not secondary then\n print(\"Normal button\")\n else\n if args.isCheck then\n print(\"Check button\")\n end\n if args.isScroll then\n print(\"Scroll button\")\n end\n end\n print(selected, secondary, json.encode(args, {indent=true}))\n end,\n onCheck = function(selected, checked, args)\n print(\"Check: \", selected, checked, args)\n end,\n onClose = function(keyPressed)\n print('Menu closed')\n if keyPressed then\n print(('Pressed %s to close the menu'):format(keyPressed))\n end\n end,\n options = {\n {label = 'Simple button', description = 'It has a description!'},\n {label = 'Checkbox button', checked = true},\n {label = 'Scroll button with icon', icon = 'arrows-up-down-left-right', values={'hello', 'there'}},\n {label = 'Button with args', args = {someArg = 'nice_button'}},\n {label = 'List button', values = {'You', 'can', 'side', 'scroll', 'this'}, description = 'It also has a description!'},\n {label = 'List button with default index', values = {'You', 'can', 'side', 'scroll', 'this'}, defaultIndex = 5},\n {label = 'List button with args', values = {'You', 'can', 'side', 'scroll', 'this'}, args = {someValue = 3, otherValue = 'value'}},\n }\n}, function(selected, scrollIndex, args)\n print(selected, scrollIndex, args)\nend)\nRegisterCommand('testmenu', function()\n lib.showMenu('some_menu_id')\nend)\nimport lib from '@overextended/ox_lib/client';\nlib.registerMenu(\n {\n id: 'some_menu_id',\n title: 'Menu title',\n position: 'top-right',\n onSideScroll: (selected, scrollIndex, args) => {\n console.log('Scroll: ', selected, scrollIndex, args);\n },\n onSelected: (selected, secondary, args) => {\n if (!secondary) {\n console.log('Normal button');\n } else {\n if (args.isCheck) {\n console.log('Check button');\n }\n if (args.isScroll) {\n console.log('Scroll button');\n }\n }\n console.log(selected, secondary, JSON.stringify(args, null, 2));\n },\n onCheck: (selected, checked, args) => {\n console.log('Check: ', selected, checked, args);\n },\n onClose: (keyPressed) => {\n console.log('Menu closed');\n if (keyPressed) {\n console.log(`Pressed ${keyPressed} to close the menu`);\n }\n },\n options: [\n { label: 'Simple button', description: 'It has a description!' },\n { label: 'Checkbox button', checked: true },\n { label: 'Scroll button with icon', icon: 'arrows-up-down-left-right', values: ['hello', 'there'] },\n { label: 'Button with args', args: { someArg: 'nice_button' } },\n {\n label: 'List button',\n values: ['You', 'can', 'side', 'scroll', 'this'],\n description: 'It also has a description!',\n },\n { label: 'List button with default index', values: ['You', 'can', 'side', 'scroll', 'this'], defaultIndex: 5 },\n {\n label: 'List button with args',\n values: ['You', 'can', 'side', 'scroll', 'this'],\n args: { someValue: 3, otherValue: 'value' },\n },\n ],\n },\n (selected, scrollIndex, args) => {\n console.log(selected, scrollIndex, args);\n }\n);\nRegisterCommand(\n 'testmenu',\n () => {\n lib.showMenu('some_menu_id');\n },\n false\n);"}},"/overextended/ox_lib/Modules/Interface/Client/input":{"title":"Input Dialog","data":{"":"The input dialog window allows you to take data from the user by setting input fields.","libinputdialog#lib.inputDialog":"lib.inputDialog(heading, rows, options)\nimport lib from '@overextended/ox_lib/client';\nlib.inputDialog(heading, rows, options);\nheading: string\nrows: string[] or table (array)\ntype: 'input' or 'number' or 'checkbox' or 'select' or 'slider' or 'color' or 'multi-select' or 'date' or 'date-range' or 'time' or 'textarea'\noptions?: table(object)\nallowCancel: boolean\nIf false the user will not be able to cancel and close the input dialog until submitted.\nIf not defined, the user is able to cancel and close the input dialog.","field-type-properties#Field Type Properties":"input\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\npassword?: boolean\nmin?: number\nmax?: number\nnumber\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nmax?: number\nprecision?: number\nstep?: number\ncheckbox\nlabel: string\nchecked?: boolean\ndisabled?: boolean\nrequired?: boolean\nselect and multi-select\nlabel: string\noptions: table(array)\nvalue: string\nlabel?: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string | table (only for multi-select)\nvalue of the default option.\nclearable?: boolean\nsearchable?: boolean\nmaxSelectedValues?: number (only for multi-select)\nMaxmimum number of options that can be selected.\nslider\nlabel: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nmax?: number\nstep?: number\ncolor\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\nformat?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla';\ndate\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string or true\nTrue defaults to current date\nformat?: string\nDate format to display in the field\nreturnString?: boolean\nReturns the date as a string, default format is DD/MM/YYYY, but if format is defined it will use that.\nclearable?: boolean\nmin?: string\n\"01/01/2000\"\nmax?: string\n\"12/12/2023\"\ndate-range\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: [string, string]\nformat?: string\nDate format to display in the field\nreturnString?: boolean\nReturns the date as a string, default format is DD/MM/YYYY, but if format is defined it will use that.\nclearable?: boolean\ntime\nlabel: string\ndescription?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: string\nformat?: '12' or '24'\nclearable?: boolean\ntextarea\nlabel: string\ndescription?: string\nplaceholder?: string\nicon?: string\nrequired? boolean\ndisabled?: boolean\ndefault?: number\nmin?: number\nMinimum amount of rows the text area will take.\nmax?: number\nMaxmimum amount of rows the text area will take, when exceeded goes into overflow.\nautosize?: boolean\nIf true text area will grow with content until max rows are reached.\nThe callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup.The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index 1 (0), if we want data from the third field, that would be index 3 (2), etc...\nField types such as date, date-range and time return a unix timestamp on the set value.","libcloseinputdialog#lib.closeInputDialog":"Force closes the active input dialog and sets its return data as nil.\nlib.closeInputDialog()\nimport lib from '@overextended/ox_lib/client';\nlib.closeInputDialog();","usage-example#Usage Example":"","basic#Basic":"local input = lib.inputDialog('Basic dialog', {'First row', 'Second row'})\nif not input then return end\nprint(json.encode(input), input[1], input[2])\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nconst input = await lib.inputDialog('Basic dialog', ['First row', 'Second row']);\nif (!input) return;\nconsole.log(input, input[0], input[1]);","advanced#Advanced":"local input = lib.inputDialog('Dialog title', {\n {type = 'input', label = 'Text input', description = 'Some input description', required = true, min = 4, max = 16},\n {type = 'number', label = 'Number input', description = 'Some number description', icon = 'hashtag'},\n {type = 'checkbox', label = 'Simple checkbox'},\n {type = 'color', label = 'Colour input', default = '#eb4034'},\n {type = 'date', label = 'Date input', icon = {'far', 'calendar'}, default = true, format = \"DD/MM/YYYY\"}\n})\nprint(json.encode(input))\n-- Getting rgb values from colour picker\nlocal rgb = lib.math.torgba(input[4])\n-- Transforming date timestamp to a readable format with Lua's os library (server-only)\nlocal timestamp = math.floor(input[5] / 1000)\nlocal date = os.date('%Y-%m-%d %H:%M:%S', timestamp)\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nconst input = await lib.inputDialog('Police locker', [\n { type: 'input', label: 'Text input', description: 'Some input description', required: true, min: 3, max: 16 },\n { type: 'number', label: 'Number input', description: 'Some number description', icon: 'hashtag' },\n { type: 'checkbox', label: 'Simple checkbox' },\n { type: 'color', label: 'Colour input', default: '#eb4034' },\n { type: 'date', label: 'Date input', icon: ['far', 'calendar'], default: true, format: 'DD/MM/YYYY' },\n]);\nconsole.log(JSON.stringify(input, null, 2));\n// Getting r, g and b values from colour picker\nconst regExp = /rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/;\nconst colourInput = input[3];\nconst color = regExp.exec(colourInput);\nif (!color) return;\nconsole.log(+color[1], +color[2], +color[3]);"}},"/overextended/ox_lib/Modules/Interface/Client/notify":{"title":"Notifications","data":{"libnotify#lib.notify":"Custom notifications with a lot of styling options.\nlib.notify(data)\nTriggerClientEvent('ox_lib:notify', source, data)\nimport lib from '@overextended/ox_lib/client';\nlib.notify(data);\nid?: string\nWhen set the current notification will be unique and only shown once on screen when spammed.\ntitle?: string\nMust provide if there is no description\ndescription?: string\nMust provide if there is no title\nMarkdown support\nduration?: number\nDefault: 3000\nshowDuration?: boolean\nDefault: true\nposition?: 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'\nDefault: 'top-right'\ntype?: 'inform' or 'error' or 'success'or 'warning'\nDefault: 'inform'\nstyle?: table (object)\nReact CSS styling format\nicon?: string\nFont Awesome 6 icon name\niconColor?: string\nCSS Legal Color Values\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nalignIcon?: 'top' or 'center'\nDefault: 'center'\nsound?: table (object)\nbank?: string\nname of audio bank that contains the soundset provided\nset: string\nSoundset the soundname is a member of.\nname: string\nSetting iconColor will get rid of the contrasted icon colour and it's circular background.","usage-example#Usage Example":"","standard#Standard":"lib.notify({\n title = 'Notification title',\n description = 'Notification description',\n type = 'success'\n})\nimport lib from '@overextended/ox_lib/client';\nlib.notify({\n title: 'Notification title',\n description: 'Notification description',\n type: 'success',\n});","custom#Custom":"lib.notify({\n id = 'some_identifier',\n title = 'Notification title',\n description = 'Notification description',\n showDuration = false,\n position = 'top',\n style = {\n backgroundColor = '#141517',\n color = '#C1C2C5',\n ['.description'] = {\n color = '#909296'\n }\n },\n icon = 'ban',\n iconColor = '#C53030'\n})\nimport lib from '@overextended/ox_lib/client';\nlib.notify({\n id: 'some_identifier',\n title: 'Notification title',\n description: 'Notification description',\n showDuration: false,\n position: 'top',\n style: {\n backgroundColor: '#141517',\n color: '#C1C2C5',\n '.decription': {\n color: '#909296',\n },\n },\n icon: 'ban',\n iconColor: '#C53030',\n});"}},"/overextended/ox_lib/Modules/Interface/Client/progress":{"title":"Progress","data":{"libprogressbar#lib.progressBar":"Displays a running progress bar.\nlib.progressBar(data)\nimport lib from '@overextended/ox_lib/client'\nlib.progressBar(data)\nduration: number\nlabel: string\nuseWhileDead?: boolean\nallowRagdoll?: boolean\nallowSwimming?: boolean\nallowCuffed?: boolean\nallowFalling?: boolean\ncanCancel?: boolean\nanim?: table (object)\ndict?: string\nMust specify either scenario or dict\nclip: string\nflag?: number\nDefault: 49\nblendIn?: float\nDefault: 3.0\nblendOut?: float\nDefault: 1.0\nduration?: number\nDefault: -1\nplaybackRate?: number\nDefault: 0\nlockX?: boolean\nlockY?: boolean\nlockZ?: boolean\nscenario?: string\nMust specify either scenario or dict\nplayEnter?: boolean\nDefault: true\nprop?: table (object or array)\n[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]\nmodel: hash\nbone?: number\nDefault: 60309\npos: table\nx: number\ny: number\nz: number\nrot: table (object)\nx: number\ny: number\nz: number\nrotOrder?: number\nThe order in which yaw, pitch and roll is applied.\nDefault: 0\ndisable?: table (object)\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean","usage-example#Usage Example":"if lib.progressBar({\n duration = 2000,\n label = 'Drinking water',\n useWhileDead = false,\n canCancel = true,\n disable = {\n car = true,\n },\n anim = {\n dict = 'mp_player_intdrink',\n clip = 'loop_bottle'\n },\n prop = {\n model = `prop_ld_flow_bottle`,\n pos = vec3(0.03, 0.03, 0.02),\n rot = vec3(0.0, 0.0, -1.5)\n },\n}) then print('Do stuff when complete') else print('Do stuff when cancelled') end\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client'\nif (await lib.progressBar({\n duration: 2000,\n label: 'Drinking water',\n useWhileDead: false,\n canCancel: true,\n disable: {\n car: true,\n },\n anim: {\n dict: 'mp_player_intdrink',\n clip: 'loop_bottle'\n },\n prop: {\n model: `prop_ld_flow_bottle`,\n pos: {x: 0.03, y: 0.03, z: 0.02},\n rot: {x: 0.0, y: 0.0, z: -1.5}\n },\n})) console.log('Do stuff when complete');\nelse console.log('Do stuff when cancelled')","libprogresscircle#lib.progressCircle":"Similar to lib.progressBar except it displays a circle and you can define a position.\nlib.progressCircle(data)\nimport lib from '@overextended/ox_lib/client'\nlib.progressCircle(data)\nduration: number\nlabel?: string\nposition?: 'middle' or 'bottom'\nDefault: 'middle'\nuseWhileDead?: boolean\nallowRagdoll?: boolean\nallowSwimming?: boolean\nallowCuffed?: boolean\nallowFalling?: boolean\ncanCancel?: boolean\nanim?: table (object)\ndict?: string\nMust specify either scenario or dict\nclip: string\nflag?: number\nDefault: 49\nblendIn?: float\nDefault: 3.0\nblendOut?: float\nDefault: 1.0\nduration?: number\nDefault: -1\nplaybackRate?: number\nDefault: 0\nlockX?: boolean\nlockY?: boolean\nlockZ?: boolean\nscenario?: string\nMust specify either scenario or dict\nplayEnter?: boolean\nDefault: true\nprop?: table (object or array)\n[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]\nmodel: hash\nbone?: number\nDefault: 60309\npos: table\nx: number\ny: number\nz: number\nrot: table (object)\nx: number\ny: number\nz: number\nrotOrder?: number\nThe order in which yaw, pitch and roll is applied.\nDefault: 0\ndisable?: table (object)\nmove?: boolean\ncar?: boolean\ncombat?: boolean\nmouse?: boolean\nsprint?: boolean","usage-example-1#Usage Example":"if lib.progressCircle({\n duration = 2000,\n position = 'bottom',\n useWhileDead = false,\n canCancel = true,\n disable = {\n car = true,\n },\n anim = {\n dict = 'mp_player_intdrink',\n clip = 'loop_bottle'\n },\n prop = {\n model = `prop_ld_flow_bottle`,\n pos = vec3(0.03, 0.03, 0.02),\n rot = vec3(0.0, 0.0, -1.5)\n },\n}) then print('Do stuff when complete') else print('Do stuff when cancelled') end\nThis function is asynchronous requiring you to do a .then callback on the promise or make your function async.\nimport lib from '@overextended/ox_lib/client'\nif (await lib.progressCircle({\n duration: 2000,\n position: 'bottom',\n useWhileDead: false,\n canCancel: true,\n disable: {\n car: true,\n },\n anim: {\n dict: 'mp_player_intdrink',\n clip: 'loop_bottle'\n },\n prop: {\n model: `prop_ld_flow_bottle`,\n pos: {x: 0.03, y: 0.03, z: 0.02},\n rot: {x: 0.0, y: 0.0, z: -1.5}\n },\n})) console.log('Do stuff when complete')\nelse console.log('Do stuff when cancelled')","libprogressactive#lib.progressActive":"Returns true if a progress bar is currently active.\nlib.progressActive()\nimport lib from '@overextended/ox_lib/client'\nlib.progressActive()","libcancelprogress#lib.cancelProgress":"If there is a progress bar active and the\nprogress bar can be cancelled then it cancels it.\nlib.cancelProgress()\nimport lib from '@overextended/ox_lib/client'\nlib.cancelProgress()"}},"/overextended/ox_lib/Modules/Interface/Client/radial":{"title":"Radial Menu","data":{"":"Radial menu has a global menu that's by default accessed with z and only displays when there is at least one item.\nYou can add and remove items from the global menu using lib.addRadialItem and lib.removeRadialItem.\nUse lib.registerRadial for creating sub menus and use the menu property on the items to open those sub menus.","libaddradialitem#lib.addRadialItem":"Item or array of items added to the global radial menu.\nlib.addRadialItem(items)\nimport lib from '@overextended/ox_lib/client';\nlib.addRadialItem(items);\nitems: table (object or array)\nid: string\nId that is used for removing options.\nicon: string\nEither a font awesome or a custom URI.1\niconWidth?: number\niconHeight?: number\nIn the case of a custom URI, adjust the size of the icon.\nlabel: string\nLabel uses \\n to insert a newline\nmenu?: string\nId of a menu to open.\nonSelect: function(currentMenu: string | nil, itemIndex: number) | string\nFunction that's ran when a user clicks the item.\nkeepOpen?: boolean","libremoveradialitem#lib.removeRadialItem":"Id of an item to be removed from the global menu.\nlib.removeRadialItem(item)\nimport lib from '@overextended/ox_lib/client';\nlib.removeRadialItem(item);\nid: string","libclearradialitems#lib.clearRadialItems":"Removes all items from the radial menu.\nlib.clearRadialItems()\nimport lib from '@overextended/ox_lib/client';\nlib.clearRadialItems();","libregisterradial#lib.registerRadial":"Registers a radial sub menu with predefined options.\nlib.registerRadial(radial)\nimport lib from '@overextended/ox_lib/client';\nlib.registerRadial(radial);\nradial: table (object)\nid: string\nUnique menu id used to open with menu prop on an item.\nitems: array\nicon: string\nlabel: string\nLabel uses \\n to insert a newline\nmenu?: string\nId of a menu to open.\nonSelect?: function(currentMenu: string | nil, itemIndex: number) | string\nFunction that's ran when a user clicks the item.","libhideradial#lib.hideRadial":"Hides the radial menu if one is open.\nlib.hideRadial()\nimport lib from '@overextended/ox_lib/client';\nlib.hideRadial();","libdisableradial#lib.disableRadial":"Disallow players from opening the radial menu.\nlib.disableRadial(state)\nimport lib from '@overextended/ox_lib/client';\nlib.disableRadial(state);\nstate: boolean\nWhether or not radial menu should be disabled","libgetcurrentradialid#lib.getCurrentRadialId":"Returns the id of the currently open radial menu.\nlocal id = lib.getCurrentRadialId()\nimport lib from '@overextended/ox_lib/client';\nlet id = lib.getCurrentRadialId();","usage-example#Usage Example":"When adding radial menu items whether they are global or for a sub menu, make sure to stick to short as possible labels\nas long labels will look out of place and should not be used with the radial menu because of its density.\nHere's a use case example with some global options and an option utilising the lib's points system.\nexports('myMenuHandler', function(menu, item)\n print(menu, item)\n if menu == 'police_menu' and item == 1 then\n print('Handcuffs')\n end\nend)\nlib.registerRadial({\n id = 'police_menu',\n items = {\n {\n label = 'Handcuff',\n icon = 'handcuffs',\n onSelect = 'myMenuHandler'\n },\n {\n label = 'Frisk',\n icon = 'hand'\n },\n {\n label = 'Fingerprint',\n icon = 'fingerprint'\n },\n {\n label = 'Jail',\n icon = 'bus'\n },\n {\n label = 'Search',\n icon = 'magnifying-glass',\n onSelect = function()\n print('Search')\n end\n }\n }\n})\nlib.addRadialItem({\n {\n id = 'police',\n label = 'Police',\n icon = 'shield-halved',\n menu = 'police_menu'\n },\n {\n id = 'business_stuff',\n label = 'Business',\n icon = 'briefcase',\n onSelect = function()\n print(\"Business\")\n end\n }\n})\nlocal coords = GetEntityCoords(cache.ped)\nlocal point = lib.points.new(coords, 5)\nfunction point:onEnter()\n lib.addRadialItem({\n id = 'garage_access',\n icon = 'warehouse',\n label = 'Garage',\n onSelect = function()\n print('Garage')\n end\n })\nend\nfunction point:onExit()\n lib.removeRadialItem('garage_access')\nend\nPoints system in the lib isn't available for the npm package.\nimport lib from '@overextended/ox_lib/client'\nexports('myMenuHandler', (menu, item) => {\n console.log(menu, item)\n if (menu === 'police_menu' and item === 1) {\n console.log('Handcuffs')\n }\n})\nlib.registerRadial({\n id: 'police_menu',\n items: [\n {\n label: 'Handcuff',\n icon: 'handcuffs',\n onSelect: 'myMenuHandler'\n },\n {\n label: 'Frisk',\n icon: 'hand'\n },\n {\n label: 'Fingerprint',\n icon: 'fingerprint'\n },\n {\n label: 'Jail',\n icon: 'bus'\n },\n {\n label: 'Search',\n icon: 'magnifying-glass',\n onSelect: () => {\n console.log('Search')\n }\n }\n ]\n})\nlib.addRadialItem([\n {\n id: 'police',\n label: 'Police',\n icon: 'shield-halved',\n menu: 'police_menu'\n },\n {\n id: 'business_stuff',\n label: 'Business',\n icon: 'briefcase',\n onSelect: () => {\n console.log('Business')\n }\n }\n])"}},"/overextended/ox_lib/Modules/Interface/Client/skillcheck":{"title":"Skill Check","data":{"libskillcheck#lib.skillCheck":"Runs a skill check with the defined difficulty.\nlib.skillCheck(difficulty, inputs)\nimport lib from '@overextended/ox_lib/client';\nlib.skillCheck(difficulty, inputs);\ndifficulty: 'easy' or 'medium' or 'hard' or table\nPreset difficulties:\n'easy' - { areaSize: 50, speedMultiplier: 1 }\n'medium' - { areaSize: 40, speedMultiplier: 1.5 }\n'hard' - { areaSize: 25, speedMultiplier: 1.75 }\nCustom difficulties can be set by sending an object instead of one of the preset strings above\nareaSize: number\nSize of the success area in degrees\nspeedMultiplier: number\nMultiplier for the speed of the indicator\ninputs?: string[]\nA random key will be picked from the inputs table for each skill check\nIf no inputs are defined the key is defaulted to e","libskillcheckactive#lib.skillCheckActive":"Returns true if a skill check is currently active.\nlib.skillCheckActive()\nimport lib from '@overextended/ox_lib/client'\nlib.skillCheckActive()","libcancelskillcheck#lib.cancelSkillCheck":"Cancels the currently ongoing skill check.\nlib.cancelSkillCheck()\nimport lib from '@overextended/ox_lib/client'\nlib.cancelSkillCheck()","usage-example#Usage Example":"local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})\nimport lib from '@overextended/ox_lib/client';\nconst success = await lib.skillCheck(\n ['easy', 'easy', { areaSize: 60, speedMultiplier: 2 }, 'hard'],\n ['w', 'a', 's', 'd']\n);"}},"/overextended/ox_lib/Modules/Logger/Server":{"title":"Server","data":{"liblogger#lib.logger":"lib.logger(source, event, message, ...)\nsource: number or string\nPreferably an active player id, otherwise an identifier, or wherever else it originated from.\nevent: string\nA name for the log event (i.e. the trigerring event or a description)\nmessage: string\nThe content for the log.\nvararg: string\nAdditional arguments are converted to tags for additional filtering and searching.\nExample\nlocal vehicle = Ox.CreateVehicle(false, `sultanrs`, vector4(-56.479122, -1116.870362, 26.432250, 0.000030517578))\nlib.logger(-1, 'CreateVehicle', json.encode(vehicle))","datadog#Datadog":"","create-your-datadog-account#Create your Datadog account":"You will receive a free 14 day trial, otherwise refer to their pricing guide.\nFree accounts are limited, however logs will still be retained for 14 days.","create-an-api-key#Create an API key":"This is a UUID used to submit logs to your Datadog organisation.","config#Config":"Set your API key and Datadog site using the following convars.\nset datadog:key \"yourapikey\"\nset datadog:site \"datadoghq.com\"","grafana-loki#Grafana Loki":"Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.\nIt is designed to be very cost effective and easy to operate.\nHas free tier with some restrictions\nEasy to manage\nEasier to setup\nMostly managed by Grafana","create-your-grafana-account#Create your Grafana account":"","head-to-my-account#Head to My Account":"","setup-loki#Setup Loki":"Find the Loki section in your account panel, and click \"Details\".\nGenerate a password and save the API key, as well as your user and url.\nTo setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.\nPlease find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that.Once done, setup authentication and use the username and password securing your endpoint.\nBy default self-hosted loki instances do not provide any authentication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access.","config-1#Config":"Use the following convars to set your logging service, endpoint, and authentication details.\nset ox:logger \"loki\"\nset loki:user \"\"\nset loki:password \"\"\nset loki:endpoint \"\"","fivemanage#Fivemanage":"Fivemanage is an easy-to-use, all-in-one SaaS for game servers that provides logging.","create-an-account#Create an account":"Sign up at Fivemanage.","make-sure-you-have-the-hobby-or-pro-plan#Make sure you have the Hobby or Pro plan.":"You'll get a 14-days free trial if you do not already have an subscription, you can find more information here and on the pricing page.","create-a-new-token#Create a new token":"You'll need to create a new token with the type Logs.","config-2#Config":"set ox:logger \"fivemanage\"\nset fivemanage:key \"YOUR_API_KEY\""}},"/overextended/ox_lib/Modules/Interface/Client/textui":{"title":"TextUI","data":{"libshowtextui#lib.showTextUI":"Show the TextUI window.\nDO NOT run this function every tick, it's intended to be used as a toggle.\nlib.showTextUI(text, options)\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI(text, options);\ntext: string\noptions?: table\nposition?: 'right-center' or 'left-center' or 'top-center' or 'bottom-center'\nDefault: 'right-center'\nicon?: string or table (array)\niconColor?: string\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nstyle?: React.CSSProperties\nalignIcon?: 'top' or 'center'\nDefault: 'center'","libhidetextui#lib.hideTextUI":"Hides the currently visible TextUI window\nlib.hideTextUI()\nimport lib from '@overextended/ox_lib/client';\nlib.hideTextUI();","libistextuiopen#lib.isTextUIOpen":"Returns whether Text UI is opened or not. The currently displayed text is returned as the second value.\nlocal isOpen, text = lib.isTextUIOpen()\nimport lib from '@overextended/ox_lib/client';\nconst [isOpen, text] = lib.isTextUIOpen();","usage-example#Usage Example":"","basic#Basic":"lib.showTextUI('[E] - Fuel vehicle')\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI('[E] - Fuel vehicle');","custom-styling#Custom styling":"lib.showTextUI('[E] - Pick apple', {\n position = \"top-center\",\n icon = 'hand',\n style = {\n borderRadius = 0,\n backgroundColor = '#48BB78',\n color = 'white'\n }\n})\nimport lib from '@overextended/ox_lib/client';\nlib.showTextUI('[E] - Pick apple', {\n position: 'top-center',\n icon: 'hand',\n style: {\n borderRadius: 0,\n backgroundColor: '#48BB78',\n color: 'white',\n },\n});"}},"/overextended/ox_lib/Modules/Locale/Shared":{"title":"Shared","data":{"":"Allows servers to set a preferred language and attempt to load locale files in any resources using the module.\nLocale files should use the ISO Language Code and be saved as ./locales/langcode.json","setup#Setup":"To change the preferred language from English, add the convar to your server.cfg and change en to the desired language code.\nsetr ox:locale en\nCreate a locales directory and a file for your language.\n{\n \"grand_theft_auto\": \"grand theft auto\",\n \"male\": \"male\",\n \"female\": \"female\",\n \"suspect_sex\": \"suspect is %s\"\n}\n{\n \"grand_theft_auto\": \"vol de voiture\",\n \"male\": \"homme\",\n \"female\": \"femme\",\n \"suspect_sex\": \"le suspect est %s\"\n}\nfiles {\n 'locales/*.json'\n}","usage#Usage":"Initialise the locale module in your resource (once).\nlib.locale()\nimport {initLocale} from '@overextended/ox_lib/shared'\ninitLocale()\nFormat your strings with the new locale global.\nAdditional arguments can be sent to format the locale output.\nlocale(str, ...)\nimport { locale } from '@overextended/ox_lib/shared'\nlocale(str, ...)\nstr: string\nvararg?: string or number\nExample\n-- Load the locale module\nlib.locale()\nSetInterval(function()\n print(locale('grand_theft_auto'))\n print(locale('suspect_sex', locale('male')))\nend, 5000)\nimport { initLocale, locale } from '@overextended/ox_lib/shared\n// Load the locale module\ninitLocale()\nsetInterval(() => {\n console.log(locale('grand_theft_auto'))\n console.log(locale('suspect_sex', locale('male')))\n}, 5000)","phrases#Phrases":"You can create a locale string that references other locales to construct a phrase, rather than calling locale multiple times.\n{\n \"hello\": \"hello %s\",\n \"my_name_is\": \"my name is %s\",\n \"hello_my_name_is\": \"${hello}! ${my_name_is}.\"\n}\nprint(locale('hello_my_name_is', 'doka', 'linden'))\nimport { locale } from '@overextended/ox_lib/shared'\nconsole.log(locale('hello_my_name_is', 'doka', 'linden'))","libgetlocale#lib.getLocale":"Gets a locale string from another resource and adds it to the dict.\nlib.getLocale(resource, key)\nresource: string\nkey: string"}},"/overextended/ox_lib/Modules/Marker/Client":{"title":"Client","data":{"libmarker#lib.marker":"Simple way to create markers","marker-class#Marker Class":"A table representing a marker with the following properties.\ntype: number or string\nThis field accepts either a numerical value representing the marker ID or a string containing the name of a marker as documented on FiveM Docs.\ncoords?: vector3\nwidth?: number\nheight?: number\ncolor?: { r: number, g: number, b: number, a: number}\ndirection?: vector3\nrotation?: vector3","libmarkernew#lib.marker.new":"lib.marker.new(options)\nReturns: Marker","usage-example#Usage Example":"local marker = lib.marker.new({\n\ttype = 1,\n\tcoords = GetEntityCoords(cache.ped),\n\tcolor = { r = 255, g = 0, b = 0, a = 200 },\n})\nCitizen.CreateThread(function()\n\twhile true do\n\t\tmarker:draw()\n\t\tCitizen.Wait(1)\n\tend\nend)","interactive-example#Interactive Example":"local center = vec3(430.452759, -1026.108032, 27.846140)\nlocal uiText = \"Press [E] to get notified\"\nlocal point = lib.points.new({\n coords = center,\n distance = 20,\n})\nlocal marker = lib.marker.new({\n coords = center,\n type = 1,\n})\nfunction point:nearby()\n marker:draw()\n if self.currentDistance < 1.5 then\n if not lib.isTextUIOpen() then\n lib.showTextUI(\"Press [E] to get notified\")\n end\n if IsControlJustPressed(0, 51) then\n lib.notify({\n description = \"Hello, World!\"\n })\n end\n else\n local isOpen, currentText = lib.isTextUIOpen()\n if isOpen and currentText == uiText then\n lib.hideTextUI()\n end\n end\nend"}},"/overextended/ox_lib/Modules/Math/Shared":{"title":"Shared","data":{"libmath#lib.math":"Extends the standard Lua math table with extra functions.\nmath = lib.math","mathtoscalars#math.toscalars":"Takes a string and returns a set of scalar values.\nmath.toscalars(input, min, max, round)\ninput: string\nmin?: number\nmax?: number\nround?: boolean\nReturn:\n...: number","mathtovector#math.tovector":"Takes a string or table and returns a vector value, or a number if only one value was found.\nmath.tovector(input, min, max, round)\ninput: string or table\nmin?: number\nmax?: number\nround?: boolean\nReturn:\nvalue: number or vector2 or vector3 or vector4","mathnormaltorotation#math.normaltorotation":"Takes a surface normal and tries to convert it to a vector3 rotation.\nmath.normaltorotation(input)\ninput: vector3\nReturn:\nvalue: vector3","mathtorgba#math.torgba":"Takes a string or table and returns a vector value, or a number if only one value was found.\nValues are rounded and must be within the range of 0-255.\nmath.torgba(input)\ninput: string or table\nReturn:\nvalue: number or vector2 or vector3 or vector4","mathhextorgb#math.hextorgb":"Takes a hexadecimal string and returns three integers.\nmath.hextorgb(input)\ninput: string\nA hexadecimal value, e.g. 'eb4034'.\nReturn:\nr: number\ng: number\nb: number","mathtohex#math.tohex":"Takes a number or string and formats it as a hexadecimal string.\nmath.tohex(n, upper)\nn: number or string\nupper?: boolean\nReturn:\nhex: string","mathgroupdigits#math.groupdigits":"Takes a number and formats it into grouped digits.\nmath.groupdigits(number, seperator)\nnumber: number\nseperator?: string\nDefault: ,\nReturn:\ngroupedDigits: string","mathclamp#math.clamp":"Clamps a number between a lower and upper limit.\nmath.clamp(number, lower, upper)\nnumber: number\nlower: number\nupper: number\nReturn:\nnumber: number","mathround#math.round":"Rounds a number to a whole number or to the specified number of decimal places.\nmath.round(value, places)\nvalue: number | string\nplaces?: number | string\nReturn:\nroundedValue: number","mathinterp#math.interp":"Calculates an intermediate value between start and finish based on the interpolation factor.\nmath.interp(start, finish, factor)\ngeneric T: number | vector2 | vector3 | vector4\nstart: T\nfinish: T\nfactor: number\nThe interpolation factor between 0 and 1.\nReturn:\nresult: T","mathlerp#math.lerp":"Linearly interpolates between two values over a specified duration, returning an iterator function that will run once per game-frame.\nmath.lerp(start, finish, duration)\ngeneric T: number | table | vector2 | vector3 | vector4\nstart: T\nThe starting value of the interpolation\nfinish: T\nThe ending value of the interpolation\nduration: number\nThe duration over which to interpolate over in milliseconds.\nReturn:\niteratorFunction: fun(): T, number"}},"/overextended/ox_lib/Modules/Points/JavaScript/Client":{"title":"Client","data":{"points#Points":"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.\nPoint({coords, distance, onEnter, onExit, nearby, args})\ncoords: number[]\ndistance: number\nonEnter?: function\nonExit?: function\nnearby?: function\nargs?: T\nimport { Point, cache } from '@overextended/ox_lib/client'\nfunction nearby(this: Point<{dunak: string}>) {\n // @ts-ignore\n DrawMarker(2, this.coords.x, this.coords.y, this.coords.z, 0, 0, 0, 0, 180, 0, 1, 1, 1, 200, 20, 20, 50, false, true, 2, false, null, null, false)\n if (this.currentDistance && this.currentDistance < 1 && IsControlJustReleased(0, 38)) {\n console.log('Inside marker', this.id)\n console.log(this.args?.dunak)\n }\n}\nconst point = new Point({\n coords: GetEntityCoords(cache.ped, false),\n distance: 5,\n nearby: nearby,\n args: {\n dunak: 'nerd'\n }\n})\npoint.onEnter = () => {\n console.log('Entered range of point', point.id)\n}\npoint.onExit = () => {\n console.log('Left range of point', point.id)\n}"}},"/overextended/ox_lib/Modules/Points/Lua/Client":{"title":"Client","data":{"":"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates.","cpoint-class#CPoint Class":"A table representing a point with the following properties.\nid: number\ncoords: vector3\ndistance: number\nThe distance for the player to be \"inside\" a point (i.e. the point's radius).\ncurrentDistance: number\nThe players current distance from the centre of the point.\nisClosest?: boolean\nremove: function()\nRemoves the point from the points registry.\nonEnter?: function(self: CPoint)\nFunction triggered when player gets within distance of the point\nonExit?: function(self: CPoint)\nFunction triggered when player goes beyond distance of the point\nnearby?: function(self: CPoint)\nFunction triggered on frame when within distance of the point","libpointsnew#lib.points.new":"lib.points.new(data)\ndata: table\ncoords: vector3\ndistance: number\nReturns:\npoint: CPoint","usage-example#Usage Example":"local point = lib.points.new({\n coords = GetEntityCoords(cache.ped),\n distance = 5,\n dunak = 'nerd',\n})\nfunction point:onEnter()\n print('entered range of point', self.id)\nend\nfunction point:onExit()\n print('left range of point', self.id)\nend\nfunction point:nearby()\n 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, false, nil, nil, false)\n if self.currentDistance < 1 and IsControlJustReleased(0, 38) then\n print('inside marker', self.id, 'dunak is a '.. self.dunak)\n end\nend","libpointsgetallpoints#lib.points.getAllPoints":"Get a table of all points created in the resource.\nlib.points.getAllPoints()\nReturn:\npoints: CPoint[]","libpointsgetnearbypoints#lib.points.getNearbyPoints":"Get an array of all points in range of the player.\nlib.points.getNearbyPoints()\nReturn:\nnearbyPoints: CPoint[]","libpointsgetclosestpoint#lib.points.getClosestPoint":"Get the data for the closest point to the player.\nlib.points.getClosestPoint()\nReturn:\nclosestPoint?: CPoint"}},"/overextended/ox_lib/Modules/Print/Shared":{"title":"Shared","data":{"":"Prints to console conditionally based on convars set.\nDifferent level prints are colored and labeled.\nResource name is always included.","libprint#lib.print":"lib.print.error(...)\nlib.print.warn(...)\nlib.print.info(...)\nlib.print.verbose(...)\nlib.print.debug(...)\nvararg: any\nWhat to print in console. Converts tables into a pretty-print format.","example#Example":"lib.print.warn(\"query latency high: \", latency)","levels#Levels":"Error\nIndicates a failure in the system.\nWarn\nWarns of an unexpected condition, or a state which is likely to cause an error in the future.\nInfo\nInformation about high-level, successful operations.\nVerbose\nMore detailed information containing intermediate steps of high-level, operations\nDebug\nUsed by developers to understand the system and may contain detailed trace information.\nShould generally not be turned on when not debugging.","config#Config":"Use the following convars to set your print level. Prints less severe than the current level will not be executed.\nFor example, a level of info will print error, warn, and info, but not verbose nor debug. Defaults to info if not set.\nResource specific print levels override the global convar.\nset ox:printlevel \"info\"\nset ox:printlevel:ox_inventory \"warn\"\nset ox:printlevel: \"\""}},"/overextended/ox_lib/Modules/Raycast/Client":{"title":"Client","data":{"libraycastfromcoords#lib.raycast.fromCoords":"Starts a shapetest originating from starting coordinates and ending at destination coordinates.\nlib.raycast.fromCoords(coords, destination, flags, ignore)\ncoords: vector3\nStarting coords for raycast\ndestination: vector3\nDestination coords for raycast\nflags?: number\nSee: https://docs.fivem.net/natives/?_0x377906D8A31E5586\nDefault: 511\nignore?: number\nA bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used.\nDefault: 4\nReturn:\nhit: boolean\nWhether or not an entity was hit\nentityHit: number\nEntity handle of hit entity\nendCoords: vector3\nClosest coords to where the raycast hit\nsurfaceNormal: vector3\nNormal to the surface that was hit\nmaterialHash: number","libraycastfromcamera#lib.raycast.fromCamera":"Starts a shapetest originating from the camera, extending to ~10m by default.\nlib.raycast.fromCamera(flags, ignore, distance)\nflags?: number\nSee: https://docs.fivem.net/natives/?_0x377906D8A31E5586\nDefault: 511\nignore?: number\nA bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used.\nDefault: 4\ndistance?: number\nDefault: 10\nReturn:\nhit: boolean\nWhether or not an entity was hit\nentityHit: number\nEntity handle of hit entity\nendCoords: vector3\nClosest coords to where the raycast hit\nsurfaceNormal: vector3\nNormal to the surface that was hit\nmaterialHash: number","libraycastcam#lib.raycast.cam":"lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!"}},"/overextended/ox_lib/Modules/Require/Shared":{"title":"Shared","data":{"":"This module is always loaded by default.","require#require":"Loads the given module. The function starts by indexing the loaded table to determine whether modname is already loaded. If it is, then require returns the value stored at loaded[modname].\nModule names are the path to a file relative to the resource.\nThe module name must point to a .lua file.\nUse . to separate directories in a path.\nModules can be loaded from external resources using @resource.modname.\nrequire 'modname'\nClient modules must be defined in the file section of the resource manifest.\nfile 'modname.lua'\n-- or\nfiles {\n 'modname.lua'\n}","usage-example#Usage Example":"- resources/\n - mylib/\n - import.lua\n - data/\n - events.lua\n - myresource/\n - server.lua\nlocal mylib = {\n events = require 'data.events'\n}\nprint('Loaded mylib')\nreturn mylib\nreturn {\n disconnect = 'onPlayerDropped',\n}\nlocal mylib = require '@mylib.import'\nprint(mylib.events.disconnect)","libload#lib.load":"Loads and runs a Lua file at the given path. Unlike require, the chunk is not cached for future use.\nlib.load(filePath, env)\nfilePath: string\nA path to the Lua file, using the same rules as require.\nenv?: table\nA table to use as the global environment, defaulting to _ENV.","usage-example-1#Usage Example":"local events = lib.load('data.events')\nprint('Loaded events')\nreturn {\n disconnect = 'onPlayerDropped',\n}","libloadjson#lib.loadJson":"Loads a JSON file at the given path and decodes it as a table.\nlib.loadJson(filePath)\nfilePath: string\nA path to the Lua file, using the same rules as require.","usage-example-2#Usage Example":"local events = lib.loadJson('data.events')\nprint('Loaded events')\n{\n \"disconnect\": \"onPlayerDropped\"\n}"}},"/overextended/ox_lib/Modules/Streaming/Client":{"title":"Client","data":{"":"Check if assets exist, such as models, and loads them into memory.\nThrows errors for invalid assets and returns true if the asset is loaded.","librequestanimdict#lib.requestAnimDict":"Remember to call RemoveAnimDict(dict) at the end of you code!\nlib.requestAnimDict(dict, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestAnimDict(dict, timeout)\ndict: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestanimset#lib.requestAnimSet":"Remember to call RemoveAnimSet(set) at the end of you code!\nlib.requestAnimSet(set, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestAnimSet(set, timeout)\nset: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestmodel#lib.requestModel":"Remember to call SetModelAsNoLongerNeeded(model) at the end of you code!\nlib.requestModel(model, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestModel(model, timeout)\nmodel: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequeststreamedtexturedict#lib.requestStreamedTextureDict":"Remember to call SetStreamedTextureDictAsNoLongerNeeded(dict) at the end of you code!\nlib.requestStreamedTextureDict(dict, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestStreamedTextureDict(dict, timeout)\ndict: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestnamedptfxasset#lib.requestNamedPtfxAsset":"Remember to call RemoveNamedPtfxAsset(dict) at the end of you code!\nlib.requestNamedPtfxAsset(ptFxName, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestNamedPtfxAsset(ptFxName, timeout)\nptFxName: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000","librequestscaleformmovie#lib.requestScaleformMovie":"Remember to call SetScaleformMovieAsNoLongerNeeded(scaleformName) at the end of you code!\nlib.requestScaleformMovie(scaleformName, timeout)\nimport lib from '@overextended/ox_lib/client'\nlib.requestScaleformMovie(scaleformName, timeout)\nscaleformName: string\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 1000","librequestweaponasset#lib.requestWeaponAsset":"Remember to call RemoveWeaponAsset(weaponType) at the end of you code!\nlib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)\nimport lib from '@overextended/ox_lib/client'\nlib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)\nweaponType: string | number\ntimeout?: number\nNumber of ticks to wait for the asset to load.\nDefault: 10000\nweaponResourceFlags?: WeaponResourceFlags\nDefault: 31\nextraWeaponComponentFlags?: ExtraWeaponComponentFlags\nDefault: 0","weaponresourceflags#WeaponResourceFlags":"1 WRF_REQUEST_BASE_ANIMS\n2 WRF_REQUEST_COVER_ANIMS\n4 WRF_REQUEST_MELEE_ANIMS\n8 WRF_REQUEST_MOTION_ANIMS\n16 WRF_REQUEST_STEALTH_ANIMS\n32 WRF_REQUEST_ALL_MOVEMENT_VARIATION_ANIMS\n31 WRF_REQUEST_ALL_ANIMS","extraweaponcomponentflags#ExtraWeaponComponentFlags":"0 WEAPON_COMPONENT_NONE\n1 WEAPON_COMPONENT_FLASH\n2 WEAPON_COMPONENT_SCOPE\n4 WEAPON_COMPONENT_SUPP\n8 WEAPON_COMPONENT_SCLIP2\n16 WEAPON_COMPONENT_GRIP"}},"/overextended/ox_lib/Modules/String/Shared":{"title":"Shared","data":{"libstring#lib.string":"Extends the standard Lua string table with extra functions.\nstring = lib.string","stringrandom#string.random":"Outputs a random string based on a given pattern.\nstring.random(pattern, length)\npattern: string\n1 will output a random number from 0-9.\nA will output a random letter from A-Z.\na will output a random letter from a-z.\n. will output a random letter or number.\n^ will output the following character literally.\nAny other character will output said character.\nlength?: number\nSets the length of the returned string, either padding it or omitting characters.\nReturn:\nstring: string"}},"/overextended/ox_lib/Modules/Table/Shared":{"title":"Shared","data":{"":"Adds additional functions alongside the standard table library.","libtablecontains#lib.table.contains":"Checks if table contains the given value. Only intended for simple values and unnested tables.\nlib.table.contains(tbl, value)\ntbl: table\nvalue: any\nReturn:\nisContained: boolean","libtablematches#lib.table.matches":"Compares if two values are equal, iterating over tables and matching both keys and values.\nlib.table.matches(tableOne, tableTwo)\ntableOne: table\ntableTwo: table\nReturn:\nmatches: boolean","libtabledeepclone#lib.table.deepclone":"Recursively clones a table to ensure no table references remain.\nlib.table.deepclone(tbl)\ntbl: table\nReturn:\nclonedTable: table","libtablemerge#lib.table.merge":"Merges two tables together. Duplicate keys will be added together if they are numbers, otherwise tableTwo's value will be used.\nlib.table.merge(tableOne, tableTwo)\ntableOne: table\ntableTwo: table\nReturn:\ntableOne: table","libtablefreeze#lib.table.freeze":"Makes a table read-only, preventing further modification. Unfrozen tables stored within table are still mutable.\nlib.table.freeze(tbl)\ntbl: table\nReturn:\nfrozenTable: table","libtableisfrozen#lib.table.isFrozen":"Returns true if tbl is set as read-only.\nlib.table.isFrozen(tbl)\ntbl: table\nReturn:\nisFrozen: boolean"}},"/overextended/ox_lib/Modules/Timer/Shared":{"title":"Shared","data":{"":"Provides a versatile timer system with options for asynchronous operation, pause and resume functionality, and callbacks on timer completion.","timer#Timer":"","libtimer#lib.timer":"lib.timer(time, onEnd, async)\ntime: number\nonEnd: function\nasync?: boolean\nIf true then the timer does not block script execution on the calling thread.\nReturns:\ntimer: OxTimer","example#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend)","methods#Methods":"","pause#pause":"Pauses an active timer until timer:play() or timer:forceEnd() is called.\ntimer:pause()","example-1#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()","play#play":"Resume a timer if it is paused with timer:pause().\ntimer:play()","example-2#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()\nWait(1000)\ntimer:play()\n--timer finishes in 6 seconds rather than 5 because of the pause","forceend#forceEnd":"Immediately ends the timer and optionally triggers the onEnd callback.\ntimer:forceEnd(triggerOnEnd)\ntriggerOnEnd: boolean","example-3#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\ntimer:pause()\nWait(1000)\ntimer:forceEnd(false)\n--timer finishes in 1 second rather than 5 because of the forceEnd and the call back never runs","ispaused#isPaused":"Checks if the timer is paused from calling timer:pause() previously.\ntimer:isPaused()\nReturns:\nisPaused: boolean","example-4#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\nprint(timer:isPaused()) -- false\ntimer:pause()\nprint(timer:isPaused()) -- true","gettimeleft#getTimeLeft":"Returns the remaining time on the timer in the given format rounded to 2 decimal places\ntimer:getTimeLeft(format)\n-- format: 'ms' = miliseconds, 's' = seconds, 'm' = minutes, 'h' = hours, nil = all returned in a table\nformat?: 'ms' or 's' or 'm' or 'h'\nReturns:\ntime: number | {ms: number, s: number, m: number, h: number}","example-5#Example":"local timer = lib.timer(5000, function()\n print(\"timer ended\")\nend, true)\nprint(timer:getTimeLeft('ms')) -- 5000 miliseconds\nprint(timer:getTimeLeft('s')) -- 5.00 seconds\nprint(timer:getTimeLeft('m')) -- 0.08 minutes\nprint(timer:getTimeLeft('h')) -- 0.00 hours\nprint(timer:getTimeLeft()) -- {ms = 5000, s = 5.00, m = 0.08, h = 0.00 }","restart#restart":"Resets and starts the timer.\ntimer:restart()","example-6#Example":"-- this will create a timer that just keeps restarting itself\nlocal timer\ntimer = lib.timer(5000, function()\n print(\"timer ended\")\n timer:restart()\nend, true)"}},"/overextended/ox_lib/Modules/Version/Server":{"title":"Server","data":{"libversioncheck#lib.versionCheck":"Compares the resource version to the latest published release on GitHub.\nUtilises GitHub's release API\nlib.versionCheck(repository)\nrepository: string\nlib.versionCheck('overextended/ox_lib')\nimport lib from '@overextended/ox_lib/server'\nlib.versionCheck('overextended/ox_lib')"}},"/overextended/ox_lib/Modules/VehicleProperties/Client":{"title":"Client","data":{"":"Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.\nhttps://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3","libgetvehicleproperties#lib.getVehicleProperties":"lib.getVehicleProperties(vehicle)\nvehicle: number\nvehicle handle of the vehicle to get the properties for\nlib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))\nimport lib from '@overextended/ox_lib/client'\nlib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))","libsetvehicleproperties#lib.setVehicleProperties":"Sets properties on a vehicle (i.e. mods, plate text, etc.) and returns true if the client owns the entity.\nlib.setVehicleProperties(vehicle, props)\nvehicle: entity\nprops: table\nRegisterNetEvent('ox_lib:setVehicleProperties', function(netid, data)\n lib.setVehicleProperties(NetToVeh(netid), data)\nend)\nimport { setVehicleProperties } from '@overextended/ox_lib/client'\nonNet('ox_lib:setVehicleProperties', (netid, data) => {\n setVehicleProperties(NetToVeh(netid), data)\n})\nReturns:\nisEntityOwner: boolean","recommended-usage#Recommended Usage":"The server should tell the owner of the entity to set properties, using the following trigger.\nTriggerClientEvent('ox_lib:setVehicleProperties', entityOwner, vehNetId, data)","vehicle-properties#Vehicle Properties":"model?: number\nplate?: string\nplateIndex?: number\nbodyHealth?: number\nengineHealth?: number\ntankHealth?: number\nfuelLevel?: number\noilLevel?: number\ndirtLevel?: number\ncolor1?: number or number[]\ncolor2?: number or number[]\npearlescentColor?: number\ninteriorColor?: number\ndashboardColor?: number\nwheelColor?: number\nwheelWidth?: number\nwheelSize?: number\nwheels?: number\nwindowTint?: number\nxenonColor?: number\nneonEnabled?: boolean[]\nneonColor?: number or number[]\nextras?: table\ntyreSmokeColor?: number or number[]\nmodSpoilers?: number\nmodFrontBumper?: number\nmodRearBumper?: number\nmodSideSkirt?: number\nmodExhaust?: number\nmodFrame?: number\nmodGrille?: number\nmodHood?: number\nmodFender?: number\nmodRightFender?: number\nmodRoof?: number\nmodEngine?: number\nmodBrakes?: number\nmodTransmission?: number\nmodHorns?: number\nmodSuspension?: number\nmodArmor?: number\nmodNitrous?: number\nmodTurbo?: number\nmodSubwoofer?: boolean\nmodSmokeEnabled?: boolean\nmodHydraulics?: boolean\nmodXenon?: boolean\nmodFrontWheels?: number\nmodBackWheels?: number\nmodCustomTiresF?: boolean\nmodCustomTiresR?: boolean\nmodPlateHolder?: number\nmodVanityPlate?: number\nmodTrimA?: number\nmodOrnaments?: number\nmodDashboard?: number\nmodDial?: number\nmodDoorSpeaker?: number\nmodSeats?: number\nmodSteeringWheel?: number\nmodShifterLeavers?: number\nmodAPlate?: number\nmodSpeakers?: number\nmodTrunk?: number\nmodHydrolic?: number\nmodEngineBlock?: number\nmodAirFilter?: number\nmodStruts?: number\nmodArchCover?: number\nmodAerials?: number\nmodTrimB?: number\nmodTank?: number\nmodWindows?: number\nmodDoorR?: number\nmodLivery?: number\nmodRoofLivery?: number\nmodLightbar?: number\nwindows?: number[]\ndoors?: number[]\ntyres?: table\nbulletProofTyres?: boolean"}},"/overextended/ox_lib/Modules/Version/Shared":{"title":"Shared","data":{"libcheckdependency#lib.checkDependency":"Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.\nlib.checkDependency(resource, version)\nresource: string\nversion: string\nif not lib.checkDependency('ox_lib', '1.5.0') then error() end\nimport lib from '@overextended/ox_lib/shared'\n// import { checkDependency } from '@overextended/ox_lib/shared'\nif (!lib.checkDependency('ox_lib', '1.5.0')) error()"}},"/overextended/ox_lib/Modules/WaitFor/Shared":{"title":"Shared","data":{"libwaitfor#lib.waitFor":"Calls a function repeatedly until it receives a non-nil value, or it times out.\nThe function result is then returned.\nlib.waitFor(cb, errMessage, timeout)\ncb: function\nA function to call each frame.\nerrMessage?: string\nThe error message to display if the function times out.\ntimeout?: number | false\nThe duration to run the function for, defaulting to 1000ms, unless set to false.\nlocal value --[['abc']] = lib.waitFor(function()\n if math.random(0, 1) == 1 then return 'abc' end\nend)"}},"/overextended/ox_target":{"title":"Ox Target","data":{"":"A performant and flexible standalone targeting resource or \"third-eye\", with additional functionality for ox_inventory, ox_core, qbx_core, and es_extended.","installation#Installation":"We strongly recommend referring to Guides for setting up Git, Node.js, and pnpm.","install-all-resource-dependencies#Install all resource dependencies":"ox_lib","download-a-release-or-clone-the-source-code#Download a release or clone the source code.":"git clone https://github.com/overextended/ox_target.git","config#Config":"Resource configuration is handled using convars.\n# Toggle targeting when pressing the hotkey, instead of holding it down.\nsetr ox_target:toggleHotkey 0\n# Change the key to enable targeting (https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard)\nsetr ox_target:defaultHotkey LMENU\n# Draw a sprite (circle) at the centroid of a zone.\nsetr ox_target:drawSprite 1\n# Enable built-in targeting options, e.g. toggling vehicle doors.\nsetr ox_target:defaults 1\n# Enable debugging / testing options, entity outlines, and a raycast indicator.\nsetr ox_target:debug 0\n# Enable / Disable leftclick to select options\nsetr ox_target:leftClick 1","supported-frameworks#Supported Frameworks":"These aren't necessary to run ox_target, but they will add additional features.\nox_core\nesx\nqbx_core"}},"/overextended/ox_lib/Modules/Zones/Shared":{"title":"Shared","data":{"":"Faster alternative to PolyZone utilising glm.polygon.\nCurrently zones only have basic support on the server side. Some features will not work such as onEnter, onExit,\nand inside.","libzonespoly#lib.zones.poly":"lib.zones.poly(data)\ndata: table\npoints: vector3[]\nAn array of 3d points defining the polygon's shape.\nthickness?: number\nThe height of the polygon, defaulting to 4.\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","libzonesbox#lib.zones.box":"lib.zones.box(data)\ndata: table\ncoords: vector3\nsize?: vector3\nDefault: vec3(2, 2, 2)\nrotation?: number\nAngle in degrees, defaulting to 0.\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","libzonessphere#lib.zones.sphere":"lib.zones.sphere(data)\ndata: table\ncoords: vector3\nradius?: number\nDefault: 2\nonEnter?: function(self: table)\nonExit?: function(self: table)\ninside?: function(self: table)\ndebug?: boolean","methods#Methods":"","remove#remove":"Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later.\nlocal zone = lib.zones.box({...})\nzone:remove()\nSetTimeout(500, function()\n lib.zones.poly(zone)\nend)","contains#contains":"Tests if a point exists inside the zone, returning a boolean.\nlocal zone = lib.zones.box({...})\nif zone:contains(vec3(1, 1, 1)) then\n print('point is inside zone!')\nend","usage-examples#Usage Examples":"function onEnter(self)\n print('entered zone', self.id)\nend\nfunction onExit(self)\n print('exited zone', self.id)\nend\nfunction inside(self)\n print('you are inside zone ' .. self.id)\nend\nlocal poly = lib.zones.poly({\n points = {\n vec(413.8, -1026.1, 29),\n vec(411.6, -1023.1, 29),\n vec(412.2, -1018.0, 29),\n vec(417.2, -1016.3, 29),\n vec(422.3, -1020.0, 29),\n vec(426.8, -1015.9, 29),\n vec(431.8, -1013.0, 29),\n vec(437.3, -1018.4, 29),\n vec(432.4, -1027.2, 29),\n vec(424.7, -1023.5, 29),\n vec(420.0, -1030.2, 29),\n vec(409.8, -1028.4, 29),\n },\n thickness = 2,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})\nlocal sphere = lib.zones.sphere({\n coords = vec3(442.5363, -1017.666, 28.65637),\n radius = 1,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})\nlocal box = lib.zones.box({\n coords = vec3(442.5363, -1017.666, 28.65637),\n size = vec3(1, 1, 1),\n rotation = 45,\n debug = true,\n inside = inside,\n onEnter = onEnter,\n onExit = onExit\n})","zone-creation-script#Zone creation script":"You can use our builtin zone-creator with /zone - with poly, box or sphere as an argument.\nAvailable controls will be displayed on the right side.Zones will be saved to ox_lib/created_zones.lua with your chosen format.\nlocal poly = lib.zones.poly({\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n})\n{\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n},\nexports.ox_target:addPolyZone({\n name = poly,\n points = {\n vec(447.9, -998.8, 25.8),\n vec(450.3, -998.2, 25.8),\n vec(449.9, -995.5, 25.8),\n vec(447.2, -995.6, 25.8),\n vec(446.3, -997.9, 25.8),\n },\n thickness = 2,\n})"}},"/overextended/ox_target/Functions/Client":{"title":"Client","data":{"":"All exports with the options argument expect a table with the targeting properties here.For some examples you can refer to defaults.lua or debug.lua.","disabletargeting#disableTargeting":"Toggle the availability of the targeting menu.\nexports.ox_target:disableTargeting(state)\nstate: boolean\nSetting state to true will turn off the targeting eye if it is active and prevent it from reopening until state is set to false again.","addglobaloption#addGlobalOption":"Creates new targetable options which are displayed at all times.\nexports.ox_target:addGlobalOption(options)\noptions: TargetOptions","removeglobaloption#removeGlobalOption":"Removes all options from the global options list with the option names.\nexports.ox_target:removeGlobalOption(optionNames)\noptionNames: string or string[]","addglobalobject#addGlobalObject":"Creates new targetable options for all Object entity types.\nexports.ox_target:addGlobalObject(options)\noptions: TargetOptions","removeglobalobject#removeGlobalObject":"Removes all options from the global Object list with the option names.\nexports.ox_target:removeGlobalObject(optionNames)\noptionNames: string or string[]","addglobalped#addGlobalPed":"Creates new targetable options for all Ped entity types (excluding players).\nexports.ox_target:addGlobalPed(options)\noptions: TargetOptions","removeglobalped#removeGlobalPed":"Removes all options from the global Ped list with the option names.\nexports.ox_target:removeGlobalPed(optionNames)\noptionNames: string or string[]","addglobalplayer#addGlobalPlayer":"Creates new targetable options for all Player entities.\nexports.ox_target:addGlobalPlayer(options)\noptions: TargetOptions","removeglobalplayer#removeGlobalPlayer":"Removes all options from the global Player list with the option names.\nexports.ox_target:removeGlobalPlayer(optionNames)\noptionNames: string or string[]","addglobalvehicle#addGlobalVehicle":"Creates new targetable options for all Vehicle entity types.\nexports.ox_target:addGlobalVehicle(options)\noptions: TargetOptions","removeglobalvehicle#removeGlobalVehicle":"Removes all options from the global Vehicle list with the option names.\nexports.ox_target:removeGlobalVehicle(optionNames)\noptionNames: string or string[]","addmodel#addModel":"Creates new targetable options for a specific model or list of models.\nexports.ox_target:addModel(models, options)\nmodels: number or string or Array\noptions: TargetOptions","removemodel#removeModel":"Removes all options from the models list with the option names.\nexports.ox_target:removeModel(models, optionNames)\nmodels: number or string or Array\noptionNames: string or string[]","addentity#addEntity":"Creates new targetable options for a specific network id or list of network ids (see NetworkGetNetworkIdFromEntity).\nexports.ox_target:addEntity(netIds, options)\nnetIds: number or number[]\noptions: TargetOptions","removeentity#removeEntity":"Removes all options from the networked entities list with the option names.\nexports.ox_target:removeEntity(netIds, optionNames)\nnetIds: number or number[]\noptionNames: string or string[]","addlocalentity#addLocalEntity":"Creates new targetable options for a specific entity handle or list of entity handles.\nexports.ox_target:addLocalEntity(entities, options)\nentities: number or number[]\noptions: TargetOptions","removelocalentity#removeLocalEntity":"Removes all options from the entities list with the option names.\nexports.ox_target:removeLocalEntity(entities, optionNames)\nentities: number or number[]\noptionNames: string or string[]","addspherezone#addSphereZone":"Creates a new targetable sphere zone.\nexports.ox_target:addSphereZone(parameters)\nparameters: table\ncoords: vector3\nname?: string\nAn optional name to refer to the zone instead of using the id.\nradius?: number\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","addboxzone#addBoxZone":"Creates a new targetable box zone.\nexports.ox_target:addBoxZone(parameters)\nparameters: table\ncoords: vector3\nname?: string\nAn optional name to refer to the zone instead of using the id.\nsize?: vector3\nrotation?: number\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","addpolyzone#addPolyZone":"Creates a new targetable poly zone.\nexports.ox_target:addPolyZone(parameters)\nparameters: table\npoints: vector3[]\nAn array of 3d points defining the polygon's shape.\nname?: string\nAn optional name to refer to the zone instead of using the id.\nthickness?: number\nThe height of the polygon, defaulting to 4.\ndebug?: boolean\ndrawSprite?: boolean\nDraw a sprite at the centroid of the zone. Defaults to true.\noptions: TargetOptions\nReturn:\nid: number","removezone#removeZone":"Removes a targetable zone with the given id (returned by addBoxZone/addSphereZone).\nexports.ox_target:removeZone(id)\nid: number or string\nThe number id that is returned by addSphereZone, addBoxZone, or addPolyZone\nOR\nThe string name given to the zone."}},"/overextended/ox_target/TargetOptions":{"title":"TargetOptions","data":{"":"All target actions are formated as an array containing objects with the following properties.","targetoption#TargetOption":"label: string\nname?: string\nAn identifier used when removing an option.\nicon?: string\nName of a Font Awesome icon.\niconColor?: string\ndistance?: number\nThe max distance to display the option.\nbones?: string or string[]\nA bone name or array of bone names (see GetEntityBoneIndexByName).\noffset?: vector3\nOffset the targetable area of an entity, relative to the model dimensions.\noffsetAbsolute?: vector3\nOffset the targetable area of an entity, relative to the entity's world coords.\noffsetSize?: number\nThe radius of the targetable area for an entity offset.\ngroups?: string or string[] or table\nA group, array of groups, or pairs of groups-grades required to show the option.\nGroups are framework dependent, and may refer to jobs, gangs, etc.\nitems?: string or string[] or table\nAn item, array of items, or pairs of items-count required to show the option.\nItems are framework dependent.\nanyItem?: boolean\nOnly require a single item from the items table to exist.\ncanInteract?: function(entity, distance, coords, name, bone)\nOptions will always display if this is undefined.\nmenuName?: string\nThe option is only displayed when a menu has been set with openMenu.\nopenMenu?: string\nSets the current menu name, displaying only options for the menuName.\nonSelect?: function(data)\nexport?: string\nevent?: string\nserverEvent?: string\ncommand?: string","callback#Callback":"This is the data returned to a registered callback or event for selected option.A selected option will trigger a single action, in order of priority:\nonSelect\nexport\nevent\nserver event\ncommand\ndata: table\nentity: number\nThe id of the entity hit by the shape test. If triggering a server event, this is the network id instead.\ncoords: vector3\nThe resulting coordinates where the shape test hit a collision.\ndistance: number\nThe player's distance from the coords.\nzone?: number\nThe id of the selected zone, if applicable."}},"/overextended/oxmysql":{"title":"OxMySQL","data":{"":"Uma substituição para mysql-async e ghmattimysql com API expandida e compatibilidade aprimorada para MySQL 8.","mysql-ou-mariadb#MySQL ou MariaDB?":"A maioria dos recursos para FiveM foi projetada para ser usada com MySQL 5.7 e pode enfrentar problemas de compatibilidade ao usar MySQL 8, por exemplo:\nMais palavras reservadas, como 'stored' e 'group'.\nCampos Longtext / JSON não suportam valores padrão.\nMariaDB é altamente recomendada por sua compatibilidade e desempenho aprimorado (em relação a todas as versões do MySQL).","devo-usar-o-xampp#Devo usar o XAMPP?":"Não. XAMPP é uma pilha de servidor web destinada a desenvolvimento, permitindo fácil desenvolvimento e teste locais.\nNão instale o XAMPP apenas para rodar seu banco de dados, e instale MariaDB diretamente.","instalação#Instalação":"","baixe-e-instale-mariadb#Baixe e instale MariaDB":"","baixe-a-última-versão-do-oxmysql#Baixe a última versão do oxmysql":"","configure-seu-servidor#Configure seu servidor":"Abra o arquivo de configuração do seu servidor.\nAdicione start oxmysql ao início da sua lista de recursos.\nConfigure sua string de conexão mysql e defina-a antes de iniciar quaisquer recursos.\n# Use seu formato preferido. Certifique-se de sempre usar set.\nset mysql_connection_string \"mysql://root:12345@localhost:3306/fivem\"\nset mysql_connection_string \"user=root;password=12345;host=localhost;port=3306;database=fivem\"\nCertos caracteres especiais são reservados ou não são suportados dependendo da sua string de conexão.\nEvite usar estes caracteres ; , / ? : @ & = + $ # e tente trocar o formato da string de conexão.","avisos-de-consulta-lenta#Avisos de consulta lenta":"Você receberá avisos se uma consulta demorar muito para ser concluída, configurável com uma variável de ambiente.\nO tempo de consulta pode não ser totalmente preciso.\nConsultas lentas podem não indicar um problema de banco de dados (ex.: travamentos do servidor).\nConsultas lentas na inicialização do servidor não são necessariamente problemáticas.\nset mysql_slow_query_warning 150","debug#Debug":"Habilitar a opção de debug imprimirá todas as consultas no console do servidor; você também pode usar uma lista para imprimir apenas de recursos específicos.\nset mysql_debug true\nset mysql_debug [\n \"ox_core\",\n \"ox_inventory\"\n]\nVocê pode modificar temporariamente a lista de recursos com comandos.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","compatibilidade#Compatibilidade":"Você pode deletar os seguintes recursos e permitir que oxmysql forneça sua funcionalidade.\nmysql-async\nghmattimysql","uso#Uso":"Os recursos podem importar métodos oxmysql incluindo nossa biblioteca, fornecendo alguns recursos de verificação de tipos e pequenas melhorias de desempenho sobre chamadas de exportação diretas.","lua#Lua":"Modifique fxmanifest.lua para o seu recurso e adicione o seguinte acima de qualquer outro arquivo de script.\nserver_script '@oxmysql/lib/MySQL.lua'","javascript#JavaScript":"Você pode usar exportações diretas ou instalar nosso pacote npm para intellisense e uso semelhante ao Lua.\n# With pnpm\npnpm add @overextended/oxmysql\n# With Yarn\nyarn add @overextended/oxmysql\n# With npm\nnpm install @overextended/oxmysql\nImporte o objeto oxmysql para o seu recurso.\nimport { oxmysql as MySQL } from '@overextended/oxmysql';","upserting#Upserting":"Quando não tiver certeza se uma linha deve ser inserida no banco de dados ou se uma linha existente deve ser atualizada, as consultas devem verificar a duplicidade de chaves.\nMySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })\nIsso é preferível a verificar a existência de uma linha e, em seguida, inserir ou atualizar dependendo do resultado.\nAlém disso, ao contrário do uso de 'REPLACE INTO', a linha não é deletada e reinserida."}},"/overextended/oxmysql/Functions/prepare":{"title":"prepare","data":{"":"O método prepare pode ser usado para executar consultas chamadas com frequência de forma mais rápida e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.\nDATE não retornará a string de data comumente usada no FiveM.\nTINYINT 1 e BIT não retornarão um valor booleano.\nVocê só pode usar os marcadores de valor ?; os marcadores de coluna ?? e os marcadores nomeados irão gerar um erro.\nAo contrário de rawExecute, a instrução SELECT retornará uma coluna, linha ou um array de linhas, dependendo do número de colunas e linhas selecionadas.","promise#Promise":"local response = MySQL.prepare.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nprint(json.encode(response, { indent = true, sort_keys = true }))\nconst response = await MySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nconsole.log(JSON.stringify(response))\nAliases\nexports.oxmysql.prepare_async","callback#Callback":"MySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n print(json.encode(response, { indent = true, sort_keys = true }))\nend)\nMySQL.prepare('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n console.log(JSON.stringify(response))\n})\nAliases\nexports.oxmysql.prepare"}},"/overextended/oxmysql/Functions/insert":{"title":"insert","data":{"":"Insere uma nova entrada no banco de dados e retorna o ID da linha inserida, se válido.","promise#Promise":"local id = MySQL.insert.await('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', {\n identifier, firstName, lastName\n})\nprint(id)\nconst id = await MySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', [\n identifier, firstName, lastName\n])\nconsole.log(id)\nAliases\nMySQL.Sync.insert\nexports.ghmattimysql.executeSync\nexports.oxmysql.insert_async","callback#Callback":"MySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', {\n identifier, firstName, lastName\n}, function(id)\n print(id)\nend)\nMySQL.insert('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', [\n identifier, firstName, lastName\n], (id) => {\n console.log(id)\n})\nAliases\nMySQL.Async.insert\nexports.ghmattimysql.execute\nexports.oxmysql.insert"}},"/overextended/oxmysql/Functions/query":{"title":"query","data":{"":"Quando dados são selecionados, retorna todas as linhas e colunas correspondentes; caso contrário, retorna dados como insertId, affectedRows, etc.","promise#Promise":"local response = MySQL.query.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nif response then\n for i = 1, #response do\n local row = response[i]\n print(row.firstname, row.lastname)\n end\nend\nconst response = await MySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nif (response) {\n response.forEach((row) => {\n console.log(row.identifier, row.firstname, row.lastname)\n })\n}\nAliases\nMySQL.Sync.fetchAll\nexports.ghmattimysql.execute\nexports.oxmysql.query_async","callback#Callback":"MySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n if response then\n for i = 1, #response do\n local row = response[i]\n print(row.firstname, row.lastname)\n end\n end\nend)\nMySQL.query('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n if (response) {\n response.forEach((row) => {\n console.log(row.firstname, row.lastname)\n })\n }\n})\nAliases\nMySQL.Async.fetchAll\nexports.ghmattimysql.execute\nexports.oxmysql.query"}},"/overextended/oxmysql/Functions/rawExecute":{"title":"rawExecute","data":{"":"rawExecute pode ser usado para executar consultas frequentemente chamadas mais rapidamente e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.\nA data não retornará a string de data normalmente usada no FiveM.\nTINYINT 1 e BIT não retornarão um valor booleano.\nVocê pode usar apenas ? como substituto de valor, os substitutos ?? para colunas e os nomes de parâmetros irão gerar um erro.\nAo contrário do prepare, a instrução SELECT sempre retornará um array de linhas.\nQuando usado com SELECT, o valor de retorno corresponderá a query, single ou scalar, dependendo do número de colunas e linhas selecionadas.","promise#Promise":"local response = MySQL.rawExecute.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n})\nprint(json.encode(response, { indent = true, sort_keys = true }))\nconst response = await MySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n])\nconsole.log(JSON.stringify(response))\nAliases\nexports.oxmysql.rawExecute_async","callback#Callback":"MySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {\n identifier\n}, function(response)\n print(json.encode(response, { indent = true, sort_keys = true }))\nend)\nMySQL.rawExecute('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', [\n identifier\n], (response) => {\n console.log(JSON.stringify(response))\n})\nAliases\nexports.oxmysql.rawExecute"}},"/overextended/oxmysql/Functions/scalar":{"title":"scalar","data":{"":"Retorna a primeira coluna de uma única linha.","promise#Promise":"local firstName = MySQL.scalar.await('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n})\nprint(firstName)\nconst firstName = await MySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n])\nconsole.log(firstName)\nAliases\nMySQL.Sync.fetchScalar\nexports.ghmattimysql.scalar\nexports.oxmysql.scalar_async","callback#Callback":"MySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n}, function(firstName)\n print(firstName)\nend)\nMySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n], (firstName) => {\n console.log(firstName)\n})\nAliases\nMySQL.Async.fetchScalar\nexports.ghmattimysql.scalar\nexports.oxmysql.scalar"}},"/overextended/oxmysql/Functions/single":{"title":"single","data":{"":"Retorna todas as colunas selecionadas para uma única linha.","promise#Promise":"local row = MySQL.single.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n})\nif not row then return end\nprint(row.firstname, row.lastname)\nconst row = await MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n])\nif (!row) return;\nconsole.log(row.firstname, row.lastname)\nAliases\nexports.oxmysql.single_async","callback#Callback":"MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {\n identifier\n}, function(row)\n if not row then return end\n print(row.firstname, row.lastname)\nend)\nMySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [\n identifier\n], (row) => {\n if (!row) return;\n console.log(row.firstname, row.lastname)\n})\nAliases\nexports.oxmysql.single"}},"/overextended/oxmysql/Functions/transaction":{"title":"transaction","data":{"":"Uma transação executa várias consultas e as confirma apenas se todas tiverem sucesso.\nSe uma falhar, nenhuma das consultas será confirmada.O valor de retorno é um booleano, que indica o resultado da transação.","formato-específico#Formato específico":"Ao usar este formato, você deve passar um array contendo conjuntos de consultas e parâmetros para o método da transação.\nNeste caso, suas consultas não precisam ser necessariamente iguais, e os valores são exclusivos para cada consulta.\n-- Você pode renomear \"values\" como \"parameters\" para compatibilidade com mysql-async.\nlocal queries = {\n { query = 'INSERT INTO `test` (id) VALUES (?)', values = { 1 }},\n { query = 'INSERT INTO `test` (id, name) VALUES (?, ?)', values = { 2, 'bob' }},\n}\n-- Você também pode passar um array de arrays.\nlocal queries = {\n { 'INSERT INTO `test` (id) VALUES (?)', { 1 } },\n { 'INSERT INTO `test` (id, name) VALUES (?, ?)', { 2, 'bob' } },\n}","formato-compartilhado#Formato compartilhado":"Ao usar este formato, você deve passar um array contendo consultas e um conjunto contendo parâmetros compartilhados para o método da transação.\nNeste caso, suas consultas não precisam ser necessariamente iguais, e os valores são exclusivos para cada consulta.\n-- Você pode renomear \"values\" como \"parameters\" para compatibilidade com mysql-async.\nlocal queries = {\n 'INSERT INTO `test` (id, name) VALUES (@someid, @somename)',\n 'SET `name` = @newname IN `test` WHERE `id` = @someid'\n}\nlocal values = {\n someid = 2,\n somename = 'John Doe',\n newname = 'John Notdoe'\n}","promise#Promise":"local success = MySQL.transaction.await(queries, values --[[deixe nil para formato específico]])\nprint(success)\nconst success = await MySQL.transaction(queries, values /*deixe nil para formato específico*/)\nconsole.log(success)\nAliases\nMySQL.Sync.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction_async","callback#Callback":"-- específico\nMySQL.transaction(queries, values, function(success)\n print(success)\nend)\n-- compartilhado\nMySQL.transaction(queries, function(success)\n print(success)\nend)\n// específico\nMySQL.transaction(queries, (success) => {\n console.log(success)\n})\n// compartilhado\nMySQL.transaction(queries, values, (success) => {\n console.log(success)\n})\nAliases\nMySQL.Async.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction","nível-de-isolamento-da-transação#Nível de Isolamento da Transação":"Isso pode ser configurado através da convar mysql_transaction_isolation_level, que é um número inteiro variando de 1-4.\nO valor padrão é 2.\nValor da Convar\tResultado\t1\tRepeatable Read\t2\tRead Committed\t3\tRead Uncommitted\t4\tSerializable"}},"/overextended/oxmysql/placeholders":{"title":"Placeholders","data":{"":"Placeholders permitem que parâmetros de consulta sejam executados de maneira segura, prevenindo métodos comuns de injeção de SQL.Os parâmetros podem ser passados como um array ou objeto (referido como parâmetros nomeados).\nlocal identifier = 'license:abc123'\nlocal group = 'admin'\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?', { identifier, group })\n-- Placeholders nomeados (descontinuado)\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group', {\n group = group\n identifier = identifier\n})\nEsses placeholders são distintos de declarações preparadas, que são gerenciadas pelo servidor MySQL; você pode usar MySQL.prepare para consultas mais otimizadas e seguras."}},"/qbox":{"title":"Introdução","data":{"":"Qbox é uma framework de roleplay para FiveM criada em 27 de setembro de 2022.Começando como um fork do QBCore, seu objetivo era melhorar o QBCore mantendo a compatibilidade retroativa. \nHoje, esta framework busca ser ainda maior, utilizando os recursos da overextended para alcançar seus objetivos.","suporte--perguntas#Suporte & Perguntas":"O suporte para o Qbox é fornecido pela comunidade nos canais de suporte do Discord do Qbox.Felizmente, o Qbox conta com uma ótima comunidade com experiências variadas.\nIncentivamos todos a se ajudarem de forma amigável e respeitosa.","convertendo-do-qbcore#Convertendo do QBCore":"Já tem um servidor que usa o QBCore? Sem problemas!\nO Qbox é compatível com quase todos os scripts do QBCore, com algumas exceções (saiba mais na FAQ).Pretende migrar para o Qbox para poder utilizar suas novas e modernas funções e recursos?\nAprenda como converter seus recursos para o Qbox em Convertendo do QBCore.","nota-para-desenvolvedores#Nota para Desenvolvedores":"Pretende utilizar o qbx_core no seu próximo recurso?\nCertifique-se de ler o Guia do Desenvolvedor para aprender sobre os princípios que ajudam a evitar más práticas e a melhorar sua experiência de desenvolvimento.","contribuindo-com-o-qbox#Contribuindo com o Qbox":"Contribuições são sempre bem-vindas, mas preferimos qualidade à quantidade!\nPor favor, leia nossas diretrizes de contribuição para aprender a melhor forma de contribuir.","perguntas-frequentes#Perguntas Frequentes":"Confira a FAQ para aprender mais sobre o Qbox."}},"/resources":{"title":"Resources","data":{}},"/overextended/oxmysql/Functions/update":{"title":"update","data":{"":"Retorna o número de linhas afetadas pela consulta.","promise#Promise":"local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {\n newName, identifier\n})\nprint(affectedRows)\nconst affectedRows = await MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [\n newName, identifier\n])\nconsole.log(affectedRows)\nAliases\nMySQL.Sync.execute\nexports.ghmattimysql.executeSync\nexports.oxmysql.update_async","callback#Callback":"MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', {\n newName, identifier\n}, function(affectedRows)\n print(affectedRows)\nend)\nMySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [\n newName, identifier\n], (affectedRows) => {\n console.log(affectedRows)\n})\nAliases\nMySQL.Async.execute\nexports.ghmattimysql.execute\nexports.oxmysql.update"}},"/guides/nodejs":{"title":"Node.js","data":{"":"Node.js é um runtime de JavaScript utilizado para criar aplicações. No contexto do FiveM, ele é necessário para agrupar recursos em um único pacote que pode ser executado tanto no servidor quanto no cliente.\nBaixe e instale a versão LTS do Node.js.\nAbra um terminal de linha de comando (ex.: Terminal, Prompt de Comando).\nDigite node --version para confirmar a instalação com sucesso."}},"/guides/vscode":{"title":"VS Code","data":{"":"O Visual Studio Code é nosso editor recomendado ao trabalhar com Lua.","extensões-recomendadas#Extensões recomendadas":"As extensões permitem que você adicione linguagens, depuradores e outras ferramentas ao VS Code, melhorando sua experiência como desenvolvedor.","sumnekolua#sumneko.lua":"Cuidado ao usar essa extensão com SSH no vsCode. Ela é conhecida por consumir RAM e CPU excessivamente no servidor e pode travá-lo.\nO Lua Language Server fornece numerosos recursos de linguagem para tornar o desenvolvimento mais fácil e rápido, por exemplo:\nAnotações\nAutocompletar\nFormatação de código\nDiagnósticos/avisos\nVerificação de tipo dinâmica\nVerificação de sintaxe","overextendedcfxlua-vscode#overextended.cfxlua-vscode":"Funciona junto com o Lua Language Server para fornecer declarações de função e tipo do runtime Lua da Cfx, dialeto Lua, globais de ambiente e nativos do jogo."}},"/overextended/ox_inventory/Guides/shops":{"title":"Creating Shops","data":{"":"Builtin shops are defined in data/shops.lua, and more can be added here to benefit from the built-in markers or zones support.","shop-definition#Shop definition":"{\n General = {\n name = 'Shop',\n blip = {\n id = 59,\n colour = 69,\n scale = 0.8\n },\n inventory = {\n { name = 'burger', price = 10 },\n { name = 'water', price = 10 },\n { name = 'cola', price = 10 },\n },\n locations = {\n vec3(25.7, -1347.3, 29.49),\n },\n targets = {\n -- Shop using a BoxZone\n {\n loc = vec3(25.06, -1347.32, 29.5),\n length = 0.7,\n width = 0.5,\n heading = 0.0,\n minZ = 29.5,\n maxZ = 29.9,\n distance = 1.5\n },\n -- Shop using a ped\n {\n ped = `mp_m_shopkeep_01`,\n scenario = 'WORLD_HUMAN_AA_COFFEE',\n loc = vec3(24.407, -1347.283, 28.497),\n heading = 270.311,\n },\n }\n }\n}\nname: string\nThe label to display when the shop is open.\nblip?: table\nCreates a blip with the given settings. Leave it undefined for no blip to be created.\nid: number\ncolour: number\nscale: number\ngroups?: table\nKey-value pairs of job name and minimum grade to access the shop.\n{[\"police\"] = 0, [\"ambulance\"] = 2}\ninventory: table\nname: string\nprice: number\ncurrency?: string\nItem to be used as currency.\ncount?: number\nAmount of the item in the stock.\nlicense?: string\nLicense required to purchase the item.\nmetadata?: table\ngrade?: number | number[]\nMinimal grade required to purchase the item.\nlocations?: vector3[]\nAn array of coordinates to create unique instances of the shop archetype at, using markers.\ntargets?: table[]\nAn array of target settings to create unique instances of the shop archetype at, using peds or BoxZones (PolyZone data structure).\nmodel?: number[]\nAn array of models that can be targetted to open a shop. Used for vending machines.\nTargets and model are only available when using a targeting resource like ox_target.","register-during-runtime#Register during runtime":"Shops can be added using exports.ox_inventory:RegisterShop on the server, however they cannot utilise any client-only features.\nBlips, markers, and zones will not be created.\nMust use \"locations\" and not \"targets\" to define each shop using the archetype.","example#Example":"exports.ox_inventory:RegisterShop('TestShop', {\n name = 'Test shop',\n inventory = {\n { name = 'burger', price = 10 },\n { name = 'water', price = 10 },\n { name = 'cola', price = 10 },\n },\n locations = {\n vec3(223.832962, -792.619751, 30.695190),\n },\n groups = {\n police = 0\n },\n})"}},"/overextended/ox_lib/Modules/Dui/Javascript/Client":{"title":"Client","data":{"":"Simple and centralised dui creation, supporting sending message, change url and deletion\nDui(data)\ndata: object\nurl: string\nwidth: number\nheight: number\ndebug?: boolean\nReturns:\ndui: Dui\nurl: string\nduiObject: number\nduiHandle: string\nruntimeTxd: number\ntxdObject: number\ndictName: string\ntxtName: string\nsetUrl: function(url: string)\nsendMessage: function(data: object)\nremove: function","usage-example#Usage Example":"import { Dui, cache } from '@overextended/ox_lib/client'\nconst dui = new Dui({\n\turl: `nui://${cache.resource}/web/index.html`, \n\twidth: 1920, \n\theight: 1080,\n\tdebug: true\n})\n// Change url\ndui.setUrl(\"https://google.com\")\n// Send a message\ndui.sendMessage({\n\taction: \"display\",\n\tvalue: true\n})\n// Destroy\ndui.remove()"}},"/overextended/ox_lib/Modules/Dui/Lua/Client":{"title":"Client","data":{"":"Simple and centralised dui creation, supporting sending message, change url and deletion","libduinew#lib.dui:new":"Constructs instance of Dui.\nlib.dui:new(data)\ndata: table\nurl: string\nwidth: number\nheight: number\ndebug?: boolean\nReturns:\ndui: Dui\nurl: string\nduiObject: number\nduiHandle: string\nruntimeTxd: number\ntxdObject: number\ndictName: string\ntxtName: string\nsetUrl: function(url: string)\nsendMessage: function(data: table)\nremove: function","usage-example#Usage Example":"local dui = lib.dui:new({\n\turl = (\"nui://%s/web/index.html\"):format(cache.resource), \n\twidth = 1920, \n\theight = 1080,\n\tdebug = true\n})\n-- Change url\ndui:setUrl(\"https://google.com\")\n-- Send a message\ndui:sendMessage({\n\taction = \"display\",\n\tvalue = true\n})\n-- Destroy\ndui:remove()"}},"/overextended/oxmysql/ui":{"title":"Usando a Interface de Depuração (Debug UI)","data":{"":"A interface de depuração permite que você veja facilmente todas as consultas que foram executadas pelos recursos, o tempo de resposta das consultas e as estatísticas por recurso.\nVocê deve ativar essa interface apenas durante o desenvolvimento, ou com um número pequeno de jogadores - para servidores maiores, consulte o registro nativo de MySQL.Antes de usar a interface, você deve garantir que tenha o convar mysql_ui configurado como true:\nset mysql_ui true\nTambém certifique-se de que você tenha permissão de acesso command ou command.mysql, então você deverá ser capaz de usar o comando mysql no jogo.\nVocê não precisa ter o mysql_debug ativado para usar a interface de depuração.\nPágina principal\nA página principal exibe os recursos que executaram consultas, onde você pode filtrá-los através de uma barra de pesquisa. Além disso, mostra seus dados gerais junto a um gráfico de pizza, que indica quais recursos consumiram mais tempo de consulta.Página do recurso\nA página do recurso mostra todas as consultas e seu tempo de execução em uma tabela, das quais o recurso executou, juntamente com a quantidade total de consultas, tempo de execução e consultas lentas para o recurso selecionado.As colunas podem ser ordenadas por ordem crescente ou decrescente, e ao passar o mouse sobre uma consulta, você verá a consulta completa em uma dica de ferramenta.\nConsultas que excedem o valor de mysql_slow_query_warning (por padrão 150ms) são exibidas em laranja.\nPara fins de demonstração, o convar mysql_slow_query_warning foi configurado para 5ms aqui."}},"/overextended/oxmysql/benchmark":{"title":"Benchmark","data":{"":"A medição de desempenho é baseada no tempo gasto para receber uma resposta dos exports.\nAs velocidades reais das consultas serão relatadas na interface de depuração e no console do servidor com mysql_debug ativado.As velocidades podem variar consideravelmente com base no hardware do sistema, configurações do banco de dados, versão do banco de dados e a carga de trabalho atual.","script#Script":"Este script testa os tempos de exportação ao usar o runtime Lua 5.4 com a sintaxe lib/MySQL.lua.\nlocal function execQuery(msg, fn, query, parameters)\n local start = os.nanotime()\n local result = fn(query, parameters)\n local finish = os.nanotime()\n print()\n print(msg)\n print('Executou ' .. (type(query) == 'string' and 1 or #query) .. ' consultas em ' .. (finish - start) / 1e6 .. 'ms')\n return result\nend\nCreateThread(function()\n local initTable = {\n 'DROP TABLE `test_table`',\n [[CREATE TABLE `test_table` (\n `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `username` VARCHAR(50) NOT NULL DEFAULT '0',\n `identifier` VARCHAR(50) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n )]],\n 'TRUNCATE `test_table`',\n 'ALTER TABLE `test_table` AUTO_INCREMENT = 1',\n }\n execQuery('Inicializando test_table', MySQL.transaction.await, initTable)\n local queries = {\n { query = 'INSERT INTO `test_table` (identifier) VALUES (?)', values = { 'abcdef1' }},\n { query = 'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()', values = { 'bob1' }},\n }\n execQuery('{ query: string, values: string }[] transação', MySQL.transaction.await, queries)\n queries = {\n { 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef2' } },\n { 'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()', { 'bob2' } },\n }\n execQuery('[string, any[]][] transação', MySQL.transaction.await, queries)\n queries = {\n 'INSERT INTO `test_table` (identifier) VALUES (\"abcdef3\")',\n 'UPDATE `test_table` SET `username` = \"bob3\" WHERE `id` = LAST_INSERT_ID()',\n }\n execQuery('string[] transação', MySQL.transaction.await, queries)\n local insertUsers = {}\n for i = 1, 10000 do\n insertUsers[i] = { 'INSERT INTO `test_table` (username, identifier) VALUES (?, ?)',\n { 'Testuser_' .. i, 'abcdef' .. i } }\n end\n execQuery('inserir ' .. #insertUsers .. ' test users', MySQL.transaction.await, insertUsers)\n local selectUserIds = {}\n for i = 1, 10000 do\n if i % 4 == 0 then\n selectUserIds[math.tointeger(i / 4)] = { 'abcdef' .. i }\n end\n end\n execQuery('selecionar todo 4º userid', MySQL.prepare.await, 'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1', selectUserIds)\n local insertid = execQuery('inserir', MySQL.insert.await, 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef' })\n local update = execQuery('atualizar', MySQL.update.await, 'UPDATE `test_table` SET `username` = ? WHERE `id` = ?', { 'bobby', insertid })\n local scalar = execQuery('escala', MySQL.scalar.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })\n local single = execQuery('único', MySQL.single.await, 'SELECT * FROM `test_table` WHERE `id` = ?', { insertid })\n print(json.encode(execQuery('preparar', MySQL.prepare.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })))\n print(insertid, update, scalar, json.encode(single))\n execQuery('consulta', MySQL.query.await, 'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1', { 419 })\nend)","resultados#Resultados":"[script:test] initialise test_table\n[script:test] Executed 4 queries in 42.7789ms\n[script:test]\n[script:test] { query: string, values: string }[] transaction\n[script:test] Executed 2 queries in 8.0145ms\n[script:test]\n[script:test] [string, any[]][] transaction\n[script:test] Executed 2 queries in 4.0278ms\n[script:test]\n[script:test] string[] transaction\n[script:test] Executed 2 queries in 3.4743ms\n[script:test]\n[script:test] insert 10000 test users\n[script:test] Executed 10000 queries in 2064.211ms\n[script:test]\n[script:test] select every 4th userid\n[script:test] Executed 1 queries in 2803.7134ms\n[script:test]\n[script:test] insert\n[script:test] Executed 1 queries in 2.8743ms\n[script:test]\n[script:test] update\n[script:test] Executed 1 queries in 2.8675ms\n[script:test]\n[script:test] scalar\n[script:test] Executed 1 queries in 1.5387ms\n[script:test]\n[script:test] single\n[script:test] Executed 1 queries in 1.3389ms\n[script:test]\n[script:test] prepare\n[script:test] Executed 1 queries in 1.6577ms\n[script:test] \"bobby\"\n[script:test] 10004 1 bobby {\"identifier\":\"abcdef\",\"username\":\"bobby\",\"id\":10004}\n[script:test]\n[script:test] query\n[script:test] Executed 1 queries in 1.1588ms"}}} \ No newline at end of file diff --git a/_next/static/chunks/pages/_app-c203bb459e386b5c.js b/_next/static/chunks/pages/_app-78117360ab8dcf19.js similarity index 80% rename from _next/static/chunks/pages/_app-c203bb459e386b5c.js rename to _next/static/chunks/pages/_app-78117360ab8dcf19.js index aea469120a..77cf1cb62d 100644 --- a/_next/static/chunks/pages/_app-c203bb459e386b5c.js +++ b/_next/static/chunks/pages/_app-78117360ab8dcf19.js @@ -17,7 +17,7 @@ --nextra-primary-hue: ${B}deg; --nextra-primary-saturation: ${K}%; } - `}),j]})]})}var nE={link:(0,eE.Z)("nx-flex nx-max-w-[50%] nx-items-center nx-gap-1 nx-py-4 nx-text-base nx-font-medium nx-text-gray-600 nx-transition-colors [word-break:break-word] hover:nx-text-primary-600 dark:nx-text-gray-300 md:nx-text-lg"),icon:(0,eE.Z)("nx-inline nx-h-5 nx-shrink-0")},NavLinks=({flatDirectories:n,currentIndex:a})=>{let g=useConfig(),v=g.navigation,j="boolean"==typeof v?{prev:v,next:v}:v,z=j.prev&&n[a-1],H=j.next&&n[a+1];return(z&&!z.isUnderCurrentDocsTree&&(z=!1),H&&!H.isUnderCurrentDocsTree&&(H=!1),z||H)?(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-mb-8 nx-flex nx-items-center nx-border-t nx-pt-8 dark:nx-border-neutral-800","contrast-more:nx-border-neutral-400 dark:contrast-more:nx-border-neutral-400","print:nx-hidden"),children:[z&&(0,ej.jsxs)(nw,{href:z.route,title:z.title,className:(0,eE.Z)(nE.link,"ltr:nx-pr-4 rtl:nx-pl-4"),children:[(0,ej.jsx)(eM.LZ,{className:(0,eE.Z)(nE.icon,"ltr:nx-rotate-180")}),z.title]}),H&&(0,ej.jsxs)(nw,{href:H.route,title:H.title,className:(0,eE.Z)(nE.link,"ltr:nx-ml-auto ltr:nx-pl-4 ltr:nx-text-right rtl:nx-mr-auto rtl:nx-pr-4 rtl:nx-text-left"),children:[H.title,(0,ej.jsx)(eM.LZ,{className:(0,eE.Z)(nE.icon,"rtl:nx-rotate-180")})]})]}):null},nI={link:(0,eE.Z)("nx-text-sm contrast-more:nx-text-gray-700 contrast-more:dark:nx-text-gray-100"),active:(0,eE.Z)("nx-font-medium nx-subpixel-antialiased"),inactive:(0,eE.Z)("nx-text-gray-600 hover:nx-text-gray-800 dark:nx-text-gray-400 dark:hover:nx-text-gray-200")};function NavbarMenu({className:n,menu:a,children:g}){let{items:v}=a,j=Object.fromEntries((a.children||[]).map(n=>[n.name,n]));return(0,ej.jsx)("div",{className:"nx-relative nx-inline-block",children:(0,ej.jsxs)(ne,{children:[(0,ej.jsx)(ne.Button,{className:(0,eE.Z)(n,"-nx-ml-2 nx-hidden nx-items-center nx-whitespace-nowrap nx-rounded nx-p-2 md:nx-inline-flex",nI.inactive),children:g}),(0,ej.jsx)(rI,{leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ej.jsx)(ne.Items,{className:"nx-absolute nx-right-0 nx-z-20 nx-mt-1 nx-max-h-64 nx-min-w-full nx-overflow-auto nx-rounded-md nx-ring-1 nx-ring-black/5 nx-bg-white nx-py-1 nx-text-sm nx-shadow-lg dark:nx-ring-white/20 dark:nx-bg-neutral-800",children:Object.entries(v||{}).map(([n,g])=>{var v;return(0,ej.jsx)(ne.Item,{children:(0,ej.jsx)(nw,{href:g.href||(null==(v=j[n])?void 0:v.route)||a.route+"/"+n,className:(0,eE.Z)("nx-relative nx-hidden nx-w-full nx-select-none nx-whitespace-nowrap nx-text-gray-600 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-100 md:nx-inline-block","nx-py-1.5 nx-transition-colors ltr:nx-pl-3 ltr:nx-pr-9 rtl:nx-pr-3 rtl:nx-pl-9"),newWindow:g.newWindow,children:g.title||n})},n)})})})]})})}var nT=Object.create(null),nM=(0,eP.createContext)(null),nA=(0,eP.createContext)(null),nN=(0,eP.createContext)(0),nR=(0,eP.memo)(function(n){let a=(0,eP.useContext)(nN);return(0,ej.jsx)(nN.Provider,{value:a+1,children:(0,ej.jsx)(FolderImpl,__spreadValues({},n))})}),nD={link:(0,eE.Z)("nx-flex nx-rounded nx-px-2 nx-py-1.5 nx-text-sm nx-transition-colors [word-break:break-word]","nx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:nx-border"),inactive:(0,eE.Z)("nx-text-gray-500 hover:nx-bg-gray-100 hover:nx-text-gray-900","dark:nx-text-neutral-400 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50","contrast-more:nx-text-gray-900 contrast-more:dark:nx-text-gray-50","contrast-more:nx-border-transparent contrast-more:hover:nx-border-gray-900 contrast-more:dark:hover:nx-border-gray-50"),active:(0,eE.Z)("nx-bg-primary-100 nx-font-semibold nx-text-primary-800 dark:nx-bg-primary-400/10 dark:nx-text-primary-600","contrast-more:nx-border-primary-500 contrast-more:dark:nx-border-primary-500"),list:(0,eE.Z)("nx-flex nx-flex-col nx-gap-1"),border:(0,eE.Z)("nx-relative before:nx-absolute before:nx-inset-y-1",'before:nx-w-px before:nx-bg-gray-200 before:nx-content-[""] dark:before:nx-bg-neutral-800',"ltr:nx-pl-3 ltr:before:nx-left-0 rtl:nx-pr-3 rtl:before:nx-right-0")};function FolderImpl({item:n,anchors:a}){let g=useFSRoute(),[v]=g.split("#"),j=[v,v+"/"].includes(n.route+"/"),z=j||v.startsWith(n.route+"/"),H=(0,eP.useContext)(nM),B=!!(null==H?void 0:H.startsWith(n.route+"/")),W=(0,eP.useContext)(nN),{setMenu:K}=useMenu(),ee=useConfig(),{theme:et}=n,er=void 0===nT[n.route]?j||z||B||(et&&"collapsed"in et?!et.collapsed:W{ee.sidebar.autoCollapse?z&&B?nT[n.route]=!0:delete nT[n.route]:(z||B)&&(nT[n.route]=!0)},[z,B,n.route,ee.sidebar.autoCollapse]),"menu"===n.type){let a=Object.fromEntries((n.children||[]).map(n=>[n.name,n]));n.children=Object.entries(n.items||{}).map(([g,v])=>{let j=a[g]||__spreadProps(__spreadValues({name:g},"locale"in n&&{locale:n.locale}),{route:n.route+"/"+g});return __spreadValues(__spreadValues({},j),v)})}let eo="withIndexPage"in n&&n.withIndexPage,ei=eo?nw:"button";return(0,ej.jsxs)("li",{className:(0,eE.Z)({open:er,active:j}),children:[(0,ej.jsxs)(ei,{href:eo?n.route:void 0,className:(0,eE.Z)("nx-items-center nx-justify-between nx-gap-2",!eo&&"nx-text-left nx-w-full",nD.link,j?nD.active:nD.inactive),onClick:a=>{let g=["svg","path"].includes(a.target.tagName.toLowerCase());if(g&&a.preventDefault(),eo){j||g?nT[n.route]=!er:(nT[n.route]=!0,K(!1)),en({});return}j||(nT[n.route]=!er,en({}))},children:[renderComponent(ee.sidebar.titleComponent,{title:n.title,type:n.type,route:n.route}),(0,ej.jsx)(eM.LZ,{className:"nx-h-[18px] nx-min-w-[18px] nx-rounded-sm nx-p-0.5 hover:nx-bg-gray-800/5 dark:hover:nx-bg-gray-100/5",pathClassName:(0,eE.Z)("nx-origin-center nx-transition-transform rtl:-nx-rotate-180",er&&"ltr:nx-rotate-90 rtl:nx-rotate-[-270deg]")})]}),(0,ej.jsx)(Collapse,{className:"ltr:nx-pr-0 rtl:nx-pl-0 nx-pt-1",isOpen:er,children:Array.isArray(n.children)?(0,ej.jsx)(Menu2,{className:(0,eE.Z)(nD.border,"ltr:nx-ml-3 rtl:nx-mr-3"),directories:n.children,base:n.route,anchors:a}):null})]})}function Separator({title:n}){let a=useConfig();return(0,ej.jsx)("li",{className:(0,eE.Z)("[word-break:break-word]",n?"nx-mt-5 nx-mb-2 nx-px-2 nx-py-1.5 nx-text-sm nx-font-semibold nx-text-gray-900 first:nx-mt-0 dark:nx-text-gray-100":"nx-my-4"),children:n?renderComponent(a.sidebar.titleComponent,{title:n,type:"separator",route:""}):(0,ej.jsx)("hr",{className:"nx-mx-2 nx-border-t nx-border-gray-200 dark:nx-border-primary-100/10"})})}function File({item:n,anchors:a}){let g=useFSRoute(),v=(0,eP.useContext)(nA),j=n.route&&[g,g+"/"].includes(n.route+"/"),z=useActiveAnchor(),{setMenu:H}=useMenu(),B=useConfig();return"separator"===n.type?(0,ej.jsx)(Separator,{title:n.title}):(0,ej.jsxs)("li",{className:(0,eE.Z)(nD.list,{active:j}),children:[(0,ej.jsx)(nw,{href:n.href||n.route,newWindow:n.newWindow,className:(0,eE.Z)(nD.link,j?nD.active:nD.inactive),onClick:()=>{H(!1)},onFocus:()=>{null==v||v(n.route)},onBlur:()=>{null==v||v(null)},children:renderComponent(B.sidebar.titleComponent,{title:n.title,type:n.type,route:n.route})}),j&&a.length>0&&(0,ej.jsx)("ul",{className:(0,eE.Z)(nD.list,nD.border,"ltr:nx-ml-3 rtl:nx-mr-3"),children:a.map(({id:n,value:a})=>{var g;return(0,ej.jsx)("li",{children:(0,ej.jsx)("a",{href:`#${n}`,className:(0,eE.Z)(nD.link,'nx-flex nx-gap-2 before:nx-opacity-25 before:nx-content-["#"]',(null==(g=z[n])?void 0:g.isActive)?nD.active:nD.inactive),onClick:()=>{H(!1)},children:a})},n)})})]})}function Menu2({directories:n,anchors:a,className:g,onlyCurrentDocs:v}){return(0,ej.jsx)("ul",{className:(0,eE.Z)(nD.list,g),children:n.map(n=>!v||n.isUnderCurrentDocsTree?"menu"===n.type||n.children&&(n.children.length||!n.withIndexPage)?(0,ej.jsx)(nR,{item:n,anchors:a},n.name):(0,ej.jsx)(File,{item:n,anchors:a},n.name):null)})}function Sidebar({docsDirectories:n,flatDirectories:a,fullDirectories:g,asPopover:v=!1,headings:j,includePlaceholder:z}){let H=useConfig(),{menu:B,setMenu:W}=useMenu(),K=(0,eC.useRouter)(),[ee,et]=(0,eP.useState)(null),[er,en]=(0,eP.useState)(!0),[eo,ei]=(0,eP.useState)(!1),es=(0,eP.useMemo)(()=>j.filter(n=>2===n.depth),[j]),el=(0,eP.useRef)(null),ec=(0,eP.useRef)(null),eu=useMounted();(0,eP.useEffect)(()=>{B?document.body.classList.add("nx-overflow-hidden","md:nx-overflow-auto"):document.body.classList.remove("nx-overflow-hidden","md:nx-overflow-auto")},[B]),(0,eP.useEffect)(()=>{var n;let a=null==(n=el.current)?void 0:n.querySelector("li.active");if(a&&(window.innerWidth>767||B)){let scroll=()=>{dist_e(a,{block:"center",inline:"center",scrollMode:"always",boundary:ec.current})};B?setTimeout(scroll,300):scroll()}},[B]),(0,eP.useEffect)(()=>{W(!1)},[K.asPath,W]);let ed=H.i18n.length>0,ep=H.darkMode||ed||H.sidebar.toggleButton;return(0,ej.jsxs)(ej.Fragment,{children:[z&&v?(0,ej.jsx)("div",{className:"max-xl:nx-hidden nx-h-0 nx-w-64 nx-shrink-0"}):null,(0,ej.jsx)("div",{className:(0,eE.Z)("motion-reduce:nx-transition-none [transition:background-color_1.5s_ease]",B?"nx-fixed nx-inset-0 nx-z-10 nx-bg-black/80 dark:nx-bg-black/60":"nx-bg-transparent"),onClick:()=>W(!1)}),(0,ej.jsxs)("aside",{className:(0,eE.Z)("nextra-sidebar-container nx-flex nx-flex-col","md:nx-top-16 md:nx-shrink-0 motion-reduce:nx-transform-none","nx-transform-gpu nx-transition-all nx-ease-in-out","print:nx-hidden",er?"md:nx-w-64":"md:nx-w-20",v?"md:nx-hidden":"md:nx-sticky md:nx-self-start",B?"max-md:[transform:translate3d(0,0,0)]":"max-md:[transform:translate3d(0,-100%,0)]"),ref:ec,children:[(0,ej.jsx)("div",{className:"nx-px-4 nx-pt-4 md:nx-hidden",children:renderComponent(H.search.component,{directories:a})}),(0,ej.jsx)(nM.Provider,{value:ee,children:(0,ej.jsx)(nA.Provider,{value:n=>{et(n)},children:(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-overflow-y-auto nx-overflow-x-hidden","nx-p-4 nx-grow md:nx-h-[calc(100vh-var(--nextra-navbar-height)-var(--nextra-menu-height))]",er?"nextra-scrollbar":"no-scrollbar"),ref:el,children:[(!v||!er)&&(0,ej.jsx)(Collapse,{isOpen:er,horizontal:!0,children:(0,ej.jsx)(Menu2,{className:"nextra-menu-desktop max-md:nx-hidden",directories:n,anchors:H.toc.float?[]:es,onlyCurrentDocs:!0})}),eu&&window.innerWidth<768&&(0,ej.jsx)(Menu2,{className:"nextra-menu-mobile md:nx-hidden",directories:g,anchors:es})]})})}),ep&&(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-sticky nx-bottom-0","nx-bg-white dark:nx-bg-dark","nx-mx-4 nx-py-4 nx-shadow-[0_-12px_16px_#fff]","nx-flex nx-items-center nx-gap-2","dark:nx-border-neutral-800 dark:nx-shadow-[0_-12px_16px_#111]","contrast-more:nx-border-neutral-400 contrast-more:nx-shadow-none contrast-more:dark:nx-shadow-none",er?(0,eE.Z)(ed&&"nx-justify-end","nx-border-t"):"nx-py-4 nx-flex-wrap nx-justify-center"),"data-toggle-animation":eo?er?"show":"hide":"off",children:[(0,ej.jsx)(LocaleSwitch,{lite:!er,className:(0,eE.Z)(er?"nx-grow":"max-md:nx-grow")}),H.darkMode&&(0,ej.jsx)("div",{className:er&&!ed?"nx-grow nx-flex nx-flex-col":"",children:renderComponent(H.themeSwitch.component,{lite:!er||ed})}),H.sidebar.toggleButton&&(0,ej.jsx)("button",{title:er?"Hide sidebar":"Show sidebar",className:"max-md:nx-hidden nx-h-7 nx-rounded-md nx-transition-colors nx-text-gray-600 dark:nx-text-gray-400 nx-px-2 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",onClick:()=>{en(!er),ei(!0)},children:(0,ej.jsx)(eM.Qq,{isOpen:er})})]})]})]})}var nL="reach-skip-nav";(0,eP.forwardRef)(function(n,a){var{className:g,id:v,label:j="Skip to content",styled:z}=n,H=__objRest(n,["className","id","label","styled"]);let B=void 0===g?z?(0,eE.Z)("nx-sr-only","focus:nx-not-sr-only focus:nx-fixed focus:nx-z-50 focus:nx-m-3 focus:nx-ml-4 focus:nx-h-[calc(var(--nextra-navbar-height)-1.5rem)] focus:nx-rounded-lg focus:nx-border focus:nx-px-3 focus:nx-py-2 focus:nx-align-middle focus:nx-text-sm focus:nx-font-bold","focus:nx-text-gray-900 focus:dark:nx-text-gray-100","focus:nx-bg-white focus:dark:nx-bg-neutral-900","focus:nx-border-neutral-400 focus:dark:nx-border-neutral-800"):"":g;return(0,ej.jsx)("a",__spreadProps(__spreadValues({},H),{ref:a,href:`#${v||nL}`,className:B,"data-reach-skip-link":"",children:j}))}).displayName="SkipNavLink";var nZ=(0,eP.forwardRef)(function(n,a){var{id:g}=n,v=__objRest(n,["id"]);return(0,ej.jsx)("div",__spreadProps(__spreadValues({},v),{ref:a,id:g||nL}))});nZ.displayName="SkipNavContent";var nF=t_.strictObject({light:t_.string(),dark:t_.string(),system:t_.string()});function scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}function BackToTop({className:n}){let a=(0,eP.useRef)(null);return(0,eP.useEffect)(()=>{function toggleVisible(){var n;let{scrollTop:g}=document.documentElement;null==(n=a.current)||n.classList.toggle("nx-opacity-0",g<300)}return window.addEventListener("scroll",toggleVisible),()=>{window.removeEventListener("scroll",toggleVisible)}},[]),(0,ej.jsxs)("button",{ref:a,"aria-hidden":"true",onClick:scrollToTop,className:(0,eE.Z)("nx-flex nx-items-center nx-gap-1.5 nx-transition nx-opacity-0",n),children:["Scroll to top",(0,ej.jsx)(eM.LZ,{className:"-nx-rotate-90 nx-w-3.5 nx-h-3.5 nx-border nx-rounded-full nx-border-current"})]})}var nV=(0,eE.Z)("nx-text-xs nx-font-medium nx-text-gray-500 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-100","contrast-more:nx-text-gray-800 contrast-more:dark:nx-text-gray-50");function MatchSorterSearch({className:n,directories:a}){let[g,v]=(0,eP.useState)(""),j=(0,eP.useMemo)(()=>g?matchSorter(a,g,{keys:["title"]}).map(({route:n,title:a})=>({id:n+a,route:n,children:(0,ej.jsx)(nk,{value:a,match:g})})):[],[g,a]);return(0,ej.jsx)(Search,{value:g,onChange:v,className:n,overlayClassName:"nx-w-full",results:j})}var nU="en-US",nz="undefined"!=typeof window;function isFunction(n){return"function"==typeof n}var nH=t_.array(t_.strictObject({direction:t_.enum(["ltr","rtl"]).optional(),locale:t_.string(),text:t_.string()})),nB=[function(n){return null==n||"string"==typeof n||isFunction(n)||(0,eP.isValidElement)(n)},{message:"Must be React.ReactNode or React.FC"}],nq=[isFunction,{message:"Must be React.FC"}];t_.strictObject({banner:t_.strictObject({dismissible:t_.boolean(),key:t_.string(),text:t_.custom(...nB).optional()}),chat:t_.strictObject({icon:t_.custom(...nB),link:t_.string().startsWith("https://").optional()}),components:t_.record(t_.custom(...nq)).optional(),darkMode:t_.boolean(),direction:t_.enum(["ltr","rtl"]),docsRepositoryBase:t_.string().startsWith("https://"),editLink:t_.strictObject({component:t_.custom(...nq).or(t_.null()),text:t_.custom(...nB)}),faviconGlyph:t_.string().optional(),feedback:t_.strictObject({content:t_.custom(...nB),labels:t_.string(),useLink:t_.function().returns(t_.string())}),footer:t_.strictObject({component:t_.custom(...nB),text:t_.custom(...nB)}),gitTimestamp:t_.custom(...nB),head:t_.custom(...nB),i18n:nH,logo:t_.custom(...nB),logoLink:t_.boolean().or(t_.string()),main:t_.custom(...nq).optional(),navbar:t_.strictObject({component:t_.custom(...nB),extraContent:t_.custom(...nB).optional()}),navigation:t_.boolean().or(t_.strictObject({next:t_.boolean(),prev:t_.boolean()})),nextThemes:t_.strictObject({defaultTheme:t_.string(),forcedTheme:t_.string().optional(),storageKey:t_.string()}),notFound:t_.strictObject({content:t_.custom(...nB),labels:t_.string()}),primaryHue:t_.number().or(t_.strictObject({dark:t_.number(),light:t_.number()})),primarySaturation:t_.number().or(t_.strictObject({dark:t_.number(),light:t_.number()})),project:t_.strictObject({icon:t_.custom(...nB),link:t_.string().startsWith("https://").optional()}),search:t_.strictObject({component:t_.custom(...nB),emptyResult:t_.custom(...nB),error:t_.string().or(t_.function().returns(t_.string())),loading:t_.custom(...nB),placeholder:t_.string().or(t_.function().returns(t_.string()))}),serverSideError:t_.strictObject({content:t_.custom(...nB),labels:t_.string()}),sidebar:t_.strictObject({autoCollapse:t_.boolean().optional(),defaultMenuCollapseLevel:t_.number().min(1).int(),titleComponent:t_.custom(...nB),toggleButton:t_.boolean()}),themeSwitch:t_.strictObject({component:t_.custom(...nB),useOptions:nF.or(t_.function().returns(nF))}),toc:t_.strictObject({backToTop:t_.boolean(),component:t_.custom(...nB),extraContent:t_.custom(...nB),float:t_.boolean(),headingComponent:t_.custom(...nq).optional(),title:t_.custom(...nB)}),useNextSeoProps:t_.custom(isFunction)}).deepPartial().extend({i18n:nH.optional()});var n$={"en-US":"Loading",fr:"Сhargement",ru:"Загрузка","zh-CN":"正在加载"},nG={"en-US":"Search documentation",fr:"Rechercher documents",ru:"Поиск документации","zh-CN":"搜索文档"},nW={banner:{dismissible:!0,key:"nextra-banner"},chat:{icon:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(eM.D7,{}),(0,ej.jsx)("span",{className:"nx-sr-only",children:"Discord"})]})},darkMode:!0,direction:"ltr",docsRepositoryBase:"https://github.com/shuding/nextra",editLink:{component:function({className:n,filePath:a,children:g}){let v=function(n=""){let a=useConfig(),g=tV()(a.docsRepositoryBase||"");if(!g)throw Error("Invalid `docsRepositoryBase` URL!");return`${g.href}/${n}`}(a);return v?(0,ej.jsx)(nw,{className:n,href:v,children:g}):null},text:"Edit this page"},feedback:{content:"Question? Give us feedback →",labels:"feedback",useLink(){let n=useConfig();return getGitIssueUrl({labels:n.feedback.labels,repository:n.docsRepositoryBase,title:`Feedback for \u201C${n.title}\u201D`})}},footer:{component:function({menu:n}){let a=useConfig();return(0,ej.jsxs)("footer",{className:"nx-bg-gray-100 nx-pb-[env(safe-area-inset-bottom)] dark:nx-bg-neutral-900 print:nx-bg-transparent",children:[(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex nx-max-w-[90rem] nx-gap-2 nx-py-2 nx-px-4",n&&(a.i18n.length>0||a.darkMode)?"nx-flex":"nx-hidden"),children:[(0,ej.jsx)(LocaleSwitch,{}),a.darkMode&&renderComponent(a.themeSwitch.component)]}),(0,ej.jsx)("hr",{className:"dark:nx-border-neutral-800"}),(0,ej.jsx)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex nx-max-w-[90rem] nx-justify-center nx-py-12 nx-text-gray-600 dark:nx-text-gray-400 md:nx-justify-start","nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]"),children:renderComponent(a.footer.text)})]})},text:`MIT ${new Date().getFullYear()} \xa9 Nextra.`},gitTimestamp:function({timestamp:n}){let{locale:a=nU}=(0,eC.useRouter)();return(0,ej.jsxs)(ej.Fragment,{children:["Last updated on"," ",(0,ej.jsx)("time",{dateTime:n.toISOString(),children:n.toLocaleDateString(a,{day:"numeric",month:"long",year:"numeric"})})]})},head:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("meta",{name:"msapplication-TileColor",content:"#fff"}),(0,ej.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ej.jsx)("meta",{name:"description",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,ej.jsx)("meta",{name:"twitter:site",content:"@shuding_"}),(0,ej.jsx)("meta",{property:"og:title",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{property:"og:description",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{name:"apple-mobile-web-app-title",content:"Nextra"})]}),i18n:[],logo:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("span",{className:"nx-font-extrabold",children:"Nextra"}),(0,ej.jsx)("span",{className:"nx-ml-2 nx-hidden nx-font-normal nx-text-gray-600 md:nx-inline",children:"The Next Docs Builder"})]}),logoLink:!0,navbar:{component:function({flatDirectories:n,items:a}){let g=useConfig(),v=useFSRoute(),{menu:j,setMenu:z}=useMenu();return(0,ej.jsxs)("div",{className:"nextra-nav-container nx-sticky nx-top-0 nx-z-20 nx-w-full nx-bg-transparent print:nx-hidden",children:[(0,ej.jsx)("div",{className:(0,eE.Z)("nextra-nav-container-blur","nx-pointer-events-none nx-absolute nx-z-[-1] nx-h-full nx-w-full nx-bg-white dark:nx-bg-dark","nx-shadow-[0_2px_4px_rgba(0,0,0,.02),0_1px_0_rgba(0,0,0,.06)] dark:nx-shadow-[0_-1px_0_rgba(255,255,255,.1)_inset]","contrast-more:nx-shadow-[0_0_0_1px_#000] contrast-more:dark:nx-shadow-[0_0_0_1px_#fff]")}),(0,ej.jsxs)("nav",{className:"nx-mx-auto nx-flex nx-h-[var(--nextra-navbar-height)] nx-max-w-[90rem] nx-items-center nx-justify-end nx-gap-2 nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]",children:[g.logoLink?(0,ej.jsx)(nw,{href:"string"==typeof g.logoLink?g.logoLink:"/",className:"nx-flex nx-items-center hover:nx-opacity-75 ltr:nx-mr-auto rtl:nx-ml-auto",children:renderComponent(g.logo)}):(0,ej.jsx)("div",{className:"nx-flex nx-items-center ltr:nx-mr-auto rtl:nx-ml-auto",children:renderComponent(g.logo)}),a.map(n=>{if("hidden"===n.display)return null;if("menu"===n.type)return(0,ej.jsxs)(NavbarMenu,{className:(0,eE.Z)(nI.link,"nx-flex nx-gap-1",nI.inactive),menu:n,children:[n.title,(0,ej.jsx)(eM.LZ,{className:"nx-h-[18px] nx-min-w-[18px] nx-rounded-sm nx-p-0.5",pathClassName:"nx-origin-center nx-transition-transform nx-rotate-90"})]},n.title);let a=n.href||n.route||"#";n.children&&(a=(n.withIndexPage?n.route:n.firstChildRoute)||a);let g=n.route===v||v.startsWith(n.route+"/");return(0,ej.jsxs)(nw,{href:a,className:(0,eE.Z)(nI.link,"nx-relative -nx-ml-2 nx-hidden nx-whitespace-nowrap nx-p-2 md:nx-inline-block",!g||n.newWindow?nI.inactive:nI.active),newWindow:n.newWindow,"aria-current":!n.newWindow&&g,children:[(0,ej.jsx)("span",{className:"nx-absolute nx-inset-x-0 nx-text-center",children:n.title}),(0,ej.jsx)("span",{className:"nx-invisible nx-font-medium",children:n.title})]},a)}),renderComponent(g.search.component,{directories:n,className:"nx-hidden md:nx-inline-block mx-min-w-[200px]"}),g.project.link?(0,ej.jsx)(nw,{className:"nx-p-2 nx-text-current",href:g.project.link,newWindow:!0,children:renderComponent(g.project.icon)}):null,g.chat.link?(0,ej.jsx)(nw,{className:"nx-p-2 nx-text-current",href:g.chat.link,newWindow:!0,children:renderComponent(g.chat.icon)}):null,renderComponent(g.navbar.extraContent),(0,ej.jsx)("button",{type:"button","aria-label":"Menu",className:"nextra-hamburger -nx-mr-2 nx-rounded nx-p-2 active:nx-bg-gray-400/20 md:nx-hidden",onClick:()=>z(!j),children:(0,ej.jsx)(eM.Oq,{className:(0,eE.Z)({open:j})})})]})]})}},navigation:!0,nextThemes:{defaultTheme:"system",storageKey:"theme"},notFound:{content:"Submit an issue about broken link →",labels:"bug"},primaryHue:{dark:204,light:212},primarySaturation:{dark:100,light:100},project:{icon:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(eM.fy,{}),(0,ej.jsx)("span",{className:"nx-sr-only",children:"GitHub"})]})},search:{component:function({className:n,directories:a}){let g=useConfig();return g.flexsearch?(0,ej.jsx)(Flexsearch,{className:n}):(0,ej.jsx)(MatchSorterSearch,{className:n,directories:a})},emptyResult:(0,ej.jsx)("span",{className:"nx-block nx-select-none nx-p-8 nx-text-center nx-text-sm nx-text-gray-400",children:"No results found."}),error:"Failed to load search index.",loading:function(){let{locale:n,defaultLocale:a=nU}=(0,eC.useRouter)(),g=n&&n$[n]||n$[a];return(0,ej.jsxs)(ej.Fragment,{children:[g,"…"]})},placeholder:function(){let{locale:n,defaultLocale:a=nU}=(0,eC.useRouter)(),g=n&&nG[n]||nG[a];return`${g}\u2026`}},serverSideError:{content:"Submit an issue about error in url →",labels:"bug"},sidebar:{defaultMenuCollapseLevel:2,titleComponent:({title:n})=>(0,ej.jsx)(ej.Fragment,{children:n}),toggleButton:!1},themeSwitch:{component:function({lite:n,className:a}){let{setTheme:g,resolvedTheme:v,theme:j=""}=y(),z=useMounted(),H=useConfig().themeSwitch,B=z&&"dark"===v?eM.kL:eM.NW,W="function"==typeof H.useOptions?H.useOptions():H.useOptions;return(0,ej.jsx)(Select,{className:a,title:"Change theme",options:[{key:"light",name:W.light},{key:"dark",name:W.dark},{key:"system",name:W.system}],onChange:n=>{g(n.key)},selected:{key:j,name:(0,ej.jsxs)("div",{className:"nx-flex nx-items-center nx-gap-2 nx-capitalize",children:[(0,ej.jsx)(B,{}),(0,ej.jsx)("span",{className:n?"md:nx-hidden":"",children:z?W[j]:W.light})]})}})},useOptions(){let{locale:n}=(0,eC.useRouter)();return"zh-CN"===n?{dark:"深色主题",light:"浅色主题",system:"系统默认"}:{dark:"Dark",light:"Light",system:"System"}}},toc:{backToTop:!1,component:function({headings:n,filePath:a}){var g;let v=useActiveAnchor(),j=useConfig(),z=(0,eP.useRef)(null),H=(0,eP.useMemo)(()=>n.filter(n=>n.depth>1),[n]),B=H.length>0,W=!!(j.feedback.content||j.editLink.component||j.toc.extraContent),K=null==(g=Object.entries(v).find(([,{isActive:n}])=>n))?void 0:g[0];return(0,eP.useEffect)(()=>{var n;if(!K)return;let a=null==(n=z.current)?void 0:n.querySelector(`li > a[href="#${K}"]`);a&&dist_e(a,{behavior:"smooth",block:"center",inline:"center",scrollMode:"always",boundary:z.current})},[K]),(0,ej.jsxs)("div",{ref:z,className:(0,eE.Z)("nextra-scrollbar nx-sticky nx-top-16 nx-overflow-y-auto nx-pr-4 nx-pt-6 nx-text-sm [hyphens:auto]","nx-max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:-nx-mr-4 rtl:-nx-ml-4"),children:[B&&(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("p",{className:"nx-mb-4 nx-font-semibold nx-tracking-tight",children:renderComponent(j.toc.title)}),(0,ej.jsx)("ul",{children:H.map(({id:n,value:a,depth:g})=>{var z,H,B,W;return(0,ej.jsx)("li",{className:"nx-my-2 nx-scroll-my-6 nx-scroll-py-6",children:(0,ej.jsx)("a",{href:`#${n}`,className:(0,eE.Z)({2:"nx-font-semibold",3:"ltr:nx-pl-4 rtl:nx-pr-4",4:"ltr:nx-pl-8 rtl:nx-pr-8",5:"ltr:nx-pl-12 rtl:nx-pr-12",6:"ltr:nx-pl-16 rtl:nx-pr-16"}[g],"nx-inline-block",(null==(z=v[n])?void 0:z.isActive)?"nx-text-primary-600 nx-subpixel-antialiased contrast-more:!nx-text-primary-600":"nx-text-gray-500 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-300","contrast-more:nx-text-gray-900 contrast-more:nx-underline contrast-more:dark:nx-text-gray-50 nx-w-full nx-break-words"),children:null!=(W=null==(B=(H=j.toc).headingComponent)?void 0:B.call(H,{id:n,children:a}))?W:a})},n)})})]}),W&&(0,ej.jsxs)("div",{className:(0,eE.Z)(B&&"nx-mt-8 nx-border-t nx-bg-white nx-pt-8 nx-shadow-[0_-12px_16px_white] dark:nx-bg-dark dark:nx-shadow-[0_-12px_16px_#111]","nx-sticky nx-bottom-0 nx-flex nx-flex-col nx-items-start nx-gap-2 nx-pb-8 dark:nx-border-neutral-800","contrast-more:nx-border-t contrast-more:nx-border-neutral-400 contrast-more:nx-shadow-none contrast-more:dark:nx-border-neutral-400"),children:[j.feedback.content?(0,ej.jsx)(nw,{className:nV,href:j.feedback.useLink(),newWindow:!0,children:renderComponent(j.feedback.content)}):null,renderComponent(j.editLink.component,{filePath:a,className:nV,children:renderComponent(j.editLink.text)}),renderComponent(j.toc.extraContent),j.toc.backToTop&&(0,ej.jsx)(BackToTop,{className:nV})]})]})},float:!0,title:"On This Page"},useNextSeoProps:()=>({titleTemplate:"%s – Nextra"})},nK=Object.entries(nW).map(([n,a])=>{let g=a&&"object"==typeof a&&!Array.isArray(a)&&!(0,eP.isValidElement)(a);if(g)return n}).filter(Boolean);if(nz){let n;window.addEventListener("resize",()=>{document.body.classList.add("resizing"),clearTimeout(n),n=setTimeout(()=>{document.body.classList.remove("resizing")},200)})}function HeadingLink(n){var{tag:a,context:g,children:v,id:j,className:z}=n,H=__objRest(n,["tag","context","children","id","className"]);let B=useSetActiveAnchor(),W=useSlugs(),K=useIntersectionObserver(),ee=(0,eP.useRef)(null);return(0,eP.useEffect)(()=>{if(!j)return;let n=ee.current;if(n)return W.set(n,[j,g.index+=1]),null==K||K.observe(n),()=>{null==K||K.disconnect(),W.delete(n),B(n=>{let a=__spreadValues({},n);return delete a[j],a})}},[j,g,W,K,B]),(0,ej.jsxs)(a,__spreadProps(__spreadValues({className:"sr-only"===z?"nx-sr-only":(0,eE.Z)("nx-font-semibold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100",{h2:"nx-mt-10 nx-border-b nx-pb-1 nx-text-3xl nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400",h3:"nx-mt-8 nx-text-2xl",h4:"nx-mt-8 nx-text-xl",h5:"nx-mt-8 nx-text-lg",h6:"nx-mt-8 nx-text-base"}[a])},H),{children:[v,j&&(0,ej.jsx)("a",{href:`#${j}`,id:j,className:"subheading-anchor","aria-label":"Permalink for this section",ref:ee})]}))}var findSummary=n=>{let a=null,g=[];return eP.Children.forEach(n,(n,v)=>{var j;if(n&&n.type===Summary){a||(a=n);return}let z=n;if(!a&&n&&"object"==typeof n&&n.type!==Details&&"props"in n&&n.props){let g=findSummary(n.props.children);a=g[0],z=(0,eP.cloneElement)(n,__spreadProps(__spreadValues({},n.props),{children:(null==(j=g[1])?void 0:j.length)?g[1]:void 0,key:v}))}g.push(z)}),[a,g]},Details=n=>{var{children:a,open:g}=n,v=__objRest(n,["children","open"]);let[j,z]=(0,eP.useState)(!!g),[H,B]=findSummary(a),[W,K]=(0,eP.useState)(j);return(0,eP.useEffect)(()=>{if(j)K(!0);else{let n=setTimeout(()=>K(j),500);return()=>clearTimeout(n)}},[j]),(0,ej.jsxs)("details",__spreadProps(__spreadValues(__spreadProps(__spreadValues({className:"nx-my-4 nx-rounded nx-border nx-border-gray-200 nx-bg-white nx-p-2 nx-shadow-sm first:nx-mt-0 dark:nx-border-neutral-800 dark:nx-bg-neutral-900"},v),{open:W}),j&&{"data-expanded":!0}),{children:[(0,ej.jsx)(n_,{value:z,children:H}),(0,ej.jsx)(Collapse,{isOpen:j,children:B})]}))},Summary=n=>{let a=useDetails();return(0,ej.jsx)("summary",__spreadProps(__spreadValues({className:(0,eE.Z)("nx-flex nx-items-center nx-cursor-pointer nx-list-none nx-p-1 nx-transition-colors hover:nx-bg-gray-100 dark:hover:nx-bg-neutral-800","before:nx-mr-1 before:nx-inline-block before:nx-transition-transform before:nx-content-[''] dark:before:nx-invert before:nx-shrink-0","rtl:before:nx-rotate-180 [[data-expanded]>&]:before:nx-rotate-90")},n),{onClick:n=>{n.preventDefault(),a(n=>!n)}}))},nJ=/https?:\/\//,Link=n=>{var{href:a="",className:g}=n,v=__objRest(n,["href","className"]);return(0,ej.jsx)(nw,__spreadValues({href:a,newWindow:nJ.test(a),className:(0,eE.Z)("nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]",g)},v))},A=n=>{var{href:a=""}=n,g=__objRest(n,["href"]);return(0,ej.jsx)(nw,__spreadValues({href:a,newWindow:nJ.test(a)},g))},getComponents=({isRawLayout:n,components:a})=>{if(n)return{a:A};let g={index:0};return __spreadValues({h1:n=>(0,ej.jsx)("h1",__spreadValues({className:"nx-mt-2 nx-text-4xl nx-font-bold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100"},n)),h2:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h2",context:g},n)),h3:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h3",context:g},n)),h4:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h4",context:g},n)),h5:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h5",context:g},n)),h6:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h6",context:g},n)),ul:n=>(0,ej.jsx)("ul",__spreadValues({className:"nx-mt-6 nx-list-disc first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"},n)),ol:n=>(0,ej.jsx)("ol",__spreadValues({className:"nx-mt-6 nx-list-decimal first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"},n)),li:n=>(0,ej.jsx)("li",__spreadValues({className:"nx-my-2"},n)),blockquote:n=>(0,ej.jsx)("blockquote",__spreadValues({className:(0,eE.Z)("nx-mt-6 nx-border-gray-300 nx-italic nx-text-gray-700 dark:nx-border-gray-700 dark:nx-text-gray-400","first:nx-mt-0 ltr:nx-border-l-2 ltr:nx-pl-6 rtl:nx-border-r-2 rtl:nx-pr-6")},n)),hr:n=>(0,ej.jsx)("hr",__spreadValues({className:"nx-my-8 nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400"},n)),a:Link,table:n=>(0,ej.jsx)(na.iA,__spreadValues({className:"nextra-scrollbar nx-mt-6 nx-p-0 first:nx-mt-0"},n)),p:n=>(0,ej.jsx)("p",__spreadValues({className:"nx-mt-6 nx-leading-7 first:nx-mt-0"},n)),tr:na.Tr,th:na.Th,td:na.Td,details:Details,summary:Summary,pre:na.SU,code:na.EK},a)},nQ={toc:(0,eE.Z)("nextra-toc nx-order-last nx-hidden nx-w-64 nx-shrink-0 xl:nx-block print:nx-hidden"),main:(0,eE.Z)("nx-w-full nx-break-words")},Body=({themeContext:n,breadcrumb:a,timestamp:g,navigation:v,children:j})=>{var z;let H=useConfig(),B=useMounted();if("raw"===n.layout)return(0,ej.jsx)("div",{className:nQ.main,children:j});let W=n.timestamp&&H.gitTimestamp&&g?new Date(g):null,K=B&&W?(0,ej.jsx)("div",{className:"nx-mt-12 nx-mb-8 nx-block nx-text-xs nx-text-gray-500 ltr:nx-text-right rtl:nx-text-left dark:nx-text-gray-400",children:renderComponent(H.gitTimestamp,{timestamp:W})}):(0,ej.jsx)("div",{className:"nx-mt-16"}),ee=(0,ej.jsxs)(ej.Fragment,{children:[j,K,v]}),et=(null==(z=H.main)?void 0:z.call(H,{children:ee}))||ee;return"full"===n.layout?(0,ej.jsx)("article",{className:(0,eE.Z)(nQ.main,"nextra-content nx-min-h-[calc(100vh-var(--nextra-navbar-height))] nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]"),children:et}):(0,ej.jsx)("article",{className:(0,eE.Z)(nQ.main,"nextra-content nx-flex nx-min-h-[calc(100vh-var(--nextra-navbar-height))] nx-min-w-0 nx-justify-center nx-pb-8 nx-pr-[calc(env(safe-area-inset-right)-1.5rem)]","article"===n.typesetting&&"nextra-body-typesetting-article"),children:(0,ej.jsxs)("main",{className:"nx-w-full nx-min-w-0 nx-max-w-6xl nx-px-6 nx-pt-4 md:nx-px-12",children:[a,et]})})},InnerLayout=({filePath:n,pageMap:a,frontMatter:g,headings:v,timestamp:j,children:z})=>{let H=useConfig(),{locale:B=nU,defaultLocale:W}=(0,eC.useRouter)(),K=useFSRoute(),{activeType:ee,activeIndex:et,activeThemeContext:er,activePath:en,topLevelNavbarItems:eo,docsDirectories:ei,flatDirectories:es,flatDocsDirectories:el,directories:ec}=(0,eP.useMemo)(()=>(function normalizePages({list:n,locale:a,defaultLocale:g,route:v,docsRoot:j="",underCurrentDocsRoot:z=!1,pageThemeContext:H=tT}){let B,W;for(let g of n)if("Meta"===g.kind){if(g.locale===a){B=g.data;break}B||(B=g.data)}let K=B||{},ee=Object.keys(K);for(let n of ee)"string"==typeof K[n]&&(K[n]={title:K[n]});let et=[],er=[],en=[],eo=[],ei=[],es=0,el=H,ec=[],eu=-1,ed=K["*"]||{};delete ed.title,delete ed.href;let ep=n.filter(n=>"Meta"!==n.kind&&!n.name.startsWith("_")&&(!("locale"in n)||!n.locale||[a,g].includes(n.locale))).sort((n,a)=>{let g=ee.indexOf(n.name),v=ee.indexOf(a.name);return -1===g&&-1===v?n.name{let a;let g=[],v=ee.indexOf(n.name);if(-1!==v){for(let n=eu+1;n({...B,type:ef,...ex&&{title:ex},...eu&&{display:eu},...eg&&{children:[]}}),ev=getItem(),ey=getItem(),eb=getItem();if(ey.isUnderCurrentDocsTree=eh,"separator"===ef&&(ev.isUnderCurrentDocsTree=eh),B.route===v)switch(ec=[ev],W=ef,el={...el,...em},ef){case"page":case"menu":es=ei.length;break;case"doc":es=eo.length}if(!("hidden"===eu&&"Folder"!==ev.kind||eI.hV.has(B.route))){if(eg){if(void 0!==eg.activeIndex&&void 0!==eg.activeType){switch(el=eg.activeThemeContext,W=eg.activeType,ec=[ev,...eg.activePath],W){case"page":case"menu":es=ei.length+eg.activeIndex;break;case"doc":es=eo.length+eg.activeIndex}B.withIndexPage&&"doc"===ef&&es++}switch(ef){case"page":case"menu":eb.children.push(...eg.directories),en.push(...eg.docsDirectories),eg.flatDirectories.length?(eb.firstChildRoute=function findFirstRoute(n){for(let a of n){if(a.route)return a.route;if(a.children){let n=findFirstRoute(a.children);if(n)return n}}}(eg.flatDirectories),ei.push(eb)):eb.withIndexPage&&ei.push(eb);break;case"doc":Array.isArray(ey.children)&&ey.children.push(...eg.docsDirectories),ev.withIndexPage&&"children"!==eu&&eo.push(ey)}er.push(...eg.flatDirectories),eo.push(...eg.flatDocsDirectories),Array.isArray(ev.children)&&ev.children.push(...eg.directories)}else switch(er.push(ev),ef){case"page":case"menu":ei.push(eb);break;case"doc":eo.push(ey)}switch("doc"===ef&&"children"===eu?ey.children&&(et.push(...ey.children),en.push(...ey.children)):et.push(ev),ef){case"page":case"menu":en.push(eb);break;case"doc":"children"!==eu&&en.push(ey);break;case"separator":en.push(ev)}}}return{activeType:W,activeIndex:es,activeThemeContext:el,activePath:ec,directories:et,flatDirectories:er,docsDirectories:en,flatDocsDirectories:eo,topLevelNavbarItems:ei}})({list:a,locale:B,defaultLocale:W,route:K}),[a,B,W,K]),eu=__spreadValues(__spreadValues({},er),g),ed=!eu.sidebar||"raw"===eu.layout||"page"===ee,ep="page"!==ee&&eu.toc&&"default"===eu.layout?(0,ej.jsx)("nav",{className:(0,eE.Z)(nQ.toc,"nx-px-4"),"aria-label":"table of contents",children:renderComponent(H.toc.component,{headings:H.toc.float?v:[],filePath:n})}):"full"!==eu.layout&&"raw"!==eu.layout&&(0,ej.jsx)("nav",{className:nQ.toc,"aria-label":"table of contents"}),ef=H.i18n.find(n=>n.locale===B),em=ef?"rtl"===ef.direction:"rtl"===H.direction,eh=em?"rtl":"ltr";return(0,ej.jsxs)("div",{dir:eh,children:[(0,ej.jsx)("script",{dangerouslySetInnerHTML:{__html:`document.documentElement.setAttribute('dir','${eh}')`}}),(0,ej.jsx)(dist_Head,{}),(0,ej.jsx)(Banner,{}),eu.navbar&&renderComponent(H.navbar.component,{flatDirectories:es,items:eo}),(0,ej.jsx)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex","raw"!==eu.layout&&"nx-max-w-[90rem]"),children:(0,ej.jsxs)(ActiveAnchorProvider,{children:[(0,ej.jsx)(Sidebar,{docsDirectories:ei,flatDirectories:es,fullDirectories:ec,headings:v,asPopover:ed,includePlaceholder:"default"===eu.layout}),ep,(0,ej.jsx)(nZ,{}),(0,ej.jsx)(Body,{themeContext:eu,breadcrumb:"page"!==ee&&eu.breadcrumb?(0,ej.jsx)(Breadcrumb,{activePath:en}):null,timestamp:j,navigation:"page"!==ee&&eu.pagination?(0,ej.jsx)(NavLinks,{flatDirectories:el,currentIndex:et}):null,children:(0,ej.jsx)(eT.Z,{components:getComponents({isRawLayout:"raw"===eu.layout,components:H.components}),children:z})})]})}),eu.footer&&renderComponent(H.footer.component,{menu:ed})]})};function ControlKeyIcon(){return eP.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},eP.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function SearchIcon(){return eP.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},eP.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var nY=["translations"];function DocSearchButton_extends(){return(DocSearchButton_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,nY),z=v.buttonText,H=void 0===z?"Search":z,B=v.buttonAriaLabel,W=_slicedToArray((0,eP.useState)(null),2),K=W[0],ee=W[1];return(0,eP.useEffect)(function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?ee("⌘"):ee(nX))},[]),eP.createElement("button",DocSearchButton_extends({type:"button",className:"DocSearch DocSearch-Button","aria-label":void 0===B?"Search":B},j,{ref:a}),eP.createElement("span",{className:"DocSearch-Button-Container"},eP.createElement(SearchIcon,null),eP.createElement("span",{className:"DocSearch-Button-Placeholder"},H)),eP.createElement("span",{className:"DocSearch-Button-Keys"},null!==K&&eP.createElement(eP.Fragment,null,eP.createElement(DocSearchButtonKey,{reactsToKey:K===nX?nX:"Meta"},K===nX?eP.createElement(ControlKeyIcon,null):K),eP.createElement(DocSearchButtonKey,{reactsToKey:"k"},"K"))))});function DocSearchButtonKey(n){var a=n.reactsToKey,g=n.children,v=_slicedToArray((0,eP.useState)(!1),2),j=v[0],z=v[1];return(0,eP.useEffect)(function(){if(a)return window.addEventListener("keydown",handleKeyDown),window.addEventListener("keyup",handleKeyUp),function(){window.removeEventListener("keydown",handleKeyDown),window.removeEventListener("keyup",handleKeyUp)};function handleKeyDown(n){n.key===a&&z(!0)}function handleKeyUp(n){(n.key===a||"Meta"===n.key)&&z(!1)}},[a]),eP.createElement("kbd",{className:j?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},g)}function debounce_debounce(n,a){var g=void 0;return function(){for(var v=arguments.length,j=Array(v),z=0;zn.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}function ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function _objectSpread(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,n7);n9&&j.environment.clearTimeout(n9);var K=W.setCollections,ee=W.setIsOpen,et=W.setQuery,er=W.setActiveItemId,en=W.setStatus;if(et(z),er(j.defaultActiveItemId),!z&&!1===j.openOnFocus){var eo,ei=B.getState().collections.map(function(n){return onInput_objectSpread(onInput_objectSpread({},n),{},{items:[]})});en("idle"),K(ei),ee(null!==(eo=v.isOpen)&&void 0!==eo?eo:j.shouldPanelOpen({state:B.getState()}));var es=cancelable(n8(ei).then(function(){return Promise.resolve()}));return B.pendingRequests.add(es)}en("loading"),n9=j.environment.setTimeout(function(){en("stalled")},j.stallThreshold);var el=cancelable(n8(j.getSources(onInput_objectSpread({query:z,refresh:H,state:B.getState()},W)).then(function(n){return Promise.all(n.map(function(n){return Promise.resolve(n.getItems(onInput_objectSpread({query:z,refresh:H,state:B.getState()},W))).then(function(a){return function(n,a,g){if(null==n?void 0:n.execute){var v="algolia"===n.requesterId?Object.assign.apply(Object,[{}].concat(resolve_toConsumableArray(Object.keys(g.context).map(function(n){var a;return null===(a=g.context[n])||void 0===a?void 0:a.__algoliaSearchParameters})))):{};return resolve_objectSpread(resolve_objectSpread({},n),{},{requests:n.queries.map(function(g){return{query:"algolia"===n.requesterId?resolve_objectSpread(resolve_objectSpread({},g),{},{params:resolve_objectSpread(resolve_objectSpread({},v),g.params)}):g,sourceId:a,transformResponse:n.transformResponse}})})}return{items:n,sourceId:a}}(a,n.sourceId,B.getState())})})).then(resolve).then(function(a){return n.map(function(n){var g=a.filter(function(a){return a.sourceId===n.sourceId}),v=g.map(function(n){return n.items}),j=g[0].transformResponse,z=j?j({results:v,hits:v.map(function(n){return n.hits}).filter(Boolean),facetHits:v.map(function(n){var a;return null===(a=n.facetHits)||void 0===a?void 0:a.map(function(n){return{label:n.value,count:n.count,_highlightResult:{label:{value:n.highlighted}}}})}).filter(Boolean)}):v;return n.onResolve({source:n,results:v,items:z,state:B.getState()}),Array.isArray(z),z.every(Boolean),'The `getItems` function from source "'.concat(n.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:n,items:z}})}).then(function(n){var a,g,v,z,H,W;return g=(a={collections:n,props:j,state:B.getState()}).collections,v=a.props,z=a.state,H=g.reduce(function(n,a){return reshape_objectSpread(reshape_objectSpread({},n),{},reshape_defineProperty({},a.source.sourceId,reshape_objectSpread(reshape_objectSpread({},a.source),{},{getItems:function(){return flatten(a.items)}})))},{}),W=v.plugins.reduce(function(n,a){return a.reshape?a.reshape(n):n},{sourcesBySourceId:H,state:z}).sourcesBySourceId,flatten(v.reshape({sourcesBySourceId:W,sources:Object.values(W),state:z})).filter(Boolean).map(function(n){return{source:n,items:n.getItems()}})})}))).then(function(n){en("idle"),K(n);var g,et=j.shouldPanelOpen({state:B.getState()});ee(null!==(g=v.isOpen)&&void 0!==g?g:j.openOnFocus&&!z&&et||et);var er=getActiveItem(B.getState());if(null!==B.getState().activeItemId&&er){var eo=er.item,ei=er.itemInputValue,es=er.itemUrl,el=er.source;el.onActive(onInput_objectSpread({event:a,item:eo,itemInputValue:ei,itemUrl:es,refresh:H,source:el,state:B.getState()},W))}}).finally(function(){en("idle"),n9&&j.environment.clearTimeout(n9)});return B.pendingRequests.add(el)}function onKeyDown_typeof(n){return(onKeyDown_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var oe=["event","props","refresh","store"];function onKeyDown_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function onKeyDown_objectSpread(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}var ou=[{segment:"autocomplete-core",version:"1.9.3"}];function metadata_typeof(n){return(metadata_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function metadata_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function metadata_defineProperty(n,a,g){var v;return(v=function(n,a){if("object"!==metadata_typeof(n)||null===n)return n;var g=n[Symbol.toPrimitive];if(void 0!==g){var v=g.call(n,a||"default");if("object"!==metadata_typeof(v))return v;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(n)}(a,"string"),(a="symbol"===metadata_typeof(v)?v:String(v))in n)?Object.defineProperty(n,a,{value:g,enumerable:!0,configurable:!0,writable:!0}):n[a]=g,n}function getCompletion(n){var a,g=n.state;return!1===g.isOpen||null===g.activeItemId?null:(null===(a=getActiveItem(g))||void 0===a?void 0:a.itemInputValue)||null}function getNextActiveItemId(n,a,g,v){if(!g)return null;if(n<0&&(null===a||null!==v&&0===a))return g+n;var j=(null===a?-1:a)+n;return j<=-1||j>=g?null===v?null:0:j}function stateReducer_typeof(n){return(stateReducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function stateReducer_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function stateReducer_objectSpread(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,od),j=g.noResultsText,z=void 0===j?"No results for":j,H=g.suggestedQueryText,B=void 0===H?"Try searching for":H,W=g.reportMissingResultsText,K=g.reportMissingResultsLinkText,ee=void 0===K?"Let us know.":K,et=v.state.context.searchSuggestions;return eP.createElement("div",{className:"DocSearch-NoResults"},eP.createElement("div",{className:"DocSearch-Screen-Icon"},eP.createElement(NoResultsIcon,null)),eP.createElement("p",{className:"DocSearch-Title"},z,' "',eP.createElement("strong",null,v.state.query),'"'),et&&et.length>0&&eP.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},eP.createElement("p",{className:"DocSearch-Help"},B,":"),eP.createElement("ul",null,et.slice(0,3).reduce(function(n,a){return[].concat(function(n){if(Array.isArray(n))return NoResultsScreen_arrayLikeToArray(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,a){if(n){if("string"==typeof n)return NoResultsScreen_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return NoResultsScreen_arrayLikeToArray(n,a)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[eP.createElement("li",{key:a},eP.createElement("button",{className:"DocSearch-Prefill",key:a,type:"button",onClick:function(){v.setQuery(a.toLowerCase()+" "),v.refresh(),v.inputRef.current.focus()}},a))])},[]))),v.getMissingResultsUrl&&eP.createElement("p",{className:"DocSearch-Help"},"".concat(void 0===W?"Believe this query should return results?":W," "),eP.createElement("a",{href:v.getMissingResultsUrl({query:v.state.query}),target:"_blank",rel:"noopener noreferrer"},ee)))}var LvlIcon=function(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function SourceIcon(n){switch(n.type){case"lvl1":return eP.createElement(LvlIcon,null);case"content":return eP.createElement(ContentIcon,null);default:return eP.createElement(AnchorIcon,null)}}function AnchorIcon(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function ContentIcon(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function SelectIcon(){return eP.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},eP.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),eP.createElement("path",{d:"M8 17l-6-6 6-6"})))}var op=["hit","attribute","tagName"];function Snippet_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function Snippet_objectSpread(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,op);return(0,eP.createElement)(j,Snippet_objectSpread(Snippet_objectSpread({},z),{},{dangerouslySetInnerHTML:{__html:getPropertyByPath(a,"_snippetResult.".concat(g,".value"))||getPropertyByPath(a,g)}}))}function Results_slicedToArray(n,a){return function(n){if(Array.isArray(n))return n}(n)||function(n,a){var g,v,j=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=j){var z=[],H=!0,B=!1;try{for(j=j.call(n);!(H=(g=j.next()).done)&&(z.push(g.value),!a||z.length!==a);H=!0);}catch(n){B=!0,v=n}finally{try{H||null==j.return||j.return()}finally{if(B)throw v}}return z}}(n,a)||function(n,a){if(n){if("string"==typeof n)return Results_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Results_arrayLikeToArray(n,a)}}(n,a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Results_arrayLikeToArray(n,a){(null==a||a>n.length)&&(a=n.length);for(var g=0,v=Array(a);g|<\/mark>)/g,om=RegExp(of.source);function removeHighlightTags(n){if(!n.__docsearch_parent&&!n._highlightResult)return n.hierarchy.lvl0;var a,g,v=((n.__docsearch_parent?null===(a=n.__docsearch_parent)||void 0===a||null===(a=a._highlightResult)||void 0===a||null===(a=a.hierarchy)||void 0===a?void 0:a.lvl0:null===(g=n._highlightResult)||void 0===g||null===(g=g.hierarchy)||void 0===g?void 0:g.lvl0)||{}).value;return v&&om.test(v)?v.replace(of,""):v}function ResultsScreen_extends(){return(ResultsScreen_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oh),j=g.recentSearchesTitle,z=g.noRecentSearchesText,H=g.saveRecentSearchButtonTitle,B=void 0===H?"Save this search":H,W=g.removeRecentSearchButtonTitle,K=void 0===W?"Remove this search from history":W,ee=g.favoriteSearchesTitle,et=g.removeFavoriteSearchButtonTitle,er=void 0===et?"Remove this search from favorites":et;return"idle"===v.state.status&&!1===v.hasCollections?v.disableUserPersonalization?null:eP.createElement("div",{className:"DocSearch-StartScreen"},eP.createElement("p",{className:"DocSearch-Help"},void 0===z?"No recent searches":z)):!1===v.hasCollections?null:eP.createElement("div",{className:"DocSearch-Dropdown-Container"},eP.createElement(Results,StartScreen_extends({},v,{title:void 0===j?"Recent":j,collection:v.state.collections[0],renderIcon:function(){return eP.createElement("div",{className:"DocSearch-Hit-icon"},eP.createElement(RecentIcon,null))},renderAction:function(n){var a=n.item,g=n.runFavoriteTransition,j=n.runDeleteTransition;return eP.createElement(eP.Fragment,null,eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:B,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),g(function(){v.favoriteSearches.add(a),v.recentSearches.remove(a),v.refresh()})}},eP.createElement(StarIcon,null))),eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:K,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),j(function(){v.recentSearches.remove(a),v.refresh()})}},eP.createElement(ResetIcon,null))))}})),eP.createElement(Results,StartScreen_extends({},v,{title:void 0===ee?"Favorite":ee,collection:v.state.collections[1],renderIcon:function(){return eP.createElement("div",{className:"DocSearch-Hit-icon"},eP.createElement(StarIcon,null))},renderAction:function(n){var a=n.item,g=n.runDeleteTransition;return eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:er,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),g(function(){v.favoriteSearches.remove(a),v.refresh()})}},eP.createElement(ResetIcon,null)))}})))}var og=["translations"];function ScreenState_extends(){return(ScreenState_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,og);if("error"===v.state.status)return eP.createElement(ErrorScreen,{translations:null==g?void 0:g.errorScreen});var j=v.state.collections.some(function(n){return n.items.length>0});return v.state.query?!1===j?eP.createElement(NoResultsScreen,ScreenState_extends({},v,{translations:null==g?void 0:g.noResultsScreen})):eP.createElement(ResultsScreen,v):eP.createElement(StartScreen,ScreenState_extends({},v,{hasCollections:j,translations:null==g?void 0:g.startScreen}))},function(n,a){return"loading"===a.state.status||"stalled"===a.state.status});function LoadingIcon(){return eP.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},eP.createElement("g",{fill:"none",fillRule:"evenodd"},eP.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},eP.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),eP.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},eP.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var ov=["translations"];function SearchBox_extends(){return(SearchBox_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,ov),j=g.resetButtonTitle,z=g.resetButtonAriaLabel,H=g.cancelButtonText,B=void 0===H?"Cancel":H,W=g.cancelButtonAriaLabel,K=g.searchInputLabel,ee=void 0===K?"Search":K,et=v.getFormProps({inputElement:v.inputRef.current}).onReset;return eP.useEffect(function(){v.autoFocus&&v.inputRef.current&&v.inputRef.current.focus()},[v.autoFocus,v.inputRef]),eP.useEffect(function(){v.isFromSelection&&v.inputRef.current&&v.inputRef.current.select()},[v.isFromSelection,v.inputRef]),eP.createElement(eP.Fragment,null,eP.createElement("form",{className:"DocSearch-Form",onSubmit:function(n){n.preventDefault()},onReset:et},eP.createElement("label",SearchBox_extends({className:"DocSearch-MagnifierLabel"},v.getLabelProps()),eP.createElement(SearchIcon,null),eP.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},ee)),eP.createElement("div",{className:"DocSearch-LoadingIndicator"},eP.createElement(LoadingIcon,null)),eP.createElement("input",SearchBox_extends({className:"DocSearch-Input",ref:v.inputRef},v.getInputProps({inputElement:v.inputRef.current,autoFocus:v.autoFocus,maxLength:64}))),eP.createElement("button",{type:"reset",title:void 0===j?"Clear the query":j,className:"DocSearch-Reset","aria-label":void 0===z?"Clear the query":z,hidden:!v.state.query},eP.createElement(ResetIcon,null))),eP.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":void 0===W?"Cancel":W,onClick:v.onClose},B))}var oy=["_highlightResult","_snippetResult"];function createStoredSearches(n){var a=n.key,g=n.limit,v=void 0===g?5:g,j=!1===function(){var n="__TEST_KEY__";try{return localStorage.setItem(n,""),localStorage.removeItem(n),!0}catch(n){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(n){return window.localStorage.setItem(a,JSON.stringify(n))},getItem:function(){var n=window.localStorage.getItem(a);return n?JSON.parse(n):[]}},z=j.getItem().slice(0,v);return{add:function(n){n._highlightResult,n._snippetResult;var a=function(n,a){if(null==n)return{};var g,v,j=function(n,a){if(null==n)return{};var g,v,j={},z=Object.keys(n);for(v=0;v=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oy),g=z.findIndex(function(n){return n.objectID===a.objectID});g>-1&&z.splice(g,1),z.unshift(a),z=z.slice(0,v),j.setItem(z)},remove:function(n){z=z.filter(function(a){return a.objectID!==n.objectID}),j.setItem(z)},getAll:function(){return z}}}function createInMemoryCache(n={serializable:!0}){let a={};return{get(g,v,j={miss:()=>Promise.resolve()}){let z=JSON.stringify(g);if(z in a)return Promise.resolve(n.serializable?JSON.parse(a[z]):a[z]);let H=v(),B=j&&j.miss||(()=>Promise.resolve());return H.then(n=>B(n)).then(()=>H)},set:(g,v)=>(a[JSON.stringify(g)]=n.serializable?JSON.stringify(v):v,Promise.resolve(v)),delete:n=>(delete a[JSON.stringify(n)],Promise.resolve()),clear:()=>(a={},Promise.resolve())}}function addMethods(n,a){return a&&Object.keys(a).forEach(g=>{n[g]=a[g](n)}),n}function encode(n,...a){let g=0;return n.replace(/%s/g,()=>encodeURIComponent(a[g++]))}let ob="4.23.3",o_={WithinQueryParameters:0,WithinHeaders:1};function createMappedRequestOptions(n,a){let g=n||{},v=g.data||{};return Object.keys(g).forEach(n=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(n)&&(v[n]=g[n])}),{data:Object.entries(v).length>0?v:void 0,timeout:g.timeout||a,headers:g.headers||{},queryParameters:g.queryParameters||{},cacheable:g.cacheable}}let oS={Read:1,Write:2,Any:3},ow={Up:1,Down:2,Timeouted:3};function createStatefulHost(n,a=ow.Up){return{...n,status:a,lastUpdate:Date.now()}}function createStatelessHost(n){return"string"==typeof n?{protocol:"https",url:n,accept:oS.Any}:{protocol:n.protocol||"https",url:n.url,accept:n.accept||oS.Any}}let ok={Get:"GET",Post:"POST"},isNetworkError=({isTimedOut:n,status:a})=>!n&&0==~~a,isRetryable=n=>{let a=n.status,g=n.isTimedOut;return g||isNetworkError(n)||2!=~~(a/100)&&4!=~~(a/100)},isSuccess=({status:n})=>2==~~(n/100),retryDecision=(n,a)=>isRetryable(n)?a.onRetry(n):isSuccess(n)?a.onSuccess(n):a.onFail(n);function retryableRequest(n,a,g,v){var j;let z=[],H=function(n,a){if(n.method===ok.Get||void 0===n.data&&void 0===a.data)return;let g=Array.isArray(n.data)?n.data:{...n.data,...a.data};return JSON.stringify(g)}(g,v),B=function(n,a){let g={...n.headers,...a.headers},v={};return Object.keys(g).forEach(n=>{let a=g[n];v[n.toLowerCase()]=a}),v}(n,v),W=g.method,K=g.method!==ok.Get?{}:{...g.data,...v.data},ee={"x-algolia-agent":n.userAgent.value,...n.queryParameters,...K,...v.queryParameters},et=0,retry=(a,j)=>{let K=a.pop();if(void 0===K)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:stackTraceWithoutCredentials(z)};let er={data:H,headers:B,method:W,url:function(n,a,g){let v=serializeQueryParameters(g),j=`${n.protocol}://${n.url}/${"/"===a.charAt(0)?a.substr(1):a}`;return v.length&&(j+=`?${v}`),j}(K,g.path,ee),connectTimeout:j(et,n.timeouts.connect),responseTimeout:j(et,v.timeout)},pushToStackTrace=n=>{let g={request:er,response:n,host:K,triesLeft:a.length};return z.push(g),g},en={onSuccess:n=>(function(n){try{return JSON.parse(n.content)}catch(a){throw{name:"DeserializationError",message:a.message,response:n}}})(n),onRetry(g){let v=pushToStackTrace(g);return g.isTimedOut&&et++,Promise.all([n.logger.info("Retryable failure",stackFrameWithoutCredentials(v)),n.hostsCache.set(K,createStatefulHost(K,g.isTimedOut?ow.Timeouted:ow.Down))]).then(()=>retry(a,j))},onFail(n){throw pushToStackTrace(n),function({content:n,status:a},g){let v=n;try{v=JSON.parse(n).message}catch(n){}return{name:"ApiError",message:v,status:a,transporterStackTrace:g}}(n,stackTraceWithoutCredentials(z))}};return n.requester.send(er).then(n=>retryDecision(n,en))};return(j=n.hostsCache,Promise.all(a.map(n=>j.get(n,()=>Promise.resolve(createStatefulHost(n))))).then(n=>{let g=n.filter(n=>n.status===ow.Up||Date.now()-n.lastUpdate>12e4),v=n.filter(n=>n.status===ow.Timeouted&&Date.now()-n.lastUpdate<=12e4),j=[...g,...v],z=j.length>0?j.map(n=>createStatelessHost(n)):a;return{getTimeout(n,a){let g=0===v.length&&0===n?1:v.length+3+n;return g*a},statelessHosts:z}})).then(n=>retry([...n.statelessHosts].reverse(),n.getTimeout))}function serializeQueryParameters(n){let isObjectOrArray=n=>"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n);return Object.keys(n).map(a=>encode("%s=%s",a,isObjectOrArray(n[a])?JSON.stringify(n[a]):n[a])).join("&")}function stackTraceWithoutCredentials(n){return n.map(n=>stackFrameWithoutCredentials(n))}function stackFrameWithoutCredentials(n){let a=n.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...n,request:{...n.request,headers:{...n.request.headers,...a}}}}let createSearchClient=n=>{let a=n.appId,g=function(n,a,g){let v={"x-algolia-api-key":g,"x-algolia-application-id":a};return{headers:()=>n===o_.WithinHeaders?v:{},queryParameters:()=>n===o_.WithinQueryParameters?v:{}}}(void 0!==n.authMode?n.authMode:o_.WithinHeaders,a,n.apiKey),v=function(n){let{hostsCache:a,logger:g,requester:v,requestsCache:j,responsesCache:z,timeouts:H,userAgent:B,hosts:W,queryParameters:K,headers:ee}=n,et={hostsCache:a,logger:g,requester:v,requestsCache:j,responsesCache:z,timeouts:H,userAgent:B,headers:ee,queryParameters:K,hosts:W.map(n=>createStatelessHost(n)),read(n,a){let g=createMappedRequestOptions(a,et.timeouts.read),createRetryableRequest=()=>retryableRequest(et,et.hosts.filter(n=>(n.accept&oS.Read)!=0),n,g),v=void 0!==g.cacheable?g.cacheable:n.cacheable;if(!0!==v)return createRetryableRequest();let j={request:n,mappedRequestOptions:g,transporter:{queryParameters:et.queryParameters,headers:et.headers}};return et.responsesCache.get(j,()=>et.requestsCache.get(j,()=>et.requestsCache.set(j,createRetryableRequest()).then(n=>Promise.all([et.requestsCache.delete(j),n]),n=>Promise.all([et.requestsCache.delete(j),Promise.reject(n)])).then(([n,a])=>a)),{miss:n=>et.responsesCache.set(j,n)})},write:(n,a)=>retryableRequest(et,et.hosts.filter(n=>(n.accept&oS.Write)!=0),n,createMappedRequestOptions(a,et.timeouts.write))};return et}({hosts:[{url:`${a}-dsn.algolia.net`,accept:oS.Read},{url:`${a}.algolia.net`,accept:oS.Write}].concat(function(n){let a=n.length-1;for(;a>0;a--){let g=Math.floor(Math.random()*(a+1)),v=n[a];n[a]=n[g],n[g]=v}return n}([{url:`${a}-1.algolianet.com`},{url:`${a}-2.algolianet.com`},{url:`${a}-3.algolianet.com`}])),...n,headers:{...g.headers(),"content-type":"application/x-www-form-urlencoded",...n.headers},queryParameters:{...g.queryParameters(),...n.queryParameters}});return addMethods({transporter:v,appId:a,addAlgoliaAgent(n,a){v.userAgent.add({segment:n,version:a})},clearCache:()=>Promise.all([v.requestsCache.clear(),v.responsesCache.clear()]).then(()=>void 0)},n.methods)},customRequest=n=>(a,g)=>a.method===ok.Get?n.transporter.read(a,g):n.transporter.write(a,g),initIndex=n=>(a,g={})=>{let v={transporter:n.transporter,appId:n.appId,indexName:a};return addMethods(v,g.methods)},multipleQueries=n=>(a,g)=>{let v=a.map(n=>({...n,params:serializeQueryParameters(n.params||{})}));return n.transporter.read({method:ok.Post,path:"1/indexes/*/queries",data:{requests:v},cacheable:!0},g)},multipleSearchForFacetValues=n=>(a,g)=>Promise.all(a.map(a=>{let{facetName:v,facetQuery:j,...z}=a.params;return initIndex(n)(a.indexName,{methods:{searchForFacetValues}}).searchForFacetValues(v,j,{...g,...z})})),findAnswers=n=>(a,g,v)=>n.transporter.read({method:ok.Post,path:encode("1/answers/%s/prediction",n.indexName),data:{query:a,queryLanguages:g},cacheable:!0},v),search=n=>(a,g)=>n.transporter.read({method:ok.Post,path:encode("1/indexes/%s/query",n.indexName),data:{query:a},cacheable:!0},g),searchForFacetValues=n=>(a,g,v)=>n.transporter.read({method:ok.Post,path:encode("1/indexes/%s/facets/%s/query",n.indexName,a),data:{facetQuery:g},cacheable:!0},v),getRecommendations=n=>(a,g)=>{let v=a.map(n=>({...n,threshold:n.threshold||0}));return n.transporter.read({method:ok.Post,path:"1/indexes/*/recommendations",data:{requests:v},cacheable:!0},g)};function algoliasearch(n,a,g){let v={appId:n,apiKey:a,timeouts:{connect:1,read:2,write:30},requester:{send:n=>new Promise(a=>{let g;let v=new XMLHttpRequest;v.open(n.method,n.url,!0),Object.keys(n.headers).forEach(a=>v.setRequestHeader(a,n.headers[a]));let createTimeout=(n,g)=>setTimeout(()=>{v.abort(),a({status:0,content:g,isTimedOut:!0})},1e3*n),j=createTimeout(n.connectTimeout,"Connection timeout");v.onreadystatechange=()=>{v.readyState>v.OPENED&&void 0===g&&(clearTimeout(j),g=createTimeout(n.responseTimeout,"Socket timeout"))},v.onerror=()=>{0===v.status&&(clearTimeout(j),clearTimeout(g),a({content:v.responseText||"Network request failed",status:v.status,isTimedOut:!1}))},v.onload=()=>{clearTimeout(j),clearTimeout(g),a({content:v.responseText,status:v.status,isTimedOut:!1})},v.send(n.data)})},logger:{debug:(n,a)=>Promise.resolve(),info:(n,a)=>Promise.resolve(),error:(n,a)=>(console.error(n,a),Promise.resolve())},responsesCache:createInMemoryCache(),requestsCache:createInMemoryCache({serializable:!1}),hostsCache:function createFallbackableCache(n){let a=[...n.caches],g=a.shift();return void 0===g?{get(n,a,g={miss:()=>Promise.resolve()}){let v=a();return v.then(n=>Promise.all([n,g.miss(n)])).then(([n])=>n)},set:(n,a)=>Promise.resolve(a),delete:n=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(n,v,j={miss:()=>Promise.resolve()})=>g.get(n,v,j).catch(()=>createFallbackableCache({caches:a}).get(n,v,j)),set:(n,v)=>g.set(n,v).catch(()=>createFallbackableCache({caches:a}).set(n,v)),delete:n=>g.delete(n).catch(()=>createFallbackableCache({caches:a}).delete(n)),clear:()=>g.clear().catch(()=>createFallbackableCache({caches:a}).clear())}}({caches:[function(n){let a;let g=`algoliasearch-client-js-${n.key}`,getStorage=()=>(void 0===a&&(a=n.localStorage||window.localStorage),a),getNamespace=()=>JSON.parse(getStorage().getItem(g)||"{}"),setNamespace=n=>{getStorage().setItem(g,JSON.stringify(n))},removeOutdatedCacheItems=()=>{let a=n.timeToLive?1e3*n.timeToLive:null,g=getNamespace(),v=Object.fromEntries(Object.entries(g).filter(([,n])=>void 0!==n.timestamp));if(setNamespace(v),!a)return;let j=Object.fromEntries(Object.entries(v).filter(([,n])=>{let g=new Date().getTime(),v=n.timestamp+aPromise.resolve()})=>Promise.resolve().then(()=>{removeOutdatedCacheItems();let a=JSON.stringify(n);return getNamespace()[a]}).then(n=>Promise.all([n?n.value:a(),void 0!==n])).then(([n,a])=>Promise.all([n,a||g.miss(n)])).then(([n])=>n),set:(n,a)=>Promise.resolve().then(()=>{let v=getNamespace();return v[JSON.stringify(n)]={timestamp:new Date().getTime(),value:a},getStorage().setItem(g,JSON.stringify(v)),a}),delete:n=>Promise.resolve().then(()=>{let a=getNamespace();delete a[JSON.stringify(n)],getStorage().setItem(g,JSON.stringify(a))}),clear:()=>Promise.resolve().then(()=>{getStorage().removeItem(g)})}}({key:`${ob}-${n}`}),createInMemoryCache()]}),userAgent:(function(n){let a={value:`Algolia for JavaScript (${n})`,add(n){let g=`; ${n.segment}${void 0!==n.version?` (${n.version})`:""}`;return -1===a.value.indexOf(g)&&(a.value=`${a.value}${g}`),a}};return a})(ob).add({segment:"Browser",version:"lite"}),authMode:o_.WithinQueryParameters};return createSearchClient({...v,...g,methods:{search:multipleQueries,searchForFacetValues:multipleSearchForFacetValues,multipleQueries,multipleSearchForFacetValues,customRequest,initIndex:n=>a=>initIndex(n)(a,{methods:{search,searchForFacetValues,findAnswers}}),getRecommendations}})}algoliasearch.version=ob;var oO="3.6.0";function noop_noop(){}function identity(n){return n}function isModifierEvent(n){return 1===n.button||n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function groupBy(n,a,g){return n.reduce(function(n,v){var j=a(v);return n.hasOwnProperty(j)||(n[j]=[]),n[j].length<(g||5)&&n[j].push(v),n},{})}var oj=["footer","searchBox"];function DocSearchModal_extends(){return(DocSearchModal_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(e_,oj),eE=function(n){if(Array.isArray(n))return n}(a=eP.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}))||function(n,a){var g,v,j=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=j){var z=[],H=!0,B=!1;try{for(j=j.call(n);!(H=(g=j.next()).done)&&(z.push(g.value),!a||z.length!==a);H=!0);}catch(n){B=!0,v=n}finally{try{H||null==j.return||j.return()}finally{if(B)throw v}}return z}}(a,2)||function(n,a){if(n){if("string"==typeof n)return DocSearchModal_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return DocSearchModal_arrayLikeToArray(n,a)}}(a,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),eI=eE[0],eT=eE[1],eM=eP.useRef(null),eA=eP.useRef(null),eN=eP.useRef(null),eR=eP.useRef(null),eD=eP.useRef(null),eL=eP.useRef(10),eZ=eP.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,eF=eP.useRef((void 0===ey?"":ey)||eZ).current,eV=eP.useMemo(function(){var n=algoliasearch(W,K);return n.addAlgoliaAgent("docsearch",oO),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",oO),eg(n)},[W,K,eg]),eU=eP.useRef(createStoredSearches({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(ee),limit:10})).current,ez=eP.useRef(createStoredSearches({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(ee),limit:0===eU.getAll().length?7:4})).current,eH=eP.useCallback(function(n){if(!ev){var a="content"===n.type?n.__docsearch_parent:n;a&&-1===eU.getAll().findIndex(function(n){return n.objectID===a.objectID})&&ez.add(a)}},[eU,ez,ev]),eB=eP.useCallback(function(n){if(eI.context.algoliaInsightsPlugin&&n.__autocomplete_id){var a={eventName:"Item Selected",index:n.__autocomplete_indexName,items:[n],positions:[n.__autocomplete_id],queryID:n.__autocomplete_queryID};eI.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(a)}},[eI.context.algoliaInsightsPlugin]),eq=eP.useMemo(function(){return function(n){var a,g,v,j,z,H,B,W,K,ee,et,er,en,eo,ei,es,el,ec,eu,ed,ep,ef=[],em=(g="undefined"!=typeof window?window:{},v=n.plugins||[],getDefaultProps_objectSpread(getDefaultProps_objectSpread({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:!1,environment:g,shouldPanelOpen:function(n){return getItemsCount(n.state)>0},reshape:function(n){return n.sources}},n),{},{id:null!==(a=n.id)&&void 0!==a?a:"autocomplete-".concat(n6++),plugins:v,initialState:getDefaultProps_objectSpread({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},n.initialState),onStateChange:function(a){var g;null===(g=n.onStateChange)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onStateChange)||void 0===g?void 0:g.call(n,a)})},onSubmit:function(a){var g;null===(g=n.onSubmit)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onSubmit)||void 0===g?void 0:g.call(n,a)})},onReset:function(a){var g;null===(g=n.onReset)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onReset)||void 0===g?void 0:g.call(n,a)})},getSources:function(a){var g;return Promise.all([].concat(function(n){if(Array.isArray(n))return getDefaultProps_arrayLikeToArray(n)}(g=v.map(function(n){return n.getSources}))||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(g)||function(n,a){if(n){if("string"==typeof n)return getDefaultProps_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return getDefaultProps_arrayLikeToArray(n,a)}}(g)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[n.getSources]).filter(Boolean).map(function(n){var g;return g=[],Promise.resolve(n(a)).then(function(n){return Array.isArray(n),Promise.all(n.filter(function(n){return!!n}).map(function(n){if(n.sourceId,g.includes(n.sourceId))throw Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(n.sourceId)," is not unique."));g.push(n.sourceId);var a={getItemInputValue:function(n){return n.state.query},getItemUrl:function(){},onSelect:function(n){(0,n.setIsOpen)(!1)},onActive:noop,onResolve:noop};return Object.keys(a).forEach(function(n){a[n].__default=!0}),Promise.resolve(getNormalizedSources_objectSpread(getNormalizedSources_objectSpread({},a),n))}))})})).then(function(n){return flatten(n)}).then(function(n){return n.map(function(n){return getDefaultProps_objectSpread(getDefaultProps_objectSpread({},n),{},{onSelect:function(a){n.onSelect(a),ef.forEach(function(n){var g;return null===(g=n.onSelect)||void 0===g?void 0:g.call(n,a)})},onActive:function(a){n.onActive(a),ef.forEach(function(n){var g;return null===(g=n.onActive)||void 0===g?void 0:g.call(n,a)})},onResolve:function(a){n.onResolve(a),ef.forEach(function(n){var g;return null===(g=n.onResolve)||void 0===g?void 0:g.call(n,a)})}})})})},navigator:getDefaultProps_objectSpread({navigate:function(n){var a=n.itemUrl;g.location.assign(a)},navigateNewTab:function(n){var a=n.itemUrl,v=g.open(a,"_blank","noopener");null==v||v.focus()},navigateNewWindow:function(n){var a=n.itemUrl;g.open(a,"_blank","noopener")}},n.navigator)})),eh=(j=function(n){var a=n.prevState,g=n.state;em.onStateChange(createAutocomplete_objectSpread({prevState:a,state:g,refresh:refresh,navigator:em.navigator},eg))},z=em.initialState,{getState:function(){return z},dispatch:function(n,a){var g=function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oe);if("ArrowUp"===a.key||"ArrowDown"===a.key){var triggerScrollIntoView=function(){var n=g.environment.document.getElementById("".concat(g.id,"-item-").concat(j.getState().activeItemId));n&&(n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n.scrollIntoView(!1))},triggerOnActive=function(){var n=getActiveItem(j.getState());if(null!==j.getState().activeItemId&&n){var g=n.item,H=n.itemInputValue,B=n.itemUrl,W=n.source;W.onActive(onKeyDown_objectSpread({event:a,item:g,itemInputValue:H,itemUrl:B,refresh:v,source:W,state:j.getState()},z))}};a.preventDefault(),!1===j.getState().isOpen&&(g.openOnFocus||j.getState().query)?onInput(onKeyDown_objectSpread({event:a,props:g,query:j.getState().query,refresh:v,store:j},z)).then(function(){j.dispatch(a.key,{nextActiveItemId:g.defaultActiveItemId}),triggerOnActive(),setTimeout(triggerScrollIntoView,0)}):(j.dispatch(a.key,{}),triggerOnActive(),triggerScrollIntoView())}else if("Escape"===a.key)a.preventDefault(),j.dispatch(a.key,null),j.pendingRequests.cancelAll();else if("Tab"===a.key)j.dispatch("blur",null),j.pendingRequests.cancelAll();else if("Enter"===a.key){if(null===j.getState().activeItemId||j.getState().collections.every(function(n){return 0===n.items.length})){g.debug||j.pendingRequests.cancelAll();return}a.preventDefault();var H=getActiveItem(j.getState()),B=H.item,W=H.itemInputValue,K=H.itemUrl,ee=H.source;if(a.metaKey||a.ctrlKey)void 0!==K&&(ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigateNewTab({itemUrl:K,item:B,state:j.getState()}));else if(a.shiftKey)void 0!==K&&(ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigateNewWindow({itemUrl:K,item:B,state:j.getState()}));else if(a.altKey);else{if(void 0!==K){ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigate({itemUrl:K,item:B,state:j.getState()});return}onInput(onKeyDown_objectSpread({event:a,nextState:{isOpen:!1},props:g,query:W,refresh:v,store:j},z)).then(function(){ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z))})}}}(getPropGetters_objectSpread({event:n,props:W,refresh:K,store:ee},et))},onFocus:onFocus,onBlur:noop,onClick:function(a){n.inputElement!==W.environment.document.activeElement||ee.getState().isOpen||onFocus(a)}},H)},getPanelProps:function(n){return getPropGetters_objectSpread({onMouseDown:function(n){n.preventDefault()},onMouseLeave:function(){ee.dispatch("mouseleave",null)}},n)},getListProps:function(n){var a=n||{},g=a.sourceIndex,v=getPropGetters_objectWithoutProperties(a,ol);return getPropGetters_objectSpread({role:"listbox","aria-labelledby":"".concat(er(W.id,g),"-label"),id:"".concat(er(W.id,g),"-list")},v)},getItemProps:function(n){var a=n.item,g=n.source,v=n.sourceIndex,j=getPropGetters_objectWithoutProperties(n,oc);return getPropGetters_objectSpread({id:"".concat(er(W.id,v),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":ee.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(n){if(a.__autocomplete_id!==ee.getState().activeItemId){ee.dispatch("mousemove",a.__autocomplete_id);var g=getActiveItem(ee.getState());if(null!==ee.getState().activeItemId&&g){var v=g.item,j=g.itemInputValue,z=g.itemUrl,H=g.source;H.onActive(getPropGetters_objectSpread({event:n,item:v,itemInputValue:j,itemUrl:z,refresh:K,source:H,state:ee.getState()},et))}}},onMouseDown:function(n){n.preventDefault()},onClick:function(n){var v=g.getItemInputValue({item:a,state:ee.getState()}),j=g.getItemUrl({item:a,state:ee.getState()});(j?Promise.resolve():onInput(getPropGetters_objectSpread({event:n,nextState:{isOpen:!1},props:W,query:v,refresh:K,store:ee},et))).then(function(){g.onSelect(getPropGetters_objectSpread({event:n,item:a,itemInputValue:v,itemUrl:j,refresh:K,source:g,state:ee.getState()},et))})}},j)}});function refresh(){return onInput(createAutocomplete_objectSpread({event:new Event("input"),nextState:{isOpen:eh.getState().isOpen},props:em,navigator:em.navigator,query:eh.getState().query,refresh:refresh,store:eh},eg))}if(n.insights&&!em.plugins.some(function(n){return"aa.algoliaInsightsPlugin"===n.name})){var ev,ey,eb,e_,eS,ew,ek,eO,ej,eC,eP,eE="boolean"==typeof n.insights?{}:n.insights;em.plugins.push((e_=(eb=createAlgoliaInsightsPlugin_objectSpread({onItemsChange:function(n){var a=n.insights,g=n.insightsEvents;a.viewedObjectIDs.apply(a,createAlgoliaInsightsPlugin_toConsumableArray(g.map(function(n){return createAlgoliaInsightsPlugin_objectSpread(createAlgoliaInsightsPlugin_objectSpread({},n),{},{algoliaSource:[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n.algoliaSource||[]),["autocomplete-internal"])})})))},onSelect:function(n){var a=n.insights,g=n.insightsEvents;a.clickedObjectIDsAfterSearch.apply(a,createAlgoliaInsightsPlugin_toConsumableArray(g.map(function(n){return createAlgoliaInsightsPlugin_objectSpread(createAlgoliaInsightsPlugin_objectSpread({},n),{},{algoliaSource:[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n.algoliaSource||[]),["autocomplete-internal"])})})))},onActive:noop},eE)).insightsClient,eS=eb.onItemsChange,ew=eb.onSelect,ek=eb.onActive,eO=e_,e_||"undefined"!=typeof window&&("string"==typeof(ey=(ev=({window:window}).window).AlgoliaAnalyticsObject||"aa")&&(eO=ev[ey]),eO||(ev.AlgoliaAnalyticsObject=ey,ev[ey]||(ev[ey]=function(){ev[ey].queue||(ev[ey].queue=[]);for(var n=arguments.length,a=Array(n),g=0;g=3||2===v&&j>=4||1===v&&j>=10);function sendToInsights(a,g,v){if(z&&void 0!==v){var j=v[0].__autocomplete_algoliaCredentials,H=j.appId,B=j.apiKey;n.apply(void 0,[a].concat(_toConsumableArray(g),[{headers:{"X-Algolia-Application-Id":H,"X-Algolia-API-Key":B}}]))}else n.apply(void 0,[a].concat(_toConsumableArray(g)))}return{init:function(a,g){n("init",{appId:a,apiKey:g})},setUserToken:function(a){n("setUserToken",a)},clickedObjectIDsAfterSearch:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("clickedObjectIDsAfterSearch",mapToInsightsParamsApi(a),a[0].items)},clickedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("clickedObjectIDs",mapToInsightsParamsApi(a),a[0].items)},clickedFilters:function(){for(var a=arguments.length,g=Array(a),v=0;v0&&n.apply(void 0,["clickedFilters"].concat(g))},convertedObjectIDsAfterSearch:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("convertedObjectIDsAfterSearch",mapToInsightsParamsApi(a),a[0].items)},convertedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("convertedObjectIDs",mapToInsightsParamsApi(a),a[0].items)},convertedFilters:function(){for(var a=arguments.length,g=Array(a),v=0;v0&&n.apply(void 0,["convertedFilters"].concat(g))},viewedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&a.reduce(function(n,a){var g=a.items,v=createSearchInsightsApi_objectWithoutProperties(a,n2);return[].concat(_toConsumableArray(n),_toConsumableArray((function(n){for(var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,g=[],v=0;v0&&n.apply(void 0,["viewedFilters"].concat(g))}}}(eO),eC={current:[]},eP=debounce_debounce(function(n){var a=n.state;if(a.isOpen){var g=a.collections.reduce(function(n,a){return[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n),createAlgoliaInsightsPlugin_toConsumableArray(a.items))},[]).filter(isAlgoliaInsightsHit);!function isEqual(n,a){if(n===a)return!0;if(isPrimitive(n)||isPrimitive(a)||"function"==typeof n||"function"==typeof a)return n===a;if(Object.keys(n).length!==Object.keys(a).length)return!1;for(var g=0,v=Object.keys(n);g0&&n5({onItemsChange:eS,items:g,insights:ej,state:a}))}},0),{name:"aa.algoliaInsightsPlugin",subscribe:function(n){var a=n.setContext,g=n.onSelect,v=n.onActive;eO("addAlgoliaAgent","insights-plugin"),a({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:ej}}),g(function(n){var a=n.item,g=n.state,v=n.event;isAlgoliaInsightsHit(a)&&ew({state:g,event:v,insights:ej,item:a,insightsEvents:[createAlgoliaInsightsPlugin_objectSpread({eventName:"Item Selected"},createClickedEvent({item:a,items:eC.current}))]})}),v(function(n){var a=n.item,g=n.state,v=n.event;isAlgoliaInsightsHit(a)&&ek({state:g,event:v,insights:ej,item:a,insightsEvents:[createAlgoliaInsightsPlugin_objectSpread({eventName:"Item Active"},createClickedEvent({item:a,items:eC.current}))]})})},onStateChange:function(n){eP({state:n.state})},__autocomplete_pluginOptions:eE}))}return em.plugins.forEach(function(n){var a;return null===(a=n.subscribe)||void 0===a?void 0:a.call(n,createAutocomplete_objectSpread(createAutocomplete_objectSpread({},eg),{},{navigator:em.navigator,refresh:refresh,onSelect:function(n){ef.push({onSelect:n})},onActive:function(n){ef.push({onActive:n})},onResolve:function(n){ef.push({onResolve:n})}}))}),!function(n){var a,g,v=n.metadata,j=n.environment;if(null===(a=j.navigator)||void 0===a?void 0:null===(g=a.userAgent)||void 0===g?void 0:g.includes("Algolia Crawler")){var z=j.document.createElement("meta"),H=j.document.querySelector("head");z.name="algolia:metadata",setTimeout(function(){z.content=JSON.stringify(v),H.appendChild(z)},0)}}({metadata:(ec=(en={plugins:em.plugins,options:n}).plugins,ep=(ed=null===(eo=((null===(ei=(eu=en.options).__autocomplete_metadata)||void 0===ei?void 0:ei.userAgents)||[])[0])||void 0===eo?void 0:eo.segment)?metadata_defineProperty({},ed,Object.keys((null===(es=eu.__autocomplete_metadata)||void 0===es?void 0:es.options)||{})):{},{plugins:ec.map(function(n){return{name:n.name,options:Object.keys(n.__autocomplete_pluginOptions||[])}}),options:function(n){for(var a=1;a",highlightPostTag:"",hitsPerPage:20,clickAnalytics:z},en)}]).catch(function(n){throw"RetryError"===n.name&&j("error"),n}).then(function(n){var a=n.results[0],j=a.hits,H=a.nbHits,B=groupBy(j,function(n){return removeHighlightTags(n)},eo);g.context.searchSuggestions.length0&&(eW(),eD.current&&eD.current.focus())},[eF,eW]),eP.useEffect(function(){function setFullViewportHeight(){if(eA.current){var n=.01*window.innerHeight;eA.current.style.setProperty("--docsearch-vh","".concat(n,"px"))}}return setFullViewportHeight(),window.addEventListener("resize",setFullViewportHeight),function(){window.removeEventListener("resize",setFullViewportHeight)}},[]),eP.createElement("div",DocSearchModal_extends({ref:eM},eG({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===eI.status&&"DocSearch-Container--Stalled","error"===eI.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(n){n.target===n.currentTarget&&es()}}),eP.createElement("div",{className:"DocSearch-Modal",ref:eA},eP.createElement("header",{className:"DocSearch-SearchBar",ref:eN},eP.createElement(SearchBox,DocSearchModal_extends({},eq,{state:eI,autoFocus:0===eF.length,inputRef:eD,isFromSelection:!!eF&&eF===eZ,translations:ej,onClose:es}))),eP.createElement("div",{className:"DocSearch-Dropdown",ref:eR},eP.createElement(ox,DocSearchModal_extends({},eq,{indexName:ee,state:eI,hitComponent:void 0===eu?Hit:eu,resultsFooterComponent:void 0===ed?function(){return null}:ed,disableUserPersonalization:ev,recentSearches:ez,favoriteSearches:eU,inputRef:eD,translations:eC,getMissingResultsUrl:eS,onItemClick:function(n,a){eB(n),eH(n),isModifierEvent(a)||es()}}))),eP.createElement("footer",{className:"DocSearch-Footer"},eP.createElement(Footer_Footer,{translations:eO}))))}function DocSearch_extends(){return(DocSearch_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g(0,ej.jsx)(DocSearch,{appId:"876KCB22DI",apiKey:"99a2c8ae162662ba8701a409923928ae",indexName:"mriqbox-com"}),{})},head:function(){let{asPath:n}=(0,eC.useRouter)(),{frontMatter:a,title:g}=useConfig(),v=a.description||"Documenta\xe7\xe3o para os recursos desenvolvidos pela mri-Qbox.";return(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,ej.jsx)("link",{rel:"icon",type:"image/x-icon",href:"/static/mri.ico"}),(0,ej.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ej.jsx)("meta",{name:"description",content:v}),(0,ej.jsx)("meta",{name:"og:title",content:g}),(0,ej.jsx)("meta",{name:"og:description",content:v}),(0,ej.jsx)("meta",{name:"og:url",content:"https://docs.mriqbox.com.br".concat(n)})]})},primaryHue:{dark:103,light:103},sidebar:{defaultMenuCollapseLevel:1},toc:{backToTop:!0},useNextSeoProps:function(){let{asPath:n}=(0,eC.useRouter)(),a=n.replace(/[-_]/g," ").split("/"),g="#"!==a[1][0]&&a[1]||"mri-Qbox",v=a[a.length-1],j=/[a-z]/.test(v)&&/[A-Z]/.test(v)?v:"%s";return{titleTemplate:"".concat(j," - ").concat(v===g?"Documenta\xe7\xe3o":g.replace(/(^\w|\s\w)/g,n=>n.toUpperCase()))}}};g(4323),g(2449);let MDXLayout=function(n){let{Component:a,pageProps:g}=n;return(0,ej.jsx)(a,{...g})},oP=[];function _createMdxContent(n){return(0,ej.jsx)(ej.Fragment,{})}var _app=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ej.jsx)(MDXLayout,{...n,children:(0,ej.jsx)(_createMdxContent,{...n})})};let oE=(ek=globalThis)[eO=Symbol.for("__nextra_internal__")]||(ek[eO]=Object.create(null));oE.Layout=function(n){var{children:a}=n,g=__objRest(n,["children"]);return(0,ej.jsx)(ConfigProvider,{value:g,children:(0,ej.jsx)(InnerLayout,__spreadProps(__spreadValues({},g.pageOpts),{children:a}))})},oE.pageMap=[{kind:"Meta",data:{index:"Introdu\xe7\xe3o",guides:"Guias",overextended:"Overextended",support:{title:"Nos apoie",type:"page",href:"https://docs.mriqbox.com.br/#support-our-team"},qbox:"Qbox",resources:"Resources"}},{kind:"Folder",name:"guides",route:"/guides",children:[{kind:"MdxPage",name:"git",route:"/guides/git"},{kind:"MdxPage",name:"nodejs",route:"/guides/nodejs",frontMatter:{title:"Node.js"}},{kind:"MdxPage",name:"pnpm",route:"/guides/pnpm",frontMatter:{title:"pnpm"}},{kind:"MdxPage",name:"types",route:"/guides/types"},{kind:"MdxPage",name:"vscode",route:"/guides/vscode",frontMatter:{title:"VS Code"}},{kind:"Meta",data:{git:"Git",nodejs:"Node.js",pnpm:"pnpm",types:"Types",vscode:"VS Code"}}]},{kind:"MdxPage",name:"guides",route:"/guides"},{kind:"MdxPage",name:"index",route:"/",frontMatter:{title:"Introdu\xe7\xe3o"}},{kind:"Folder",name:"overextended",route:"/overextended",children:[{kind:"Meta",data:{oxmysql:"OxMySQL",ox_lib:"Ox Lib",ox_core:"Ox Core",ox_doorlock:"Ox Doorlock",ox_fuel:"Ox Fuel",ox_inventory:"Ox Inventory",ox_target:"Ox Target"}},{kind:"Folder",name:"ox_core",route:"/overextended/ox_core",children:[{kind:"Folder",name:"Classes",route:"/overextended/ox_core/Classes",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_core/Classes/Client",children:[{kind:"MdxPage",name:"OxPlayer",route:"/overextended/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"Meta",data:{OxPlayer:"OxPlayer"}}]},{kind:"Folder",name:"Server",route:"/overextended/ox_core/Classes/Server",children:[{kind:"MdxPage",name:"OxAccount",route:"/overextended/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"}},{kind:"MdxPage",name:"OxPlayer",route:"/overextended/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"MdxPage",name:"OxVehicle",route:"/overextended/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"}},{kind:"Meta",data:{OxAccount:"OxAccount",OxPlayer:"OxPlayer",OxVehicle:"OxVehicle"}}]}]},{kind:"Folder",name:"Events",route:"/overextended/ox_core/Events",children:[{kind:"MdxPage",name:"client",route:"/overextended/ox_core/Events/client"},{kind:"MdxPage",name:"server",route:"/overextended/ox_core/Events/server"},{kind:"Meta",data:{client:"Client",server:"Server"}}]},{kind:"Folder",name:"Functions",route:"/overextended/ox_core/Functions",children:[{kind:"MdxPage",name:"common",route:"/overextended/ox_core/Functions/common"},{kind:"MdxPage",name:"server",route:"/overextended/ox_core/Functions/server"},{kind:"Meta",data:{common:"Common",server:"Server"}}]}]},{kind:"MdxPage",name:"ox_core",route:"/overextended/ox_core"},{kind:"Folder",name:"ox_doorlock",route:"/overextended/ox_doorlock",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_doorlock/Client",children:[{kind:"Meta",data:{functions:"Fun\xe7\xf5es"}},{kind:"MdxPage",name:"functions",route:"/overextended/ox_doorlock/Client/functions"}]},{kind:"Folder",name:"Server",route:"/overextended/ox_doorlock/Server",children:[{kind:"Meta",data:{functions:"Fun\xe7\xf5es",events:"Eventos"}},{kind:"MdxPage",name:"events",route:"/overextended/ox_doorlock/Server/events"},{kind:"MdxPage",name:"functions",route:"/overextended/ox_doorlock/Server/functions"}]},{kind:"MdxPage",name:"settings",route:"/overextended/ox_doorlock/settings",frontMatter:{title:"Configura\xe7\xf5es da Porta"}},{kind:"Meta",data:{settings:"Configura\xe7\xf5es da Porta"}}]},{kind:"MdxPage",name:"ox_doorlock",route:"/overextended/ox_doorlock"},{kind:"Folder",name:"ox_fuel",route:"/overextended/ox_fuel",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_fuel/Client",children:[{kind:"MdxPage",name:"functions",route:"/overextended/ox_fuel/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/overextended/ox_fuel/Server",children:[{kind:"MdxPage",name:"functions",route:"/overextended/ox_fuel/Server/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_fuel/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"MdxPage",name:"ox_fuel",route:"/overextended/ox_fuel"},{kind:"Folder",name:"ox_inventory",route:"/overextended/ox_inventory",children:[{kind:"Folder",name:"Events",route:"/overextended/ox_inventory/Events",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_inventory/Events/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_inventory/Events/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Frameworks",route:"/overextended/ox_inventory/Frameworks",children:[{kind:"MdxPage",name:"esx",route:"/overextended/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"}},{kind:"MdxPage",name:"qbx",route:"/overextended/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"}},{kind:"Meta",data:{esx:"ESX",qbx:"Qbox"}}]},{kind:"Folder",name:"Functions",route:"/overextended/ox_inventory/Functions",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_inventory/Functions/Client"},{kind:"Folder",name:"Server",route:"/overextended/ox_inventory/Functions/Server",children:[{kind:"MdxPage",name:"Hooks",route:"/overextended/ox_inventory/Functions/Server/Hooks"},{kind:"Meta",data:{Hooks:"Hooks"}}]},{kind:"MdxPage",name:"Server",route:"/overextended/ox_inventory/Functions/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Guides",route:"/overextended/ox_inventory/Guides",children:[{kind:"MdxPage",name:"crafting",route:"/overextended/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"}},{kind:"MdxPage",name:"creatingItems",route:"/overextended/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"}},{kind:"MdxPage",name:"metadata",route:"/overextended/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"shops",route:"/overextended/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"}},{kind:"MdxPage",name:"stashes",route:"/overextended/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"}},{kind:"Meta",data:{crafting:"Crafting",creatingItems:"Creating Items",shops:"Creating Shops",stashes:"Custom Stashes",metadata:"Metadata"}}]},{kind:"MdxPage",name:"issues",route:"/overextended/ox_inventory/issues",frontMatter:{title:"Common Issues"}},{kind:"Meta",data:{issues:"Common Issues"}}]},{kind:"MdxPage",name:"ox_inventory",route:"/overextended/ox_inventory"},{kind:"Folder",name:"ox_lib",route:"/overextended/ox_lib",children:[{kind:"Folder",name:"Modules",route:"/overextended/ox_lib/Modules",children:[{kind:"Folder",name:"ACL",route:"/overextended/ox_lib/Modules/ACL",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/ACL/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddCommand",route:"/overextended/ox_lib/Modules/AddCommand",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/AddCommand/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddKeybind",route:"/overextended/ox_lib/Modules/AddKeybind",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/AddKeybind/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Array",route:"/overextended/ox_lib/Modules/Array",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Array/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cache",route:"/overextended/ox_lib/Modules/Cache",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Cache/Client"},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Cache/Shared"},{kind:"Meta",data:{Client:"Client",Shared:"Shared"}}]},{kind:"Folder",name:"Callback",route:"/overextended/ox_lib/Modules/Callback",children:[{kind:"Folder",name:"JavaScript",route:"/overextended/ox_lib/Modules/Callback/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Callback/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Callback/Lua/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Callback/Lua/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]}]},{kind:"Folder",name:"Class",route:"/overextended/ox_lib/Modules/Class",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Class/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cron",route:"/overextended/ox_lib/Modules/Cron",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Cron/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"DisableControls",route:"/overextended/ox_lib/Modules/DisableControls",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/DisableControls/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Dui",route:"/overextended/ox_lib/Modules/Dui",children:[{kind:"Folder",name:"Javascript",route:"/overextended/ox_lib/Modules/Dui/Javascript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Dui/Javascript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Dui/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Dui/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"GetClosestObject",route:"/overextended/ox_lib/Modules/GetClosestObject",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestObject/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPed",route:"/overextended/ox_lib/Modules/GetClosestPed",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestPed/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPlayer",route:"/overextended/ox_lib/Modules/GetClosestPlayer",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestVehicle",route:"/overextended/ox_lib/Modules/GetClosestVehicle",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyObjects",route:"/overextended/ox_lib/Modules/GetNearbyObjects",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPeds",route:"/overextended/ox_lib/Modules/GetNearbyPeds",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPlayers",route:"/overextended/ox_lib/Modules/GetNearbyPlayers",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyVehicles",route:"/overextended/ox_lib/Modules/GetNearbyVehicles",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Interface",route:"/overextended/ox_lib/Modules/Interface",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_lib/Modules/Interface/Client",children:[{kind:"MdxPage",name:"alert",route:"/overextended/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"}},{kind:"MdxPage",name:"clipboard",route:"/overextended/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"}},{kind:"MdxPage",name:"context",route:"/overextended/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"}},{kind:"MdxPage",name:"input",route:"/overextended/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"}},{kind:"MdxPage",name:"menu",route:"/overextended/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"}},{kind:"MdxPage",name:"notify",route:"/overextended/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"}},{kind:"MdxPage",name:"progress",route:"/overextended/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"}},{kind:"MdxPage",name:"radial",route:"/overextended/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"}},{kind:"MdxPage",name:"skillcheck",route:"/overextended/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"}},{kind:"MdxPage",name:"textui",route:"/overextended/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"}},{kind:"Meta",data:{alert:"Alert Dialog",clipboard:"Clipboard",context:"Context Menu",input:"Input Dialog",menu:"Menu",notify:"Notifications",progress:"Progress",radial:"Radial Menu",skillcheck:"Skill Check",textui:"TextUI"}}]}]},{kind:"MdxPage",name:"Interface",route:"/overextended/ox_lib/Modules/Interface",frontMatter:{title:"Interface"}},{kind:"Folder",name:"Locale",route:"/overextended/ox_lib/Modules/Locale",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Locale/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Logger",route:"/overextended/ox_lib/Modules/Logger",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Logger/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"Marker",route:"/overextended/ox_lib/Modules/Marker",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Marker/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Math",route:"/overextended/ox_lib/Modules/Math",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Math/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Points",route:"/overextended/ox_lib/Modules/Points",children:[{kind:"Folder",name:"JavaScript",route:"/overextended/ox_lib/Modules/Points/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Points/JavaScript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Points/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Points/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"Print",route:"/overextended/ox_lib/Modules/Print",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Print/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Raycast",route:"/overextended/ox_lib/Modules/Raycast",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Raycast/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Require",route:"/overextended/ox_lib/Modules/Require",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Require/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Streaming",route:"/overextended/ox_lib/Modules/Streaming",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Streaming/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"String",route:"/overextended/ox_lib/Modules/String",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/String/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Table",route:"/overextended/ox_lib/Modules/Table",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Table/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Timer",route:"/overextended/ox_lib/Modules/Timer",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Timer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"VehicleProperties",route:"/overextended/ox_lib/Modules/VehicleProperties",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/VehicleProperties/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Version",route:"/overextended/ox_lib/Modules/Version",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Version/Server"},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Version/Shared"},{kind:"Meta",data:{Server:"Server",Shared:"Shared"}}]},{kind:"Folder",name:"WaitFor",route:"/overextended/ox_lib/Modules/WaitFor",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/WaitFor/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Zones",route:"/overextended/ox_lib/Modules/Zones",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Zones/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Meta",data:{Interface:"Interface"}}]}]},{kind:"MdxPage",name:"ox_lib",route:"/overextended/ox_lib"},{kind:"Folder",name:"ox_target",route:"/overextended/ox_target",children:[{kind:"Folder",name:"Functions",route:"/overextended/ox_target/Functions",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_target/Functions/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"MdxPage",name:"TargetOptions",route:"/overextended/ox_target/TargetOptions"},{kind:"Meta",data:{TargetOptions:"TargetOptions"}}]},{kind:"MdxPage",name:"ox_target",route:"/overextended/ox_target"},{kind:"Folder",name:"oxmysql",route:"/overextended/oxmysql",children:[{kind:"Folder",name:"Functions",route:"/overextended/oxmysql/Functions",children:[{kind:"MdxPage",name:"insert",route:"/overextended/oxmysql/Functions/insert",frontMatter:{title:"insert"}},{kind:"MdxPage",name:"prepare",route:"/overextended/oxmysql/Functions/prepare",frontMatter:{title:"prepare"}},{kind:"MdxPage",name:"query",route:"/overextended/oxmysql/Functions/query",frontMatter:{title:"query"}},{kind:"MdxPage",name:"rawExecute",route:"/overextended/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"}},{kind:"MdxPage",name:"scalar",route:"/overextended/oxmysql/Functions/scalar",frontMatter:{title:"scalar"}},{kind:"MdxPage",name:"single",route:"/overextended/oxmysql/Functions/single",frontMatter:{title:"single"}},{kind:"MdxPage",name:"transaction",route:"/overextended/oxmysql/Functions/transaction",frontMatter:{title:"transaction"}},{kind:"MdxPage",name:"update",route:"/overextended/oxmysql/Functions/update",frontMatter:{title:"update"}},{kind:"Meta",data:{insert:"insert",prepare:"prepare",query:"query",rawExecute:"rawExecute",scalar:"scalar",single:"single",transaction:"transaction",update:"update"}}]},{kind:"Meta",data:{benchmark:"Benchmark",placeholders:"Placeholders",ui:"Debug UI",Functions:"Fun\xe7\xf5es"}},{kind:"MdxPage",name:"benchmark",route:"/overextended/oxmysql/benchmark"},{kind:"MdxPage",name:"placeholders",route:"/overextended/oxmysql/placeholders"},{kind:"MdxPage",name:"ui",route:"/overextended/oxmysql/ui"}]},{kind:"MdxPage",name:"oxmysql",route:"/overextended/oxmysql",frontMatter:{title:"OxMySQL"}}]},{kind:"MdxPage",name:"overextended",route:"/overextended",frontMatter:{title:"Introdu\xe7\xe3o"}},{kind:"MdxPage",name:"qbox",route:"/qbox"},{kind:"MdxPage",name:"resources",route:"/resources"}],oE.flexsearch={codeblocks:!0},oE.themeConfig=oC},528:function(n,a){"use strict";var g,v;Object.defineProperty(a,"__esModule",{value:!0}),function(n,a){for(var g in a)Object.defineProperty(n,g,{enumerable:!0,get:a[g]})}(a,{PrefetchKind:function(){return g},ACTION_REFRESH:function(){return j},ACTION_NAVIGATE:function(){return z},ACTION_RESTORE:function(){return H},ACTION_SERVER_PATCH:function(){return B},ACTION_PREFETCH:function(){return W},ACTION_FAST_REFRESH:function(){return K},ACTION_SERVER_ACTION:function(){return ee}});let j="refresh",z="navigate",H="restore",B="server-patch",W="prefetch",K="fast-refresh",ee="server-action";(v=g||(g={})).AUTO="auto",v.FULL="full",v.TEMPORARY="temporary",("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},4038:function(n,a,g){"use strict";function getDomainLocale(n,a,g,v){return!1}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getDomainLocale",{enumerable:!0,get:function(){return getDomainLocale}}),g(9785),("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},2377:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"Image",{enumerable:!0,get:function(){return ei}});let v=g(1351),j=g(5815),z=j._(g(5271)),H=v._(g(967)),B=v._(g(4507)),W=g(4853),K=g(2156),ee=g(8244);g(1226);let et=g(2195),er=v._(g(5118)),en={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function handleLoading(n,a,g,v,j,z){let H=null==n?void 0:n.src;if(!n||n["data-loaded-src"]===H)return;n["data-loaded-src"]=H;let B="decode"in n?n.decode():Promise.resolve();B.catch(()=>{}).then(()=>{if(n.parentElement&&n.isConnected){if("empty"!==a&&j(!0),null==g?void 0:g.current){let a=new Event("load");Object.defineProperty(a,"target",{writable:!1,value:n});let v=!1,j=!1;g.current({...a,nativeEvent:a,currentTarget:n,target:n,isDefaultPrevented:()=>v,isPropagationStopped:()=>j,persist:()=>{},preventDefault:()=>{v=!0,a.preventDefault()},stopPropagation:()=>{j=!0,a.stopPropagation()}})}(null==v?void 0:v.current)&&v.current(n)}})}function getDynamicProps(n){let[a,g]=z.version.split("."),v=parseInt(a,10),j=parseInt(g,10);return v>18||18===v&&j>=3?{fetchPriority:n}:{fetchpriority:n}}let eo=(0,z.forwardRef)((n,a)=>{let{src:g,srcSet:v,sizes:j,height:H,width:B,decoding:W,className:K,style:ee,fetchPriority:et,placeholder:er,loading:en,unoptimized:eo,fill:ei,onLoadRef:es,onLoadingCompleteRef:el,setBlurComplete:ec,setShowAltText:eu,onLoad:ed,onError:ep,...ef}=n;return z.default.createElement("img",{...ef,...getDynamicProps(et),loading:en,width:B,height:H,decoding:W,"data-nimg":ei?"fill":"1",className:K,style:ee,sizes:j,srcSet:v,src:g,ref:(0,z.useCallback)(n=>{a&&("function"==typeof a?a(n):"object"==typeof a&&(a.current=n)),n&&(ep&&(n.src=n.src),n.complete&&handleLoading(n,er,es,el,ec,eo))},[g,er,es,el,ec,ep,eo,a]),onLoad:n=>{let a=n.currentTarget;handleLoading(a,er,es,el,ec,eo)},onError:n=>{eu(!0),"empty"!==er&&ec(!0),ep&&ep(n)}})});function ImagePreload(n){let{isAppRouter:a,imgAttributes:g}=n,v={as:"image",imageSrcSet:g.srcSet,imageSizes:g.sizes,crossOrigin:g.crossOrigin,referrerPolicy:g.referrerPolicy,...getDynamicProps(g.fetchPriority)};return a&&H.default.preload?(H.default.preload(g.src,v),null):z.default.createElement(B.default,null,z.default.createElement("link",{key:"__nimg-"+g.src+g.srcSet+g.sizes,rel:"preload",href:g.srcSet?void 0:g.src,...v}))}let ei=(0,z.forwardRef)((n,a)=>{let g=(0,z.useContext)(et.RouterContext),v=(0,z.useContext)(ee.ImageConfigContext),j=(0,z.useMemo)(()=>{let n=en||v||K.imageConfigDefault,a=[...n.deviceSizes,...n.imageSizes].sort((n,a)=>n-a),g=n.deviceSizes.sort((n,a)=>n-a);return{...n,allSizes:a,deviceSizes:g}},[v]),{onLoad:H,onLoadingComplete:B}=n,ei=(0,z.useRef)(H);(0,z.useEffect)(()=>{ei.current=H},[H]);let es=(0,z.useRef)(B);(0,z.useEffect)(()=>{es.current=B},[B]);let[el,ec]=(0,z.useState)(!1),[eu,ed]=(0,z.useState)(!1),{props:ep,meta:ef}=(0,W.getImgProps)(n,{defaultLoader:er.default,imgConf:j,blurComplete:el,showAltText:eu});return z.default.createElement(z.default.Fragment,null,z.default.createElement(eo,{...ep,unoptimized:ef.unoptimized,placeholder:ef.placeholder,fill:ef.fill,onLoadRef:ei,onLoadingCompleteRef:es,setBlurComplete:ec,setShowAltText:ed,ref:a}),ef.priority?z.default.createElement(ImagePreload,{isAppRouter:!g,imgAttributes:ep}):null)});("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},8357:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return ec}});let v=g(1351),j=v._(g(5271)),z=g(475),H=g(8436),B=g(9616),W=g(6525),K=g(4059),ee=g(2195),et=g(374),er=g(6683),en=g(4038),eo=g(4407),ei=g(528),es=new Set;function prefetch(n,a,g,v,j,z){if(!z&&!(0,H.isLocalURL)(a))return;if(!v.bypassPrefetchedCheck){let j=void 0!==v.locale?v.locale:"locale"in n?n.locale:void 0,z=a+"%"+g+"%"+j;if(es.has(z))return;es.add(z)}let B=z?n.prefetch(a,j):n.prefetch(a,g,v);Promise.resolve(B).catch(n=>{})}function formatStringOrUrl(n){return"string"==typeof n?n:(0,B.formatUrl)(n)}let el=j.default.forwardRef(function(n,a){let g,v;let{href:B,as:es,children:el,prefetch:ec=null,passHref:eu,replace:ed,shallow:ep,scroll:ef,locale:em,onClick:eh,onMouseEnter:eg,onTouchStart:ex,legacyBehavior:ev=!1,...ey}=n;g=el,ev&&("string"==typeof g||"number"==typeof g)&&(g=j.default.createElement("a",null,g));let eb=j.default.useContext(ee.RouterContext),e_=j.default.useContext(et.AppRouterContext),eS=null!=eb?eb:e_,ew=!eb,ek=!1!==ec,eO=null===ec?ei.PrefetchKind.AUTO:ei.PrefetchKind.FULL,{href:ej,as:eC}=j.default.useMemo(()=>{if(!eb){let n=formatStringOrUrl(B);return{href:n,as:es?formatStringOrUrl(es):n}}let[n,a]=(0,z.resolveHref)(eb,B,!0);return{href:n,as:es?(0,z.resolveHref)(eb,es):a||n}},[eb,B,es]),eP=j.default.useRef(ej),eE=j.default.useRef(eC);ev&&(v=j.default.Children.only(g));let eI=ev?v&&"object"==typeof v&&v.ref:a,[eT,eM,eA]=(0,er.useIntersection)({rootMargin:"200px"}),eN=j.default.useCallback(n=>{(eE.current!==eC||eP.current!==ej)&&(eA(),eE.current=eC,eP.current=ej),eT(n),eI&&("function"==typeof eI?eI(n):"object"==typeof eI&&(eI.current=n))},[eC,eI,ej,eA,eT]);j.default.useEffect(()=>{eS&&eM&&ek&&prefetch(eS,ej,eC,{locale:em},{kind:eO},ew)},[eC,ej,eM,em,ek,null==eb?void 0:eb.locale,eS,ew,eO]);let eR={ref:eN,onClick(n){ev||"function"!=typeof eh||eh(n),ev&&v.props&&"function"==typeof v.props.onClick&&v.props.onClick(n),eS&&!n.defaultPrevented&&function(n,a,g,v,z,B,W,K,ee,et){let{nodeName:er}=n.currentTarget,en="A"===er.toUpperCase();if(en&&(function(n){let a=n.currentTarget,g=a.getAttribute("target");return g&&"_self"!==g||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.nativeEvent&&2===n.nativeEvent.which}(n)||!ee&&!(0,H.isLocalURL)(g)))return;n.preventDefault();let navigate=()=>{let n=null==W||W;"beforePopState"in a?a[z?"replace":"push"](g,v,{shallow:B,locale:K,scroll:n}):a[z?"replace":"push"](v||g,{forceOptimisticNavigation:!et,scroll:n})};ee?j.default.startTransition(navigate):navigate()}(n,eS,ej,eC,ed,ep,ef,em,ew,ek)},onMouseEnter(n){ev||"function"!=typeof eg||eg(n),ev&&v.props&&"function"==typeof v.props.onMouseEnter&&v.props.onMouseEnter(n),eS&&(ek||!ew)&&prefetch(eS,ej,eC,{locale:em,priority:!0,bypassPrefetchedCheck:!0},{kind:eO},ew)},onTouchStart(n){ev||"function"!=typeof ex||ex(n),ev&&v.props&&"function"==typeof v.props.onTouchStart&&v.props.onTouchStart(n),eS&&(ek||!ew)&&prefetch(eS,ej,eC,{locale:em,priority:!0,bypassPrefetchedCheck:!0},{kind:eO},ew)}};if((0,W.isAbsoluteUrl)(eC))eR.href=eC;else if(!ev||eu||"a"===v.type&&!("href"in v.props)){let n=void 0!==em?em:null==eb?void 0:eb.locale,a=(null==eb?void 0:eb.isLocaleDomain)&&(0,en.getDomainLocale)(eC,n,null==eb?void 0:eb.locales,null==eb?void 0:eb.domainLocales);eR.href=a||(0,eo.addBasePath)((0,K.addLocale)(eC,n,null==eb?void 0:eb.defaultLocale))}return ev?j.default.cloneElement(v,eR):j.default.createElement("a",{...ey,...eR},g)}),ec=el;("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},6683:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useIntersection",{enumerable:!0,get:function(){return useIntersection}});let v=g(5271),j=g(4517),z="function"==typeof IntersectionObserver,H=new Map,B=[];function useIntersection(n){let{rootRef:a,rootMargin:g,disabled:W}=n,K=W||!z,[ee,et]=(0,v.useState)(!1),er=(0,v.useRef)(null),en=(0,v.useCallback)(n=>{er.current=n},[]);(0,v.useEffect)(()=>{if(z){if(K||ee)return;let n=er.current;if(n&&n.tagName){let v=function(n,a,g){let{id:v,observer:j,elements:z}=function(n){let a;let g={root:n.root||null,margin:n.rootMargin||""},v=B.find(n=>n.root===g.root&&n.margin===g.margin);if(v&&(a=H.get(v)))return a;let j=new Map,z=new IntersectionObserver(n=>{n.forEach(n=>{let a=j.get(n.target),g=n.isIntersecting||n.intersectionRatio>0;a&&g&&a(g)})},n);return a={id:g,observer:z,elements:j},B.push(g),H.set(g,a),a}(g);return z.set(n,a),j.observe(n),function(){if(z.delete(n),j.unobserve(n),0===z.size){j.disconnect(),H.delete(v);let n=B.findIndex(n=>n.root===v.root&&n.margin===v.margin);n>-1&&B.splice(n,1)}}}(n,n=>n&&et(n),{root:null==a?void 0:a.current,rootMargin:g});return v}}else if(!ee){let n=(0,j.requestIdleCallback)(()=>et(!0));return()=>(0,j.cancelIdleCallback)(n)}},[K,g,a,ee,er.current]);let eo=(0,v.useCallback)(()=>{et(!1)},[]);return[en,ee,eo]}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},4853:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getImgProps",{enumerable:!0,get:function(){return getImgProps}}),g(1226);let v=g(9323),j=g(2156);function isStaticRequire(n){return void 0!==n.default}function getInt(n){return void 0===n?n:"number"==typeof n?Number.isFinite(n)?n:NaN:"string"==typeof n&&/^[0-9]+$/.test(n)?parseInt(n,10):NaN}function getImgProps(n,a){var g;let z,H,B,{src:W,sizes:K,unoptimized:ee=!1,priority:et=!1,loading:er,className:en,quality:eo,width:ei,height:es,fill:el=!1,style:ec,onLoad:eu,onLoadingComplete:ed,placeholder:ep="empty",blurDataURL:ef,fetchPriority:em,layout:eh,objectFit:eg,objectPosition:ex,lazyBoundary:ev,lazyRoot:ey,...eb}=n,{imgConf:e_,showAltText:eS,blurComplete:ew,defaultLoader:ek}=a,eO=e_||j.imageConfigDefault;if("allSizes"in eO)z=eO;else{let n=[...eO.deviceSizes,...eO.imageSizes].sort((n,a)=>n-a),a=eO.deviceSizes.sort((n,a)=>n-a);z={...eO,allSizes:n,deviceSizes:a}}let ej=eb.loader||ek;delete eb.loader,delete eb.srcSet;let eC="__next_img_default"in ej;if(eC){if("custom"===z.loader)throw Error('Image with src "'+W+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let n=ej;ej=a=>{let{config:g,...v}=a;return n(v)}}if(eh){"fill"===eh&&(el=!0);let n={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[eh];n&&(ec={...ec,...n});let a={responsive:"100vw",fill:"100vw"}[eh];a&&!K&&(K=a)}let eP="",eE=getInt(ei),eI=getInt(es);if("object"==typeof(g=W)&&(isStaticRequire(g)||void 0!==g.src)){let n=isStaticRequire(W)?W.default:W;if(!n.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(n));if(!n.height||!n.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(n));if(H=n.blurWidth,B=n.blurHeight,ef=ef||n.blurDataURL,eP=n.src,!el){if(eE||eI){if(eE&&!eI){let a=eE/n.width;eI=Math.round(n.height*a)}else if(!eE&&eI){let a=eI/n.height;eE=Math.round(n.width*a)}}else eE=n.width,eI=n.height}}let eT=!et&&("lazy"===er||void 0===er);(!(W="string"==typeof W?W:eP)||W.startsWith("data:")||W.startsWith("blob:"))&&(ee=!0,eT=!1),z.unoptimized&&(ee=!0),eC&&W.endsWith(".svg")&&!z.dangerouslyAllowSVG&&(ee=!0),et&&(em="high");let eM=getInt(eo),eA=Object.assign(el?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:eg,objectPosition:ex}:{},eS?{}:{color:"transparent"},ec),eN=ew||"empty"===ep?null:"blur"===ep?'url("data:image/svg+xml;charset=utf-8,'+(0,v.getImageBlurSvg)({widthInt:eE,heightInt:eI,blurWidth:H,blurHeight:B,blurDataURL:ef||"",objectFit:eA.objectFit})+'")':'url("'+ep+'")',eR=eN?{backgroundSize:eA.objectFit||"cover",backgroundPosition:eA.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:eN}:{},eD=function(n){let{config:a,src:g,unoptimized:v,width:j,quality:z,sizes:H,loader:B}=n;if(v)return{src:g,srcSet:void 0,sizes:void 0};let{widths:W,kind:K}=function(n,a,g){let{deviceSizes:v,allSizes:j}=n;if(g){let n=/(^|\s)(1?\d?\d)vw/g,a=[];for(let v;v=n.exec(g);v)a.push(parseInt(v[2]));if(a.length){let n=.01*Math.min(...a);return{widths:j.filter(a=>a>=v[0]*n),kind:"w"}}return{widths:j,kind:"w"}}if("number"!=typeof a)return{widths:v,kind:"w"};let z=[...new Set([a,2*a].map(n=>j.find(a=>a>=n)||j[j.length-1]))];return{widths:z,kind:"x"}}(a,j,H),ee=W.length-1;return{sizes:H||"w"!==K?H:"100vw",srcSet:W.map((n,v)=>B({config:a,src:g,quality:z,width:n})+" "+("w"===K?n:v+1)+K).join(", "),src:B({config:a,src:g,quality:z,width:W[ee]})}}({config:z,src:W,unoptimized:ee,width:eE,quality:eM,sizes:K,loader:ej}),eL={...eb,loading:eT?"lazy":er,fetchPriority:em,width:eE,height:eI,decoding:"async",className:en,style:{...eA,...eR},sizes:eD.sizes,srcSet:eD.srcSet,src:eD.src},eZ={unoptimized:ee,priority:et,placeholder:ep,fill:el};return{props:eL,meta:eZ}}},9323:function(n,a){"use strict";function getImageBlurSvg(n){let{widthInt:a,heightInt:g,blurWidth:v,blurHeight:j,blurDataURL:z,objectFit:H}=n,B=v?40*v:a,W=j?40*j:g,K=B&&W?"viewBox='0 0 "+B+" "+W+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+K+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(K?"none":"contain"===H?"xMidYMid":"cover"===H?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+z+"'/%3E%3C/svg%3E"}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getImageBlurSvg",{enumerable:!0,get:function(){return getImageBlurSvg}})},1011:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),function(n,a){for(var g in a)Object.defineProperty(n,g,{enumerable:!0,get:a[g]})}(a,{unstable_getImgProps:function(){return unstable_getImgProps},default:function(){return W}});let v=g(1351),j=g(4853),z=g(1226),H=g(2377),B=v._(g(5118)),unstable_getImgProps=n=>{(0,z.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:a}=(0,j.getImgProps)(n,{defaultLoader:B.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[n,g]of Object.entries(a))void 0===g&&delete a[n];return{props:a}},W=H.Image},5118:function(n,a){"use strict";function defaultLoader(n){let{config:a,src:g,width:v,quality:j}=n;return a.path+"?url="+encodeURIComponent(g)+"&w="+v+"&q="+(j||75)}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return g}}),defaultLoader.__next_img_default=!0;let g=defaultLoader},1384:function(){},4323:function(){},2449:function(){},518:function(n){!function(){"use strict";var a={114:function(n){function assertPath(n){if("string"!=typeof n)throw TypeError("Path must be a string. Received "+JSON.stringify(n))}function normalizeStringPosix(n,a){for(var g,v="",j=0,z=-1,H=0,B=0;B<=n.length;++B){if(B2){var W=v.lastIndexOf("/");if(W!==v.length-1){-1===W?(v="",j=0):j=(v=v.slice(0,W)).length-1-v.lastIndexOf("/"),z=B,H=0;continue}}else if(2===v.length||1===v.length){v="",j=0,z=B,H=0;continue}}a&&(v.length>0?v+="/..":v="..",j=2)}else v.length>0?v+="/"+n.slice(z+1,B):v=n.slice(z+1,B),j=B-z-1;z=B,H=0}else 46===g&&-1!==H?++H:H=-1}return v}var a={resolve:function(){for(var n,a,g="",v=!1,j=arguments.length-1;j>=-1&&!v;j--)j>=0?a=arguments[j]:(void 0===n&&(n=""),a=n),assertPath(a),0!==a.length&&(g=a+"/"+g,v=47===a.charCodeAt(0));return(g=normalizeStringPosix(g,!v),v)?g.length>0?"/"+g:"/":g.length>0?g:"."},normalize:function(n){if(assertPath(n),0===n.length)return".";var a=47===n.charCodeAt(0),g=47===n.charCodeAt(n.length-1);return(0!==(n=normalizeStringPosix(n,!a)).length||a||(n="."),n.length>0&&g&&(n+="/"),a)?"/"+n:n},isAbsolute:function(n){return assertPath(n),n.length>0&&47===n.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var n,g=0;g0&&(void 0===n?n=v:n+="/"+v)}return void 0===n?".":a.normalize(n)},relative:function(n,g){if(assertPath(n),assertPath(g),n===g||(n=a.resolve(n))===(g=a.resolve(g)))return"";for(var v=1;vW){if(47===g.charCodeAt(H+ee))return g.slice(H+ee+1);if(0===ee)return g.slice(H+ee)}else z>W&&(47===n.charCodeAt(v+ee)?K=ee:0===ee&&(K=0));break}var et=n.charCodeAt(v+ee);if(et!==g.charCodeAt(H+ee))break;47===et&&(K=ee)}var er="";for(ee=v+K+1;ee<=j;++ee)(ee===j||47===n.charCodeAt(ee))&&(0===er.length?er+="..":er+="/..");return er.length>0?er+g.slice(H+K):(H+=K,47===g.charCodeAt(H)&&++H,g.slice(H))},_makeLong:function(n){return n},dirname:function(n){if(assertPath(n),0===n.length)return".";for(var a=n.charCodeAt(0),g=47===a,v=-1,j=!0,z=n.length-1;z>=1;--z)if(47===(a=n.charCodeAt(z))){if(!j){v=z;break}}else j=!1;return -1===v?g?"/":".":g&&1===v?"//":n.slice(0,v)},basename:function(n,a){if(void 0!==a&&"string"!=typeof a)throw TypeError('"ext" argument must be a string');assertPath(n);var g,v=0,j=-1,z=!0;if(void 0!==a&&a.length>0&&a.length<=n.length){if(a.length===n.length&&a===n)return"";var H=a.length-1,B=-1;for(g=n.length-1;g>=0;--g){var W=n.charCodeAt(g);if(47===W){if(!z){v=g+1;break}}else -1===B&&(z=!1,B=g+1),H>=0&&(W===a.charCodeAt(H)?-1==--H&&(j=g):(H=-1,j=B))}return v===j?j=B:-1===j&&(j=n.length),n.slice(v,j)}for(g=n.length-1;g>=0;--g)if(47===n.charCodeAt(g)){if(!z){v=g+1;break}}else -1===j&&(z=!1,j=g+1);return -1===j?"":n.slice(v,j)},extname:function(n){assertPath(n);for(var a=-1,g=0,v=-1,j=!0,z=0,H=n.length-1;H>=0;--H){var B=n.charCodeAt(H);if(47===B){if(!j){g=H+1;break}continue}-1===v&&(j=!1,v=H+1),46===B?-1===a?a=H:1!==z&&(z=1):-1!==a&&(z=-1)}return -1===a||-1===v||0===z||1===z&&a===v-1&&a===g+1?"":n.slice(a,v)},format:function(n){var a,g;if(null===n||"object"!=typeof n)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a=n.dir||n.root,g=n.base||(n.name||"")+(n.ext||""),a?a===n.root?a+g:a+"/"+g:g},parse:function(n){assertPath(n);var a,g={root:"",dir:"",base:"",ext:"",name:""};if(0===n.length)return g;var v=n.charCodeAt(0),j=47===v;j?(g.root="/",a=1):a=0;for(var z=-1,H=0,B=-1,W=!0,K=n.length-1,ee=0;K>=a;--K){if(47===(v=n.charCodeAt(K))){if(!W){H=K+1;break}continue}-1===B&&(W=!1,B=K+1),46===v?-1===z?z=K:1!==ee&&(ee=1):-1!==z&&(ee=-1)}return -1===z||-1===B||0===ee||1===ee&&z===B-1&&z===H+1?-1!==B&&(0===H&&j?g.base=g.name=n.slice(1,B):g.base=g.name=n.slice(H,B)):(0===H&&j?(g.name=n.slice(1,z),g.base=n.slice(1,B)):(g.name=n.slice(H,z),g.base=n.slice(H,B)),g.ext=n.slice(z,B)),H>0?g.dir=n.slice(0,H-1):j&&(g.dir="/"),g},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a}},g={};function __nccwpck_require__(n){var v=g[n];if(void 0!==v)return v.exports;var j=g[n]={exports:{}},z=!0;try{a[n](j,j.exports,__nccwpck_require__),z=!1}finally{z&&delete g[n]}return j.exports}__nccwpck_require__.ab="//";var v=__nccwpck_require__(114);n.exports=v}()},1750:function(n){!function(){var a={229:function(n){var a,g,v,j=n.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(n){if(a===setTimeout)return setTimeout(n,0);if((a===defaultSetTimout||!a)&&setTimeout)return a=setTimeout,setTimeout(n,0);try{return a(n,0)}catch(g){try{return a.call(null,n,0)}catch(g){return a.call(this,n,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(n){a=defaultSetTimout}try{g="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(n){g=defaultClearTimeout}}();var z=[],H=!1,B=-1;function cleanUpNextTick(){H&&v&&(H=!1,v.length?z=v.concat(z):B=-1,z.length&&drainQueue())}function drainQueue(){if(!H){var n=runTimeout(cleanUpNextTick);H=!0;for(var a=z.length;a;){for(v=z,z=[];++B1)for(var g=1;g(0,B.jsx)("button",{className:(0,H.Z)("nextra-button nx-transition-all active:nx-opacity-50","nx-bg-primary-700/5 nx-border nx-border-black/5 nx-text-gray-600 hover:nx-text-gray-900 nx-rounded-md nx-p-1.5","dark:nx-bg-primary-300/10 dark:nx-border-white/10 dark:nx-text-gray-400 dark:hover:nx-text-gray-50",a),...g,children:n}),W=g(2766),K={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,B.jsx)(W.AV,{className:"nx-mt-1"}),warning:"⚠️"},ee={default:(0,H.Z)("nx-border-orange-100 nx-bg-orange-50 nx-text-orange-800 dark:nx-border-orange-400/30 dark:nx-bg-orange-400/20 dark:nx-text-orange-300"),error:(0,H.Z)("nx-border-red-200 nx-bg-red-100 nx-text-red-900 dark:nx-border-red-200/30 dark:nx-bg-red-900/30 dark:nx-text-red-200"),info:(0,H.Z)("nx-border-blue-200 nx-bg-blue-100 nx-text-blue-900 dark:nx-border-blue-200/30 dark:nx-bg-blue-900/30 dark:nx-text-blue-200"),warning:(0,H.Z)("nx-border-yellow-100 nx-bg-yellow-50 nx-text-yellow-900 dark:nx-border-yellow-200/30 dark:nx-bg-yellow-700/30 dark:nx-text-yellow-200")};function Callout({children:n,type:a="default",emoji:g=K[a]}){return(0,B.jsxs)("div",{className:(0,H.Z)("nextra-callout nx-overflow-x-auto nx-mt-6 nx-flex nx-rounded-lg nx-border nx-py-2 ltr:nx-pr-4 rtl:nx-pl-4","contrast-more:nx-border-current contrast-more:dark:nx-border-current",ee[a]),children:[(0,B.jsx)("div",{className:"nx-select-none nx-text-xl ltr:nx-pl-3 ltr:nx-pr-2 rtl:nx-pr-3 rtl:nx-pl-2",style:{fontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},children:g}),(0,B.jsx)("div",{className:"nx-w-full nx-min-w-0 nx-leading-7",children:n})]})}var et=g(5271),CopyToClipboard=({getValue:n,...a})=>{let[g,v]=(0,et.useState)(!1);(0,et.useEffect)(()=>{if(!g)return;let n=setTimeout(()=>{v(!1)},2e3);return()=>{clearTimeout(n)}},[g]);let j=(0,et.useCallback)(async()=>{v(!0),navigator?.clipboard||console.error("Access to clipboard rejected!");try{await navigator.clipboard.writeText(n())}catch{console.error("Failed to copy!")}},[n]),z=g?W.nQ:W.TI;return(0,B.jsx)(Button,{onClick:j,title:"Copy code",tabIndex:0,...a,children:(0,B.jsx)(z,{className:"nextra-copy-icon nx-pointer-events-none nx-h-4 nx-w-4"})})},Code=({children:n,className:a,...g})=>{let v="data-line-numbers"in g;return(0,B.jsx)("code",{className:(0,H.Z)("nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] nx-text-[.9em]","dark:nx-border-white/10 dark:nx-bg-white/10",v&&"[counter-reset:line]",a),dir:"ltr",...g,children:n})},Pre=({children:n,className:a,hasCopyCode:g,filename:v,...j})=>{let z=(0,et.useRef)(null),K=(0,et.useCallback)(()=>{let n=document.documentElement.dataset,a="nextraWordWrap"in n;a?delete n.nextraWordWrap:n.nextraWordWrap=""},[]);return(0,B.jsxs)("div",{className:"nextra-code-block nx-relative nx-mt-6 first:nx-mt-0",children:[v&&(0,B.jsx)("div",{className:"nx-absolute nx-top-0 nx-z-[1] nx-w-full nx-truncate nx-rounded-t-xl nx-bg-primary-700/5 nx-py-2 nx-px-4 nx-text-xs nx-text-gray-700 dark:nx-bg-primary-300/10 dark:nx-text-gray-200",children:v}),(0,B.jsx)("pre",{className:(0,H.Z)("nx-bg-primary-700/5 nx-mb-4 nx-overflow-x-auto nx-rounded-xl nx-subpixel-antialiased dark:nx-bg-primary-300/10 nx-text-[.9em]","contrast-more:nx-border contrast-more:nx-border-primary-900/20 contrast-more:nx-contrast-150 contrast-more:dark:nx-border-primary-100/40",v?"nx-pt-12 nx-pb-4":"nx-py-4",a),ref:z,...j,children:n}),(0,B.jsxs)("div",{className:(0,H.Z)("nx-opacity-0 nx-transition [div:hover>&]:nx-opacity-100 focus-within:nx-opacity-100","nx-flex nx-gap-1 nx-absolute nx-m-[11px] nx-right-0",v?"nx-top-8":"nx-top-0"),children:[(0,B.jsx)(Button,{onClick:K,className:"md:nx-hidden",title:"Toggle word wrap",children:(0,B.jsx)(W.NK,{className:"nx-pointer-events-none nx-h-4 nx-w-4"})}),g&&(0,B.jsx)(CopyToClipboard,{getValue:()=>z.current?.querySelector("code")?.textContent||""})]})]})};function Steps({children:n,className:a,...g}){return(0,B.jsx)("div",{className:(0,H.Z)("nextra-steps nx-ml-4 nx-mb-12 nx-border-l nx-border-gray-200 nx-pl-6","dark:nx-border-neutral-800 [counter-reset:step]",a),...g,children:n})}var er=g(4327),en=g(9140),eo=g(2410),ei=g(93),es=g(121),el=g(2412),ec=g(3142),eu=g(8656),ed=g(4538);function focus_sentinel_b({onFocus:n}){let[a,g]=(0,et.useState)(!0),v=(0,eu.t)();return a?et.createElement(ed._,{as:"button",type:"button",features:ed.A.Focusable,onFocus:a=>{a.preventDefault();let j,z=50;j=requestAnimationFrame(function t(){if(z--<=0){j&&cancelAnimationFrame(j);return}if(n()){if(cancelAnimationFrame(j),!v.current)return;g(!1);return}j=requestAnimationFrame(t)})}}):null}var ep=g(4830),ef=g(2549),em=g(616),eh=g(4832),eg=g(2184);let ex=et.createContext(null);function C({children:n}){let a=et.useRef({groups:new Map,get(n,a){var g;let v=this.groups.get(n);v||(v=new Map,this.groups.set(n,v));let j=null!=(g=v.get(a))?g:0;return v.set(a,j+1),[Array.from(v.keys()).indexOf(a),function(){let n=v.get(a);n>1?v.set(a,n-1):v.delete(a)}]}});return et.createElement(ex.Provider,{value:a},n)}function d(n){let a=et.useContext(ex);if(!a)throw Error("You must wrap your component in a ");let g=function(){var n,a,g;let v=null!=(g=null==(a=null==(n=et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)?void 0:n.ReactCurrentOwner)?void 0:a.current)?g:null;if(!v)return Symbol();let j=[],z=v;for(;z;)j.push(z.index),z=z.return;return"$."+j.join(".")}(),[v,j]=a.current.get(n,g);return et.useEffect(()=>j,[]),v}var ev=((v=ev||{})[v.Forwards=0]="Forwards",v[v.Backwards=1]="Backwards",v),ey=((j=ey||{})[j.Less=-1]="Less",j[j.Equal=0]="Equal",j[j.Greater=1]="Greater",j),eb=((z=eb||{})[z.SetSelectedIndex=0]="SetSelectedIndex",z[z.RegisterTab=1]="RegisterTab",z[z.UnregisterTab=2]="UnregisterTab",z[z.RegisterPanel=3]="RegisterPanel",z[z.UnregisterPanel=4]="UnregisterPanel",z);let e_={0(n,a){var g;let v=(0,ep.z2)(n.tabs,n=>n.current),j=(0,ep.z2)(n.panels,n=>n.current),z=v.filter(n=>{var a;return!(null!=(a=n.current)&&a.hasAttribute("disabled"))}),H={...n,tabs:v,panels:j};if(a.index<0||a.index>v.length-1){let g=(0,ef.E)(Math.sign(a.index-n.selectedIndex),{[-1]:()=>1,0:()=>(0,ef.E)(Math.sign(a.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===z.length)return H;let j=(0,ef.E)(g,{0:()=>v.indexOf(z[0]),1:()=>v.indexOf(z[z.length-1])});return{...H,selectedIndex:-1===j?n.selectedIndex:j}}let B=v.slice(0,a.index),W=[...v.slice(a.index),...B].find(n=>z.includes(n));if(!W)return H;let K=null!=(g=v.indexOf(W))?g:n.selectedIndex;return -1===K&&(K=n.selectedIndex),{...H,selectedIndex:K}},1(n,a){if(n.tabs.includes(a.tab))return n;let g=n.tabs[n.selectedIndex],v=(0,ep.z2)([...n.tabs,a.tab],n=>n.current),j=n.selectedIndex;return n.info.current.isControlled||-1===(j=v.indexOf(g))&&(j=n.selectedIndex),{...n,tabs:v,selectedIndex:j}},2:(n,a)=>({...n,tabs:n.tabs.filter(n=>n!==a.tab)}),3:(n,a)=>n.panels.includes(a.panel)?n:{...n,panels:(0,ep.z2)([...n.panels,a.panel],n=>n.current)},4:(n,a)=>({...n,panels:n.panels.filter(n=>n!==a.panel)})},eS=(0,et.createContext)(null);function F(n){let a=(0,et.useContext)(eS);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,F),a}return a}eS.displayName="TabsDataContext";let ew=(0,et.createContext)(null);function q(n){let a=(0,et.useContext)(ew);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,q),a}return a}function fe(n,a){return(0,ef.E)(a.type,e_,n,a)}ew.displayName="TabsActionsContext";let ek=et.Fragment,eO=eg.AN.RenderStrategy|eg.AN.Static,ej=Object.assign((0,eg.yV)(function(n,a){var g,v;let j=(0,eo.M)(),{id:z=`headlessui-tabs-tab-${j}`,...H}=n,{orientation:B,activation:W,selectedIndex:K,tabs:ee,panels:es}=F("Tab"),eu=q("Tab"),ed=F("Tab"),ex=(0,et.useRef)(null),ev=(0,ec.T)(ex,a);(0,ei.e)(()=>eu.registerTab(ex),[eu,ex]);let ey=d("tabs"),eb=ee.indexOf(ex);-1===eb&&(eb=ey);let e_=eb===K,eS=(0,en.z)(n=>{var a;let g=n();if(g===ep.fE.Success&&"auto"===W){let n=null==(a=(0,eh.r)(ex))?void 0:a.activeElement,g=ed.tabs.findIndex(a=>a.current===n);-1!==g&&eu.change(g)}return g}),ew=(0,en.z)(n=>{let a=ee.map(n=>n.current).filter(Boolean);if(n.key===er.R.Space||n.key===er.R.Enter){n.preventDefault(),n.stopPropagation(),eu.change(eb);return}switch(n.key){case er.R.Home:case er.R.PageUp:return n.preventDefault(),n.stopPropagation(),eS(()=>(0,ep.jA)(a,ep.TO.First));case er.R.End:case er.R.PageDown:return n.preventDefault(),n.stopPropagation(),eS(()=>(0,ep.jA)(a,ep.TO.Last))}if(eS(()=>(0,ef.E)(B,{vertical:()=>n.key===er.R.ArrowUp?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===er.R.ArrowDown?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error,horizontal:()=>n.key===er.R.ArrowLeft?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===er.R.ArrowRight?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error}))===ep.fE.Success)return n.preventDefault()}),ek=(0,et.useRef)(!1),eO=(0,en.z)(()=>{var n;ek.current||(ek.current=!0,null==(n=ex.current)||n.focus({preventScroll:!0}),eu.change(eb),(0,em.Y)(()=>{ek.current=!1}))}),ej=(0,en.z)(n=>{n.preventDefault()}),eC=(0,et.useMemo)(()=>{var a;return{selected:e_,disabled:null!=(a=n.disabled)&&a}},[e_,n.disabled]),eP={ref:ev,onKeyDown:ew,onMouseDown:ej,onClick:eO,id:z,role:"tab",type:(0,el.f)(n,ex),"aria-controls":null==(v=null==(g=es[eb])?void 0:g.current)?void 0:v.id,"aria-selected":e_,tabIndex:e_?0:-1};return(0,eg.sY)({ourProps:eP,theirProps:H,slot:eC,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,eg.yV)(function(n,a){let{defaultIndex:g=0,vertical:v=!1,manual:j=!1,onChange:z,selectedIndex:H=null,...B}=n,W=v?"vertical":"horizontal",K=j?"manual":"auto",ee=null!==H,er=(0,es.E)({isControlled:ee}),eo=(0,ec.T)(a),[el,eu]=(0,et.useReducer)(fe,{info:er,selectedIndex:null!=H?H:g,tabs:[],panels:[]}),ed=(0,et.useMemo)(()=>({selectedIndex:el.selectedIndex}),[el.selectedIndex]),ef=(0,es.E)(z||(()=>{})),em=(0,es.E)(el.tabs),eh=(0,et.useMemo)(()=>({orientation:W,activation:K,...el}),[W,K,el]),ex=(0,en.z)(n=>(eu({type:1,tab:n}),()=>eu({type:2,tab:n}))),ev=(0,en.z)(n=>(eu({type:3,panel:n}),()=>eu({type:4,panel:n}))),ey=(0,en.z)(n=>{eb.current!==n&&ef.current(n),ee||eu({type:0,index:n})}),eb=(0,es.E)(ee?n.selectedIndex:el.selectedIndex),e_=(0,et.useMemo)(()=>({registerTab:ex,registerPanel:ev,change:ey}),[]);return(0,ei.e)(()=>{eu({type:0,index:null!=H?H:g})},[H]),(0,ei.e)(()=>{if(void 0===eb.current||el.tabs.length<=0)return;let n=(0,ep.z2)(el.tabs,n=>n.current);n.some((n,a)=>el.tabs[a]!==n)&&ey(n.indexOf(el.tabs[eb.current]))}),et.createElement(C,null,et.createElement(ew.Provider,{value:e_},et.createElement(eS.Provider,{value:eh},eh.tabs.length<=0&&et.createElement(focus_sentinel_b,{onFocus:()=>{var n,a;for(let g of em.current)if((null==(n=g.current)?void 0:n.tabIndex)===0)return null==(a=g.current)||a.focus(),!0;return!1}}),(0,eg.sY)({ourProps:{ref:eo},theirProps:B,slot:ed,defaultTag:ek,name:"Tabs"}))))}),List:(0,eg.yV)(function(n,a){let{orientation:g,selectedIndex:v}=F("Tab.List"),j=(0,ec.T)(a);return(0,eg.sY)({ourProps:{ref:j,role:"tablist","aria-orientation":g},theirProps:n,slot:{selectedIndex:v},defaultTag:"div",name:"Tabs.List"})}),Panels:(0,eg.yV)(function(n,a){let{selectedIndex:g}=F("Tab.Panels"),v=(0,ec.T)(a),j=(0,et.useMemo)(()=>({selectedIndex:g}),[g]);return(0,eg.sY)({ourProps:{ref:v},theirProps:n,slot:j,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,eg.yV)(function(n,a){var g,v,j,z;let H=(0,eo.M)(),{id:B=`headlessui-tabs-panel-${H}`,tabIndex:W=0,...K}=n,{selectedIndex:ee,tabs:er,panels:en}=F("Tab.Panel"),es=q("Tab.Panel"),el=(0,et.useRef)(null),eu=(0,ec.T)(el,a);(0,ei.e)(()=>es.registerPanel(el),[es,el,B]);let ep=d("panels"),ef=en.indexOf(el);-1===ef&&(ef=ep);let em=ef===ee,eh=(0,et.useMemo)(()=>({selected:em}),[em]),ex={ref:eu,id:B,role:"tabpanel","aria-labelledby":null==(v=null==(g=er[ef])?void 0:g.current)?void 0:v.id,tabIndex:em?W:-1};return em||null!=(j=K.unmount)&&!j||null!=(z=K.static)&&z?(0,eg.sY)({ourProps:ex,theirProps:K,slot:eh,defaultTag:"div",features:eO,visible:em,name:"Tabs.Panel"}):et.createElement(ed._,{as:"span","aria-hidden":"true",...ex})})});function isTabObjectItem(n){return!!n&&"object"==typeof n&&"label"in n}function Tab({children:n,...a}){return(0,B.jsx)(ej.Panel,{...a,className:"nx-rounded nx-pt-6",children:n})}var eC=Object.assign(function({items:n,selectedIndex:a,defaultIndex:g=0,onChange:v,children:j,storageKey:z}){let[W,K]=(0,et.useState)(g);(0,et.useEffect)(()=>{void 0!==a&&K(a)},[a]),(0,et.useEffect)(()=>{if(!z)return;function fn(n){n.key===z&&K(Number(n.newValue))}let n=Number(localStorage.getItem(z));return K(Number.isNaN(n)?0:n),window.addEventListener("storage",fn),()=>{window.removeEventListener("storage",fn)}},[]);let ee=(0,et.useCallback)(n=>{if(z){let a=String(n);localStorage.setItem(z,a),window.dispatchEvent(new StorageEvent("storage",{key:z,newValue:a}));return}K(n),v?.(n)},[]);return(0,B.jsxs)(ej.Group,{selectedIndex:W,defaultIndex:g,onChange:ee,children:[(0,B.jsx)("div",{className:"nextra-scrollbar nx-overflow-x-auto nx-overflow-y-hidden nx-overscroll-x-contain",children:(0,B.jsx)(ej.List,{className:"nx-mt-4 nx-flex nx-w-max nx-min-w-full nx-border-b nx-border-gray-200 nx-pb-px dark:nx-border-neutral-800",children:n.map((n,a)=>{let g=isTabObjectItem(n)&&n.disabled;return(0,B.jsx)(ej,{disabled:g,className:({selected:n})=>(0,H.Z)("nx-mr-2 nx-rounded-t nx-p-2 nx-font-medium nx-leading-5 nx-transition-colors","-nx-mb-0.5 nx-select-none nx-border-b-2",n?"nx-border-primary-500 nx-text-primary-600":"nx-border-transparent nx-text-gray-600 hover:nx-border-gray-200 hover:nx-text-black dark:nx-text-gray-200 dark:hover:nx-border-neutral-800 dark:hover:nx-text-white",g&&"nx-pointer-events-none nx-text-gray-400 dark:nx-text-neutral-600"),children:isTabObjectItem(n)?n.label:n},a)})})}),(0,B.jsx)(ej.Panels,{children:j})]})},{displayName:"Tabs",Tab}),Td=({className:n="",...a})=>(0,B.jsx)("td",{className:(0,H.Z)("nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600",n),...a}),Table=({className:n="",...a})=>(0,B.jsx)("table",{className:(0,H.Z)("nx-block nx-overflow-x-scroll",n),...a}),Th=({className:n="",...a})=>(0,B.jsx)("th",{className:(0,H.Z)("nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 nx-font-semibold dark:nx-border-gray-600",n),...a}),Tr=({className:n="",...a})=>(0,B.jsx)("tr",{className:(0,H.Z)("nx-m-0 nx-border-t nx-border-gray-300 nx-p-0 dark:nx-border-gray-600","even:nx-bg-gray-100 even:dark:nx-bg-gray-600/20",n),...a}),eP=g(9517),eE=g.n(eP),eI={cards:(0,H.Z)("nextra-cards nx-mt-4 nx-gap-4 nx-grid","nx-not-prose"),card:(0,H.Z)("nextra-card nx-group nx-flex nx-flex-col nx-justify-start nx-overflow-hidden nx-rounded-lg nx-border nx-border-gray-200","nx-text-current nx-no-underline dark:nx-shadow-none","hover:nx-shadow-gray-100 dark:hover:nx-shadow-none nx-shadow-gray-100","active:nx-shadow-sm active:nx-shadow-gray-200","nx-transition-all nx-duration-200 hover:nx-border-gray-300"),title:(0,H.Z)("nx-flex nx-font-semibold nx-items-start nx-gap-2 nx-p-4 nx-text-gray-700 hover:nx-text-gray-900")},eT=(0,B.jsx)("span",{className:"nx-transition-transform nx-duration-75 group-hover:nx-translate-x-[2px]",children:"→"});Object.assign(function({children:n,num:a=3,className:g,style:v,...j}){return(0,B.jsx)("div",{className:(0,H.Z)(eI.cards,g),...j,style:{...v,"--rows":a},children:n})},{displayName:"Cards",Card:function({children:n,title:a,icon:g,image:v,arrow:j,href:z,...W}){let K=j?eT:null;return v?(0,B.jsxs)(eE(),{href:z,className:(0,H.Z)(eI.card,"nx-bg-gray-100 nx-shadow dark:nx-border-neutral-700 dark:nx-bg-neutral-800 dark:nx-text-gray-50 hover:nx-shadow-lg dark:hover:nx-border-neutral-500 dark:hover:nx-bg-neutral-700"),...W,children:[n,(0,B.jsxs)("span",{className:(0,H.Z)(eI.title,"dark:nx-text-gray-300 dark:hover:nx-text-gray-100"),children:[g,(0,B.jsxs)("span",{className:"nx-flex nx-gap-1",children:[a,K]})]})]}):(0,B.jsx)(eE(),{href:z,className:(0,H.Z)(eI.card,"nx-bg-transparent nx-shadow-sm dark:nx-border-neutral-800 hover:nx-bg-slate-50 hover:nx-shadow-md dark:hover:nx-border-neutral-700 dark:hover:nx-bg-neutral-900"),...W,children:(0,B.jsxs)("span",{className:(0,H.Z)(eI.title,"dark:nx-text-neutral-200 dark:hover:nx-text-neutral-50 nx-flex nx-items-center"),children:[g,a,K]})})}});var eM=(0,et.createContext)(0);function useIndent(){return(0,et.useContext)(eM)}function Ident(){let n=useIndent();return(0,B.jsx)(B.Fragment,{children:Array.from({length:n},(n,a)=>(0,B.jsx)("span",{className:"nx-w-5"},a))})}var eA=(0,et.memo)(({label:n,name:a,open:g,children:v,defaultOpen:j=!1,onToggle:z})=>{let H=useIndent(),[W,K]=(0,et.useState)(j),ee=(0,et.useCallback)(()=>{z?.(!W),K(!W)},[W,z]),er=void 0===g?W:g;return(0,B.jsxs)("li",{className:"nx-flex nx-list-none nx-flex-col",children:[(0,B.jsxs)("button",{onClick:ee,title:a,className:"nx-inline-flex nx-cursor-pointer nx-items-center nx-py-1 hover:nx-opacity-60",children:[(0,B.jsx)(Ident,{}),(0,B.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",children:(0,B.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:er?"M5 19a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h4l2 2h4a2 2 0 0 1 2 2v1M5 19h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2Z":"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2Z"})}),(0,B.jsx)("span",{className:"nx-ml-1",children:n??a})]}),er&&(0,B.jsx)("ul",{children:(0,B.jsx)(eM.Provider,{value:H+1,children:v})})]})});eA.displayName="Folder";var eN=(0,et.memo)(({label:n,name:a,active:g})=>(0,B.jsx)("li",{className:(0,H.Z)("nx-flex nx-list-none",g&&"nx-text-primary-600 contrast-more:nx-underline"),children:(0,B.jsxs)("span",{className:"nx-inline-flex nx-cursor-default nx-items-center nx-py-1",children:[(0,B.jsx)(Ident,{}),(0,B.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",children:(0,B.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.586a1 1 0 0 1 .707.293l5.414 5.414a1 1 0 0 1 .293.707V19a2 2 0 0 1-2 2Z"})}),(0,B.jsx)("span",{className:"nx-ml-1",children:n??a})]})}));eN.displayName="File",Object.assign(function({children:n}){return(0,B.jsx)("div",{className:(0,H.Z)("nextra-filetree nx-mt-6 nx-select-none nx-text-sm nx-text-gray-800 dark:nx-text-gray-300","nx-not-prose"),children:(0,B.jsx)("div",{className:"nx-inline-block nx-rounded-lg nx-border nx-px-4 nx-py-2 dark:nx-border-neutral-800",children:n})})},{Folder:eA,File:eN})},2766:function(n,a,g){"use strict";g.d(a,{LZ:function(){return ArrowRightIcon},nQ:function(){return CheckIcon},TI:function(){return CopyIcon},D7:function(){return DiscordIcon},Qq:function(){return ExpandIcon},fy:function(){return GitHubIcon},n9:function(){return GlobeIcon},AV:function(){return InformationCircleIcon},Oq:function(){return MenuIcon},kL:function(){return MoonIcon},L4:function(){return SpinnerIcon},NW:function(){return SunIcon},NK:function(){return WordWrapIcon},b0:function(){return XIcon}});var v=g(2676);function ArrowRightIcon({pathClassName:n,...a}){return(0,v.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...a,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7",className:n})})}function CheckIcon(n){return(0,v.jsx)("svg",{viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}function CopyIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",...n,children:[(0,v.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,v.jsx)("path",{d:"M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function DiscordIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 5 30.67 23.25",...n,children:[(0,v.jsx)("title",{children:"Discord"}),(0,v.jsx)("path",{d:"M26.0015 6.9529C24.0021 6.03845 21.8787 5.37198 19.6623 5C19.3833 5.48048 19.0733 6.13144 18.8563 6.64292C16.4989 6.30193 14.1585 6.30193 11.8336 6.64292C11.6166 6.13144 11.2911 5.48048 11.0276 5C8.79575 5.37198 6.67235 6.03845 4.6869 6.9529C0.672601 12.8736 -0.41235 18.6548 0.130124 24.3585C2.79599 26.2959 5.36889 27.4739 7.89682 28.2489C8.51679 27.4119 9.07477 26.5129 9.55525 25.5675C8.64079 25.2265 7.77283 24.808 6.93587 24.312C7.15286 24.1571 7.36986 23.9866 7.57135 23.8161C12.6241 26.1255 18.0969 26.1255 23.0876 23.8161C23.3046 23.9866 23.5061 24.1571 23.7231 24.312C22.8861 24.808 22.0182 25.2265 21.1037 25.5675C21.5842 26.5129 22.1422 27.4119 22.7621 28.2489C25.2885 27.4739 27.8769 26.2959 30.5288 24.3585C31.1952 17.7559 29.4733 12.0212 26.0015 6.9529ZM10.2527 20.8402C8.73376 20.8402 7.49382 19.4608 7.49382 17.7714C7.49382 16.082 8.70276 14.7025 10.2527 14.7025C11.7871 14.7025 13.0425 16.082 13.0115 17.7714C13.0115 19.4608 11.7871 20.8402 10.2527 20.8402ZM20.4373 20.8402C18.9183 20.8402 17.6768 19.4608 17.6768 17.7714C17.6768 16.082 18.8873 14.7025 20.4373 14.7025C21.9717 14.7025 23.2271 16.082 23.1961 17.7714C23.1961 19.4608 21.9872 20.8402 20.4373 20.8402Z"})]})}function ExpandIcon({isOpen:n,...a}){return(0,v.jsxs)("svg",{height:"12",width:"12",viewBox:"0 0 16 16",fill:"currentColor",...a,children:[(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.177 7.823l2.396-2.396A.25.25 0 017 5.604v4.792a.25.25 0 01-.427.177L4.177 8.177a.25.25 0 010-.354z",className:n?"":"nx-origin-[35%] nx-rotate-180"}),(0,v.jsx)("path",{fillRule:"evenodd",d:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm1.75-.25a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25H9.5v-13H1.75zm12.5 13H11v-13h3.25a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25z"})]})}function GitHubIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",fill:"currentColor",viewBox:"3 3 18 18",...n,children:[(0,v.jsx)("title",{children:"GitHub"}),(0,v.jsx)("path",{d:"M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"})]})}function GlobeIcon(n){return(0,v.jsx)("svg",{viewBox:"2 2 16 16",width:"12",height:"12",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",clipRule:"evenodd"})})}function InformationCircleIcon(n){return(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",width:"20",height:"20",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"})})}function MenuIcon(n){return(0,v.jsxs)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:[(0,v.jsx)("g",{children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16"})}),(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 12h16"}),(0,v.jsx)("g",{children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 18h16"})})]})}function MoonIcon(n){return(0,v.jsx)("svg",{fill:"none",viewBox:"2 2 20 20",width:"12",height:"12",stroke:"currentColor",...n,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",fill:"currentColor",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}function SpinnerIcon(n){return(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24",...n,children:[(0,v.jsx)("circle",{className:"nx-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,v.jsx)("path",{className:"nx-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function SunIcon(n){return(0,v.jsx)("svg",{fill:"none",viewBox:"3 3 18 18",width:"12",height:"12",stroke:"currentColor",...n,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",fill:"currentColor",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})})}function WordWrapIcon(n){return(0,v.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",...n,children:(0,v.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}function XIcon(n){return(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}},8745:function(n,a,g){"use strict";g.d(a,{Z:function(){return MDXProvider},a:function(){return mdx_useMDXComponents}});var v=g(5271);let j=v.createContext({});function useMDXComponents(n){let a=v.useContext(j);return v.useMemo(()=>"function"==typeof n?n(a):{...a,...n},[a,n])}let z={};function MDXProvider({components:n,children:a,disableParentContext:g}){let H;return H=g?"function"==typeof n?n({}):n||z:useMDXComponents(n),v.createElement(j.Provider,{value:H},a)}var H=g(1939),B=g.n(H),W={img:n=>(0,v.createElement)("object"==typeof n.src?B():"img",n)},mdx_useMDXComponents=n=>useMDXComponents({...W,...n})},5182:function(n,a,g){"use strict";var v=g(6097);n.exports=function(n){var a={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:n,query:{},parse_failed:!1};try{var g=new URL(n);a.protocols=v(g),a.protocol=a.protocols[0],a.port=g.port,a.resource=g.hostname,a.host=g.host,a.user=g.username||"",a.password=g.password||"",a.pathname=g.pathname,a.hash=g.hash.slice(1),a.search=g.search.slice(1),a.href=g.href,a.query=Object.fromEntries(g.searchParams)}catch(g){a.protocols=["file"],a.protocol=a.protocols[0],a.port="",a.resource="",a.user="",a.pathname="",a.hash="",a.search="",a.href=n,a.query={},a.parse_failed=!0}return a}},8593:function(n,a,g){"use strict";var v=g(5182),j=v&&"object"==typeof v&&"default"in v?v:{default:v};let testParameter=(n,a)=>a.some(a=>a instanceof RegExp?a.test(n):a===n),normalizeDataURL=(n,{stripHash:a})=>{let g=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(n);if(!g)throw Error(`Invalid URL: ${n}`);let{type:v,data:j,hash:z}=g.groups,H=v.split(";");z=a?"":z;let B=!1;"base64"===H[H.length-1]&&(H.pop(),B=!0);let W=(H.shift()||"").toLowerCase(),K=H.map(n=>{let[a,g=""]=n.split("=").map(n=>n.trim());return"charset"===a&&"us-ascii"===(g=g.toLowerCase())?"":`${a}${g?`=${g}`:""}`}).filter(Boolean),ee=[...K];return B&&ee.push("base64"),(ee.length>0||W&&"text/plain"!==W)&&ee.unshift(W),`data:${ee.join(";")},${B?j.trim():j}${z?`#${z}`:""}`},parseUrl=(n,a=!1)=>{let throwErr=a=>{let g=Error(a);throw g.subject_url=n,g};"string"==typeof n&&n.trim()||throwErr("Invalid url."),n.length>parseUrl.MAX_INPUT_LENGTH&&throwErr("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),a&&("object"!=typeof a&&(a={stripHash:!1}),n=function(n,a){if(a={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...a},n=n.trim(),/^data:/i.test(n))return normalizeDataURL(n,a);if(/^view-source:/i.test(n))throw Error("`view-source:` is not supported as it is a non-standard protocol");let g=n.startsWith("//"),v=!g&&/^\.*\//.test(n);v||(n=n.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,a.defaultProtocol));let j=new URL(n);if(a.forceHttp&&a.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(a.forceHttp&&"https:"===j.protocol&&(j.protocol="http:"),a.forceHttps&&"http:"===j.protocol&&(j.protocol="https:"),a.stripAuthentication&&(j.username="",j.password=""),a.stripHash?j.hash="":a.stripTextFragment&&(j.hash=j.hash.replace(/#?:~:text.*?$/i,"")),j.pathname){let n=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,a=0,g="";for(;;){let v=n.exec(j.pathname);if(!v)break;let z=v[0],H=v.index,B=j.pathname.slice(a,H);g+=B.replace(/\/{2,}/g,"/")+z,a=H+z.length}let v=j.pathname.slice(a,j.pathname.length);g+=v.replace(/\/{2,}/g,"/"),j.pathname=g}if(j.pathname)try{j.pathname=decodeURI(j.pathname)}catch{}if(!0===a.removeDirectoryIndex&&(a.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(a.removeDirectoryIndex)&&a.removeDirectoryIndex.length>0){let n=j.pathname.split("/"),g=n[n.length-1];testParameter(g,a.removeDirectoryIndex)&&(n=n.slice(0,-1),j.pathname=n.slice(1).join("/")+"/")}if(j.hostname&&(j.hostname=j.hostname.replace(/\.$/,""),a.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(j.hostname)&&(j.hostname=j.hostname.replace(/^www\./,""))),Array.isArray(a.removeQueryParameters))for(let n of[...j.searchParams.keys()])testParameter(n,a.removeQueryParameters)&&j.searchParams.delete(n);if(!0===a.removeQueryParameters&&(j.search=""),a.sortQueryParameters){j.searchParams.sort();try{j.search=decodeURIComponent(j.search)}catch{}}a.removeTrailingSlash&&(j.pathname=j.pathname.replace(/\/$/,""));let z=n;return n=j.toString(),a.removeSingleSlash||"/"!==j.pathname||z.endsWith("/")||""!==j.hash||(n=n.replace(/\/$/,"")),(a.removeTrailingSlash||"/"===j.pathname)&&""===j.hash&&a.removeSingleSlash&&(n=n.replace(/\/$/,"")),g&&!a.normalizeProtocol&&(n=n.replace(/^http:\/\//,"//")),a.stripProtocol&&(n=n.replace(/^(?:https?:)?\/\//,"")),n}(n,a));let g=j.default(n);if(g.parse_failed){let n=g.href.match(/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/);n?(g.protocols=["ssh"],g.protocol="ssh",g.resource=n[2],g.host=n[2],g.user=n[1],g.pathname=`/${n[3]}`,g.parse_failed=!1):throwErr("URL parsing failed.")}return g};parseUrl.MAX_INPUT_LENGTH=2048,n.exports=parseUrl},6097:function(n){"use strict";n.exports=function(n,a){!0===a&&(a=0);var g="";if("string"==typeof n)try{g=new URL(n).protocol}catch(n){}else n&&n.constructor===URL&&(g=n.protocol);var v=g.split(/\:|\+/).filter(Boolean);return"number"==typeof a?v[a]:v}},2601:function(n){var a={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},g=Object.keys(a).join("|"),v=RegExp(g,"g"),j=RegExp(g,"");function matcher(n){return a[n]}var removeAccents=function(n){return n.replace(v,matcher)};n.exports=removeAccents,n.exports.has=function(n){return!!n.match(j)},n.exports.remove=removeAccents},5184:function(){},4327:function(n,a,g){"use strict";g.d(a,{R:function(){return j}});var v,j=((v=j||{}).Space=" ",v.Enter="Enter",v.Escape="Escape",v.Backspace="Backspace",v.Delete="Delete",v.ArrowLeft="ArrowLeft",v.ArrowUp="ArrowUp",v.ArrowRight="ArrowRight",v.ArrowDown="ArrowDown",v.Home="Home",v.End="End",v.PageUp="PageUp",v.PageDown="PageDown",v.Tab="Tab",v)},9140:function(n,a,g){"use strict";g.d(a,{z:function(){return o}});var v=g(5271),j=g(121);let o=function(n){let a=(0,j.E)(n);return v.useCallback((...n)=>a.current(...n),[a])}},2410:function(n,a,g){"use strict";g.d(a,{M:function(){return W}});var v,j=g(5271),z=g(5350),H=g(93),B=g(1963);let W=null!=(v=j.useId)?v:function(){let n=(0,B.H)(),[a,g]=j.useState(n?()=>z.O.nextId():null);return(0,H.e)(()=>{null===a&&g(z.O.nextId())},[a]),null!=a?""+a:void 0}},8656:function(n,a,g){"use strict";g.d(a,{t:function(){return f}});var v=g(5271),j=g(93);function f(){let n=(0,v.useRef)(!1);return(0,j.e)(()=>(n.current=!0,()=>{n.current=!1}),[]),n}},93:function(n,a,g){"use strict";g.d(a,{e:function(){return l}});var v=g(5271),j=g(5350);let l=(n,a)=>{j.O.isServer?(0,v.useEffect)(n,a):(0,v.useLayoutEffect)(n,a)}},121:function(n,a,g){"use strict";g.d(a,{E:function(){return s}});var v=g(5271),j=g(93);function s(n){let a=(0,v.useRef)(n);return(0,j.e)(()=>{a.current=n},[n]),a}},2412:function(n,a,g){"use strict";g.d(a,{f:function(){return T}});var v=g(5271),j=g(93);function i(n){var a;if(n.type)return n.type;let g=null!=(a=n.as)?a:"button";if("string"==typeof g&&"button"===g.toLowerCase())return"button"}function T(n,a){let[g,z]=(0,v.useState)(()=>i(n));return(0,j.e)(()=>{z(i(n))},[n.type,n.as]),(0,j.e)(()=>{g||a.current&&a.current instanceof HTMLButtonElement&&!a.current.hasAttribute("type")&&z("button")},[g,a]),g}},1963:function(n,a,g){"use strict";g.d(a,{H:function(){return l}});var v,j=g(5271),z=g(5350);function l(){let n;let a=(n="undefined"==typeof document,(0,(v||(v=g.t(j,2))).useSyncExternalStore)(()=>()=>{},()=>!1,()=>!n)),[H,B]=j.useState(z.O.isHandoffComplete);return H&&!1===z.O.isHandoffComplete&&B(!1),j.useEffect(()=>{!0!==H&&B(!0)},[H]),j.useEffect(()=>z.O.handoff(),[]),!a&&H}},3142:function(n,a,g){"use strict";g.d(a,{T:function(){return y}});var v=g(5271),j=g(9140);let z=Symbol();function y(...n){let a=(0,v.useRef)(n);(0,v.useEffect)(()=>{a.current=n},[n]);let g=(0,j.z)(n=>{for(let g of a.current)null!=g&&("function"==typeof g?g(n):g.current=n)});return n.every(n=>null==n||(null==n?void 0:n[z]))?void 0:g}},4538:function(n,a,g){"use strict";g.d(a,{A:function(){return z},_:function(){return H}});var v,j=g(2184),z=((v=z||{})[v.None=1]="None",v[v.Focusable=2]="Focusable",v[v.Hidden=4]="Hidden",v);let H=(0,j.yV)(function(n,a){var g;let{features:v=1,...z}=n,H={ref:a,"aria-hidden":(2&v)==2||(null!=(g=z["aria-hidden"])?g:void 0),hidden:(4&v)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&v)==4&&(2&v)!=2&&{display:"none"}}};return(0,j.sY)({ourProps:H,theirProps:z,slot:{},defaultTag:"div",name:"Hidden"})})},9363:function(n,a,g){"use strict";function t(...n){return Array.from(new Set(n.flatMap(n=>"string"==typeof n?n.split(" "):[]))).filter(Boolean).join(" ")}g.d(a,{A:function(){return t}})},3465:function(n,a,g){"use strict";g.d(a,{k:function(){return function o(){let n=[],a={addEventListener:(n,g,v,j)=>(n.addEventListener(g,v,j),a.add(()=>n.removeEventListener(g,v,j))),requestAnimationFrame(...n){let g=requestAnimationFrame(...n);return a.add(()=>cancelAnimationFrame(g))},nextFrame:(...n)=>a.requestAnimationFrame(()=>a.requestAnimationFrame(...n)),setTimeout(...n){let g=setTimeout(...n);return a.add(()=>clearTimeout(g))},microTask(...n){let g={current:!0};return(0,v.Y)(()=>{g.current&&n[0]()}),a.add(()=>{g.current=!1})},style(n,a,g){let v=n.style.getPropertyValue(a);return Object.assign(n.style,{[a]:g}),this.add(()=>{Object.assign(n.style,{[a]:v})})},group(n){let a=o();return n(a),this.add(()=>a.dispose())},add:a=>(n.push(a),()=>{let g=n.indexOf(a);if(g>=0)for(let a of n.splice(g,1))a()}),dispose(){for(let a of n.splice(0))a()}};return a}}});var v=g(616)},5350:function(n,a,g){"use strict";g.d(a,{O:function(){return j}});var v=Object.defineProperty,d=(n,a,g)=>a in n?v(n,a,{enumerable:!0,configurable:!0,writable:!0,value:g}):n[a]=g,r=(n,a,g)=>(d(n,"symbol"!=typeof a?a+"":a,g),g);let j=new class{constructor(){r(this,"current",this.detect()),r(this,"handoffState","pending"),r(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}}},4830:function(n,a,g){"use strict";g.d(a,{EO:function(){return _},TO:function(){return er},fE:function(){return en},jA:function(){return O},sP:function(){return h},tJ:function(){return ei},wI:function(){return D},z2:function(){return I}});var v,j,z,H,B,W=g(3465),K=g(2549),ee=g(4832);let et=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var er=((v=er||{})[v.First=1]="First",v[v.Previous=2]="Previous",v[v.Next=4]="Next",v[v.Last=8]="Last",v[v.WrapAround=16]="WrapAround",v[v.NoScroll=32]="NoScroll",v),en=((j=en||{})[j.Error=0]="Error",j[j.Overflow=1]="Overflow",j[j.Success=2]="Success",j[j.Underflow=3]="Underflow",j),eo=((z=eo||{})[z.Previous=-1]="Previous",z[z.Next=1]="Next",z);function f(n=document.body){return null==n?[]:Array.from(n.querySelectorAll(et)).sort((n,a)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(a.tabIndex||Number.MAX_SAFE_INTEGER)))}var ei=((H=ei||{})[H.Strict=0]="Strict",H[H.Loose=1]="Loose",H);function h(n,a=0){var g;return n!==(null==(g=(0,ee.r)(n))?void 0:g.body)&&(0,K.E)(a,{0:()=>n.matches(et),1(){let a=n;for(;null!==a;){if(a.matches(et))return!0;a=a.parentElement}return!1}})}function D(n){let a=(0,ee.r)(n);(0,W.k)().nextFrame(()=>{a&&!h(a.activeElement,0)&&(null==n||n.focus({preventScroll:!0}))})}var es=((B=es||{})[B.Keyboard=0]="Keyboard",B[B.Mouse=1]="Mouse",B);function I(n,a=n=>n){return n.slice().sort((n,g)=>{let v=a(n),j=a(g);if(null===v||null===j)return 0;let z=v.compareDocumentPosition(j);return z&Node.DOCUMENT_POSITION_FOLLOWING?-1:z&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _(n,a){return O(f(),a,{relativeTo:n})}function O(n,a,{sorted:g=!0,relativeTo:v=null,skipElements:j=[]}={}){var z,H,B;let W=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,K=Array.isArray(n)?g?I(n):n:f(n);j.length>0&&K.length>1&&(K=K.filter(n=>!j.includes(n))),v=null!=v?v:W.activeElement;let ee=(()=>{if(5&a)return 1;if(10&a)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),et=(()=>{if(1&a)return 0;if(2&a)return Math.max(0,K.indexOf(v))-1;if(4&a)return Math.max(0,K.indexOf(v))+1;if(8&a)return K.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),er=32&a?{preventScroll:!0}:{},en=0,eo=K.length,ei;do{if(en>=eo||en+eo<=0)return 0;let n=et+en;if(16&a)n=(n+eo)%eo;else{if(n<0)return 3;if(n>=eo)return 1}null==(ei=K[n])||ei.focus(er),en+=ee}while(ei!==W.activeElement);return 6&a&&null!=(B=null==(H=null==(z=ei)?void 0:z.matches)?void 0:H.call(z,"textarea,input"))&&B&&ei.select(),2}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{1===n.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===n.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0))},2549:function(n,a,g){"use strict";function u(n,a,...g){if(n in a){let v=a[n];return"function"==typeof v?v(...g):v}let v=Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(v,u),v}g.d(a,{E:function(){return u}})},616:function(n,a,g){"use strict";function t(n){"function"==typeof queueMicrotask?queueMicrotask(n):Promise.resolve().then(n).catch(n=>setTimeout(()=>{throw n}))}g.d(a,{Y:function(){return t}})},4832:function(n,a,g){"use strict";g.d(a,{r:function(){return o}});var v=g(5350);function o(n){return v.O.isServer?null:n instanceof Node?n.ownerDocument:null!=n&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}},2184:function(n,a,g){"use strict";g.d(a,{AN:function(){return W},l4:function(){return K},oA:function(){return x},sY:function(){return C},yV:function(){return U}});var v,j,z=g(5271),H=g(9363),B=g(2549),W=((v=W||{})[v.None=0]="None",v[v.RenderStrategy=1]="RenderStrategy",v[v.Static=2]="Static",v),K=((j=K||{})[j.Unmount=0]="Unmount",j[j.Hidden=1]="Hidden",j);function C({ourProps:n,theirProps:a,slot:g,defaultTag:v,features:j,visible:z=!0,name:H,mergeRefs:W}){W=null!=W?W:k;let K=R(a,n);if(z)return m(K,g,v,H,W);let ee=null!=j?j:0;if(2&ee){let{static:n=!1,...a}=K;if(n)return m(a,g,v,H,W)}if(1&ee){let{unmount:n=!0,...a}=K;return(0,B.E)(n?0:1,{0:()=>null,1:()=>m({...a,hidden:!0,style:{display:"none"}},g,v,H,W)})}return m(K,g,v,H,W)}function m(n,a={},g,v,j){let{as:B=g,children:W,refName:K="ref",...ee}=F(n,["unmount","static"]),et=void 0!==n.ref?{[K]:n.ref}:{},er="function"==typeof W?W(a):W;"className"in ee&&ee.className&&"function"==typeof ee.className&&(ee.className=ee.className(a));let en={};if(a){let n=!1,g=[];for(let[v,j]of Object.entries(a))"boolean"==typeof j&&(n=!0),!0===j&&g.push(v);n&&(en["data-headlessui-state"]=g.join(" "))}if(B===z.Fragment&&Object.keys(x(ee)).length>0){if(!(0,z.isValidElement)(er)||Array.isArray(er)&&er.length>1)throw Error(['Passing props on "Fragment"!',"",`The current component <${v} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ee).map(n=>` - ${n}`).join(` + `}),j]})]})}var nE={link:(0,eE.Z)("nx-flex nx-max-w-[50%] nx-items-center nx-gap-1 nx-py-4 nx-text-base nx-font-medium nx-text-gray-600 nx-transition-colors [word-break:break-word] hover:nx-text-primary-600 dark:nx-text-gray-300 md:nx-text-lg"),icon:(0,eE.Z)("nx-inline nx-h-5 nx-shrink-0")},NavLinks=({flatDirectories:n,currentIndex:a})=>{let g=useConfig(),v=g.navigation,j="boolean"==typeof v?{prev:v,next:v}:v,z=j.prev&&n[a-1],H=j.next&&n[a+1];return(z&&!z.isUnderCurrentDocsTree&&(z=!1),H&&!H.isUnderCurrentDocsTree&&(H=!1),z||H)?(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-mb-8 nx-flex nx-items-center nx-border-t nx-pt-8 dark:nx-border-neutral-800","contrast-more:nx-border-neutral-400 dark:contrast-more:nx-border-neutral-400","print:nx-hidden"),children:[z&&(0,ej.jsxs)(nw,{href:z.route,title:z.title,className:(0,eE.Z)(nE.link,"ltr:nx-pr-4 rtl:nx-pl-4"),children:[(0,ej.jsx)(eM.LZ,{className:(0,eE.Z)(nE.icon,"ltr:nx-rotate-180")}),z.title]}),H&&(0,ej.jsxs)(nw,{href:H.route,title:H.title,className:(0,eE.Z)(nE.link,"ltr:nx-ml-auto ltr:nx-pl-4 ltr:nx-text-right rtl:nx-mr-auto rtl:nx-pr-4 rtl:nx-text-left"),children:[H.title,(0,ej.jsx)(eM.LZ,{className:(0,eE.Z)(nE.icon,"rtl:nx-rotate-180")})]})]}):null},nI={link:(0,eE.Z)("nx-text-sm contrast-more:nx-text-gray-700 contrast-more:dark:nx-text-gray-100"),active:(0,eE.Z)("nx-font-medium nx-subpixel-antialiased"),inactive:(0,eE.Z)("nx-text-gray-600 hover:nx-text-gray-800 dark:nx-text-gray-400 dark:hover:nx-text-gray-200")};function NavbarMenu({className:n,menu:a,children:g}){let{items:v}=a,j=Object.fromEntries((a.children||[]).map(n=>[n.name,n]));return(0,ej.jsx)("div",{className:"nx-relative nx-inline-block",children:(0,ej.jsxs)(ne,{children:[(0,ej.jsx)(ne.Button,{className:(0,eE.Z)(n,"-nx-ml-2 nx-hidden nx-items-center nx-whitespace-nowrap nx-rounded nx-p-2 md:nx-inline-flex",nI.inactive),children:g}),(0,ej.jsx)(rI,{leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ej.jsx)(ne.Items,{className:"nx-absolute nx-right-0 nx-z-20 nx-mt-1 nx-max-h-64 nx-min-w-full nx-overflow-auto nx-rounded-md nx-ring-1 nx-ring-black/5 nx-bg-white nx-py-1 nx-text-sm nx-shadow-lg dark:nx-ring-white/20 dark:nx-bg-neutral-800",children:Object.entries(v||{}).map(([n,g])=>{var v;return(0,ej.jsx)(ne.Item,{children:(0,ej.jsx)(nw,{href:g.href||(null==(v=j[n])?void 0:v.route)||a.route+"/"+n,className:(0,eE.Z)("nx-relative nx-hidden nx-w-full nx-select-none nx-whitespace-nowrap nx-text-gray-600 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-100 md:nx-inline-block","nx-py-1.5 nx-transition-colors ltr:nx-pl-3 ltr:nx-pr-9 rtl:nx-pr-3 rtl:nx-pl-9"),newWindow:g.newWindow,children:g.title||n})},n)})})})]})})}var nT=Object.create(null),nM=(0,eP.createContext)(null),nA=(0,eP.createContext)(null),nN=(0,eP.createContext)(0),nR=(0,eP.memo)(function(n){let a=(0,eP.useContext)(nN);return(0,ej.jsx)(nN.Provider,{value:a+1,children:(0,ej.jsx)(FolderImpl,__spreadValues({},n))})}),nD={link:(0,eE.Z)("nx-flex nx-rounded nx-px-2 nx-py-1.5 nx-text-sm nx-transition-colors [word-break:break-word]","nx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:nx-border"),inactive:(0,eE.Z)("nx-text-gray-500 hover:nx-bg-gray-100 hover:nx-text-gray-900","dark:nx-text-neutral-400 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50","contrast-more:nx-text-gray-900 contrast-more:dark:nx-text-gray-50","contrast-more:nx-border-transparent contrast-more:hover:nx-border-gray-900 contrast-more:dark:hover:nx-border-gray-50"),active:(0,eE.Z)("nx-bg-primary-100 nx-font-semibold nx-text-primary-800 dark:nx-bg-primary-400/10 dark:nx-text-primary-600","contrast-more:nx-border-primary-500 contrast-more:dark:nx-border-primary-500"),list:(0,eE.Z)("nx-flex nx-flex-col nx-gap-1"),border:(0,eE.Z)("nx-relative before:nx-absolute before:nx-inset-y-1",'before:nx-w-px before:nx-bg-gray-200 before:nx-content-[""] dark:before:nx-bg-neutral-800',"ltr:nx-pl-3 ltr:before:nx-left-0 rtl:nx-pr-3 rtl:before:nx-right-0")};function FolderImpl({item:n,anchors:a}){let g=useFSRoute(),[v]=g.split("#"),j=[v,v+"/"].includes(n.route+"/"),z=j||v.startsWith(n.route+"/"),H=(0,eP.useContext)(nM),B=!!(null==H?void 0:H.startsWith(n.route+"/")),W=(0,eP.useContext)(nN),{setMenu:K}=useMenu(),ee=useConfig(),{theme:et}=n,er=void 0===nT[n.route]?j||z||B||(et&&"collapsed"in et?!et.collapsed:W{ee.sidebar.autoCollapse?z&&B?nT[n.route]=!0:delete nT[n.route]:(z||B)&&(nT[n.route]=!0)},[z,B,n.route,ee.sidebar.autoCollapse]),"menu"===n.type){let a=Object.fromEntries((n.children||[]).map(n=>[n.name,n]));n.children=Object.entries(n.items||{}).map(([g,v])=>{let j=a[g]||__spreadProps(__spreadValues({name:g},"locale"in n&&{locale:n.locale}),{route:n.route+"/"+g});return __spreadValues(__spreadValues({},j),v)})}let eo="withIndexPage"in n&&n.withIndexPage,ei=eo?nw:"button";return(0,ej.jsxs)("li",{className:(0,eE.Z)({open:er,active:j}),children:[(0,ej.jsxs)(ei,{href:eo?n.route:void 0,className:(0,eE.Z)("nx-items-center nx-justify-between nx-gap-2",!eo&&"nx-text-left nx-w-full",nD.link,j?nD.active:nD.inactive),onClick:a=>{let g=["svg","path"].includes(a.target.tagName.toLowerCase());if(g&&a.preventDefault(),eo){j||g?nT[n.route]=!er:(nT[n.route]=!0,K(!1)),en({});return}j||(nT[n.route]=!er,en({}))},children:[renderComponent(ee.sidebar.titleComponent,{title:n.title,type:n.type,route:n.route}),(0,ej.jsx)(eM.LZ,{className:"nx-h-[18px] nx-min-w-[18px] nx-rounded-sm nx-p-0.5 hover:nx-bg-gray-800/5 dark:hover:nx-bg-gray-100/5",pathClassName:(0,eE.Z)("nx-origin-center nx-transition-transform rtl:-nx-rotate-180",er&&"ltr:nx-rotate-90 rtl:nx-rotate-[-270deg]")})]}),(0,ej.jsx)(Collapse,{className:"ltr:nx-pr-0 rtl:nx-pl-0 nx-pt-1",isOpen:er,children:Array.isArray(n.children)?(0,ej.jsx)(Menu2,{className:(0,eE.Z)(nD.border,"ltr:nx-ml-3 rtl:nx-mr-3"),directories:n.children,base:n.route,anchors:a}):null})]})}function Separator({title:n}){let a=useConfig();return(0,ej.jsx)("li",{className:(0,eE.Z)("[word-break:break-word]",n?"nx-mt-5 nx-mb-2 nx-px-2 nx-py-1.5 nx-text-sm nx-font-semibold nx-text-gray-900 first:nx-mt-0 dark:nx-text-gray-100":"nx-my-4"),children:n?renderComponent(a.sidebar.titleComponent,{title:n,type:"separator",route:""}):(0,ej.jsx)("hr",{className:"nx-mx-2 nx-border-t nx-border-gray-200 dark:nx-border-primary-100/10"})})}function File({item:n,anchors:a}){let g=useFSRoute(),v=(0,eP.useContext)(nA),j=n.route&&[g,g+"/"].includes(n.route+"/"),z=useActiveAnchor(),{setMenu:H}=useMenu(),B=useConfig();return"separator"===n.type?(0,ej.jsx)(Separator,{title:n.title}):(0,ej.jsxs)("li",{className:(0,eE.Z)(nD.list,{active:j}),children:[(0,ej.jsx)(nw,{href:n.href||n.route,newWindow:n.newWindow,className:(0,eE.Z)(nD.link,j?nD.active:nD.inactive),onClick:()=>{H(!1)},onFocus:()=>{null==v||v(n.route)},onBlur:()=>{null==v||v(null)},children:renderComponent(B.sidebar.titleComponent,{title:n.title,type:n.type,route:n.route})}),j&&a.length>0&&(0,ej.jsx)("ul",{className:(0,eE.Z)(nD.list,nD.border,"ltr:nx-ml-3 rtl:nx-mr-3"),children:a.map(({id:n,value:a})=>{var g;return(0,ej.jsx)("li",{children:(0,ej.jsx)("a",{href:`#${n}`,className:(0,eE.Z)(nD.link,'nx-flex nx-gap-2 before:nx-opacity-25 before:nx-content-["#"]',(null==(g=z[n])?void 0:g.isActive)?nD.active:nD.inactive),onClick:()=>{H(!1)},children:a})},n)})})]})}function Menu2({directories:n,anchors:a,className:g,onlyCurrentDocs:v}){return(0,ej.jsx)("ul",{className:(0,eE.Z)(nD.list,g),children:n.map(n=>!v||n.isUnderCurrentDocsTree?"menu"===n.type||n.children&&(n.children.length||!n.withIndexPage)?(0,ej.jsx)(nR,{item:n,anchors:a},n.name):(0,ej.jsx)(File,{item:n,anchors:a},n.name):null)})}function Sidebar({docsDirectories:n,flatDirectories:a,fullDirectories:g,asPopover:v=!1,headings:j,includePlaceholder:z}){let H=useConfig(),{menu:B,setMenu:W}=useMenu(),K=(0,eC.useRouter)(),[ee,et]=(0,eP.useState)(null),[er,en]=(0,eP.useState)(!0),[eo,ei]=(0,eP.useState)(!1),es=(0,eP.useMemo)(()=>j.filter(n=>2===n.depth),[j]),el=(0,eP.useRef)(null),ec=(0,eP.useRef)(null),eu=useMounted();(0,eP.useEffect)(()=>{B?document.body.classList.add("nx-overflow-hidden","md:nx-overflow-auto"):document.body.classList.remove("nx-overflow-hidden","md:nx-overflow-auto")},[B]),(0,eP.useEffect)(()=>{var n;let a=null==(n=el.current)?void 0:n.querySelector("li.active");if(a&&(window.innerWidth>767||B)){let scroll=()=>{dist_e(a,{block:"center",inline:"center",scrollMode:"always",boundary:ec.current})};B?setTimeout(scroll,300):scroll()}},[B]),(0,eP.useEffect)(()=>{W(!1)},[K.asPath,W]);let ed=H.i18n.length>0,ep=H.darkMode||ed||H.sidebar.toggleButton;return(0,ej.jsxs)(ej.Fragment,{children:[z&&v?(0,ej.jsx)("div",{className:"max-xl:nx-hidden nx-h-0 nx-w-64 nx-shrink-0"}):null,(0,ej.jsx)("div",{className:(0,eE.Z)("motion-reduce:nx-transition-none [transition:background-color_1.5s_ease]",B?"nx-fixed nx-inset-0 nx-z-10 nx-bg-black/80 dark:nx-bg-black/60":"nx-bg-transparent"),onClick:()=>W(!1)}),(0,ej.jsxs)("aside",{className:(0,eE.Z)("nextra-sidebar-container nx-flex nx-flex-col","md:nx-top-16 md:nx-shrink-0 motion-reduce:nx-transform-none","nx-transform-gpu nx-transition-all nx-ease-in-out","print:nx-hidden",er?"md:nx-w-64":"md:nx-w-20",v?"md:nx-hidden":"md:nx-sticky md:nx-self-start",B?"max-md:[transform:translate3d(0,0,0)]":"max-md:[transform:translate3d(0,-100%,0)]"),ref:ec,children:[(0,ej.jsx)("div",{className:"nx-px-4 nx-pt-4 md:nx-hidden",children:renderComponent(H.search.component,{directories:a})}),(0,ej.jsx)(nM.Provider,{value:ee,children:(0,ej.jsx)(nA.Provider,{value:n=>{et(n)},children:(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-overflow-y-auto nx-overflow-x-hidden","nx-p-4 nx-grow md:nx-h-[calc(100vh-var(--nextra-navbar-height)-var(--nextra-menu-height))]",er?"nextra-scrollbar":"no-scrollbar"),ref:el,children:[(!v||!er)&&(0,ej.jsx)(Collapse,{isOpen:er,horizontal:!0,children:(0,ej.jsx)(Menu2,{className:"nextra-menu-desktop max-md:nx-hidden",directories:n,anchors:H.toc.float?[]:es,onlyCurrentDocs:!0})}),eu&&window.innerWidth<768&&(0,ej.jsx)(Menu2,{className:"nextra-menu-mobile md:nx-hidden",directories:g,anchors:es})]})})}),ep&&(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-sticky nx-bottom-0","nx-bg-white dark:nx-bg-dark","nx-mx-4 nx-py-4 nx-shadow-[0_-12px_16px_#fff]","nx-flex nx-items-center nx-gap-2","dark:nx-border-neutral-800 dark:nx-shadow-[0_-12px_16px_#111]","contrast-more:nx-border-neutral-400 contrast-more:nx-shadow-none contrast-more:dark:nx-shadow-none",er?(0,eE.Z)(ed&&"nx-justify-end","nx-border-t"):"nx-py-4 nx-flex-wrap nx-justify-center"),"data-toggle-animation":eo?er?"show":"hide":"off",children:[(0,ej.jsx)(LocaleSwitch,{lite:!er,className:(0,eE.Z)(er?"nx-grow":"max-md:nx-grow")}),H.darkMode&&(0,ej.jsx)("div",{className:er&&!ed?"nx-grow nx-flex nx-flex-col":"",children:renderComponent(H.themeSwitch.component,{lite:!er||ed})}),H.sidebar.toggleButton&&(0,ej.jsx)("button",{title:er?"Hide sidebar":"Show sidebar",className:"max-md:nx-hidden nx-h-7 nx-rounded-md nx-transition-colors nx-text-gray-600 dark:nx-text-gray-400 nx-px-2 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",onClick:()=>{en(!er),ei(!0)},children:(0,ej.jsx)(eM.Qq,{isOpen:er})})]})]})]})}var nL="reach-skip-nav";(0,eP.forwardRef)(function(n,a){var{className:g,id:v,label:j="Skip to content",styled:z}=n,H=__objRest(n,["className","id","label","styled"]);let B=void 0===g?z?(0,eE.Z)("nx-sr-only","focus:nx-not-sr-only focus:nx-fixed focus:nx-z-50 focus:nx-m-3 focus:nx-ml-4 focus:nx-h-[calc(var(--nextra-navbar-height)-1.5rem)] focus:nx-rounded-lg focus:nx-border focus:nx-px-3 focus:nx-py-2 focus:nx-align-middle focus:nx-text-sm focus:nx-font-bold","focus:nx-text-gray-900 focus:dark:nx-text-gray-100","focus:nx-bg-white focus:dark:nx-bg-neutral-900","focus:nx-border-neutral-400 focus:dark:nx-border-neutral-800"):"":g;return(0,ej.jsx)("a",__spreadProps(__spreadValues({},H),{ref:a,href:`#${v||nL}`,className:B,"data-reach-skip-link":"",children:j}))}).displayName="SkipNavLink";var nZ=(0,eP.forwardRef)(function(n,a){var{id:g}=n,v=__objRest(n,["id"]);return(0,ej.jsx)("div",__spreadProps(__spreadValues({},v),{ref:a,id:g||nL}))});nZ.displayName="SkipNavContent";var nF=t_.strictObject({light:t_.string(),dark:t_.string(),system:t_.string()});function scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}function BackToTop({className:n}){let a=(0,eP.useRef)(null);return(0,eP.useEffect)(()=>{function toggleVisible(){var n;let{scrollTop:g}=document.documentElement;null==(n=a.current)||n.classList.toggle("nx-opacity-0",g<300)}return window.addEventListener("scroll",toggleVisible),()=>{window.removeEventListener("scroll",toggleVisible)}},[]),(0,ej.jsxs)("button",{ref:a,"aria-hidden":"true",onClick:scrollToTop,className:(0,eE.Z)("nx-flex nx-items-center nx-gap-1.5 nx-transition nx-opacity-0",n),children:["Scroll to top",(0,ej.jsx)(eM.LZ,{className:"-nx-rotate-90 nx-w-3.5 nx-h-3.5 nx-border nx-rounded-full nx-border-current"})]})}var nV=(0,eE.Z)("nx-text-xs nx-font-medium nx-text-gray-500 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-100","contrast-more:nx-text-gray-800 contrast-more:dark:nx-text-gray-50");function MatchSorterSearch({className:n,directories:a}){let[g,v]=(0,eP.useState)(""),j=(0,eP.useMemo)(()=>g?matchSorter(a,g,{keys:["title"]}).map(({route:n,title:a})=>({id:n+a,route:n,children:(0,ej.jsx)(nk,{value:a,match:g})})):[],[g,a]);return(0,ej.jsx)(Search,{value:g,onChange:v,className:n,overlayClassName:"nx-w-full",results:j})}var nU="en-US",nz="undefined"!=typeof window;function isFunction(n){return"function"==typeof n}var nH=t_.array(t_.strictObject({direction:t_.enum(["ltr","rtl"]).optional(),locale:t_.string(),text:t_.string()})),nB=[function(n){return null==n||"string"==typeof n||isFunction(n)||(0,eP.isValidElement)(n)},{message:"Must be React.ReactNode or React.FC"}],nq=[isFunction,{message:"Must be React.FC"}];t_.strictObject({banner:t_.strictObject({dismissible:t_.boolean(),key:t_.string(),text:t_.custom(...nB).optional()}),chat:t_.strictObject({icon:t_.custom(...nB),link:t_.string().startsWith("https://").optional()}),components:t_.record(t_.custom(...nq)).optional(),darkMode:t_.boolean(),direction:t_.enum(["ltr","rtl"]),docsRepositoryBase:t_.string().startsWith("https://"),editLink:t_.strictObject({component:t_.custom(...nq).or(t_.null()),text:t_.custom(...nB)}),faviconGlyph:t_.string().optional(),feedback:t_.strictObject({content:t_.custom(...nB),labels:t_.string(),useLink:t_.function().returns(t_.string())}),footer:t_.strictObject({component:t_.custom(...nB),text:t_.custom(...nB)}),gitTimestamp:t_.custom(...nB),head:t_.custom(...nB),i18n:nH,logo:t_.custom(...nB),logoLink:t_.boolean().or(t_.string()),main:t_.custom(...nq).optional(),navbar:t_.strictObject({component:t_.custom(...nB),extraContent:t_.custom(...nB).optional()}),navigation:t_.boolean().or(t_.strictObject({next:t_.boolean(),prev:t_.boolean()})),nextThemes:t_.strictObject({defaultTheme:t_.string(),forcedTheme:t_.string().optional(),storageKey:t_.string()}),notFound:t_.strictObject({content:t_.custom(...nB),labels:t_.string()}),primaryHue:t_.number().or(t_.strictObject({dark:t_.number(),light:t_.number()})),primarySaturation:t_.number().or(t_.strictObject({dark:t_.number(),light:t_.number()})),project:t_.strictObject({icon:t_.custom(...nB),link:t_.string().startsWith("https://").optional()}),search:t_.strictObject({component:t_.custom(...nB),emptyResult:t_.custom(...nB),error:t_.string().or(t_.function().returns(t_.string())),loading:t_.custom(...nB),placeholder:t_.string().or(t_.function().returns(t_.string()))}),serverSideError:t_.strictObject({content:t_.custom(...nB),labels:t_.string()}),sidebar:t_.strictObject({autoCollapse:t_.boolean().optional(),defaultMenuCollapseLevel:t_.number().min(1).int(),titleComponent:t_.custom(...nB),toggleButton:t_.boolean()}),themeSwitch:t_.strictObject({component:t_.custom(...nB),useOptions:nF.or(t_.function().returns(nF))}),toc:t_.strictObject({backToTop:t_.boolean(),component:t_.custom(...nB),extraContent:t_.custom(...nB),float:t_.boolean(),headingComponent:t_.custom(...nq).optional(),title:t_.custom(...nB)}),useNextSeoProps:t_.custom(isFunction)}).deepPartial().extend({i18n:nH.optional()});var n$={"en-US":"Loading",fr:"Сhargement",ru:"Загрузка","zh-CN":"正在加载"},nG={"en-US":"Search documentation",fr:"Rechercher documents",ru:"Поиск документации","zh-CN":"搜索文档"},nW={banner:{dismissible:!0,key:"nextra-banner"},chat:{icon:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(eM.D7,{}),(0,ej.jsx)("span",{className:"nx-sr-only",children:"Discord"})]})},darkMode:!0,direction:"ltr",docsRepositoryBase:"https://github.com/shuding/nextra",editLink:{component:function({className:n,filePath:a,children:g}){let v=function(n=""){let a=useConfig(),g=tV()(a.docsRepositoryBase||"");if(!g)throw Error("Invalid `docsRepositoryBase` URL!");return`${g.href}/${n}`}(a);return v?(0,ej.jsx)(nw,{className:n,href:v,children:g}):null},text:"Edit this page"},feedback:{content:"Question? Give us feedback →",labels:"feedback",useLink(){let n=useConfig();return getGitIssueUrl({labels:n.feedback.labels,repository:n.docsRepositoryBase,title:`Feedback for \u201C${n.title}\u201D`})}},footer:{component:function({menu:n}){let a=useConfig();return(0,ej.jsxs)("footer",{className:"nx-bg-gray-100 nx-pb-[env(safe-area-inset-bottom)] dark:nx-bg-neutral-900 print:nx-bg-transparent",children:[(0,ej.jsxs)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex nx-max-w-[90rem] nx-gap-2 nx-py-2 nx-px-4",n&&(a.i18n.length>0||a.darkMode)?"nx-flex":"nx-hidden"),children:[(0,ej.jsx)(LocaleSwitch,{}),a.darkMode&&renderComponent(a.themeSwitch.component)]}),(0,ej.jsx)("hr",{className:"dark:nx-border-neutral-800"}),(0,ej.jsx)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex nx-max-w-[90rem] nx-justify-center nx-py-12 nx-text-gray-600 dark:nx-text-gray-400 md:nx-justify-start","nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]"),children:renderComponent(a.footer.text)})]})},text:`MIT ${new Date().getFullYear()} \xa9 Nextra.`},gitTimestamp:function({timestamp:n}){let{locale:a=nU}=(0,eC.useRouter)();return(0,ej.jsxs)(ej.Fragment,{children:["Last updated on"," ",(0,ej.jsx)("time",{dateTime:n.toISOString(),children:n.toLocaleDateString(a,{day:"numeric",month:"long",year:"numeric"})})]})},head:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("meta",{name:"msapplication-TileColor",content:"#fff"}),(0,ej.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ej.jsx)("meta",{name:"description",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,ej.jsx)("meta",{name:"twitter:site",content:"@shuding_"}),(0,ej.jsx)("meta",{property:"og:title",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{property:"og:description",content:"Nextra: the next docs builder"}),(0,ej.jsx)("meta",{name:"apple-mobile-web-app-title",content:"Nextra"})]}),i18n:[],logo:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("span",{className:"nx-font-extrabold",children:"Nextra"}),(0,ej.jsx)("span",{className:"nx-ml-2 nx-hidden nx-font-normal nx-text-gray-600 md:nx-inline",children:"The Next Docs Builder"})]}),logoLink:!0,navbar:{component:function({flatDirectories:n,items:a}){let g=useConfig(),v=useFSRoute(),{menu:j,setMenu:z}=useMenu();return(0,ej.jsxs)("div",{className:"nextra-nav-container nx-sticky nx-top-0 nx-z-20 nx-w-full nx-bg-transparent print:nx-hidden",children:[(0,ej.jsx)("div",{className:(0,eE.Z)("nextra-nav-container-blur","nx-pointer-events-none nx-absolute nx-z-[-1] nx-h-full nx-w-full nx-bg-white dark:nx-bg-dark","nx-shadow-[0_2px_4px_rgba(0,0,0,.02),0_1px_0_rgba(0,0,0,.06)] dark:nx-shadow-[0_-1px_0_rgba(255,255,255,.1)_inset]","contrast-more:nx-shadow-[0_0_0_1px_#000] contrast-more:dark:nx-shadow-[0_0_0_1px_#fff]")}),(0,ej.jsxs)("nav",{className:"nx-mx-auto nx-flex nx-h-[var(--nextra-navbar-height)] nx-max-w-[90rem] nx-items-center nx-justify-end nx-gap-2 nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]",children:[g.logoLink?(0,ej.jsx)(nw,{href:"string"==typeof g.logoLink?g.logoLink:"/",className:"nx-flex nx-items-center hover:nx-opacity-75 ltr:nx-mr-auto rtl:nx-ml-auto",children:renderComponent(g.logo)}):(0,ej.jsx)("div",{className:"nx-flex nx-items-center ltr:nx-mr-auto rtl:nx-ml-auto",children:renderComponent(g.logo)}),a.map(n=>{if("hidden"===n.display)return null;if("menu"===n.type)return(0,ej.jsxs)(NavbarMenu,{className:(0,eE.Z)(nI.link,"nx-flex nx-gap-1",nI.inactive),menu:n,children:[n.title,(0,ej.jsx)(eM.LZ,{className:"nx-h-[18px] nx-min-w-[18px] nx-rounded-sm nx-p-0.5",pathClassName:"nx-origin-center nx-transition-transform nx-rotate-90"})]},n.title);let a=n.href||n.route||"#";n.children&&(a=(n.withIndexPage?n.route:n.firstChildRoute)||a);let g=n.route===v||v.startsWith(n.route+"/");return(0,ej.jsxs)(nw,{href:a,className:(0,eE.Z)(nI.link,"nx-relative -nx-ml-2 nx-hidden nx-whitespace-nowrap nx-p-2 md:nx-inline-block",!g||n.newWindow?nI.inactive:nI.active),newWindow:n.newWindow,"aria-current":!n.newWindow&&g,children:[(0,ej.jsx)("span",{className:"nx-absolute nx-inset-x-0 nx-text-center",children:n.title}),(0,ej.jsx)("span",{className:"nx-invisible nx-font-medium",children:n.title})]},a)}),renderComponent(g.search.component,{directories:n,className:"nx-hidden md:nx-inline-block mx-min-w-[200px]"}),g.project.link?(0,ej.jsx)(nw,{className:"nx-p-2 nx-text-current",href:g.project.link,newWindow:!0,children:renderComponent(g.project.icon)}):null,g.chat.link?(0,ej.jsx)(nw,{className:"nx-p-2 nx-text-current",href:g.chat.link,newWindow:!0,children:renderComponent(g.chat.icon)}):null,renderComponent(g.navbar.extraContent),(0,ej.jsx)("button",{type:"button","aria-label":"Menu",className:"nextra-hamburger -nx-mr-2 nx-rounded nx-p-2 active:nx-bg-gray-400/20 md:nx-hidden",onClick:()=>z(!j),children:(0,ej.jsx)(eM.Oq,{className:(0,eE.Z)({open:j})})})]})]})}},navigation:!0,nextThemes:{defaultTheme:"system",storageKey:"theme"},notFound:{content:"Submit an issue about broken link →",labels:"bug"},primaryHue:{dark:204,light:212},primarySaturation:{dark:100,light:100},project:{icon:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(eM.fy,{}),(0,ej.jsx)("span",{className:"nx-sr-only",children:"GitHub"})]})},search:{component:function({className:n,directories:a}){let g=useConfig();return g.flexsearch?(0,ej.jsx)(Flexsearch,{className:n}):(0,ej.jsx)(MatchSorterSearch,{className:n,directories:a})},emptyResult:(0,ej.jsx)("span",{className:"nx-block nx-select-none nx-p-8 nx-text-center nx-text-sm nx-text-gray-400",children:"No results found."}),error:"Failed to load search index.",loading:function(){let{locale:n,defaultLocale:a=nU}=(0,eC.useRouter)(),g=n&&n$[n]||n$[a];return(0,ej.jsxs)(ej.Fragment,{children:[g,"…"]})},placeholder:function(){let{locale:n,defaultLocale:a=nU}=(0,eC.useRouter)(),g=n&&nG[n]||nG[a];return`${g}\u2026`}},serverSideError:{content:"Submit an issue about error in url →",labels:"bug"},sidebar:{defaultMenuCollapseLevel:2,titleComponent:({title:n})=>(0,ej.jsx)(ej.Fragment,{children:n}),toggleButton:!1},themeSwitch:{component:function({lite:n,className:a}){let{setTheme:g,resolvedTheme:v,theme:j=""}=y(),z=useMounted(),H=useConfig().themeSwitch,B=z&&"dark"===v?eM.kL:eM.NW,W="function"==typeof H.useOptions?H.useOptions():H.useOptions;return(0,ej.jsx)(Select,{className:a,title:"Change theme",options:[{key:"light",name:W.light},{key:"dark",name:W.dark},{key:"system",name:W.system}],onChange:n=>{g(n.key)},selected:{key:j,name:(0,ej.jsxs)("div",{className:"nx-flex nx-items-center nx-gap-2 nx-capitalize",children:[(0,ej.jsx)(B,{}),(0,ej.jsx)("span",{className:n?"md:nx-hidden":"",children:z?W[j]:W.light})]})}})},useOptions(){let{locale:n}=(0,eC.useRouter)();return"zh-CN"===n?{dark:"深色主题",light:"浅色主题",system:"系统默认"}:{dark:"Dark",light:"Light",system:"System"}}},toc:{backToTop:!1,component:function({headings:n,filePath:a}){var g;let v=useActiveAnchor(),j=useConfig(),z=(0,eP.useRef)(null),H=(0,eP.useMemo)(()=>n.filter(n=>n.depth>1),[n]),B=H.length>0,W=!!(j.feedback.content||j.editLink.component||j.toc.extraContent),K=null==(g=Object.entries(v).find(([,{isActive:n}])=>n))?void 0:g[0];return(0,eP.useEffect)(()=>{var n;if(!K)return;let a=null==(n=z.current)?void 0:n.querySelector(`li > a[href="#${K}"]`);a&&dist_e(a,{behavior:"smooth",block:"center",inline:"center",scrollMode:"always",boundary:z.current})},[K]),(0,ej.jsxs)("div",{ref:z,className:(0,eE.Z)("nextra-scrollbar nx-sticky nx-top-16 nx-overflow-y-auto nx-pr-4 nx-pt-6 nx-text-sm [hyphens:auto]","nx-max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:-nx-mr-4 rtl:-nx-ml-4"),children:[B&&(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("p",{className:"nx-mb-4 nx-font-semibold nx-tracking-tight",children:renderComponent(j.toc.title)}),(0,ej.jsx)("ul",{children:H.map(({id:n,value:a,depth:g})=>{var z,H,B,W;return(0,ej.jsx)("li",{className:"nx-my-2 nx-scroll-my-6 nx-scroll-py-6",children:(0,ej.jsx)("a",{href:`#${n}`,className:(0,eE.Z)({2:"nx-font-semibold",3:"ltr:nx-pl-4 rtl:nx-pr-4",4:"ltr:nx-pl-8 rtl:nx-pr-8",5:"ltr:nx-pl-12 rtl:nx-pr-12",6:"ltr:nx-pl-16 rtl:nx-pr-16"}[g],"nx-inline-block",(null==(z=v[n])?void 0:z.isActive)?"nx-text-primary-600 nx-subpixel-antialiased contrast-more:!nx-text-primary-600":"nx-text-gray-500 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-300","contrast-more:nx-text-gray-900 contrast-more:nx-underline contrast-more:dark:nx-text-gray-50 nx-w-full nx-break-words"),children:null!=(W=null==(B=(H=j.toc).headingComponent)?void 0:B.call(H,{id:n,children:a}))?W:a})},n)})})]}),W&&(0,ej.jsxs)("div",{className:(0,eE.Z)(B&&"nx-mt-8 nx-border-t nx-bg-white nx-pt-8 nx-shadow-[0_-12px_16px_white] dark:nx-bg-dark dark:nx-shadow-[0_-12px_16px_#111]","nx-sticky nx-bottom-0 nx-flex nx-flex-col nx-items-start nx-gap-2 nx-pb-8 dark:nx-border-neutral-800","contrast-more:nx-border-t contrast-more:nx-border-neutral-400 contrast-more:nx-shadow-none contrast-more:dark:nx-border-neutral-400"),children:[j.feedback.content?(0,ej.jsx)(nw,{className:nV,href:j.feedback.useLink(),newWindow:!0,children:renderComponent(j.feedback.content)}):null,renderComponent(j.editLink.component,{filePath:a,className:nV,children:renderComponent(j.editLink.text)}),renderComponent(j.toc.extraContent),j.toc.backToTop&&(0,ej.jsx)(BackToTop,{className:nV})]})]})},float:!0,title:"On This Page"},useNextSeoProps:()=>({titleTemplate:"%s – Nextra"})},nK=Object.entries(nW).map(([n,a])=>{let g=a&&"object"==typeof a&&!Array.isArray(a)&&!(0,eP.isValidElement)(a);if(g)return n}).filter(Boolean);if(nz){let n;window.addEventListener("resize",()=>{document.body.classList.add("resizing"),clearTimeout(n),n=setTimeout(()=>{document.body.classList.remove("resizing")},200)})}function HeadingLink(n){var{tag:a,context:g,children:v,id:j,className:z}=n,H=__objRest(n,["tag","context","children","id","className"]);let B=useSetActiveAnchor(),W=useSlugs(),K=useIntersectionObserver(),ee=(0,eP.useRef)(null);return(0,eP.useEffect)(()=>{if(!j)return;let n=ee.current;if(n)return W.set(n,[j,g.index+=1]),null==K||K.observe(n),()=>{null==K||K.disconnect(),W.delete(n),B(n=>{let a=__spreadValues({},n);return delete a[j],a})}},[j,g,W,K,B]),(0,ej.jsxs)(a,__spreadProps(__spreadValues({className:"sr-only"===z?"nx-sr-only":(0,eE.Z)("nx-font-semibold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100",{h2:"nx-mt-10 nx-border-b nx-pb-1 nx-text-3xl nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400",h3:"nx-mt-8 nx-text-2xl",h4:"nx-mt-8 nx-text-xl",h5:"nx-mt-8 nx-text-lg",h6:"nx-mt-8 nx-text-base"}[a])},H),{children:[v,j&&(0,ej.jsx)("a",{href:`#${j}`,id:j,className:"subheading-anchor","aria-label":"Permalink for this section",ref:ee})]}))}var findSummary=n=>{let a=null,g=[];return eP.Children.forEach(n,(n,v)=>{var j;if(n&&n.type===Summary){a||(a=n);return}let z=n;if(!a&&n&&"object"==typeof n&&n.type!==Details&&"props"in n&&n.props){let g=findSummary(n.props.children);a=g[0],z=(0,eP.cloneElement)(n,__spreadProps(__spreadValues({},n.props),{children:(null==(j=g[1])?void 0:j.length)?g[1]:void 0,key:v}))}g.push(z)}),[a,g]},Details=n=>{var{children:a,open:g}=n,v=__objRest(n,["children","open"]);let[j,z]=(0,eP.useState)(!!g),[H,B]=findSummary(a),[W,K]=(0,eP.useState)(j);return(0,eP.useEffect)(()=>{if(j)K(!0);else{let n=setTimeout(()=>K(j),500);return()=>clearTimeout(n)}},[j]),(0,ej.jsxs)("details",__spreadProps(__spreadValues(__spreadProps(__spreadValues({className:"nx-my-4 nx-rounded nx-border nx-border-gray-200 nx-bg-white nx-p-2 nx-shadow-sm first:nx-mt-0 dark:nx-border-neutral-800 dark:nx-bg-neutral-900"},v),{open:W}),j&&{"data-expanded":!0}),{children:[(0,ej.jsx)(n_,{value:z,children:H}),(0,ej.jsx)(Collapse,{isOpen:j,children:B})]}))},Summary=n=>{let a=useDetails();return(0,ej.jsx)("summary",__spreadProps(__spreadValues({className:(0,eE.Z)("nx-flex nx-items-center nx-cursor-pointer nx-list-none nx-p-1 nx-transition-colors hover:nx-bg-gray-100 dark:hover:nx-bg-neutral-800","before:nx-mr-1 before:nx-inline-block before:nx-transition-transform before:nx-content-[''] dark:before:nx-invert before:nx-shrink-0","rtl:before:nx-rotate-180 [[data-expanded]>&]:before:nx-rotate-90")},n),{onClick:n=>{n.preventDefault(),a(n=>!n)}}))},nJ=/https?:\/\//,Link=n=>{var{href:a="",className:g}=n,v=__objRest(n,["href","className"]);return(0,ej.jsx)(nw,__spreadValues({href:a,newWindow:nJ.test(a),className:(0,eE.Z)("nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]",g)},v))},A=n=>{var{href:a=""}=n,g=__objRest(n,["href"]);return(0,ej.jsx)(nw,__spreadValues({href:a,newWindow:nJ.test(a)},g))},getComponents=({isRawLayout:n,components:a})=>{if(n)return{a:A};let g={index:0};return __spreadValues({h1:n=>(0,ej.jsx)("h1",__spreadValues({className:"nx-mt-2 nx-text-4xl nx-font-bold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100"},n)),h2:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h2",context:g},n)),h3:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h3",context:g},n)),h4:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h4",context:g},n)),h5:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h5",context:g},n)),h6:n=>(0,ej.jsx)(HeadingLink,__spreadValues({tag:"h6",context:g},n)),ul:n=>(0,ej.jsx)("ul",__spreadValues({className:"nx-mt-6 nx-list-disc first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"},n)),ol:n=>(0,ej.jsx)("ol",__spreadValues({className:"nx-mt-6 nx-list-decimal first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"},n)),li:n=>(0,ej.jsx)("li",__spreadValues({className:"nx-my-2"},n)),blockquote:n=>(0,ej.jsx)("blockquote",__spreadValues({className:(0,eE.Z)("nx-mt-6 nx-border-gray-300 nx-italic nx-text-gray-700 dark:nx-border-gray-700 dark:nx-text-gray-400","first:nx-mt-0 ltr:nx-border-l-2 ltr:nx-pl-6 rtl:nx-border-r-2 rtl:nx-pr-6")},n)),hr:n=>(0,ej.jsx)("hr",__spreadValues({className:"nx-my-8 nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400"},n)),a:Link,table:n=>(0,ej.jsx)(na.iA,__spreadValues({className:"nextra-scrollbar nx-mt-6 nx-p-0 first:nx-mt-0"},n)),p:n=>(0,ej.jsx)("p",__spreadValues({className:"nx-mt-6 nx-leading-7 first:nx-mt-0"},n)),tr:na.Tr,th:na.Th,td:na.Td,details:Details,summary:Summary,pre:na.SU,code:na.EK},a)},nQ={toc:(0,eE.Z)("nextra-toc nx-order-last nx-hidden nx-w-64 nx-shrink-0 xl:nx-block print:nx-hidden"),main:(0,eE.Z)("nx-w-full nx-break-words")},Body=({themeContext:n,breadcrumb:a,timestamp:g,navigation:v,children:j})=>{var z;let H=useConfig(),B=useMounted();if("raw"===n.layout)return(0,ej.jsx)("div",{className:nQ.main,children:j});let W=n.timestamp&&H.gitTimestamp&&g?new Date(g):null,K=B&&W?(0,ej.jsx)("div",{className:"nx-mt-12 nx-mb-8 nx-block nx-text-xs nx-text-gray-500 ltr:nx-text-right rtl:nx-text-left dark:nx-text-gray-400",children:renderComponent(H.gitTimestamp,{timestamp:W})}):(0,ej.jsx)("div",{className:"nx-mt-16"}),ee=(0,ej.jsxs)(ej.Fragment,{children:[j,K,v]}),et=(null==(z=H.main)?void 0:z.call(H,{children:ee}))||ee;return"full"===n.layout?(0,ej.jsx)("article",{className:(0,eE.Z)(nQ.main,"nextra-content nx-min-h-[calc(100vh-var(--nextra-navbar-height))] nx-pl-[max(env(safe-area-inset-left),1.5rem)] nx-pr-[max(env(safe-area-inset-right),1.5rem)]"),children:et}):(0,ej.jsx)("article",{className:(0,eE.Z)(nQ.main,"nextra-content nx-flex nx-min-h-[calc(100vh-var(--nextra-navbar-height))] nx-min-w-0 nx-justify-center nx-pb-8 nx-pr-[calc(env(safe-area-inset-right)-1.5rem)]","article"===n.typesetting&&"nextra-body-typesetting-article"),children:(0,ej.jsxs)("main",{className:"nx-w-full nx-min-w-0 nx-max-w-6xl nx-px-6 nx-pt-4 md:nx-px-12",children:[a,et]})})},InnerLayout=({filePath:n,pageMap:a,frontMatter:g,headings:v,timestamp:j,children:z})=>{let H=useConfig(),{locale:B=nU,defaultLocale:W}=(0,eC.useRouter)(),K=useFSRoute(),{activeType:ee,activeIndex:et,activeThemeContext:er,activePath:en,topLevelNavbarItems:eo,docsDirectories:ei,flatDirectories:es,flatDocsDirectories:el,directories:ec}=(0,eP.useMemo)(()=>(function normalizePages({list:n,locale:a,defaultLocale:g,route:v,docsRoot:j="",underCurrentDocsRoot:z=!1,pageThemeContext:H=tT}){let B,W;for(let g of n)if("Meta"===g.kind){if(g.locale===a){B=g.data;break}B||(B=g.data)}let K=B||{},ee=Object.keys(K);for(let n of ee)"string"==typeof K[n]&&(K[n]={title:K[n]});let et=[],er=[],en=[],eo=[],ei=[],es=0,el=H,ec=[],eu=-1,ed=K["*"]||{};delete ed.title,delete ed.href;let ep=n.filter(n=>"Meta"!==n.kind&&!n.name.startsWith("_")&&(!("locale"in n)||!n.locale||[a,g].includes(n.locale))).sort((n,a)=>{let g=ee.indexOf(n.name),v=ee.indexOf(a.name);return -1===g&&-1===v?n.name{let a;let g=[],v=ee.indexOf(n.name);if(-1!==v){for(let n=eu+1;n({...B,type:ef,...ex&&{title:ex},...eu&&{display:eu},...eg&&{children:[]}}),ev=getItem(),ey=getItem(),eb=getItem();if(ey.isUnderCurrentDocsTree=eh,"separator"===ef&&(ev.isUnderCurrentDocsTree=eh),B.route===v)switch(ec=[ev],W=ef,el={...el,...em},ef){case"page":case"menu":es=ei.length;break;case"doc":es=eo.length}if(!("hidden"===eu&&"Folder"!==ev.kind||eI.hV.has(B.route))){if(eg){if(void 0!==eg.activeIndex&&void 0!==eg.activeType){switch(el=eg.activeThemeContext,W=eg.activeType,ec=[ev,...eg.activePath],W){case"page":case"menu":es=ei.length+eg.activeIndex;break;case"doc":es=eo.length+eg.activeIndex}B.withIndexPage&&"doc"===ef&&es++}switch(ef){case"page":case"menu":eb.children.push(...eg.directories),en.push(...eg.docsDirectories),eg.flatDirectories.length?(eb.firstChildRoute=function findFirstRoute(n){for(let a of n){if(a.route)return a.route;if(a.children){let n=findFirstRoute(a.children);if(n)return n}}}(eg.flatDirectories),ei.push(eb)):eb.withIndexPage&&ei.push(eb);break;case"doc":Array.isArray(ey.children)&&ey.children.push(...eg.docsDirectories),ev.withIndexPage&&"children"!==eu&&eo.push(ey)}er.push(...eg.flatDirectories),eo.push(...eg.flatDocsDirectories),Array.isArray(ev.children)&&ev.children.push(...eg.directories)}else switch(er.push(ev),ef){case"page":case"menu":ei.push(eb);break;case"doc":eo.push(ey)}switch("doc"===ef&&"children"===eu?ey.children&&(et.push(...ey.children),en.push(...ey.children)):et.push(ev),ef){case"page":case"menu":en.push(eb);break;case"doc":"children"!==eu&&en.push(ey);break;case"separator":en.push(ev)}}}return{activeType:W,activeIndex:es,activeThemeContext:el,activePath:ec,directories:et,flatDirectories:er,docsDirectories:en,flatDocsDirectories:eo,topLevelNavbarItems:ei}})({list:a,locale:B,defaultLocale:W,route:K}),[a,B,W,K]),eu=__spreadValues(__spreadValues({},er),g),ed=!eu.sidebar||"raw"===eu.layout||"page"===ee,ep="page"!==ee&&eu.toc&&"default"===eu.layout?(0,ej.jsx)("nav",{className:(0,eE.Z)(nQ.toc,"nx-px-4"),"aria-label":"table of contents",children:renderComponent(H.toc.component,{headings:H.toc.float?v:[],filePath:n})}):"full"!==eu.layout&&"raw"!==eu.layout&&(0,ej.jsx)("nav",{className:nQ.toc,"aria-label":"table of contents"}),ef=H.i18n.find(n=>n.locale===B),em=ef?"rtl"===ef.direction:"rtl"===H.direction,eh=em?"rtl":"ltr";return(0,ej.jsxs)("div",{dir:eh,children:[(0,ej.jsx)("script",{dangerouslySetInnerHTML:{__html:`document.documentElement.setAttribute('dir','${eh}')`}}),(0,ej.jsx)(dist_Head,{}),(0,ej.jsx)(Banner,{}),eu.navbar&&renderComponent(H.navbar.component,{flatDirectories:es,items:eo}),(0,ej.jsx)("div",{className:(0,eE.Z)("nx-mx-auto nx-flex","raw"!==eu.layout&&"nx-max-w-[90rem]"),children:(0,ej.jsxs)(ActiveAnchorProvider,{children:[(0,ej.jsx)(Sidebar,{docsDirectories:ei,flatDirectories:es,fullDirectories:ec,headings:v,asPopover:ed,includePlaceholder:"default"===eu.layout}),ep,(0,ej.jsx)(nZ,{}),(0,ej.jsx)(Body,{themeContext:eu,breadcrumb:"page"!==ee&&eu.breadcrumb?(0,ej.jsx)(Breadcrumb,{activePath:en}):null,timestamp:j,navigation:"page"!==ee&&eu.pagination?(0,ej.jsx)(NavLinks,{flatDirectories:el,currentIndex:et}):null,children:(0,ej.jsx)(eT.Z,{components:getComponents({isRawLayout:"raw"===eu.layout,components:H.components}),children:z})})]})}),eu.footer&&renderComponent(H.footer.component,{menu:ed})]})};function ControlKeyIcon(){return eP.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},eP.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function SearchIcon(){return eP.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},eP.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var nY=["translations"];function DocSearchButton_extends(){return(DocSearchButton_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,nY),z=v.buttonText,H=void 0===z?"Search":z,B=v.buttonAriaLabel,W=_slicedToArray((0,eP.useState)(null),2),K=W[0],ee=W[1];return(0,eP.useEffect)(function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?ee("⌘"):ee(nX))},[]),eP.createElement("button",DocSearchButton_extends({type:"button",className:"DocSearch DocSearch-Button","aria-label":void 0===B?"Search":B},j,{ref:a}),eP.createElement("span",{className:"DocSearch-Button-Container"},eP.createElement(SearchIcon,null),eP.createElement("span",{className:"DocSearch-Button-Placeholder"},H)),eP.createElement("span",{className:"DocSearch-Button-Keys"},null!==K&&eP.createElement(eP.Fragment,null,eP.createElement(DocSearchButtonKey,{reactsToKey:K===nX?nX:"Meta"},K===nX?eP.createElement(ControlKeyIcon,null):K),eP.createElement(DocSearchButtonKey,{reactsToKey:"k"},"K"))))});function DocSearchButtonKey(n){var a=n.reactsToKey,g=n.children,v=_slicedToArray((0,eP.useState)(!1),2),j=v[0],z=v[1];return(0,eP.useEffect)(function(){if(a)return window.addEventListener("keydown",handleKeyDown),window.addEventListener("keyup",handleKeyUp),function(){window.removeEventListener("keydown",handleKeyDown),window.removeEventListener("keyup",handleKeyUp)};function handleKeyDown(n){n.key===a&&z(!0)}function handleKeyUp(n){(n.key===a||"Meta"===n.key)&&z(!1)}},[a]),eP.createElement("kbd",{className:j?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},g)}function debounce_debounce(n,a){var g=void 0;return function(){for(var v=arguments.length,j=Array(v),z=0;zn.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}function ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function _objectSpread(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);gn.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,n7);n9&&j.environment.clearTimeout(n9);var K=W.setCollections,ee=W.setIsOpen,et=W.setQuery,er=W.setActiveItemId,en=W.setStatus;if(et(z),er(j.defaultActiveItemId),!z&&!1===j.openOnFocus){var eo,ei=B.getState().collections.map(function(n){return onInput_objectSpread(onInput_objectSpread({},n),{},{items:[]})});en("idle"),K(ei),ee(null!==(eo=v.isOpen)&&void 0!==eo?eo:j.shouldPanelOpen({state:B.getState()}));var es=cancelable(n8(ei).then(function(){return Promise.resolve()}));return B.pendingRequests.add(es)}en("loading"),n9=j.environment.setTimeout(function(){en("stalled")},j.stallThreshold);var el=cancelable(n8(j.getSources(onInput_objectSpread({query:z,refresh:H,state:B.getState()},W)).then(function(n){return Promise.all(n.map(function(n){return Promise.resolve(n.getItems(onInput_objectSpread({query:z,refresh:H,state:B.getState()},W))).then(function(a){return function(n,a,g){if(null==n?void 0:n.execute){var v="algolia"===n.requesterId?Object.assign.apply(Object,[{}].concat(resolve_toConsumableArray(Object.keys(g.context).map(function(n){var a;return null===(a=g.context[n])||void 0===a?void 0:a.__algoliaSearchParameters})))):{};return resolve_objectSpread(resolve_objectSpread({},n),{},{requests:n.queries.map(function(g){return{query:"algolia"===n.requesterId?resolve_objectSpread(resolve_objectSpread({},g),{},{params:resolve_objectSpread(resolve_objectSpread({},v),g.params)}):g,sourceId:a,transformResponse:n.transformResponse}})})}return{items:n,sourceId:a}}(a,n.sourceId,B.getState())})})).then(resolve).then(function(a){return n.map(function(n){var g=a.filter(function(a){return a.sourceId===n.sourceId}),v=g.map(function(n){return n.items}),j=g[0].transformResponse,z=j?j({results:v,hits:v.map(function(n){return n.hits}).filter(Boolean),facetHits:v.map(function(n){var a;return null===(a=n.facetHits)||void 0===a?void 0:a.map(function(n){return{label:n.value,count:n.count,_highlightResult:{label:{value:n.highlighted}}}})}).filter(Boolean)}):v;return n.onResolve({source:n,results:v,items:z,state:B.getState()}),Array.isArray(z),z.every(Boolean),'The `getItems` function from source "'.concat(n.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:n,items:z}})}).then(function(n){var a,g,v,z,H,W;return g=(a={collections:n,props:j,state:B.getState()}).collections,v=a.props,z=a.state,H=g.reduce(function(n,a){return reshape_objectSpread(reshape_objectSpread({},n),{},reshape_defineProperty({},a.source.sourceId,reshape_objectSpread(reshape_objectSpread({},a.source),{},{getItems:function(){return flatten(a.items)}})))},{}),W=v.plugins.reduce(function(n,a){return a.reshape?a.reshape(n):n},{sourcesBySourceId:H,state:z}).sourcesBySourceId,flatten(v.reshape({sourcesBySourceId:W,sources:Object.values(W),state:z})).filter(Boolean).map(function(n){return{source:n,items:n.getItems()}})})}))).then(function(n){en("idle"),K(n);var g,et=j.shouldPanelOpen({state:B.getState()});ee(null!==(g=v.isOpen)&&void 0!==g?g:j.openOnFocus&&!z&&et||et);var er=getActiveItem(B.getState());if(null!==B.getState().activeItemId&&er){var eo=er.item,ei=er.itemInputValue,es=er.itemUrl,el=er.source;el.onActive(onInput_objectSpread({event:a,item:eo,itemInputValue:ei,itemUrl:es,refresh:H,source:el,state:B.getState()},W))}}).finally(function(){en("idle"),n9&&j.environment.clearTimeout(n9)});return B.pendingRequests.add(el)}function onKeyDown_typeof(n){return(onKeyDown_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var oe=["event","props","refresh","store"];function onKeyDown_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function onKeyDown_objectSpread(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}var ou=[{segment:"autocomplete-core",version:"1.9.3"}];function metadata_typeof(n){return(metadata_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function metadata_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function metadata_defineProperty(n,a,g){var v;return(v=function(n,a){if("object"!==metadata_typeof(n)||null===n)return n;var g=n[Symbol.toPrimitive];if(void 0!==g){var v=g.call(n,a||"default");if("object"!==metadata_typeof(v))return v;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(n)}(a,"string"),(a="symbol"===metadata_typeof(v)?v:String(v))in n)?Object.defineProperty(n,a,{value:g,enumerable:!0,configurable:!0,writable:!0}):n[a]=g,n}function getCompletion(n){var a,g=n.state;return!1===g.isOpen||null===g.activeItemId?null:(null===(a=getActiveItem(g))||void 0===a?void 0:a.itemInputValue)||null}function getNextActiveItemId(n,a,g,v){if(!g)return null;if(n<0&&(null===a||null!==v&&0===a))return g+n;var j=(null===a?-1:a)+n;return j<=-1||j>=g?null===v?null:0:j}function stateReducer_typeof(n){return(stateReducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function stateReducer_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function stateReducer_objectSpread(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,od),j=g.noResultsText,z=void 0===j?"No results for":j,H=g.suggestedQueryText,B=void 0===H?"Try searching for":H,W=g.reportMissingResultsText,K=g.reportMissingResultsLinkText,ee=void 0===K?"Let us know.":K,et=v.state.context.searchSuggestions;return eP.createElement("div",{className:"DocSearch-NoResults"},eP.createElement("div",{className:"DocSearch-Screen-Icon"},eP.createElement(NoResultsIcon,null)),eP.createElement("p",{className:"DocSearch-Title"},z,' "',eP.createElement("strong",null,v.state.query),'"'),et&&et.length>0&&eP.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},eP.createElement("p",{className:"DocSearch-Help"},B,":"),eP.createElement("ul",null,et.slice(0,3).reduce(function(n,a){return[].concat(function(n){if(Array.isArray(n))return NoResultsScreen_arrayLikeToArray(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,a){if(n){if("string"==typeof n)return NoResultsScreen_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return NoResultsScreen_arrayLikeToArray(n,a)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[eP.createElement("li",{key:a},eP.createElement("button",{className:"DocSearch-Prefill",key:a,type:"button",onClick:function(){v.setQuery(a.toLowerCase()+" "),v.refresh(),v.inputRef.current.focus()}},a))])},[]))),v.getMissingResultsUrl&&eP.createElement("p",{className:"DocSearch-Help"},"".concat(void 0===W?"Believe this query should return results?":W," "),eP.createElement("a",{href:v.getMissingResultsUrl({query:v.state.query}),target:"_blank",rel:"noopener noreferrer"},ee)))}var LvlIcon=function(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function SourceIcon(n){switch(n.type){case"lvl1":return eP.createElement(LvlIcon,null);case"content":return eP.createElement(ContentIcon,null);default:return eP.createElement(AnchorIcon,null)}}function AnchorIcon(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function ContentIcon(){return eP.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function SelectIcon(){return eP.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},eP.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},eP.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),eP.createElement("path",{d:"M8 17l-6-6 6-6"})))}var op=["hit","attribute","tagName"];function Snippet_ownKeys(n,a){var g=Object.keys(n);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(n);a&&(v=v.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),g.push.apply(g,v)}return g}function Snippet_objectSpread(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,op);return(0,eP.createElement)(j,Snippet_objectSpread(Snippet_objectSpread({},z),{},{dangerouslySetInnerHTML:{__html:getPropertyByPath(a,"_snippetResult.".concat(g,".value"))||getPropertyByPath(a,g)}}))}function Results_slicedToArray(n,a){return function(n){if(Array.isArray(n))return n}(n)||function(n,a){var g,v,j=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=j){var z=[],H=!0,B=!1;try{for(j=j.call(n);!(H=(g=j.next()).done)&&(z.push(g.value),!a||z.length!==a);H=!0);}catch(n){B=!0,v=n}finally{try{H||null==j.return||j.return()}finally{if(B)throw v}}return z}}(n,a)||function(n,a){if(n){if("string"==typeof n)return Results_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Results_arrayLikeToArray(n,a)}}(n,a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Results_arrayLikeToArray(n,a){(null==a||a>n.length)&&(a=n.length);for(var g=0,v=Array(a);g|<\/mark>)/g,om=RegExp(of.source);function removeHighlightTags(n){if(!n.__docsearch_parent&&!n._highlightResult)return n.hierarchy.lvl0;var a,g,v=((n.__docsearch_parent?null===(a=n.__docsearch_parent)||void 0===a||null===(a=a._highlightResult)||void 0===a||null===(a=a.hierarchy)||void 0===a?void 0:a.lvl0:null===(g=n._highlightResult)||void 0===g||null===(g=g.hierarchy)||void 0===g?void 0:g.lvl0)||{}).value;return v&&om.test(v)?v.replace(of,""):v}function ResultsScreen_extends(){return(ResultsScreen_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oh),j=g.recentSearchesTitle,z=g.noRecentSearchesText,H=g.saveRecentSearchButtonTitle,B=void 0===H?"Save this search":H,W=g.removeRecentSearchButtonTitle,K=void 0===W?"Remove this search from history":W,ee=g.favoriteSearchesTitle,et=g.removeFavoriteSearchButtonTitle,er=void 0===et?"Remove this search from favorites":et;return"idle"===v.state.status&&!1===v.hasCollections?v.disableUserPersonalization?null:eP.createElement("div",{className:"DocSearch-StartScreen"},eP.createElement("p",{className:"DocSearch-Help"},void 0===z?"No recent searches":z)):!1===v.hasCollections?null:eP.createElement("div",{className:"DocSearch-Dropdown-Container"},eP.createElement(Results,StartScreen_extends({},v,{title:void 0===j?"Recent":j,collection:v.state.collections[0],renderIcon:function(){return eP.createElement("div",{className:"DocSearch-Hit-icon"},eP.createElement(RecentIcon,null))},renderAction:function(n){var a=n.item,g=n.runFavoriteTransition,j=n.runDeleteTransition;return eP.createElement(eP.Fragment,null,eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:B,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),g(function(){v.favoriteSearches.add(a),v.recentSearches.remove(a),v.refresh()})}},eP.createElement(StarIcon,null))),eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:K,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),j(function(){v.recentSearches.remove(a),v.refresh()})}},eP.createElement(ResetIcon,null))))}})),eP.createElement(Results,StartScreen_extends({},v,{title:void 0===ee?"Favorite":ee,collection:v.state.collections[1],renderIcon:function(){return eP.createElement("div",{className:"DocSearch-Hit-icon"},eP.createElement(StarIcon,null))},renderAction:function(n){var a=n.item,g=n.runDeleteTransition;return eP.createElement("div",{className:"DocSearch-Hit-action"},eP.createElement("button",{className:"DocSearch-Hit-action-button",title:er,type:"submit",onClick:function(n){n.preventDefault(),n.stopPropagation(),g(function(){v.favoriteSearches.remove(a),v.refresh()})}},eP.createElement(ResetIcon,null)))}})))}var og=["translations"];function ScreenState_extends(){return(ScreenState_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,og);if("error"===v.state.status)return eP.createElement(ErrorScreen,{translations:null==g?void 0:g.errorScreen});var j=v.state.collections.some(function(n){return n.items.length>0});return v.state.query?!1===j?eP.createElement(NoResultsScreen,ScreenState_extends({},v,{translations:null==g?void 0:g.noResultsScreen})):eP.createElement(ResultsScreen,v):eP.createElement(StartScreen,ScreenState_extends({},v,{hasCollections:j,translations:null==g?void 0:g.startScreen}))},function(n,a){return"loading"===a.state.status||"stalled"===a.state.status});function LoadingIcon(){return eP.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},eP.createElement("g",{fill:"none",fillRule:"evenodd"},eP.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},eP.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),eP.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},eP.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var ov=["translations"];function SearchBox_extends(){return(SearchBox_extends=Object.assign||function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,ov),j=g.resetButtonTitle,z=g.resetButtonAriaLabel,H=g.cancelButtonText,B=void 0===H?"Cancel":H,W=g.cancelButtonAriaLabel,K=g.searchInputLabel,ee=void 0===K?"Search":K,et=v.getFormProps({inputElement:v.inputRef.current}).onReset;return eP.useEffect(function(){v.autoFocus&&v.inputRef.current&&v.inputRef.current.focus()},[v.autoFocus,v.inputRef]),eP.useEffect(function(){v.isFromSelection&&v.inputRef.current&&v.inputRef.current.select()},[v.isFromSelection,v.inputRef]),eP.createElement(eP.Fragment,null,eP.createElement("form",{className:"DocSearch-Form",onSubmit:function(n){n.preventDefault()},onReset:et},eP.createElement("label",SearchBox_extends({className:"DocSearch-MagnifierLabel"},v.getLabelProps()),eP.createElement(SearchIcon,null),eP.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},ee)),eP.createElement("div",{className:"DocSearch-LoadingIndicator"},eP.createElement(LoadingIcon,null)),eP.createElement("input",SearchBox_extends({className:"DocSearch-Input",ref:v.inputRef},v.getInputProps({inputElement:v.inputRef.current,autoFocus:v.autoFocus,maxLength:64}))),eP.createElement("button",{type:"reset",title:void 0===j?"Clear the query":j,className:"DocSearch-Reset","aria-label":void 0===z?"Clear the query":z,hidden:!v.state.query},eP.createElement(ResetIcon,null))),eP.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":void 0===W?"Cancel":W,onClick:v.onClose},B))}var oy=["_highlightResult","_snippetResult"];function createStoredSearches(n){var a=n.key,g=n.limit,v=void 0===g?5:g,j=!1===function(){var n="__TEST_KEY__";try{return localStorage.setItem(n,""),localStorage.removeItem(n),!0}catch(n){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(n){return window.localStorage.setItem(a,JSON.stringify(n))},getItem:function(){var n=window.localStorage.getItem(a);return n?JSON.parse(n):[]}},z=j.getItem().slice(0,v);return{add:function(n){n._highlightResult,n._snippetResult;var a=function(n,a){if(null==n)return{};var g,v,j=function(n,a){if(null==n)return{};var g,v,j={},z=Object.keys(n);for(v=0;v=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oy),g=z.findIndex(function(n){return n.objectID===a.objectID});g>-1&&z.splice(g,1),z.unshift(a),z=z.slice(0,v),j.setItem(z)},remove:function(n){z=z.filter(function(a){return a.objectID!==n.objectID}),j.setItem(z)},getAll:function(){return z}}}function createInMemoryCache(n={serializable:!0}){let a={};return{get(g,v,j={miss:()=>Promise.resolve()}){let z=JSON.stringify(g);if(z in a)return Promise.resolve(n.serializable?JSON.parse(a[z]):a[z]);let H=v(),B=j&&j.miss||(()=>Promise.resolve());return H.then(n=>B(n)).then(()=>H)},set:(g,v)=>(a[JSON.stringify(g)]=n.serializable?JSON.stringify(v):v,Promise.resolve(v)),delete:n=>(delete a[JSON.stringify(n)],Promise.resolve()),clear:()=>(a={},Promise.resolve())}}function addMethods(n,a){return a&&Object.keys(a).forEach(g=>{n[g]=a[g](n)}),n}function encode(n,...a){let g=0;return n.replace(/%s/g,()=>encodeURIComponent(a[g++]))}let ob="4.23.3",o_={WithinQueryParameters:0,WithinHeaders:1};function createMappedRequestOptions(n,a){let g=n||{},v=g.data||{};return Object.keys(g).forEach(n=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(n)&&(v[n]=g[n])}),{data:Object.entries(v).length>0?v:void 0,timeout:g.timeout||a,headers:g.headers||{},queryParameters:g.queryParameters||{},cacheable:g.cacheable}}let oS={Read:1,Write:2,Any:3},ow={Up:1,Down:2,Timeouted:3};function createStatefulHost(n,a=ow.Up){return{...n,status:a,lastUpdate:Date.now()}}function createStatelessHost(n){return"string"==typeof n?{protocol:"https",url:n,accept:oS.Any}:{protocol:n.protocol||"https",url:n.url,accept:n.accept||oS.Any}}let ok={Get:"GET",Post:"POST"},isNetworkError=({isTimedOut:n,status:a})=>!n&&0==~~a,isRetryable=n=>{let a=n.status,g=n.isTimedOut;return g||isNetworkError(n)||2!=~~(a/100)&&4!=~~(a/100)},isSuccess=({status:n})=>2==~~(n/100),retryDecision=(n,a)=>isRetryable(n)?a.onRetry(n):isSuccess(n)?a.onSuccess(n):a.onFail(n);function retryableRequest(n,a,g,v){var j;let z=[],H=function(n,a){if(n.method===ok.Get||void 0===n.data&&void 0===a.data)return;let g=Array.isArray(n.data)?n.data:{...n.data,...a.data};return JSON.stringify(g)}(g,v),B=function(n,a){let g={...n.headers,...a.headers},v={};return Object.keys(g).forEach(n=>{let a=g[n];v[n.toLowerCase()]=a}),v}(n,v),W=g.method,K=g.method!==ok.Get?{}:{...g.data,...v.data},ee={"x-algolia-agent":n.userAgent.value,...n.queryParameters,...K,...v.queryParameters},et=0,retry=(a,j)=>{let K=a.pop();if(void 0===K)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:stackTraceWithoutCredentials(z)};let er={data:H,headers:B,method:W,url:function(n,a,g){let v=serializeQueryParameters(g),j=`${n.protocol}://${n.url}/${"/"===a.charAt(0)?a.substr(1):a}`;return v.length&&(j+=`?${v}`),j}(K,g.path,ee),connectTimeout:j(et,n.timeouts.connect),responseTimeout:j(et,v.timeout)},pushToStackTrace=n=>{let g={request:er,response:n,host:K,triesLeft:a.length};return z.push(g),g},en={onSuccess:n=>(function(n){try{return JSON.parse(n.content)}catch(a){throw{name:"DeserializationError",message:a.message,response:n}}})(n),onRetry(g){let v=pushToStackTrace(g);return g.isTimedOut&&et++,Promise.all([n.logger.info("Retryable failure",stackFrameWithoutCredentials(v)),n.hostsCache.set(K,createStatefulHost(K,g.isTimedOut?ow.Timeouted:ow.Down))]).then(()=>retry(a,j))},onFail(n){throw pushToStackTrace(n),function({content:n,status:a},g){let v=n;try{v=JSON.parse(n).message}catch(n){}return{name:"ApiError",message:v,status:a,transporterStackTrace:g}}(n,stackTraceWithoutCredentials(z))}};return n.requester.send(er).then(n=>retryDecision(n,en))};return(j=n.hostsCache,Promise.all(a.map(n=>j.get(n,()=>Promise.resolve(createStatefulHost(n))))).then(n=>{let g=n.filter(n=>n.status===ow.Up||Date.now()-n.lastUpdate>12e4),v=n.filter(n=>n.status===ow.Timeouted&&Date.now()-n.lastUpdate<=12e4),j=[...g,...v],z=j.length>0?j.map(n=>createStatelessHost(n)):a;return{getTimeout(n,a){let g=0===v.length&&0===n?1:v.length+3+n;return g*a},statelessHosts:z}})).then(n=>retry([...n.statelessHosts].reverse(),n.getTimeout))}function serializeQueryParameters(n){let isObjectOrArray=n=>"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n);return Object.keys(n).map(a=>encode("%s=%s",a,isObjectOrArray(n[a])?JSON.stringify(n[a]):n[a])).join("&")}function stackTraceWithoutCredentials(n){return n.map(n=>stackFrameWithoutCredentials(n))}function stackFrameWithoutCredentials(n){let a=n.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...n,request:{...n.request,headers:{...n.request.headers,...a}}}}let createSearchClient=n=>{let a=n.appId,g=function(n,a,g){let v={"x-algolia-api-key":g,"x-algolia-application-id":a};return{headers:()=>n===o_.WithinHeaders?v:{},queryParameters:()=>n===o_.WithinQueryParameters?v:{}}}(void 0!==n.authMode?n.authMode:o_.WithinHeaders,a,n.apiKey),v=function(n){let{hostsCache:a,logger:g,requester:v,requestsCache:j,responsesCache:z,timeouts:H,userAgent:B,hosts:W,queryParameters:K,headers:ee}=n,et={hostsCache:a,logger:g,requester:v,requestsCache:j,responsesCache:z,timeouts:H,userAgent:B,headers:ee,queryParameters:K,hosts:W.map(n=>createStatelessHost(n)),read(n,a){let g=createMappedRequestOptions(a,et.timeouts.read),createRetryableRequest=()=>retryableRequest(et,et.hosts.filter(n=>(n.accept&oS.Read)!=0),n,g),v=void 0!==g.cacheable?g.cacheable:n.cacheable;if(!0!==v)return createRetryableRequest();let j={request:n,mappedRequestOptions:g,transporter:{queryParameters:et.queryParameters,headers:et.headers}};return et.responsesCache.get(j,()=>et.requestsCache.get(j,()=>et.requestsCache.set(j,createRetryableRequest()).then(n=>Promise.all([et.requestsCache.delete(j),n]),n=>Promise.all([et.requestsCache.delete(j),Promise.reject(n)])).then(([n,a])=>a)),{miss:n=>et.responsesCache.set(j,n)})},write:(n,a)=>retryableRequest(et,et.hosts.filter(n=>(n.accept&oS.Write)!=0),n,createMappedRequestOptions(a,et.timeouts.write))};return et}({hosts:[{url:`${a}-dsn.algolia.net`,accept:oS.Read},{url:`${a}.algolia.net`,accept:oS.Write}].concat(function(n){let a=n.length-1;for(;a>0;a--){let g=Math.floor(Math.random()*(a+1)),v=n[a];n[a]=n[g],n[g]=v}return n}([{url:`${a}-1.algolianet.com`},{url:`${a}-2.algolianet.com`},{url:`${a}-3.algolianet.com`}])),...n,headers:{...g.headers(),"content-type":"application/x-www-form-urlencoded",...n.headers},queryParameters:{...g.queryParameters(),...n.queryParameters}});return addMethods({transporter:v,appId:a,addAlgoliaAgent(n,a){v.userAgent.add({segment:n,version:a})},clearCache:()=>Promise.all([v.requestsCache.clear(),v.responsesCache.clear()]).then(()=>void 0)},n.methods)},customRequest=n=>(a,g)=>a.method===ok.Get?n.transporter.read(a,g):n.transporter.write(a,g),initIndex=n=>(a,g={})=>{let v={transporter:n.transporter,appId:n.appId,indexName:a};return addMethods(v,g.methods)},multipleQueries=n=>(a,g)=>{let v=a.map(n=>({...n,params:serializeQueryParameters(n.params||{})}));return n.transporter.read({method:ok.Post,path:"1/indexes/*/queries",data:{requests:v},cacheable:!0},g)},multipleSearchForFacetValues=n=>(a,g)=>Promise.all(a.map(a=>{let{facetName:v,facetQuery:j,...z}=a.params;return initIndex(n)(a.indexName,{methods:{searchForFacetValues}}).searchForFacetValues(v,j,{...g,...z})})),findAnswers=n=>(a,g,v)=>n.transporter.read({method:ok.Post,path:encode("1/answers/%s/prediction",n.indexName),data:{query:a,queryLanguages:g},cacheable:!0},v),search=n=>(a,g)=>n.transporter.read({method:ok.Post,path:encode("1/indexes/%s/query",n.indexName),data:{query:a},cacheable:!0},g),searchForFacetValues=n=>(a,g,v)=>n.transporter.read({method:ok.Post,path:encode("1/indexes/%s/facets/%s/query",n.indexName,a),data:{facetQuery:g},cacheable:!0},v),getRecommendations=n=>(a,g)=>{let v=a.map(n=>({...n,threshold:n.threshold||0}));return n.transporter.read({method:ok.Post,path:"1/indexes/*/recommendations",data:{requests:v},cacheable:!0},g)};function algoliasearch(n,a,g){let v={appId:n,apiKey:a,timeouts:{connect:1,read:2,write:30},requester:{send:n=>new Promise(a=>{let g;let v=new XMLHttpRequest;v.open(n.method,n.url,!0),Object.keys(n.headers).forEach(a=>v.setRequestHeader(a,n.headers[a]));let createTimeout=(n,g)=>setTimeout(()=>{v.abort(),a({status:0,content:g,isTimedOut:!0})},1e3*n),j=createTimeout(n.connectTimeout,"Connection timeout");v.onreadystatechange=()=>{v.readyState>v.OPENED&&void 0===g&&(clearTimeout(j),g=createTimeout(n.responseTimeout,"Socket timeout"))},v.onerror=()=>{0===v.status&&(clearTimeout(j),clearTimeout(g),a({content:v.responseText||"Network request failed",status:v.status,isTimedOut:!1}))},v.onload=()=>{clearTimeout(j),clearTimeout(g),a({content:v.responseText,status:v.status,isTimedOut:!1})},v.send(n.data)})},logger:{debug:(n,a)=>Promise.resolve(),info:(n,a)=>Promise.resolve(),error:(n,a)=>(console.error(n,a),Promise.resolve())},responsesCache:createInMemoryCache(),requestsCache:createInMemoryCache({serializable:!1}),hostsCache:function createFallbackableCache(n){let a=[...n.caches],g=a.shift();return void 0===g?{get(n,a,g={miss:()=>Promise.resolve()}){let v=a();return v.then(n=>Promise.all([n,g.miss(n)])).then(([n])=>n)},set:(n,a)=>Promise.resolve(a),delete:n=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(n,v,j={miss:()=>Promise.resolve()})=>g.get(n,v,j).catch(()=>createFallbackableCache({caches:a}).get(n,v,j)),set:(n,v)=>g.set(n,v).catch(()=>createFallbackableCache({caches:a}).set(n,v)),delete:n=>g.delete(n).catch(()=>createFallbackableCache({caches:a}).delete(n)),clear:()=>g.clear().catch(()=>createFallbackableCache({caches:a}).clear())}}({caches:[function(n){let a;let g=`algoliasearch-client-js-${n.key}`,getStorage=()=>(void 0===a&&(a=n.localStorage||window.localStorage),a),getNamespace=()=>JSON.parse(getStorage().getItem(g)||"{}"),setNamespace=n=>{getStorage().setItem(g,JSON.stringify(n))},removeOutdatedCacheItems=()=>{let a=n.timeToLive?1e3*n.timeToLive:null,g=getNamespace(),v=Object.fromEntries(Object.entries(g).filter(([,n])=>void 0!==n.timestamp));if(setNamespace(v),!a)return;let j=Object.fromEntries(Object.entries(v).filter(([,n])=>{let g=new Date().getTime(),v=n.timestamp+aPromise.resolve()})=>Promise.resolve().then(()=>{removeOutdatedCacheItems();let a=JSON.stringify(n);return getNamespace()[a]}).then(n=>Promise.all([n?n.value:a(),void 0!==n])).then(([n,a])=>Promise.all([n,a||g.miss(n)])).then(([n])=>n),set:(n,a)=>Promise.resolve().then(()=>{let v=getNamespace();return v[JSON.stringify(n)]={timestamp:new Date().getTime(),value:a},getStorage().setItem(g,JSON.stringify(v)),a}),delete:n=>Promise.resolve().then(()=>{let a=getNamespace();delete a[JSON.stringify(n)],getStorage().setItem(g,JSON.stringify(a))}),clear:()=>Promise.resolve().then(()=>{getStorage().removeItem(g)})}}({key:`${ob}-${n}`}),createInMemoryCache()]}),userAgent:(function(n){let a={value:`Algolia for JavaScript (${n})`,add(n){let g=`; ${n.segment}${void 0!==n.version?` (${n.version})`:""}`;return -1===a.value.indexOf(g)&&(a.value=`${a.value}${g}`),a}};return a})(ob).add({segment:"Browser",version:"lite"}),authMode:o_.WithinQueryParameters};return createSearchClient({...v,...g,methods:{search:multipleQueries,searchForFacetValues:multipleSearchForFacetValues,multipleQueries,multipleSearchForFacetValues,customRequest,initIndex:n=>a=>initIndex(n)(a,{methods:{search,searchForFacetValues,findAnswers}}),getRecommendations}})}algoliasearch.version=ob;var oO="3.6.0";function noop_noop(){}function identity(n){return n}function isModifierEvent(n){return 1===n.button||n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function groupBy(n,a,g){return n.reduce(function(n,v){var j=a(v);return n.hasOwnProperty(j)||(n[j]=[]),n[j].length<(g||5)&&n[j].push(v),n},{})}var oj=["footer","searchBox"];function DocSearchModal_extends(){return(DocSearchModal_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(e_,oj),eE=function(n){if(Array.isArray(n))return n}(a=eP.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}))||function(n,a){var g,v,j=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=j){var z=[],H=!0,B=!1;try{for(j=j.call(n);!(H=(g=j.next()).done)&&(z.push(g.value),!a||z.length!==a);H=!0);}catch(n){B=!0,v=n}finally{try{H||null==j.return||j.return()}finally{if(B)throw v}}return z}}(a,2)||function(n,a){if(n){if("string"==typeof n)return DocSearchModal_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return DocSearchModal_arrayLikeToArray(n,a)}}(a,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),eI=eE[0],eT=eE[1],eM=eP.useRef(null),eA=eP.useRef(null),eN=eP.useRef(null),eR=eP.useRef(null),eD=eP.useRef(null),eL=eP.useRef(10),eZ=eP.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,eF=eP.useRef((void 0===ey?"":ey)||eZ).current,eV=eP.useMemo(function(){var n=algoliasearch(W,K);return n.addAlgoliaAgent("docsearch",oO),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",oO),eg(n)},[W,K,eg]),eU=eP.useRef(createStoredSearches({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(ee),limit:10})).current,ez=eP.useRef(createStoredSearches({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(ee),limit:0===eU.getAll().length?7:4})).current,eH=eP.useCallback(function(n){if(!ev){var a="content"===n.type?n.__docsearch_parent:n;a&&-1===eU.getAll().findIndex(function(n){return n.objectID===a.objectID})&&ez.add(a)}},[eU,ez,ev]),eB=eP.useCallback(function(n){if(eI.context.algoliaInsightsPlugin&&n.__autocomplete_id){var a={eventName:"Item Selected",index:n.__autocomplete_indexName,items:[n],positions:[n.__autocomplete_id],queryID:n.__autocomplete_queryID};eI.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(a)}},[eI.context.algoliaInsightsPlugin]),eq=eP.useMemo(function(){return function(n){var a,g,v,j,z,H,B,W,K,ee,et,er,en,eo,ei,es,el,ec,eu,ed,ep,ef=[],em=(g="undefined"!=typeof window?window:{},v=n.plugins||[],getDefaultProps_objectSpread(getDefaultProps_objectSpread({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:!1,environment:g,shouldPanelOpen:function(n){return getItemsCount(n.state)>0},reshape:function(n){return n.sources}},n),{},{id:null!==(a=n.id)&&void 0!==a?a:"autocomplete-".concat(n6++),plugins:v,initialState:getDefaultProps_objectSpread({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},n.initialState),onStateChange:function(a){var g;null===(g=n.onStateChange)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onStateChange)||void 0===g?void 0:g.call(n,a)})},onSubmit:function(a){var g;null===(g=n.onSubmit)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onSubmit)||void 0===g?void 0:g.call(n,a)})},onReset:function(a){var g;null===(g=n.onReset)||void 0===g||g.call(n,a),v.forEach(function(n){var g;return null===(g=n.onReset)||void 0===g?void 0:g.call(n,a)})},getSources:function(a){var g;return Promise.all([].concat(function(n){if(Array.isArray(n))return getDefaultProps_arrayLikeToArray(n)}(g=v.map(function(n){return n.getSources}))||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(g)||function(n,a){if(n){if("string"==typeof n)return getDefaultProps_arrayLikeToArray(n,a);var g=Object.prototype.toString.call(n).slice(8,-1);if("Object"===g&&n.constructor&&(g=n.constructor.name),"Map"===g||"Set"===g)return Array.from(n);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return getDefaultProps_arrayLikeToArray(n,a)}}(g)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[n.getSources]).filter(Boolean).map(function(n){var g;return g=[],Promise.resolve(n(a)).then(function(n){return Array.isArray(n),Promise.all(n.filter(function(n){return!!n}).map(function(n){if(n.sourceId,g.includes(n.sourceId))throw Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(n.sourceId)," is not unique."));g.push(n.sourceId);var a={getItemInputValue:function(n){return n.state.query},getItemUrl:function(){},onSelect:function(n){(0,n.setIsOpen)(!1)},onActive:noop,onResolve:noop};return Object.keys(a).forEach(function(n){a[n].__default=!0}),Promise.resolve(getNormalizedSources_objectSpread(getNormalizedSources_objectSpread({},a),n))}))})})).then(function(n){return flatten(n)}).then(function(n){return n.map(function(n){return getDefaultProps_objectSpread(getDefaultProps_objectSpread({},n),{},{onSelect:function(a){n.onSelect(a),ef.forEach(function(n){var g;return null===(g=n.onSelect)||void 0===g?void 0:g.call(n,a)})},onActive:function(a){n.onActive(a),ef.forEach(function(n){var g;return null===(g=n.onActive)||void 0===g?void 0:g.call(n,a)})},onResolve:function(a){n.onResolve(a),ef.forEach(function(n){var g;return null===(g=n.onResolve)||void 0===g?void 0:g.call(n,a)})}})})})},navigator:getDefaultProps_objectSpread({navigate:function(n){var a=n.itemUrl;g.location.assign(a)},navigateNewTab:function(n){var a=n.itemUrl,v=g.open(a,"_blank","noopener");null==v||v.focus()},navigateNewWindow:function(n){var a=n.itemUrl;g.open(a,"_blank","noopener")}},n.navigator)})),eh=(j=function(n){var a=n.prevState,g=n.state;em.onStateChange(createAutocomplete_objectSpread({prevState:a,state:g,refresh:refresh,navigator:em.navigator},eg))},z=em.initialState,{getState:function(){return z},dispatch:function(n,a){var g=function(n){for(var a=1;a=0||(j[g]=n[g]);return j}(n,a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(n);for(v=0;v=0)&&Object.prototype.propertyIsEnumerable.call(n,g)&&(j[g]=n[g])}return j}(n,oe);if("ArrowUp"===a.key||"ArrowDown"===a.key){var triggerScrollIntoView=function(){var n=g.environment.document.getElementById("".concat(g.id,"-item-").concat(j.getState().activeItemId));n&&(n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n.scrollIntoView(!1))},triggerOnActive=function(){var n=getActiveItem(j.getState());if(null!==j.getState().activeItemId&&n){var g=n.item,H=n.itemInputValue,B=n.itemUrl,W=n.source;W.onActive(onKeyDown_objectSpread({event:a,item:g,itemInputValue:H,itemUrl:B,refresh:v,source:W,state:j.getState()},z))}};a.preventDefault(),!1===j.getState().isOpen&&(g.openOnFocus||j.getState().query)?onInput(onKeyDown_objectSpread({event:a,props:g,query:j.getState().query,refresh:v,store:j},z)).then(function(){j.dispatch(a.key,{nextActiveItemId:g.defaultActiveItemId}),triggerOnActive(),setTimeout(triggerScrollIntoView,0)}):(j.dispatch(a.key,{}),triggerOnActive(),triggerScrollIntoView())}else if("Escape"===a.key)a.preventDefault(),j.dispatch(a.key,null),j.pendingRequests.cancelAll();else if("Tab"===a.key)j.dispatch("blur",null),j.pendingRequests.cancelAll();else if("Enter"===a.key){if(null===j.getState().activeItemId||j.getState().collections.every(function(n){return 0===n.items.length})){g.debug||j.pendingRequests.cancelAll();return}a.preventDefault();var H=getActiveItem(j.getState()),B=H.item,W=H.itemInputValue,K=H.itemUrl,ee=H.source;if(a.metaKey||a.ctrlKey)void 0!==K&&(ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigateNewTab({itemUrl:K,item:B,state:j.getState()}));else if(a.shiftKey)void 0!==K&&(ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigateNewWindow({itemUrl:K,item:B,state:j.getState()}));else if(a.altKey);else{if(void 0!==K){ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z)),g.navigator.navigate({itemUrl:K,item:B,state:j.getState()});return}onInput(onKeyDown_objectSpread({event:a,nextState:{isOpen:!1},props:g,query:W,refresh:v,store:j},z)).then(function(){ee.onSelect(onKeyDown_objectSpread({event:a,item:B,itemInputValue:W,itemUrl:K,refresh:v,source:ee,state:j.getState()},z))})}}}(getPropGetters_objectSpread({event:n,props:W,refresh:K,store:ee},et))},onFocus:onFocus,onBlur:noop,onClick:function(a){n.inputElement!==W.environment.document.activeElement||ee.getState().isOpen||onFocus(a)}},H)},getPanelProps:function(n){return getPropGetters_objectSpread({onMouseDown:function(n){n.preventDefault()},onMouseLeave:function(){ee.dispatch("mouseleave",null)}},n)},getListProps:function(n){var a=n||{},g=a.sourceIndex,v=getPropGetters_objectWithoutProperties(a,ol);return getPropGetters_objectSpread({role:"listbox","aria-labelledby":"".concat(er(W.id,g),"-label"),id:"".concat(er(W.id,g),"-list")},v)},getItemProps:function(n){var a=n.item,g=n.source,v=n.sourceIndex,j=getPropGetters_objectWithoutProperties(n,oc);return getPropGetters_objectSpread({id:"".concat(er(W.id,v),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":ee.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(n){if(a.__autocomplete_id!==ee.getState().activeItemId){ee.dispatch("mousemove",a.__autocomplete_id);var g=getActiveItem(ee.getState());if(null!==ee.getState().activeItemId&&g){var v=g.item,j=g.itemInputValue,z=g.itemUrl,H=g.source;H.onActive(getPropGetters_objectSpread({event:n,item:v,itemInputValue:j,itemUrl:z,refresh:K,source:H,state:ee.getState()},et))}}},onMouseDown:function(n){n.preventDefault()},onClick:function(n){var v=g.getItemInputValue({item:a,state:ee.getState()}),j=g.getItemUrl({item:a,state:ee.getState()});(j?Promise.resolve():onInput(getPropGetters_objectSpread({event:n,nextState:{isOpen:!1},props:W,query:v,refresh:K,store:ee},et))).then(function(){g.onSelect(getPropGetters_objectSpread({event:n,item:a,itemInputValue:v,itemUrl:j,refresh:K,source:g,state:ee.getState()},et))})}},j)}});function refresh(){return onInput(createAutocomplete_objectSpread({event:new Event("input"),nextState:{isOpen:eh.getState().isOpen},props:em,navigator:em.navigator,query:eh.getState().query,refresh:refresh,store:eh},eg))}if(n.insights&&!em.plugins.some(function(n){return"aa.algoliaInsightsPlugin"===n.name})){var ev,ey,eb,e_,eS,ew,ek,eO,ej,eC,eP,eE="boolean"==typeof n.insights?{}:n.insights;em.plugins.push((e_=(eb=createAlgoliaInsightsPlugin_objectSpread({onItemsChange:function(n){var a=n.insights,g=n.insightsEvents;a.viewedObjectIDs.apply(a,createAlgoliaInsightsPlugin_toConsumableArray(g.map(function(n){return createAlgoliaInsightsPlugin_objectSpread(createAlgoliaInsightsPlugin_objectSpread({},n),{},{algoliaSource:[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n.algoliaSource||[]),["autocomplete-internal"])})})))},onSelect:function(n){var a=n.insights,g=n.insightsEvents;a.clickedObjectIDsAfterSearch.apply(a,createAlgoliaInsightsPlugin_toConsumableArray(g.map(function(n){return createAlgoliaInsightsPlugin_objectSpread(createAlgoliaInsightsPlugin_objectSpread({},n),{},{algoliaSource:[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n.algoliaSource||[]),["autocomplete-internal"])})})))},onActive:noop},eE)).insightsClient,eS=eb.onItemsChange,ew=eb.onSelect,ek=eb.onActive,eO=e_,e_||"undefined"!=typeof window&&("string"==typeof(ey=(ev=({window:window}).window).AlgoliaAnalyticsObject||"aa")&&(eO=ev[ey]),eO||(ev.AlgoliaAnalyticsObject=ey,ev[ey]||(ev[ey]=function(){ev[ey].queue||(ev[ey].queue=[]);for(var n=arguments.length,a=Array(n),g=0;g=3||2===v&&j>=4||1===v&&j>=10);function sendToInsights(a,g,v){if(z&&void 0!==v){var j=v[0].__autocomplete_algoliaCredentials,H=j.appId,B=j.apiKey;n.apply(void 0,[a].concat(_toConsumableArray(g),[{headers:{"X-Algolia-Application-Id":H,"X-Algolia-API-Key":B}}]))}else n.apply(void 0,[a].concat(_toConsumableArray(g)))}return{init:function(a,g){n("init",{appId:a,apiKey:g})},setUserToken:function(a){n("setUserToken",a)},clickedObjectIDsAfterSearch:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("clickedObjectIDsAfterSearch",mapToInsightsParamsApi(a),a[0].items)},clickedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("clickedObjectIDs",mapToInsightsParamsApi(a),a[0].items)},clickedFilters:function(){for(var a=arguments.length,g=Array(a),v=0;v0&&n.apply(void 0,["clickedFilters"].concat(g))},convertedObjectIDsAfterSearch:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("convertedObjectIDsAfterSearch",mapToInsightsParamsApi(a),a[0].items)},convertedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&sendToInsights("convertedObjectIDs",mapToInsightsParamsApi(a),a[0].items)},convertedFilters:function(){for(var a=arguments.length,g=Array(a),v=0;v0&&n.apply(void 0,["convertedFilters"].concat(g))},viewedObjectIDs:function(){for(var n=arguments.length,a=Array(n),g=0;g0&&a.reduce(function(n,a){var g=a.items,v=createSearchInsightsApi_objectWithoutProperties(a,n2);return[].concat(_toConsumableArray(n),_toConsumableArray((function(n){for(var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,g=[],v=0;v0&&n.apply(void 0,["viewedFilters"].concat(g))}}}(eO),eC={current:[]},eP=debounce_debounce(function(n){var a=n.state;if(a.isOpen){var g=a.collections.reduce(function(n,a){return[].concat(createAlgoliaInsightsPlugin_toConsumableArray(n),createAlgoliaInsightsPlugin_toConsumableArray(a.items))},[]).filter(isAlgoliaInsightsHit);!function isEqual(n,a){if(n===a)return!0;if(isPrimitive(n)||isPrimitive(a)||"function"==typeof n||"function"==typeof a)return n===a;if(Object.keys(n).length!==Object.keys(a).length)return!1;for(var g=0,v=Object.keys(n);g0&&n5({onItemsChange:eS,items:g,insights:ej,state:a}))}},0),{name:"aa.algoliaInsightsPlugin",subscribe:function(n){var a=n.setContext,g=n.onSelect,v=n.onActive;eO("addAlgoliaAgent","insights-plugin"),a({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:ej}}),g(function(n){var a=n.item,g=n.state,v=n.event;isAlgoliaInsightsHit(a)&&ew({state:g,event:v,insights:ej,item:a,insightsEvents:[createAlgoliaInsightsPlugin_objectSpread({eventName:"Item Selected"},createClickedEvent({item:a,items:eC.current}))]})}),v(function(n){var a=n.item,g=n.state,v=n.event;isAlgoliaInsightsHit(a)&&ek({state:g,event:v,insights:ej,item:a,insightsEvents:[createAlgoliaInsightsPlugin_objectSpread({eventName:"Item Active"},createClickedEvent({item:a,items:eC.current}))]})})},onStateChange:function(n){eP({state:n.state})},__autocomplete_pluginOptions:eE}))}return em.plugins.forEach(function(n){var a;return null===(a=n.subscribe)||void 0===a?void 0:a.call(n,createAutocomplete_objectSpread(createAutocomplete_objectSpread({},eg),{},{navigator:em.navigator,refresh:refresh,onSelect:function(n){ef.push({onSelect:n})},onActive:function(n){ef.push({onActive:n})},onResolve:function(n){ef.push({onResolve:n})}}))}),!function(n){var a,g,v=n.metadata,j=n.environment;if(null===(a=j.navigator)||void 0===a?void 0:null===(g=a.userAgent)||void 0===g?void 0:g.includes("Algolia Crawler")){var z=j.document.createElement("meta"),H=j.document.querySelector("head");z.name="algolia:metadata",setTimeout(function(){z.content=JSON.stringify(v),H.appendChild(z)},0)}}({metadata:(ec=(en={plugins:em.plugins,options:n}).plugins,ep=(ed=null===(eo=((null===(ei=(eu=en.options).__autocomplete_metadata)||void 0===ei?void 0:ei.userAgents)||[])[0])||void 0===eo?void 0:eo.segment)?metadata_defineProperty({},ed,Object.keys((null===(es=eu.__autocomplete_metadata)||void 0===es?void 0:es.options)||{})):{},{plugins:ec.map(function(n){return{name:n.name,options:Object.keys(n.__autocomplete_pluginOptions||[])}}),options:function(n){for(var a=1;a",highlightPostTag:"",hitsPerPage:20,clickAnalytics:z},en)}]).catch(function(n){throw"RetryError"===n.name&&j("error"),n}).then(function(n){var a=n.results[0],j=a.hits,H=a.nbHits,B=groupBy(j,function(n){return removeHighlightTags(n)},eo);g.context.searchSuggestions.length0&&(eW(),eD.current&&eD.current.focus())},[eF,eW]),eP.useEffect(function(){function setFullViewportHeight(){if(eA.current){var n=.01*window.innerHeight;eA.current.style.setProperty("--docsearch-vh","".concat(n,"px"))}}return setFullViewportHeight(),window.addEventListener("resize",setFullViewportHeight),function(){window.removeEventListener("resize",setFullViewportHeight)}},[]),eP.createElement("div",DocSearchModal_extends({ref:eM},eG({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===eI.status&&"DocSearch-Container--Stalled","error"===eI.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(n){n.target===n.currentTarget&&es()}}),eP.createElement("div",{className:"DocSearch-Modal",ref:eA},eP.createElement("header",{className:"DocSearch-SearchBar",ref:eN},eP.createElement(SearchBox,DocSearchModal_extends({},eq,{state:eI,autoFocus:0===eF.length,inputRef:eD,isFromSelection:!!eF&&eF===eZ,translations:ej,onClose:es}))),eP.createElement("div",{className:"DocSearch-Dropdown",ref:eR},eP.createElement(ox,DocSearchModal_extends({},eq,{indexName:ee,state:eI,hitComponent:void 0===eu?Hit:eu,resultsFooterComponent:void 0===ed?function(){return null}:ed,disableUserPersonalization:ev,recentSearches:ez,favoriteSearches:eU,inputRef:eD,translations:eC,getMissingResultsUrl:eS,onItemClick:function(n,a){eB(n),eH(n),isModifierEvent(a)||es()}}))),eP.createElement("footer",{className:"DocSearch-Footer"},eP.createElement(Footer_Footer,{translations:eO}))))}function DocSearch_extends(){return(DocSearch_extends=Object.assign||function(n){for(var a=1;an.length)&&(a=n.length);for(var g=0,v=Array(a);g(0,ej.jsx)(DocSearch,{appId:"876KCB22DI",apiKey:"99a2c8ae162662ba8701a409923928ae",indexName:"mriqbox-com"}),{})},head:function(){let{asPath:n}=(0,eC.useRouter)(),{frontMatter:a,title:g}=useConfig(),v=a.description||"Documenta\xe7\xe3o para os recursos desenvolvidos pela mri-Qbox.";return(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,ej.jsx)("link",{rel:"icon",type:"image/x-icon",href:"/static/mri.ico"}),(0,ej.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ej.jsx)("meta",{name:"description",content:v}),(0,ej.jsx)("meta",{name:"og:title",content:g}),(0,ej.jsx)("meta",{name:"og:description",content:v}),(0,ej.jsx)("meta",{name:"og:url",content:"https://docs.mriqbox.com.br".concat(n)})]})},primaryHue:{dark:103,light:103},sidebar:{defaultMenuCollapseLevel:1},toc:{backToTop:!0},useNextSeoProps:function(){let{asPath:n}=(0,eC.useRouter)(),a=n.replace(/[-_]/g," ").split("/"),g="#"!==a[1][0]&&a[1]||"mri-Qbox",v=a[a.length-1],j=/[a-z]/.test(v)&&/[A-Z]/.test(v)?v:"%s";return{titleTemplate:"".concat(j," - ").concat(v===g?"Documenta\xe7\xe3o":g.replace(/(^\w|\s\w)/g,n=>n.toUpperCase()))}}};g(4323),g(2449);let MDXLayout=function(n){let{Component:a,pageProps:g}=n;return(0,ej.jsx)(a,{...g})},oP=[];function _createMdxContent(n){return(0,ej.jsx)(ej.Fragment,{})}var _app=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ej.jsx)(MDXLayout,{...n,children:(0,ej.jsx)(_createMdxContent,{...n})})};let oE=(ek=globalThis)[eO=Symbol.for("__nextra_internal__")]||(ek[eO]=Object.create(null));oE.Layout=function(n){var{children:a}=n,g=__objRest(n,["children"]);return(0,ej.jsx)(ConfigProvider,{value:g,children:(0,ej.jsx)(InnerLayout,__spreadProps(__spreadValues({},g.pageOpts),{children:a}))})},oE.pageMap=[{kind:"Meta",data:{index:"Introdu\xe7\xe3o",guides:"Guias",overextended:"Overextended",support:{title:"Nos apoie",type:"page",href:"https://docs.mriqbox.com.br/#support-our-team"},qbox:"Qbox",resources:"Resources"}},{kind:"Folder",name:"guides",route:"/guides",children:[{kind:"MdxPage",name:"git",route:"/guides/git"},{kind:"MdxPage",name:"nodejs",route:"/guides/nodejs",frontMatter:{title:"Node.js"}},{kind:"MdxPage",name:"pnpm",route:"/guides/pnpm",frontMatter:{title:"pnpm"}},{kind:"MdxPage",name:"types",route:"/guides/types"},{kind:"MdxPage",name:"vscode",route:"/guides/vscode",frontMatter:{title:"VS Code"}},{kind:"Meta",data:{git:"Git",nodejs:"Node.js",pnpm:"pnpm",types:"Types",vscode:"VS Code"}}]},{kind:"MdxPage",name:"guides",route:"/guides"},{kind:"MdxPage",name:"index",route:"/",frontMatter:{title:"Introdu\xe7\xe3o"}},{kind:"Folder",name:"overextended",route:"/overextended",children:[{kind:"Meta",data:{oxmysql:"OxMySQL",ox_lib:"Ox Lib",ox_core:"Ox Core",ox_doorlock:"Ox Doorlock",ox_fuel:"Ox Fuel",ox_inventory:"Ox Inventory",ox_target:"Ox Target"}},{kind:"Folder",name:"ox_core",route:"/overextended/ox_core",children:[{kind:"Folder",name:"Classes",route:"/overextended/ox_core/Classes",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_core/Classes/Client",children:[{kind:"MdxPage",name:"OxPlayer",route:"/overextended/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"Meta",data:{OxPlayer:"OxPlayer"}}]},{kind:"Folder",name:"Server",route:"/overextended/ox_core/Classes/Server",children:[{kind:"MdxPage",name:"OxAccount",route:"/overextended/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"}},{kind:"MdxPage",name:"OxPlayer",route:"/overextended/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"MdxPage",name:"OxVehicle",route:"/overextended/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"}},{kind:"Meta",data:{OxAccount:"OxAccount",OxPlayer:"OxPlayer",OxVehicle:"OxVehicle"}}]}]},{kind:"Folder",name:"Events",route:"/overextended/ox_core/Events",children:[{kind:"MdxPage",name:"client",route:"/overextended/ox_core/Events/client"},{kind:"MdxPage",name:"server",route:"/overextended/ox_core/Events/server"},{kind:"Meta",data:{client:"Client",server:"Server"}}]},{kind:"Folder",name:"Functions",route:"/overextended/ox_core/Functions",children:[{kind:"MdxPage",name:"common",route:"/overextended/ox_core/Functions/common"},{kind:"MdxPage",name:"server",route:"/overextended/ox_core/Functions/server"},{kind:"Meta",data:{common:"Common",server:"Server"}}]},{kind:"Meta",data:{Classes:"Classes",Events:"Eventos",Functions:"Fun\xe7\xf5es"}}]},{kind:"MdxPage",name:"ox_core",route:"/overextended/ox_core"},{kind:"Folder",name:"ox_doorlock",route:"/overextended/ox_doorlock",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_doorlock/Client",children:[{kind:"Meta",data:{functions:"Fun\xe7\xf5es"}},{kind:"MdxPage",name:"functions",route:"/overextended/ox_doorlock/Client/functions"}]},{kind:"Folder",name:"Server",route:"/overextended/ox_doorlock/Server",children:[{kind:"Meta",data:{functions:"Fun\xe7\xf5es",events:"Eventos"}},{kind:"MdxPage",name:"events",route:"/overextended/ox_doorlock/Server/events"},{kind:"MdxPage",name:"functions",route:"/overextended/ox_doorlock/Server/functions"}]},{kind:"MdxPage",name:"settings",route:"/overextended/ox_doorlock/settings",frontMatter:{title:"Configura\xe7\xf5es da Porta"}},{kind:"Meta",data:{settings:"Configura\xe7\xf5es da Porta"}}]},{kind:"MdxPage",name:"ox_doorlock",route:"/overextended/ox_doorlock"},{kind:"Folder",name:"ox_fuel",route:"/overextended/ox_fuel",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_fuel/Client",children:[{kind:"MdxPage",name:"functions",route:"/overextended/ox_fuel/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/overextended/ox_fuel/Server",children:[{kind:"MdxPage",name:"functions",route:"/overextended/ox_fuel/Server/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_fuel/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"MdxPage",name:"ox_fuel",route:"/overextended/ox_fuel"},{kind:"Folder",name:"ox_inventory",route:"/overextended/ox_inventory",children:[{kind:"Folder",name:"Events",route:"/overextended/ox_inventory/Events",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_inventory/Events/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_inventory/Events/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Frameworks",route:"/overextended/ox_inventory/Frameworks",children:[{kind:"MdxPage",name:"esx",route:"/overextended/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"}},{kind:"MdxPage",name:"qbx",route:"/overextended/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"}},{kind:"Meta",data:{esx:"ESX",qbx:"Qbox"}}]},{kind:"Folder",name:"Functions",route:"/overextended/ox_inventory/Functions",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_inventory/Functions/Client"},{kind:"Folder",name:"Server",route:"/overextended/ox_inventory/Functions/Server",children:[{kind:"MdxPage",name:"Hooks",route:"/overextended/ox_inventory/Functions/Server/Hooks"},{kind:"Meta",data:{Hooks:"Hooks"}}]},{kind:"MdxPage",name:"Server",route:"/overextended/ox_inventory/Functions/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Guides",route:"/overextended/ox_inventory/Guides",children:[{kind:"MdxPage",name:"crafting",route:"/overextended/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"}},{kind:"MdxPage",name:"creatingItems",route:"/overextended/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"}},{kind:"MdxPage",name:"metadata",route:"/overextended/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"shops",route:"/overextended/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"}},{kind:"MdxPage",name:"stashes",route:"/overextended/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"}},{kind:"Meta",data:{crafting:"Crafting",creatingItems:"Creating Items",shops:"Creating Shops",stashes:"Custom Stashes",metadata:"Metadata"}}]},{kind:"MdxPage",name:"issues",route:"/overextended/ox_inventory/issues",frontMatter:{title:"Common Issues"}},{kind:"Meta",data:{issues:"Common Issues"}}]},{kind:"MdxPage",name:"ox_inventory",route:"/overextended/ox_inventory"},{kind:"Folder",name:"ox_lib",route:"/overextended/ox_lib",children:[{kind:"Folder",name:"Modules",route:"/overextended/ox_lib/Modules",children:[{kind:"Folder",name:"ACL",route:"/overextended/ox_lib/Modules/ACL",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/ACL/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddCommand",route:"/overextended/ox_lib/Modules/AddCommand",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/AddCommand/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddKeybind",route:"/overextended/ox_lib/Modules/AddKeybind",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/AddKeybind/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Array",route:"/overextended/ox_lib/Modules/Array",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Array/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cache",route:"/overextended/ox_lib/Modules/Cache",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Cache/Client"},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Cache/Shared"},{kind:"Meta",data:{Client:"Client",Shared:"Shared"}}]},{kind:"Folder",name:"Callback",route:"/overextended/ox_lib/Modules/Callback",children:[{kind:"Folder",name:"JavaScript",route:"/overextended/ox_lib/Modules/Callback/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Callback/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Callback/Lua/Client"},{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Callback/Lua/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]}]},{kind:"Folder",name:"Class",route:"/overextended/ox_lib/Modules/Class",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Class/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cron",route:"/overextended/ox_lib/Modules/Cron",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Cron/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"DisableControls",route:"/overextended/ox_lib/Modules/DisableControls",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/DisableControls/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Dui",route:"/overextended/ox_lib/Modules/Dui",children:[{kind:"Folder",name:"Javascript",route:"/overextended/ox_lib/Modules/Dui/Javascript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Dui/Javascript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Dui/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Dui/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"GetClosestObject",route:"/overextended/ox_lib/Modules/GetClosestObject",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestObject/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPed",route:"/overextended/ox_lib/Modules/GetClosestPed",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestPed/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPlayer",route:"/overextended/ox_lib/Modules/GetClosestPlayer",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestVehicle",route:"/overextended/ox_lib/Modules/GetClosestVehicle",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyObjects",route:"/overextended/ox_lib/Modules/GetNearbyObjects",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPeds",route:"/overextended/ox_lib/Modules/GetNearbyPeds",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPlayers",route:"/overextended/ox_lib/Modules/GetNearbyPlayers",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyVehicles",route:"/overextended/ox_lib/Modules/GetNearbyVehicles",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Interface",route:"/overextended/ox_lib/Modules/Interface",children:[{kind:"Folder",name:"Client",route:"/overextended/ox_lib/Modules/Interface/Client",children:[{kind:"MdxPage",name:"alert",route:"/overextended/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"}},{kind:"MdxPage",name:"clipboard",route:"/overextended/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"}},{kind:"MdxPage",name:"context",route:"/overextended/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"}},{kind:"MdxPage",name:"input",route:"/overextended/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"}},{kind:"MdxPage",name:"menu",route:"/overextended/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"}},{kind:"MdxPage",name:"notify",route:"/overextended/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"}},{kind:"MdxPage",name:"progress",route:"/overextended/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"}},{kind:"MdxPage",name:"radial",route:"/overextended/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"}},{kind:"MdxPage",name:"skillcheck",route:"/overextended/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"}},{kind:"MdxPage",name:"textui",route:"/overextended/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"}},{kind:"Meta",data:{alert:"Alert Dialog",clipboard:"Clipboard",context:"Context Menu",input:"Input Dialog",menu:"Menu",notify:"Notifications",progress:"Progress",radial:"Radial Menu",skillcheck:"Skill Check",textui:"TextUI"}}]}]},{kind:"MdxPage",name:"Interface",route:"/overextended/ox_lib/Modules/Interface",frontMatter:{title:"Interface"}},{kind:"Folder",name:"Locale",route:"/overextended/ox_lib/Modules/Locale",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Locale/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Logger",route:"/overextended/ox_lib/Modules/Logger",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Logger/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"Marker",route:"/overextended/ox_lib/Modules/Marker",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Marker/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Math",route:"/overextended/ox_lib/Modules/Math",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Math/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Points",route:"/overextended/ox_lib/Modules/Points",children:[{kind:"Folder",name:"JavaScript",route:"/overextended/ox_lib/Modules/Points/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Points/JavaScript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/overextended/ox_lib/Modules/Points/Lua",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Points/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"Print",route:"/overextended/ox_lib/Modules/Print",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Print/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Raycast",route:"/overextended/ox_lib/Modules/Raycast",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Raycast/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Require",route:"/overextended/ox_lib/Modules/Require",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Require/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Streaming",route:"/overextended/ox_lib/Modules/Streaming",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/Streaming/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"String",route:"/overextended/ox_lib/Modules/String",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/String/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Table",route:"/overextended/ox_lib/Modules/Table",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Table/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Timer",route:"/overextended/ox_lib/Modules/Timer",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Timer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"VehicleProperties",route:"/overextended/ox_lib/Modules/VehicleProperties",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_lib/Modules/VehicleProperties/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Version",route:"/overextended/ox_lib/Modules/Version",children:[{kind:"MdxPage",name:"Server",route:"/overextended/ox_lib/Modules/Version/Server"},{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Version/Shared"},{kind:"Meta",data:{Server:"Server",Shared:"Shared"}}]},{kind:"Folder",name:"WaitFor",route:"/overextended/ox_lib/Modules/WaitFor",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/WaitFor/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Zones",route:"/overextended/ox_lib/Modules/Zones",children:[{kind:"MdxPage",name:"Shared",route:"/overextended/ox_lib/Modules/Zones/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Meta",data:{Interface:"Interface"}}]}]},{kind:"MdxPage",name:"ox_lib",route:"/overextended/ox_lib"},{kind:"Folder",name:"ox_target",route:"/overextended/ox_target",children:[{kind:"Folder",name:"Functions",route:"/overextended/ox_target/Functions",children:[{kind:"MdxPage",name:"Client",route:"/overextended/ox_target/Functions/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"MdxPage",name:"TargetOptions",route:"/overextended/ox_target/TargetOptions"},{kind:"Meta",data:{TargetOptions:"TargetOptions"}}]},{kind:"MdxPage",name:"ox_target",route:"/overextended/ox_target"},{kind:"Folder",name:"oxmysql",route:"/overextended/oxmysql",children:[{kind:"Folder",name:"Functions",route:"/overextended/oxmysql/Functions",children:[{kind:"MdxPage",name:"insert",route:"/overextended/oxmysql/Functions/insert",frontMatter:{title:"insert"}},{kind:"MdxPage",name:"prepare",route:"/overextended/oxmysql/Functions/prepare",frontMatter:{title:"prepare"}},{kind:"MdxPage",name:"query",route:"/overextended/oxmysql/Functions/query",frontMatter:{title:"query"}},{kind:"MdxPage",name:"rawExecute",route:"/overextended/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"}},{kind:"MdxPage",name:"scalar",route:"/overextended/oxmysql/Functions/scalar",frontMatter:{title:"scalar"}},{kind:"MdxPage",name:"single",route:"/overextended/oxmysql/Functions/single",frontMatter:{title:"single"}},{kind:"MdxPage",name:"transaction",route:"/overextended/oxmysql/Functions/transaction",frontMatter:{title:"transaction"}},{kind:"MdxPage",name:"update",route:"/overextended/oxmysql/Functions/update",frontMatter:{title:"update"}},{kind:"Meta",data:{insert:"insert",prepare:"prepare",query:"query",rawExecute:"rawExecute",scalar:"scalar",single:"single",transaction:"transaction",update:"update"}}]},{kind:"Meta",data:{benchmark:"Benchmark",placeholders:"Placeholders",ui:"Debug UI",Functions:"Fun\xe7\xf5es"}},{kind:"MdxPage",name:"benchmark",route:"/overextended/oxmysql/benchmark"},{kind:"MdxPage",name:"placeholders",route:"/overextended/oxmysql/placeholders"},{kind:"MdxPage",name:"ui",route:"/overextended/oxmysql/ui"}]},{kind:"MdxPage",name:"oxmysql",route:"/overextended/oxmysql",frontMatter:{title:"OxMySQL"}}]},{kind:"MdxPage",name:"overextended",route:"/overextended",frontMatter:{title:"Introdu\xe7\xe3o"}},{kind:"MdxPage",name:"qbox",route:"/qbox"},{kind:"MdxPage",name:"resources",route:"/resources"}],oE.flexsearch={codeblocks:!0},oE.themeConfig=oC},528:function(n,a){"use strict";var g,v;Object.defineProperty(a,"__esModule",{value:!0}),function(n,a){for(var g in a)Object.defineProperty(n,g,{enumerable:!0,get:a[g]})}(a,{PrefetchKind:function(){return g},ACTION_REFRESH:function(){return j},ACTION_NAVIGATE:function(){return z},ACTION_RESTORE:function(){return H},ACTION_SERVER_PATCH:function(){return B},ACTION_PREFETCH:function(){return W},ACTION_FAST_REFRESH:function(){return K},ACTION_SERVER_ACTION:function(){return ee}});let j="refresh",z="navigate",H="restore",B="server-patch",W="prefetch",K="fast-refresh",ee="server-action";(v=g||(g={})).AUTO="auto",v.FULL="full",v.TEMPORARY="temporary",("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},4038:function(n,a,g){"use strict";function getDomainLocale(n,a,g,v){return!1}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getDomainLocale",{enumerable:!0,get:function(){return getDomainLocale}}),g(9785),("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},2377:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"Image",{enumerable:!0,get:function(){return ei}});let v=g(1351),j=g(5815),z=j._(g(5271)),H=v._(g(967)),B=v._(g(4507)),W=g(4853),K=g(2156),ee=g(8244);g(1226);let et=g(2195),er=v._(g(5118)),en={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function handleLoading(n,a,g,v,j,z){let H=null==n?void 0:n.src;if(!n||n["data-loaded-src"]===H)return;n["data-loaded-src"]=H;let B="decode"in n?n.decode():Promise.resolve();B.catch(()=>{}).then(()=>{if(n.parentElement&&n.isConnected){if("empty"!==a&&j(!0),null==g?void 0:g.current){let a=new Event("load");Object.defineProperty(a,"target",{writable:!1,value:n});let v=!1,j=!1;g.current({...a,nativeEvent:a,currentTarget:n,target:n,isDefaultPrevented:()=>v,isPropagationStopped:()=>j,persist:()=>{},preventDefault:()=>{v=!0,a.preventDefault()},stopPropagation:()=>{j=!0,a.stopPropagation()}})}(null==v?void 0:v.current)&&v.current(n)}})}function getDynamicProps(n){let[a,g]=z.version.split("."),v=parseInt(a,10),j=parseInt(g,10);return v>18||18===v&&j>=3?{fetchPriority:n}:{fetchpriority:n}}let eo=(0,z.forwardRef)((n,a)=>{let{src:g,srcSet:v,sizes:j,height:H,width:B,decoding:W,className:K,style:ee,fetchPriority:et,placeholder:er,loading:en,unoptimized:eo,fill:ei,onLoadRef:es,onLoadingCompleteRef:el,setBlurComplete:ec,setShowAltText:eu,onLoad:ed,onError:ep,...ef}=n;return z.default.createElement("img",{...ef,...getDynamicProps(et),loading:en,width:B,height:H,decoding:W,"data-nimg":ei?"fill":"1",className:K,style:ee,sizes:j,srcSet:v,src:g,ref:(0,z.useCallback)(n=>{a&&("function"==typeof a?a(n):"object"==typeof a&&(a.current=n)),n&&(ep&&(n.src=n.src),n.complete&&handleLoading(n,er,es,el,ec,eo))},[g,er,es,el,ec,ep,eo,a]),onLoad:n=>{let a=n.currentTarget;handleLoading(a,er,es,el,ec,eo)},onError:n=>{eu(!0),"empty"!==er&&ec(!0),ep&&ep(n)}})});function ImagePreload(n){let{isAppRouter:a,imgAttributes:g}=n,v={as:"image",imageSrcSet:g.srcSet,imageSizes:g.sizes,crossOrigin:g.crossOrigin,referrerPolicy:g.referrerPolicy,...getDynamicProps(g.fetchPriority)};return a&&H.default.preload?(H.default.preload(g.src,v),null):z.default.createElement(B.default,null,z.default.createElement("link",{key:"__nimg-"+g.src+g.srcSet+g.sizes,rel:"preload",href:g.srcSet?void 0:g.src,...v}))}let ei=(0,z.forwardRef)((n,a)=>{let g=(0,z.useContext)(et.RouterContext),v=(0,z.useContext)(ee.ImageConfigContext),j=(0,z.useMemo)(()=>{let n=en||v||K.imageConfigDefault,a=[...n.deviceSizes,...n.imageSizes].sort((n,a)=>n-a),g=n.deviceSizes.sort((n,a)=>n-a);return{...n,allSizes:a,deviceSizes:g}},[v]),{onLoad:H,onLoadingComplete:B}=n,ei=(0,z.useRef)(H);(0,z.useEffect)(()=>{ei.current=H},[H]);let es=(0,z.useRef)(B);(0,z.useEffect)(()=>{es.current=B},[B]);let[el,ec]=(0,z.useState)(!1),[eu,ed]=(0,z.useState)(!1),{props:ep,meta:ef}=(0,W.getImgProps)(n,{defaultLoader:er.default,imgConf:j,blurComplete:el,showAltText:eu});return z.default.createElement(z.default.Fragment,null,z.default.createElement(eo,{...ep,unoptimized:ef.unoptimized,placeholder:ef.placeholder,fill:ef.fill,onLoadRef:ei,onLoadingCompleteRef:es,setBlurComplete:ec,setShowAltText:ed,ref:a}),ef.priority?z.default.createElement(ImagePreload,{isAppRouter:!g,imgAttributes:ep}):null)});("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},8357:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return ec}});let v=g(1351),j=v._(g(5271)),z=g(475),H=g(8436),B=g(9616),W=g(6525),K=g(4059),ee=g(2195),et=g(374),er=g(6683),en=g(4038),eo=g(4407),ei=g(528),es=new Set;function prefetch(n,a,g,v,j,z){if(!z&&!(0,H.isLocalURL)(a))return;if(!v.bypassPrefetchedCheck){let j=void 0!==v.locale?v.locale:"locale"in n?n.locale:void 0,z=a+"%"+g+"%"+j;if(es.has(z))return;es.add(z)}let B=z?n.prefetch(a,j):n.prefetch(a,g,v);Promise.resolve(B).catch(n=>{})}function formatStringOrUrl(n){return"string"==typeof n?n:(0,B.formatUrl)(n)}let el=j.default.forwardRef(function(n,a){let g,v;let{href:B,as:es,children:el,prefetch:ec=null,passHref:eu,replace:ed,shallow:ep,scroll:ef,locale:em,onClick:eh,onMouseEnter:eg,onTouchStart:ex,legacyBehavior:ev=!1,...ey}=n;g=el,ev&&("string"==typeof g||"number"==typeof g)&&(g=j.default.createElement("a",null,g));let eb=j.default.useContext(ee.RouterContext),e_=j.default.useContext(et.AppRouterContext),eS=null!=eb?eb:e_,ew=!eb,ek=!1!==ec,eO=null===ec?ei.PrefetchKind.AUTO:ei.PrefetchKind.FULL,{href:ej,as:eC}=j.default.useMemo(()=>{if(!eb){let n=formatStringOrUrl(B);return{href:n,as:es?formatStringOrUrl(es):n}}let[n,a]=(0,z.resolveHref)(eb,B,!0);return{href:n,as:es?(0,z.resolveHref)(eb,es):a||n}},[eb,B,es]),eP=j.default.useRef(ej),eE=j.default.useRef(eC);ev&&(v=j.default.Children.only(g));let eI=ev?v&&"object"==typeof v&&v.ref:a,[eT,eM,eA]=(0,er.useIntersection)({rootMargin:"200px"}),eN=j.default.useCallback(n=>{(eE.current!==eC||eP.current!==ej)&&(eA(),eE.current=eC,eP.current=ej),eT(n),eI&&("function"==typeof eI?eI(n):"object"==typeof eI&&(eI.current=n))},[eC,eI,ej,eA,eT]);j.default.useEffect(()=>{eS&&eM&&ek&&prefetch(eS,ej,eC,{locale:em},{kind:eO},ew)},[eC,ej,eM,em,ek,null==eb?void 0:eb.locale,eS,ew,eO]);let eR={ref:eN,onClick(n){ev||"function"!=typeof eh||eh(n),ev&&v.props&&"function"==typeof v.props.onClick&&v.props.onClick(n),eS&&!n.defaultPrevented&&function(n,a,g,v,z,B,W,K,ee,et){let{nodeName:er}=n.currentTarget,en="A"===er.toUpperCase();if(en&&(function(n){let a=n.currentTarget,g=a.getAttribute("target");return g&&"_self"!==g||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.nativeEvent&&2===n.nativeEvent.which}(n)||!ee&&!(0,H.isLocalURL)(g)))return;n.preventDefault();let navigate=()=>{let n=null==W||W;"beforePopState"in a?a[z?"replace":"push"](g,v,{shallow:B,locale:K,scroll:n}):a[z?"replace":"push"](v||g,{forceOptimisticNavigation:!et,scroll:n})};ee?j.default.startTransition(navigate):navigate()}(n,eS,ej,eC,ed,ep,ef,em,ew,ek)},onMouseEnter(n){ev||"function"!=typeof eg||eg(n),ev&&v.props&&"function"==typeof v.props.onMouseEnter&&v.props.onMouseEnter(n),eS&&(ek||!ew)&&prefetch(eS,ej,eC,{locale:em,priority:!0,bypassPrefetchedCheck:!0},{kind:eO},ew)},onTouchStart(n){ev||"function"!=typeof ex||ex(n),ev&&v.props&&"function"==typeof v.props.onTouchStart&&v.props.onTouchStart(n),eS&&(ek||!ew)&&prefetch(eS,ej,eC,{locale:em,priority:!0,bypassPrefetchedCheck:!0},{kind:eO},ew)}};if((0,W.isAbsoluteUrl)(eC))eR.href=eC;else if(!ev||eu||"a"===v.type&&!("href"in v.props)){let n=void 0!==em?em:null==eb?void 0:eb.locale,a=(null==eb?void 0:eb.isLocaleDomain)&&(0,en.getDomainLocale)(eC,n,null==eb?void 0:eb.locales,null==eb?void 0:eb.domainLocales);eR.href=a||(0,eo.addBasePath)((0,K.addLocale)(eC,n,null==eb?void 0:eb.defaultLocale))}return ev?j.default.cloneElement(v,eR):j.default.createElement("a",{...ey,...eR},g)}),ec=el;("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},6683:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useIntersection",{enumerable:!0,get:function(){return useIntersection}});let v=g(5271),j=g(4517),z="function"==typeof IntersectionObserver,H=new Map,B=[];function useIntersection(n){let{rootRef:a,rootMargin:g,disabled:W}=n,K=W||!z,[ee,et]=(0,v.useState)(!1),er=(0,v.useRef)(null),en=(0,v.useCallback)(n=>{er.current=n},[]);(0,v.useEffect)(()=>{if(z){if(K||ee)return;let n=er.current;if(n&&n.tagName){let v=function(n,a,g){let{id:v,observer:j,elements:z}=function(n){let a;let g={root:n.root||null,margin:n.rootMargin||""},v=B.find(n=>n.root===g.root&&n.margin===g.margin);if(v&&(a=H.get(v)))return a;let j=new Map,z=new IntersectionObserver(n=>{n.forEach(n=>{let a=j.get(n.target),g=n.isIntersecting||n.intersectionRatio>0;a&&g&&a(g)})},n);return a={id:g,observer:z,elements:j},B.push(g),H.set(g,a),a}(g);return z.set(n,a),j.observe(n),function(){if(z.delete(n),j.unobserve(n),0===z.size){j.disconnect(),H.delete(v);let n=B.findIndex(n=>n.root===v.root&&n.margin===v.margin);n>-1&&B.splice(n,1)}}}(n,n=>n&&et(n),{root:null==a?void 0:a.current,rootMargin:g});return v}}else if(!ee){let n=(0,j.requestIdleCallback)(()=>et(!0));return()=>(0,j.cancelIdleCallback)(n)}},[K,g,a,ee,er.current]);let eo=(0,v.useCallback)(()=>{et(!1)},[]);return[en,ee,eo]}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),n.exports=a.default)},4853:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getImgProps",{enumerable:!0,get:function(){return getImgProps}}),g(1226);let v=g(9323),j=g(2156);function isStaticRequire(n){return void 0!==n.default}function getInt(n){return void 0===n?n:"number"==typeof n?Number.isFinite(n)?n:NaN:"string"==typeof n&&/^[0-9]+$/.test(n)?parseInt(n,10):NaN}function getImgProps(n,a){var g;let z,H,B,{src:W,sizes:K,unoptimized:ee=!1,priority:et=!1,loading:er,className:en,quality:eo,width:ei,height:es,fill:el=!1,style:ec,onLoad:eu,onLoadingComplete:ed,placeholder:ep="empty",blurDataURL:ef,fetchPriority:em,layout:eh,objectFit:eg,objectPosition:ex,lazyBoundary:ev,lazyRoot:ey,...eb}=n,{imgConf:e_,showAltText:eS,blurComplete:ew,defaultLoader:ek}=a,eO=e_||j.imageConfigDefault;if("allSizes"in eO)z=eO;else{let n=[...eO.deviceSizes,...eO.imageSizes].sort((n,a)=>n-a),a=eO.deviceSizes.sort((n,a)=>n-a);z={...eO,allSizes:n,deviceSizes:a}}let ej=eb.loader||ek;delete eb.loader,delete eb.srcSet;let eC="__next_img_default"in ej;if(eC){if("custom"===z.loader)throw Error('Image with src "'+W+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let n=ej;ej=a=>{let{config:g,...v}=a;return n(v)}}if(eh){"fill"===eh&&(el=!0);let n={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[eh];n&&(ec={...ec,...n});let a={responsive:"100vw",fill:"100vw"}[eh];a&&!K&&(K=a)}let eP="",eE=getInt(ei),eI=getInt(es);if("object"==typeof(g=W)&&(isStaticRequire(g)||void 0!==g.src)){let n=isStaticRequire(W)?W.default:W;if(!n.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(n));if(!n.height||!n.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(n));if(H=n.blurWidth,B=n.blurHeight,ef=ef||n.blurDataURL,eP=n.src,!el){if(eE||eI){if(eE&&!eI){let a=eE/n.width;eI=Math.round(n.height*a)}else if(!eE&&eI){let a=eI/n.height;eE=Math.round(n.width*a)}}else eE=n.width,eI=n.height}}let eT=!et&&("lazy"===er||void 0===er);(!(W="string"==typeof W?W:eP)||W.startsWith("data:")||W.startsWith("blob:"))&&(ee=!0,eT=!1),z.unoptimized&&(ee=!0),eC&&W.endsWith(".svg")&&!z.dangerouslyAllowSVG&&(ee=!0),et&&(em="high");let eM=getInt(eo),eA=Object.assign(el?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:eg,objectPosition:ex}:{},eS?{}:{color:"transparent"},ec),eN=ew||"empty"===ep?null:"blur"===ep?'url("data:image/svg+xml;charset=utf-8,'+(0,v.getImageBlurSvg)({widthInt:eE,heightInt:eI,blurWidth:H,blurHeight:B,blurDataURL:ef||"",objectFit:eA.objectFit})+'")':'url("'+ep+'")',eR=eN?{backgroundSize:eA.objectFit||"cover",backgroundPosition:eA.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:eN}:{},eD=function(n){let{config:a,src:g,unoptimized:v,width:j,quality:z,sizes:H,loader:B}=n;if(v)return{src:g,srcSet:void 0,sizes:void 0};let{widths:W,kind:K}=function(n,a,g){let{deviceSizes:v,allSizes:j}=n;if(g){let n=/(^|\s)(1?\d?\d)vw/g,a=[];for(let v;v=n.exec(g);v)a.push(parseInt(v[2]));if(a.length){let n=.01*Math.min(...a);return{widths:j.filter(a=>a>=v[0]*n),kind:"w"}}return{widths:j,kind:"w"}}if("number"!=typeof a)return{widths:v,kind:"w"};let z=[...new Set([a,2*a].map(n=>j.find(a=>a>=n)||j[j.length-1]))];return{widths:z,kind:"x"}}(a,j,H),ee=W.length-1;return{sizes:H||"w"!==K?H:"100vw",srcSet:W.map((n,v)=>B({config:a,src:g,quality:z,width:n})+" "+("w"===K?n:v+1)+K).join(", "),src:B({config:a,src:g,quality:z,width:W[ee]})}}({config:z,src:W,unoptimized:ee,width:eE,quality:eM,sizes:K,loader:ej}),eL={...eb,loading:eT?"lazy":er,fetchPriority:em,width:eE,height:eI,decoding:"async",className:en,style:{...eA,...eR},sizes:eD.sizes,srcSet:eD.srcSet,src:eD.src},eZ={unoptimized:ee,priority:et,placeholder:ep,fill:el};return{props:eL,meta:eZ}}},9323:function(n,a){"use strict";function getImageBlurSvg(n){let{widthInt:a,heightInt:g,blurWidth:v,blurHeight:j,blurDataURL:z,objectFit:H}=n,B=v?40*v:a,W=j?40*j:g,K=B&&W?"viewBox='0 0 "+B+" "+W+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+K+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(K?"none":"contain"===H?"xMidYMid":"cover"===H?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+z+"'/%3E%3C/svg%3E"}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"getImageBlurSvg",{enumerable:!0,get:function(){return getImageBlurSvg}})},1011:function(n,a,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),function(n,a){for(var g in a)Object.defineProperty(n,g,{enumerable:!0,get:a[g]})}(a,{unstable_getImgProps:function(){return unstable_getImgProps},default:function(){return W}});let v=g(1351),j=g(4853),z=g(1226),H=g(2377),B=v._(g(5118)),unstable_getImgProps=n=>{(0,z.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:a}=(0,j.getImgProps)(n,{defaultLoader:B.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[n,g]of Object.entries(a))void 0===g&&delete a[n];return{props:a}},W=H.Image},5118:function(n,a){"use strict";function defaultLoader(n){let{config:a,src:g,width:v,quality:j}=n;return a.path+"?url="+encodeURIComponent(g)+"&w="+v+"&q="+(j||75)}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return g}}),defaultLoader.__next_img_default=!0;let g=defaultLoader},1384:function(){},4323:function(){},2449:function(){},518:function(n){!function(){"use strict";var a={114:function(n){function assertPath(n){if("string"!=typeof n)throw TypeError("Path must be a string. Received "+JSON.stringify(n))}function normalizeStringPosix(n,a){for(var g,v="",j=0,z=-1,H=0,B=0;B<=n.length;++B){if(B2){var W=v.lastIndexOf("/");if(W!==v.length-1){-1===W?(v="",j=0):j=(v=v.slice(0,W)).length-1-v.lastIndexOf("/"),z=B,H=0;continue}}else if(2===v.length||1===v.length){v="",j=0,z=B,H=0;continue}}a&&(v.length>0?v+="/..":v="..",j=2)}else v.length>0?v+="/"+n.slice(z+1,B):v=n.slice(z+1,B),j=B-z-1;z=B,H=0}else 46===g&&-1!==H?++H:H=-1}return v}var a={resolve:function(){for(var n,a,g="",v=!1,j=arguments.length-1;j>=-1&&!v;j--)j>=0?a=arguments[j]:(void 0===n&&(n=""),a=n),assertPath(a),0!==a.length&&(g=a+"/"+g,v=47===a.charCodeAt(0));return(g=normalizeStringPosix(g,!v),v)?g.length>0?"/"+g:"/":g.length>0?g:"."},normalize:function(n){if(assertPath(n),0===n.length)return".";var a=47===n.charCodeAt(0),g=47===n.charCodeAt(n.length-1);return(0!==(n=normalizeStringPosix(n,!a)).length||a||(n="."),n.length>0&&g&&(n+="/"),a)?"/"+n:n},isAbsolute:function(n){return assertPath(n),n.length>0&&47===n.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var n,g=0;g0&&(void 0===n?n=v:n+="/"+v)}return void 0===n?".":a.normalize(n)},relative:function(n,g){if(assertPath(n),assertPath(g),n===g||(n=a.resolve(n))===(g=a.resolve(g)))return"";for(var v=1;vW){if(47===g.charCodeAt(H+ee))return g.slice(H+ee+1);if(0===ee)return g.slice(H+ee)}else z>W&&(47===n.charCodeAt(v+ee)?K=ee:0===ee&&(K=0));break}var et=n.charCodeAt(v+ee);if(et!==g.charCodeAt(H+ee))break;47===et&&(K=ee)}var er="";for(ee=v+K+1;ee<=j;++ee)(ee===j||47===n.charCodeAt(ee))&&(0===er.length?er+="..":er+="/..");return er.length>0?er+g.slice(H+K):(H+=K,47===g.charCodeAt(H)&&++H,g.slice(H))},_makeLong:function(n){return n},dirname:function(n){if(assertPath(n),0===n.length)return".";for(var a=n.charCodeAt(0),g=47===a,v=-1,j=!0,z=n.length-1;z>=1;--z)if(47===(a=n.charCodeAt(z))){if(!j){v=z;break}}else j=!1;return -1===v?g?"/":".":g&&1===v?"//":n.slice(0,v)},basename:function(n,a){if(void 0!==a&&"string"!=typeof a)throw TypeError('"ext" argument must be a string');assertPath(n);var g,v=0,j=-1,z=!0;if(void 0!==a&&a.length>0&&a.length<=n.length){if(a.length===n.length&&a===n)return"";var H=a.length-1,B=-1;for(g=n.length-1;g>=0;--g){var W=n.charCodeAt(g);if(47===W){if(!z){v=g+1;break}}else -1===B&&(z=!1,B=g+1),H>=0&&(W===a.charCodeAt(H)?-1==--H&&(j=g):(H=-1,j=B))}return v===j?j=B:-1===j&&(j=n.length),n.slice(v,j)}for(g=n.length-1;g>=0;--g)if(47===n.charCodeAt(g)){if(!z){v=g+1;break}}else -1===j&&(z=!1,j=g+1);return -1===j?"":n.slice(v,j)},extname:function(n){assertPath(n);for(var a=-1,g=0,v=-1,j=!0,z=0,H=n.length-1;H>=0;--H){var B=n.charCodeAt(H);if(47===B){if(!j){g=H+1;break}continue}-1===v&&(j=!1,v=H+1),46===B?-1===a?a=H:1!==z&&(z=1):-1!==a&&(z=-1)}return -1===a||-1===v||0===z||1===z&&a===v-1&&a===g+1?"":n.slice(a,v)},format:function(n){var a,g;if(null===n||"object"!=typeof n)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a=n.dir||n.root,g=n.base||(n.name||"")+(n.ext||""),a?a===n.root?a+g:a+"/"+g:g},parse:function(n){assertPath(n);var a,g={root:"",dir:"",base:"",ext:"",name:""};if(0===n.length)return g;var v=n.charCodeAt(0),j=47===v;j?(g.root="/",a=1):a=0;for(var z=-1,H=0,B=-1,W=!0,K=n.length-1,ee=0;K>=a;--K){if(47===(v=n.charCodeAt(K))){if(!W){H=K+1;break}continue}-1===B&&(W=!1,B=K+1),46===v?-1===z?z=K:1!==ee&&(ee=1):-1!==z&&(ee=-1)}return -1===z||-1===B||0===ee||1===ee&&z===B-1&&z===H+1?-1!==B&&(0===H&&j?g.base=g.name=n.slice(1,B):g.base=g.name=n.slice(H,B)):(0===H&&j?(g.name=n.slice(1,z),g.base=n.slice(1,B)):(g.name=n.slice(H,z),g.base=n.slice(H,B)),g.ext=n.slice(z,B)),H>0?g.dir=n.slice(0,H-1):j&&(g.dir="/"),g},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a}},g={};function __nccwpck_require__(n){var v=g[n];if(void 0!==v)return v.exports;var j=g[n]={exports:{}},z=!0;try{a[n](j,j.exports,__nccwpck_require__),z=!1}finally{z&&delete g[n]}return j.exports}__nccwpck_require__.ab="//";var v=__nccwpck_require__(114);n.exports=v}()},1750:function(n){!function(){var a={229:function(n){var a,g,v,j=n.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(n){if(a===setTimeout)return setTimeout(n,0);if((a===defaultSetTimout||!a)&&setTimeout)return a=setTimeout,setTimeout(n,0);try{return a(n,0)}catch(g){try{return a.call(null,n,0)}catch(g){return a.call(this,n,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(n){a=defaultSetTimout}try{g="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(n){g=defaultClearTimeout}}();var z=[],H=!1,B=-1;function cleanUpNextTick(){H&&v&&(H=!1,v.length?z=v.concat(z):B=-1,z.length&&drainQueue())}function drainQueue(){if(!H){var n=runTimeout(cleanUpNextTick);H=!0;for(var a=z.length;a;){for(v=z,z=[];++B1)for(var g=1;g(0,B.jsx)("button",{className:(0,H.Z)("nextra-button nx-transition-all active:nx-opacity-50","nx-bg-primary-700/5 nx-border nx-border-black/5 nx-text-gray-600 hover:nx-text-gray-900 nx-rounded-md nx-p-1.5","dark:nx-bg-primary-300/10 dark:nx-border-white/10 dark:nx-text-gray-400 dark:hover:nx-text-gray-50",a),...g,children:n}),W=g(2766),K={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,B.jsx)(W.AV,{className:"nx-mt-1"}),warning:"⚠️"},ee={default:(0,H.Z)("nx-border-orange-100 nx-bg-orange-50 nx-text-orange-800 dark:nx-border-orange-400/30 dark:nx-bg-orange-400/20 dark:nx-text-orange-300"),error:(0,H.Z)("nx-border-red-200 nx-bg-red-100 nx-text-red-900 dark:nx-border-red-200/30 dark:nx-bg-red-900/30 dark:nx-text-red-200"),info:(0,H.Z)("nx-border-blue-200 nx-bg-blue-100 nx-text-blue-900 dark:nx-border-blue-200/30 dark:nx-bg-blue-900/30 dark:nx-text-blue-200"),warning:(0,H.Z)("nx-border-yellow-100 nx-bg-yellow-50 nx-text-yellow-900 dark:nx-border-yellow-200/30 dark:nx-bg-yellow-700/30 dark:nx-text-yellow-200")};function Callout({children:n,type:a="default",emoji:g=K[a]}){return(0,B.jsxs)("div",{className:(0,H.Z)("nextra-callout nx-overflow-x-auto nx-mt-6 nx-flex nx-rounded-lg nx-border nx-py-2 ltr:nx-pr-4 rtl:nx-pl-4","contrast-more:nx-border-current contrast-more:dark:nx-border-current",ee[a]),children:[(0,B.jsx)("div",{className:"nx-select-none nx-text-xl ltr:nx-pl-3 ltr:nx-pr-2 rtl:nx-pr-3 rtl:nx-pl-2",style:{fontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},children:g}),(0,B.jsx)("div",{className:"nx-w-full nx-min-w-0 nx-leading-7",children:n})]})}var et=g(5271),CopyToClipboard=({getValue:n,...a})=>{let[g,v]=(0,et.useState)(!1);(0,et.useEffect)(()=>{if(!g)return;let n=setTimeout(()=>{v(!1)},2e3);return()=>{clearTimeout(n)}},[g]);let j=(0,et.useCallback)(async()=>{v(!0),navigator?.clipboard||console.error("Access to clipboard rejected!");try{await navigator.clipboard.writeText(n())}catch{console.error("Failed to copy!")}},[n]),z=g?W.nQ:W.TI;return(0,B.jsx)(Button,{onClick:j,title:"Copy code",tabIndex:0,...a,children:(0,B.jsx)(z,{className:"nextra-copy-icon nx-pointer-events-none nx-h-4 nx-w-4"})})},Code=({children:n,className:a,...g})=>{let v="data-line-numbers"in g;return(0,B.jsx)("code",{className:(0,H.Z)("nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] nx-text-[.9em]","dark:nx-border-white/10 dark:nx-bg-white/10",v&&"[counter-reset:line]",a),dir:"ltr",...g,children:n})},Pre=({children:n,className:a,hasCopyCode:g,filename:v,...j})=>{let z=(0,et.useRef)(null),K=(0,et.useCallback)(()=>{let n=document.documentElement.dataset,a="nextraWordWrap"in n;a?delete n.nextraWordWrap:n.nextraWordWrap=""},[]);return(0,B.jsxs)("div",{className:"nextra-code-block nx-relative nx-mt-6 first:nx-mt-0",children:[v&&(0,B.jsx)("div",{className:"nx-absolute nx-top-0 nx-z-[1] nx-w-full nx-truncate nx-rounded-t-xl nx-bg-primary-700/5 nx-py-2 nx-px-4 nx-text-xs nx-text-gray-700 dark:nx-bg-primary-300/10 dark:nx-text-gray-200",children:v}),(0,B.jsx)("pre",{className:(0,H.Z)("nx-bg-primary-700/5 nx-mb-4 nx-overflow-x-auto nx-rounded-xl nx-subpixel-antialiased dark:nx-bg-primary-300/10 nx-text-[.9em]","contrast-more:nx-border contrast-more:nx-border-primary-900/20 contrast-more:nx-contrast-150 contrast-more:dark:nx-border-primary-100/40",v?"nx-pt-12 nx-pb-4":"nx-py-4",a),ref:z,...j,children:n}),(0,B.jsxs)("div",{className:(0,H.Z)("nx-opacity-0 nx-transition [div:hover>&]:nx-opacity-100 focus-within:nx-opacity-100","nx-flex nx-gap-1 nx-absolute nx-m-[11px] nx-right-0",v?"nx-top-8":"nx-top-0"),children:[(0,B.jsx)(Button,{onClick:K,className:"md:nx-hidden",title:"Toggle word wrap",children:(0,B.jsx)(W.NK,{className:"nx-pointer-events-none nx-h-4 nx-w-4"})}),g&&(0,B.jsx)(CopyToClipboard,{getValue:()=>z.current?.querySelector("code")?.textContent||""})]})]})};function Steps({children:n,className:a,...g}){return(0,B.jsx)("div",{className:(0,H.Z)("nextra-steps nx-ml-4 nx-mb-12 nx-border-l nx-border-gray-200 nx-pl-6","dark:nx-border-neutral-800 [counter-reset:step]",a),...g,children:n})}var er=g(4327),en=g(9140),eo=g(2410),ei=g(93),es=g(121),el=g(2412),ec=g(3142),eu=g(8656),ed=g(4538);function focus_sentinel_b({onFocus:n}){let[a,g]=(0,et.useState)(!0),v=(0,eu.t)();return a?et.createElement(ed._,{as:"button",type:"button",features:ed.A.Focusable,onFocus:a=>{a.preventDefault();let j,z=50;j=requestAnimationFrame(function t(){if(z--<=0){j&&cancelAnimationFrame(j);return}if(n()){if(cancelAnimationFrame(j),!v.current)return;g(!1);return}j=requestAnimationFrame(t)})}}):null}var ep=g(4830),ef=g(2549),em=g(616),eh=g(4832),eg=g(2184);let ex=et.createContext(null);function C({children:n}){let a=et.useRef({groups:new Map,get(n,a){var g;let v=this.groups.get(n);v||(v=new Map,this.groups.set(n,v));let j=null!=(g=v.get(a))?g:0;return v.set(a,j+1),[Array.from(v.keys()).indexOf(a),function(){let n=v.get(a);n>1?v.set(a,n-1):v.delete(a)}]}});return et.createElement(ex.Provider,{value:a},n)}function d(n){let a=et.useContext(ex);if(!a)throw Error("You must wrap your component in a ");let g=function(){var n,a,g;let v=null!=(g=null==(a=null==(n=et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)?void 0:n.ReactCurrentOwner)?void 0:a.current)?g:null;if(!v)return Symbol();let j=[],z=v;for(;z;)j.push(z.index),z=z.return;return"$."+j.join(".")}(),[v,j]=a.current.get(n,g);return et.useEffect(()=>j,[]),v}var ev=((v=ev||{})[v.Forwards=0]="Forwards",v[v.Backwards=1]="Backwards",v),ey=((j=ey||{})[j.Less=-1]="Less",j[j.Equal=0]="Equal",j[j.Greater=1]="Greater",j),eb=((z=eb||{})[z.SetSelectedIndex=0]="SetSelectedIndex",z[z.RegisterTab=1]="RegisterTab",z[z.UnregisterTab=2]="UnregisterTab",z[z.RegisterPanel=3]="RegisterPanel",z[z.UnregisterPanel=4]="UnregisterPanel",z);let e_={0(n,a){var g;let v=(0,ep.z2)(n.tabs,n=>n.current),j=(0,ep.z2)(n.panels,n=>n.current),z=v.filter(n=>{var a;return!(null!=(a=n.current)&&a.hasAttribute("disabled"))}),H={...n,tabs:v,panels:j};if(a.index<0||a.index>v.length-1){let g=(0,ef.E)(Math.sign(a.index-n.selectedIndex),{[-1]:()=>1,0:()=>(0,ef.E)(Math.sign(a.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===z.length)return H;let j=(0,ef.E)(g,{0:()=>v.indexOf(z[0]),1:()=>v.indexOf(z[z.length-1])});return{...H,selectedIndex:-1===j?n.selectedIndex:j}}let B=v.slice(0,a.index),W=[...v.slice(a.index),...B].find(n=>z.includes(n));if(!W)return H;let K=null!=(g=v.indexOf(W))?g:n.selectedIndex;return -1===K&&(K=n.selectedIndex),{...H,selectedIndex:K}},1(n,a){if(n.tabs.includes(a.tab))return n;let g=n.tabs[n.selectedIndex],v=(0,ep.z2)([...n.tabs,a.tab],n=>n.current),j=n.selectedIndex;return n.info.current.isControlled||-1===(j=v.indexOf(g))&&(j=n.selectedIndex),{...n,tabs:v,selectedIndex:j}},2:(n,a)=>({...n,tabs:n.tabs.filter(n=>n!==a.tab)}),3:(n,a)=>n.panels.includes(a.panel)?n:{...n,panels:(0,ep.z2)([...n.panels,a.panel],n=>n.current)},4:(n,a)=>({...n,panels:n.panels.filter(n=>n!==a.panel)})},eS=(0,et.createContext)(null);function F(n){let a=(0,et.useContext)(eS);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,F),a}return a}eS.displayName="TabsDataContext";let ew=(0,et.createContext)(null);function q(n){let a=(0,et.useContext)(ew);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,q),a}return a}function fe(n,a){return(0,ef.E)(a.type,e_,n,a)}ew.displayName="TabsActionsContext";let ek=et.Fragment,eO=eg.AN.RenderStrategy|eg.AN.Static,ej=Object.assign((0,eg.yV)(function(n,a){var g,v;let j=(0,eo.M)(),{id:z=`headlessui-tabs-tab-${j}`,...H}=n,{orientation:B,activation:W,selectedIndex:K,tabs:ee,panels:es}=F("Tab"),eu=q("Tab"),ed=F("Tab"),ex=(0,et.useRef)(null),ev=(0,ec.T)(ex,a);(0,ei.e)(()=>eu.registerTab(ex),[eu,ex]);let ey=d("tabs"),eb=ee.indexOf(ex);-1===eb&&(eb=ey);let e_=eb===K,eS=(0,en.z)(n=>{var a;let g=n();if(g===ep.fE.Success&&"auto"===W){let n=null==(a=(0,eh.r)(ex))?void 0:a.activeElement,g=ed.tabs.findIndex(a=>a.current===n);-1!==g&&eu.change(g)}return g}),ew=(0,en.z)(n=>{let a=ee.map(n=>n.current).filter(Boolean);if(n.key===er.R.Space||n.key===er.R.Enter){n.preventDefault(),n.stopPropagation(),eu.change(eb);return}switch(n.key){case er.R.Home:case er.R.PageUp:return n.preventDefault(),n.stopPropagation(),eS(()=>(0,ep.jA)(a,ep.TO.First));case er.R.End:case er.R.PageDown:return n.preventDefault(),n.stopPropagation(),eS(()=>(0,ep.jA)(a,ep.TO.Last))}if(eS(()=>(0,ef.E)(B,{vertical:()=>n.key===er.R.ArrowUp?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===er.R.ArrowDown?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error,horizontal:()=>n.key===er.R.ArrowLeft?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===er.R.ArrowRight?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error}))===ep.fE.Success)return n.preventDefault()}),ek=(0,et.useRef)(!1),eO=(0,en.z)(()=>{var n;ek.current||(ek.current=!0,null==(n=ex.current)||n.focus({preventScroll:!0}),eu.change(eb),(0,em.Y)(()=>{ek.current=!1}))}),ej=(0,en.z)(n=>{n.preventDefault()}),eC=(0,et.useMemo)(()=>{var a;return{selected:e_,disabled:null!=(a=n.disabled)&&a}},[e_,n.disabled]),eP={ref:ev,onKeyDown:ew,onMouseDown:ej,onClick:eO,id:z,role:"tab",type:(0,el.f)(n,ex),"aria-controls":null==(v=null==(g=es[eb])?void 0:g.current)?void 0:v.id,"aria-selected":e_,tabIndex:e_?0:-1};return(0,eg.sY)({ourProps:eP,theirProps:H,slot:eC,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,eg.yV)(function(n,a){let{defaultIndex:g=0,vertical:v=!1,manual:j=!1,onChange:z,selectedIndex:H=null,...B}=n,W=v?"vertical":"horizontal",K=j?"manual":"auto",ee=null!==H,er=(0,es.E)({isControlled:ee}),eo=(0,ec.T)(a),[el,eu]=(0,et.useReducer)(fe,{info:er,selectedIndex:null!=H?H:g,tabs:[],panels:[]}),ed=(0,et.useMemo)(()=>({selectedIndex:el.selectedIndex}),[el.selectedIndex]),ef=(0,es.E)(z||(()=>{})),em=(0,es.E)(el.tabs),eh=(0,et.useMemo)(()=>({orientation:W,activation:K,...el}),[W,K,el]),ex=(0,en.z)(n=>(eu({type:1,tab:n}),()=>eu({type:2,tab:n}))),ev=(0,en.z)(n=>(eu({type:3,panel:n}),()=>eu({type:4,panel:n}))),ey=(0,en.z)(n=>{eb.current!==n&&ef.current(n),ee||eu({type:0,index:n})}),eb=(0,es.E)(ee?n.selectedIndex:el.selectedIndex),e_=(0,et.useMemo)(()=>({registerTab:ex,registerPanel:ev,change:ey}),[]);return(0,ei.e)(()=>{eu({type:0,index:null!=H?H:g})},[H]),(0,ei.e)(()=>{if(void 0===eb.current||el.tabs.length<=0)return;let n=(0,ep.z2)(el.tabs,n=>n.current);n.some((n,a)=>el.tabs[a]!==n)&&ey(n.indexOf(el.tabs[eb.current]))}),et.createElement(C,null,et.createElement(ew.Provider,{value:e_},et.createElement(eS.Provider,{value:eh},eh.tabs.length<=0&&et.createElement(focus_sentinel_b,{onFocus:()=>{var n,a;for(let g of em.current)if((null==(n=g.current)?void 0:n.tabIndex)===0)return null==(a=g.current)||a.focus(),!0;return!1}}),(0,eg.sY)({ourProps:{ref:eo},theirProps:B,slot:ed,defaultTag:ek,name:"Tabs"}))))}),List:(0,eg.yV)(function(n,a){let{orientation:g,selectedIndex:v}=F("Tab.List"),j=(0,ec.T)(a);return(0,eg.sY)({ourProps:{ref:j,role:"tablist","aria-orientation":g},theirProps:n,slot:{selectedIndex:v},defaultTag:"div",name:"Tabs.List"})}),Panels:(0,eg.yV)(function(n,a){let{selectedIndex:g}=F("Tab.Panels"),v=(0,ec.T)(a),j=(0,et.useMemo)(()=>({selectedIndex:g}),[g]);return(0,eg.sY)({ourProps:{ref:v},theirProps:n,slot:j,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,eg.yV)(function(n,a){var g,v,j,z;let H=(0,eo.M)(),{id:B=`headlessui-tabs-panel-${H}`,tabIndex:W=0,...K}=n,{selectedIndex:ee,tabs:er,panels:en}=F("Tab.Panel"),es=q("Tab.Panel"),el=(0,et.useRef)(null),eu=(0,ec.T)(el,a);(0,ei.e)(()=>es.registerPanel(el),[es,el,B]);let ep=d("panels"),ef=en.indexOf(el);-1===ef&&(ef=ep);let em=ef===ee,eh=(0,et.useMemo)(()=>({selected:em}),[em]),ex={ref:eu,id:B,role:"tabpanel","aria-labelledby":null==(v=null==(g=er[ef])?void 0:g.current)?void 0:v.id,tabIndex:em?W:-1};return em||null!=(j=K.unmount)&&!j||null!=(z=K.static)&&z?(0,eg.sY)({ourProps:ex,theirProps:K,slot:eh,defaultTag:"div",features:eO,visible:em,name:"Tabs.Panel"}):et.createElement(ed._,{as:"span","aria-hidden":"true",...ex})})});function isTabObjectItem(n){return!!n&&"object"==typeof n&&"label"in n}function Tab({children:n,...a}){return(0,B.jsx)(ej.Panel,{...a,className:"nx-rounded nx-pt-6",children:n})}var eC=Object.assign(function({items:n,selectedIndex:a,defaultIndex:g=0,onChange:v,children:j,storageKey:z}){let[W,K]=(0,et.useState)(g);(0,et.useEffect)(()=>{void 0!==a&&K(a)},[a]),(0,et.useEffect)(()=>{if(!z)return;function fn(n){n.key===z&&K(Number(n.newValue))}let n=Number(localStorage.getItem(z));return K(Number.isNaN(n)?0:n),window.addEventListener("storage",fn),()=>{window.removeEventListener("storage",fn)}},[]);let ee=(0,et.useCallback)(n=>{if(z){let a=String(n);localStorage.setItem(z,a),window.dispatchEvent(new StorageEvent("storage",{key:z,newValue:a}));return}K(n),v?.(n)},[]);return(0,B.jsxs)(ej.Group,{selectedIndex:W,defaultIndex:g,onChange:ee,children:[(0,B.jsx)("div",{className:"nextra-scrollbar nx-overflow-x-auto nx-overflow-y-hidden nx-overscroll-x-contain",children:(0,B.jsx)(ej.List,{className:"nx-mt-4 nx-flex nx-w-max nx-min-w-full nx-border-b nx-border-gray-200 nx-pb-px dark:nx-border-neutral-800",children:n.map((n,a)=>{let g=isTabObjectItem(n)&&n.disabled;return(0,B.jsx)(ej,{disabled:g,className:({selected:n})=>(0,H.Z)("nx-mr-2 nx-rounded-t nx-p-2 nx-font-medium nx-leading-5 nx-transition-colors","-nx-mb-0.5 nx-select-none nx-border-b-2",n?"nx-border-primary-500 nx-text-primary-600":"nx-border-transparent nx-text-gray-600 hover:nx-border-gray-200 hover:nx-text-black dark:nx-text-gray-200 dark:hover:nx-border-neutral-800 dark:hover:nx-text-white",g&&"nx-pointer-events-none nx-text-gray-400 dark:nx-text-neutral-600"),children:isTabObjectItem(n)?n.label:n},a)})})}),(0,B.jsx)(ej.Panels,{children:j})]})},{displayName:"Tabs",Tab}),Td=({className:n="",...a})=>(0,B.jsx)("td",{className:(0,H.Z)("nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 dark:nx-border-gray-600",n),...a}),Table=({className:n="",...a})=>(0,B.jsx)("table",{className:(0,H.Z)("nx-block nx-overflow-x-scroll",n),...a}),Th=({className:n="",...a})=>(0,B.jsx)("th",{className:(0,H.Z)("nx-m-0 nx-border nx-border-gray-300 nx-px-4 nx-py-2 nx-font-semibold dark:nx-border-gray-600",n),...a}),Tr=({className:n="",...a})=>(0,B.jsx)("tr",{className:(0,H.Z)("nx-m-0 nx-border-t nx-border-gray-300 nx-p-0 dark:nx-border-gray-600","even:nx-bg-gray-100 even:dark:nx-bg-gray-600/20",n),...a}),eP=g(9517),eE=g.n(eP),eI={cards:(0,H.Z)("nextra-cards nx-mt-4 nx-gap-4 nx-grid","nx-not-prose"),card:(0,H.Z)("nextra-card nx-group nx-flex nx-flex-col nx-justify-start nx-overflow-hidden nx-rounded-lg nx-border nx-border-gray-200","nx-text-current nx-no-underline dark:nx-shadow-none","hover:nx-shadow-gray-100 dark:hover:nx-shadow-none nx-shadow-gray-100","active:nx-shadow-sm active:nx-shadow-gray-200","nx-transition-all nx-duration-200 hover:nx-border-gray-300"),title:(0,H.Z)("nx-flex nx-font-semibold nx-items-start nx-gap-2 nx-p-4 nx-text-gray-700 hover:nx-text-gray-900")},eT=(0,B.jsx)("span",{className:"nx-transition-transform nx-duration-75 group-hover:nx-translate-x-[2px]",children:"→"});Object.assign(function({children:n,num:a=3,className:g,style:v,...j}){return(0,B.jsx)("div",{className:(0,H.Z)(eI.cards,g),...j,style:{...v,"--rows":a},children:n})},{displayName:"Cards",Card:function({children:n,title:a,icon:g,image:v,arrow:j,href:z,...W}){let K=j?eT:null;return v?(0,B.jsxs)(eE(),{href:z,className:(0,H.Z)(eI.card,"nx-bg-gray-100 nx-shadow dark:nx-border-neutral-700 dark:nx-bg-neutral-800 dark:nx-text-gray-50 hover:nx-shadow-lg dark:hover:nx-border-neutral-500 dark:hover:nx-bg-neutral-700"),...W,children:[n,(0,B.jsxs)("span",{className:(0,H.Z)(eI.title,"dark:nx-text-gray-300 dark:hover:nx-text-gray-100"),children:[g,(0,B.jsxs)("span",{className:"nx-flex nx-gap-1",children:[a,K]})]})]}):(0,B.jsx)(eE(),{href:z,className:(0,H.Z)(eI.card,"nx-bg-transparent nx-shadow-sm dark:nx-border-neutral-800 hover:nx-bg-slate-50 hover:nx-shadow-md dark:hover:nx-border-neutral-700 dark:hover:nx-bg-neutral-900"),...W,children:(0,B.jsxs)("span",{className:(0,H.Z)(eI.title,"dark:nx-text-neutral-200 dark:hover:nx-text-neutral-50 nx-flex nx-items-center"),children:[g,a,K]})})}});var eM=(0,et.createContext)(0);function useIndent(){return(0,et.useContext)(eM)}function Ident(){let n=useIndent();return(0,B.jsx)(B.Fragment,{children:Array.from({length:n},(n,a)=>(0,B.jsx)("span",{className:"nx-w-5"},a))})}var eA=(0,et.memo)(({label:n,name:a,open:g,children:v,defaultOpen:j=!1,onToggle:z})=>{let H=useIndent(),[W,K]=(0,et.useState)(j),ee=(0,et.useCallback)(()=>{z?.(!W),K(!W)},[W,z]),er=void 0===g?W:g;return(0,B.jsxs)("li",{className:"nx-flex nx-list-none nx-flex-col",children:[(0,B.jsxs)("button",{onClick:ee,title:a,className:"nx-inline-flex nx-cursor-pointer nx-items-center nx-py-1 hover:nx-opacity-60",children:[(0,B.jsx)(Ident,{}),(0,B.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",children:(0,B.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:er?"M5 19a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h4l2 2h4a2 2 0 0 1 2 2v1M5 19h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2Z":"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2Z"})}),(0,B.jsx)("span",{className:"nx-ml-1",children:n??a})]}),er&&(0,B.jsx)("ul",{children:(0,B.jsx)(eM.Provider,{value:H+1,children:v})})]})});eA.displayName="Folder";var eN=(0,et.memo)(({label:n,name:a,active:g})=>(0,B.jsx)("li",{className:(0,H.Z)("nx-flex nx-list-none",g&&"nx-text-primary-600 contrast-more:nx-underline"),children:(0,B.jsxs)("span",{className:"nx-inline-flex nx-cursor-default nx-items-center nx-py-1",children:[(0,B.jsx)(Ident,{}),(0,B.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",children:(0,B.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.586a1 1 0 0 1 .707.293l5.414 5.414a1 1 0 0 1 .293.707V19a2 2 0 0 1-2 2Z"})}),(0,B.jsx)("span",{className:"nx-ml-1",children:n??a})]})}));eN.displayName="File",Object.assign(function({children:n}){return(0,B.jsx)("div",{className:(0,H.Z)("nextra-filetree nx-mt-6 nx-select-none nx-text-sm nx-text-gray-800 dark:nx-text-gray-300","nx-not-prose"),children:(0,B.jsx)("div",{className:"nx-inline-block nx-rounded-lg nx-border nx-px-4 nx-py-2 dark:nx-border-neutral-800",children:n})})},{Folder:eA,File:eN})},2766:function(n,a,g){"use strict";g.d(a,{LZ:function(){return ArrowRightIcon},nQ:function(){return CheckIcon},TI:function(){return CopyIcon},D7:function(){return DiscordIcon},Qq:function(){return ExpandIcon},fy:function(){return GitHubIcon},n9:function(){return GlobeIcon},AV:function(){return InformationCircleIcon},Oq:function(){return MenuIcon},kL:function(){return MoonIcon},L4:function(){return SpinnerIcon},NW:function(){return SunIcon},NK:function(){return WordWrapIcon},b0:function(){return XIcon}});var v=g(2676);function ArrowRightIcon({pathClassName:n,...a}){return(0,v.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...a,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7",className:n})})}function CheckIcon(n){return(0,v.jsx)("svg",{viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}function CopyIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",...n,children:[(0,v.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,v.jsx)("path",{d:"M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function DiscordIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 5 30.67 23.25",...n,children:[(0,v.jsx)("title",{children:"Discord"}),(0,v.jsx)("path",{d:"M26.0015 6.9529C24.0021 6.03845 21.8787 5.37198 19.6623 5C19.3833 5.48048 19.0733 6.13144 18.8563 6.64292C16.4989 6.30193 14.1585 6.30193 11.8336 6.64292C11.6166 6.13144 11.2911 5.48048 11.0276 5C8.79575 5.37198 6.67235 6.03845 4.6869 6.9529C0.672601 12.8736 -0.41235 18.6548 0.130124 24.3585C2.79599 26.2959 5.36889 27.4739 7.89682 28.2489C8.51679 27.4119 9.07477 26.5129 9.55525 25.5675C8.64079 25.2265 7.77283 24.808 6.93587 24.312C7.15286 24.1571 7.36986 23.9866 7.57135 23.8161C12.6241 26.1255 18.0969 26.1255 23.0876 23.8161C23.3046 23.9866 23.5061 24.1571 23.7231 24.312C22.8861 24.808 22.0182 25.2265 21.1037 25.5675C21.5842 26.5129 22.1422 27.4119 22.7621 28.2489C25.2885 27.4739 27.8769 26.2959 30.5288 24.3585C31.1952 17.7559 29.4733 12.0212 26.0015 6.9529ZM10.2527 20.8402C8.73376 20.8402 7.49382 19.4608 7.49382 17.7714C7.49382 16.082 8.70276 14.7025 10.2527 14.7025C11.7871 14.7025 13.0425 16.082 13.0115 17.7714C13.0115 19.4608 11.7871 20.8402 10.2527 20.8402ZM20.4373 20.8402C18.9183 20.8402 17.6768 19.4608 17.6768 17.7714C17.6768 16.082 18.8873 14.7025 20.4373 14.7025C21.9717 14.7025 23.2271 16.082 23.1961 17.7714C23.1961 19.4608 21.9872 20.8402 20.4373 20.8402Z"})]})}function ExpandIcon({isOpen:n,...a}){return(0,v.jsxs)("svg",{height:"12",width:"12",viewBox:"0 0 16 16",fill:"currentColor",...a,children:[(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.177 7.823l2.396-2.396A.25.25 0 017 5.604v4.792a.25.25 0 01-.427.177L4.177 8.177a.25.25 0 010-.354z",className:n?"":"nx-origin-[35%] nx-rotate-180"}),(0,v.jsx)("path",{fillRule:"evenodd",d:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm1.75-.25a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25H9.5v-13H1.75zm12.5 13H11v-13h3.25a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25z"})]})}function GitHubIcon(n){return(0,v.jsxs)("svg",{width:"24",height:"24",fill:"currentColor",viewBox:"3 3 18 18",...n,children:[(0,v.jsx)("title",{children:"GitHub"}),(0,v.jsx)("path",{d:"M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"})]})}function GlobeIcon(n){return(0,v.jsx)("svg",{viewBox:"2 2 16 16",width:"12",height:"12",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",clipRule:"evenodd"})})}function InformationCircleIcon(n){return(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",width:"20",height:"20",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"})})}function MenuIcon(n){return(0,v.jsxs)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:[(0,v.jsx)("g",{children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16"})}),(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 12h16"}),(0,v.jsx)("g",{children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 18h16"})})]})}function MoonIcon(n){return(0,v.jsx)("svg",{fill:"none",viewBox:"2 2 20 20",width:"12",height:"12",stroke:"currentColor",...n,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",fill:"currentColor",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}function SpinnerIcon(n){return(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24",...n,children:[(0,v.jsx)("circle",{className:"nx-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,v.jsx)("path",{className:"nx-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function SunIcon(n){return(0,v.jsx)("svg",{fill:"none",viewBox:"3 3 18 18",width:"12",height:"12",stroke:"currentColor",...n,children:(0,v.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",fill:"currentColor",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})})}function WordWrapIcon(n){return(0,v.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",...n,children:(0,v.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}function XIcon(n){return(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",...n,children:(0,v.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}},8745:function(n,a,g){"use strict";g.d(a,{Z:function(){return MDXProvider},a:function(){return mdx_useMDXComponents}});var v=g(5271);let j=v.createContext({});function useMDXComponents(n){let a=v.useContext(j);return v.useMemo(()=>"function"==typeof n?n(a):{...a,...n},[a,n])}let z={};function MDXProvider({components:n,children:a,disableParentContext:g}){let H;return H=g?"function"==typeof n?n({}):n||z:useMDXComponents(n),v.createElement(j.Provider,{value:H},a)}var H=g(1939),B=g.n(H),W={img:n=>(0,v.createElement)("object"==typeof n.src?B():"img",n)},mdx_useMDXComponents=n=>useMDXComponents({...W,...n})},5182:function(n,a,g){"use strict";var v=g(6097);n.exports=function(n){var a={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:n,query:{},parse_failed:!1};try{var g=new URL(n);a.protocols=v(g),a.protocol=a.protocols[0],a.port=g.port,a.resource=g.hostname,a.host=g.host,a.user=g.username||"",a.password=g.password||"",a.pathname=g.pathname,a.hash=g.hash.slice(1),a.search=g.search.slice(1),a.href=g.href,a.query=Object.fromEntries(g.searchParams)}catch(g){a.protocols=["file"],a.protocol=a.protocols[0],a.port="",a.resource="",a.user="",a.pathname="",a.hash="",a.search="",a.href=n,a.query={},a.parse_failed=!0}return a}},8593:function(n,a,g){"use strict";var v=g(5182),j=v&&"object"==typeof v&&"default"in v?v:{default:v};let testParameter=(n,a)=>a.some(a=>a instanceof RegExp?a.test(n):a===n),normalizeDataURL=(n,{stripHash:a})=>{let g=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(n);if(!g)throw Error(`Invalid URL: ${n}`);let{type:v,data:j,hash:z}=g.groups,H=v.split(";");z=a?"":z;let B=!1;"base64"===H[H.length-1]&&(H.pop(),B=!0);let W=(H.shift()||"").toLowerCase(),K=H.map(n=>{let[a,g=""]=n.split("=").map(n=>n.trim());return"charset"===a&&"us-ascii"===(g=g.toLowerCase())?"":`${a}${g?`=${g}`:""}`}).filter(Boolean),ee=[...K];return B&&ee.push("base64"),(ee.length>0||W&&"text/plain"!==W)&&ee.unshift(W),`data:${ee.join(";")},${B?j.trim():j}${z?`#${z}`:""}`},parseUrl=(n,a=!1)=>{let throwErr=a=>{let g=Error(a);throw g.subject_url=n,g};"string"==typeof n&&n.trim()||throwErr("Invalid url."),n.length>parseUrl.MAX_INPUT_LENGTH&&throwErr("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),a&&("object"!=typeof a&&(a={stripHash:!1}),n=function(n,a){if(a={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...a},n=n.trim(),/^data:/i.test(n))return normalizeDataURL(n,a);if(/^view-source:/i.test(n))throw Error("`view-source:` is not supported as it is a non-standard protocol");let g=n.startsWith("//"),v=!g&&/^\.*\//.test(n);v||(n=n.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,a.defaultProtocol));let j=new URL(n);if(a.forceHttp&&a.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(a.forceHttp&&"https:"===j.protocol&&(j.protocol="http:"),a.forceHttps&&"http:"===j.protocol&&(j.protocol="https:"),a.stripAuthentication&&(j.username="",j.password=""),a.stripHash?j.hash="":a.stripTextFragment&&(j.hash=j.hash.replace(/#?:~:text.*?$/i,"")),j.pathname){let n=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,a=0,g="";for(;;){let v=n.exec(j.pathname);if(!v)break;let z=v[0],H=v.index,B=j.pathname.slice(a,H);g+=B.replace(/\/{2,}/g,"/")+z,a=H+z.length}let v=j.pathname.slice(a,j.pathname.length);g+=v.replace(/\/{2,}/g,"/"),j.pathname=g}if(j.pathname)try{j.pathname=decodeURI(j.pathname)}catch{}if(!0===a.removeDirectoryIndex&&(a.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(a.removeDirectoryIndex)&&a.removeDirectoryIndex.length>0){let n=j.pathname.split("/"),g=n[n.length-1];testParameter(g,a.removeDirectoryIndex)&&(n=n.slice(0,-1),j.pathname=n.slice(1).join("/")+"/")}if(j.hostname&&(j.hostname=j.hostname.replace(/\.$/,""),a.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(j.hostname)&&(j.hostname=j.hostname.replace(/^www\./,""))),Array.isArray(a.removeQueryParameters))for(let n of[...j.searchParams.keys()])testParameter(n,a.removeQueryParameters)&&j.searchParams.delete(n);if(!0===a.removeQueryParameters&&(j.search=""),a.sortQueryParameters){j.searchParams.sort();try{j.search=decodeURIComponent(j.search)}catch{}}a.removeTrailingSlash&&(j.pathname=j.pathname.replace(/\/$/,""));let z=n;return n=j.toString(),a.removeSingleSlash||"/"!==j.pathname||z.endsWith("/")||""!==j.hash||(n=n.replace(/\/$/,"")),(a.removeTrailingSlash||"/"===j.pathname)&&""===j.hash&&a.removeSingleSlash&&(n=n.replace(/\/$/,"")),g&&!a.normalizeProtocol&&(n=n.replace(/^http:\/\//,"//")),a.stripProtocol&&(n=n.replace(/^(?:https?:)?\/\//,"")),n}(n,a));let g=j.default(n);if(g.parse_failed){let n=g.href.match(/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/);n?(g.protocols=["ssh"],g.protocol="ssh",g.resource=n[2],g.host=n[2],g.user=n[1],g.pathname=`/${n[3]}`,g.parse_failed=!1):throwErr("URL parsing failed.")}return g};parseUrl.MAX_INPUT_LENGTH=2048,n.exports=parseUrl},6097:function(n){"use strict";n.exports=function(n,a){!0===a&&(a=0);var g="";if("string"==typeof n)try{g=new URL(n).protocol}catch(n){}else n&&n.constructor===URL&&(g=n.protocol);var v=g.split(/\:|\+/).filter(Boolean);return"number"==typeof a?v[a]:v}},2601:function(n){var a={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},g=Object.keys(a).join("|"),v=RegExp(g,"g"),j=RegExp(g,"");function matcher(n){return a[n]}var removeAccents=function(n){return n.replace(v,matcher)};n.exports=removeAccents,n.exports.has=function(n){return!!n.match(j)},n.exports.remove=removeAccents},5184:function(){},4327:function(n,a,g){"use strict";g.d(a,{R:function(){return j}});var v,j=((v=j||{}).Space=" ",v.Enter="Enter",v.Escape="Escape",v.Backspace="Backspace",v.Delete="Delete",v.ArrowLeft="ArrowLeft",v.ArrowUp="ArrowUp",v.ArrowRight="ArrowRight",v.ArrowDown="ArrowDown",v.Home="Home",v.End="End",v.PageUp="PageUp",v.PageDown="PageDown",v.Tab="Tab",v)},9140:function(n,a,g){"use strict";g.d(a,{z:function(){return o}});var v=g(5271),j=g(121);let o=function(n){let a=(0,j.E)(n);return v.useCallback((...n)=>a.current(...n),[a])}},2410:function(n,a,g){"use strict";g.d(a,{M:function(){return W}});var v,j=g(5271),z=g(5350),H=g(93),B=g(1963);let W=null!=(v=j.useId)?v:function(){let n=(0,B.H)(),[a,g]=j.useState(n?()=>z.O.nextId():null);return(0,H.e)(()=>{null===a&&g(z.O.nextId())},[a]),null!=a?""+a:void 0}},8656:function(n,a,g){"use strict";g.d(a,{t:function(){return f}});var v=g(5271),j=g(93);function f(){let n=(0,v.useRef)(!1);return(0,j.e)(()=>(n.current=!0,()=>{n.current=!1}),[]),n}},93:function(n,a,g){"use strict";g.d(a,{e:function(){return l}});var v=g(5271),j=g(5350);let l=(n,a)=>{j.O.isServer?(0,v.useEffect)(n,a):(0,v.useLayoutEffect)(n,a)}},121:function(n,a,g){"use strict";g.d(a,{E:function(){return s}});var v=g(5271),j=g(93);function s(n){let a=(0,v.useRef)(n);return(0,j.e)(()=>{a.current=n},[n]),a}},2412:function(n,a,g){"use strict";g.d(a,{f:function(){return T}});var v=g(5271),j=g(93);function i(n){var a;if(n.type)return n.type;let g=null!=(a=n.as)?a:"button";if("string"==typeof g&&"button"===g.toLowerCase())return"button"}function T(n,a){let[g,z]=(0,v.useState)(()=>i(n));return(0,j.e)(()=>{z(i(n))},[n.type,n.as]),(0,j.e)(()=>{g||a.current&&a.current instanceof HTMLButtonElement&&!a.current.hasAttribute("type")&&z("button")},[g,a]),g}},1963:function(n,a,g){"use strict";g.d(a,{H:function(){return l}});var v,j=g(5271),z=g(5350);function l(){let n;let a=(n="undefined"==typeof document,(0,(v||(v=g.t(j,2))).useSyncExternalStore)(()=>()=>{},()=>!1,()=>!n)),[H,B]=j.useState(z.O.isHandoffComplete);return H&&!1===z.O.isHandoffComplete&&B(!1),j.useEffect(()=>{!0!==H&&B(!0)},[H]),j.useEffect(()=>z.O.handoff(),[]),!a&&H}},3142:function(n,a,g){"use strict";g.d(a,{T:function(){return y}});var v=g(5271),j=g(9140);let z=Symbol();function y(...n){let a=(0,v.useRef)(n);(0,v.useEffect)(()=>{a.current=n},[n]);let g=(0,j.z)(n=>{for(let g of a.current)null!=g&&("function"==typeof g?g(n):g.current=n)});return n.every(n=>null==n||(null==n?void 0:n[z]))?void 0:g}},4538:function(n,a,g){"use strict";g.d(a,{A:function(){return z},_:function(){return H}});var v,j=g(2184),z=((v=z||{})[v.None=1]="None",v[v.Focusable=2]="Focusable",v[v.Hidden=4]="Hidden",v);let H=(0,j.yV)(function(n,a){var g;let{features:v=1,...z}=n,H={ref:a,"aria-hidden":(2&v)==2||(null!=(g=z["aria-hidden"])?g:void 0),hidden:(4&v)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&v)==4&&(2&v)!=2&&{display:"none"}}};return(0,j.sY)({ourProps:H,theirProps:z,slot:{},defaultTag:"div",name:"Hidden"})})},9363:function(n,a,g){"use strict";function t(...n){return Array.from(new Set(n.flatMap(n=>"string"==typeof n?n.split(" "):[]))).filter(Boolean).join(" ")}g.d(a,{A:function(){return t}})},3465:function(n,a,g){"use strict";g.d(a,{k:function(){return function o(){let n=[],a={addEventListener:(n,g,v,j)=>(n.addEventListener(g,v,j),a.add(()=>n.removeEventListener(g,v,j))),requestAnimationFrame(...n){let g=requestAnimationFrame(...n);return a.add(()=>cancelAnimationFrame(g))},nextFrame:(...n)=>a.requestAnimationFrame(()=>a.requestAnimationFrame(...n)),setTimeout(...n){let g=setTimeout(...n);return a.add(()=>clearTimeout(g))},microTask(...n){let g={current:!0};return(0,v.Y)(()=>{g.current&&n[0]()}),a.add(()=>{g.current=!1})},style(n,a,g){let v=n.style.getPropertyValue(a);return Object.assign(n.style,{[a]:g}),this.add(()=>{Object.assign(n.style,{[a]:v})})},group(n){let a=o();return n(a),this.add(()=>a.dispose())},add:a=>(n.push(a),()=>{let g=n.indexOf(a);if(g>=0)for(let a of n.splice(g,1))a()}),dispose(){for(let a of n.splice(0))a()}};return a}}});var v=g(616)},5350:function(n,a,g){"use strict";g.d(a,{O:function(){return j}});var v=Object.defineProperty,d=(n,a,g)=>a in n?v(n,a,{enumerable:!0,configurable:!0,writable:!0,value:g}):n[a]=g,r=(n,a,g)=>(d(n,"symbol"!=typeof a?a+"":a,g),g);let j=new class{constructor(){r(this,"current",this.detect()),r(this,"handoffState","pending"),r(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}}},4830:function(n,a,g){"use strict";g.d(a,{EO:function(){return _},TO:function(){return er},fE:function(){return en},jA:function(){return O},sP:function(){return h},tJ:function(){return ei},wI:function(){return D},z2:function(){return I}});var v,j,z,H,B,W=g(3465),K=g(2549),ee=g(4832);let et=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var er=((v=er||{})[v.First=1]="First",v[v.Previous=2]="Previous",v[v.Next=4]="Next",v[v.Last=8]="Last",v[v.WrapAround=16]="WrapAround",v[v.NoScroll=32]="NoScroll",v),en=((j=en||{})[j.Error=0]="Error",j[j.Overflow=1]="Overflow",j[j.Success=2]="Success",j[j.Underflow=3]="Underflow",j),eo=((z=eo||{})[z.Previous=-1]="Previous",z[z.Next=1]="Next",z);function f(n=document.body){return null==n?[]:Array.from(n.querySelectorAll(et)).sort((n,a)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(a.tabIndex||Number.MAX_SAFE_INTEGER)))}var ei=((H=ei||{})[H.Strict=0]="Strict",H[H.Loose=1]="Loose",H);function h(n,a=0){var g;return n!==(null==(g=(0,ee.r)(n))?void 0:g.body)&&(0,K.E)(a,{0:()=>n.matches(et),1(){let a=n;for(;null!==a;){if(a.matches(et))return!0;a=a.parentElement}return!1}})}function D(n){let a=(0,ee.r)(n);(0,W.k)().nextFrame(()=>{a&&!h(a.activeElement,0)&&(null==n||n.focus({preventScroll:!0}))})}var es=((B=es||{})[B.Keyboard=0]="Keyboard",B[B.Mouse=1]="Mouse",B);function I(n,a=n=>n){return n.slice().sort((n,g)=>{let v=a(n),j=a(g);if(null===v||null===j)return 0;let z=v.compareDocumentPosition(j);return z&Node.DOCUMENT_POSITION_FOLLOWING?-1:z&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _(n,a){return O(f(),a,{relativeTo:n})}function O(n,a,{sorted:g=!0,relativeTo:v=null,skipElements:j=[]}={}){var z,H,B;let W=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,K=Array.isArray(n)?g?I(n):n:f(n);j.length>0&&K.length>1&&(K=K.filter(n=>!j.includes(n))),v=null!=v?v:W.activeElement;let ee=(()=>{if(5&a)return 1;if(10&a)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),et=(()=>{if(1&a)return 0;if(2&a)return Math.max(0,K.indexOf(v))-1;if(4&a)return Math.max(0,K.indexOf(v))+1;if(8&a)return K.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),er=32&a?{preventScroll:!0}:{},en=0,eo=K.length,ei;do{if(en>=eo||en+eo<=0)return 0;let n=et+en;if(16&a)n=(n+eo)%eo;else{if(n<0)return 3;if(n>=eo)return 1}null==(ei=K[n])||ei.focus(er),en+=ee}while(ei!==W.activeElement);return 6&a&&null!=(B=null==(H=null==(z=ei)?void 0:z.matches)?void 0:H.call(z,"textarea,input"))&&B&&ei.select(),2}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{1===n.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===n.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0))},2549:function(n,a,g){"use strict";function u(n,a,...g){if(n in a){let v=a[n];return"function"==typeof v?v(...g):v}let v=Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(v,u),v}g.d(a,{E:function(){return u}})},616:function(n,a,g){"use strict";function t(n){"function"==typeof queueMicrotask?queueMicrotask(n):Promise.resolve().then(n).catch(n=>setTimeout(()=>{throw n}))}g.d(a,{Y:function(){return t}})},4832:function(n,a,g){"use strict";g.d(a,{r:function(){return o}});var v=g(5350);function o(n){return v.O.isServer?null:n instanceof Node?n.ownerDocument:null!=n&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}},2184:function(n,a,g){"use strict";g.d(a,{AN:function(){return W},l4:function(){return K},oA:function(){return x},sY:function(){return C},yV:function(){return U}});var v,j,z=g(5271),H=g(9363),B=g(2549),W=((v=W||{})[v.None=0]="None",v[v.RenderStrategy=1]="RenderStrategy",v[v.Static=2]="Static",v),K=((j=K||{})[j.Unmount=0]="Unmount",j[j.Hidden=1]="Hidden",j);function C({ourProps:n,theirProps:a,slot:g,defaultTag:v,features:j,visible:z=!0,name:H,mergeRefs:W}){W=null!=W?W:k;let K=R(a,n);if(z)return m(K,g,v,H,W);let ee=null!=j?j:0;if(2&ee){let{static:n=!1,...a}=K;if(n)return m(a,g,v,H,W)}if(1&ee){let{unmount:n=!0,...a}=K;return(0,B.E)(n?0:1,{0:()=>null,1:()=>m({...a,hidden:!0,style:{display:"none"}},g,v,H,W)})}return m(K,g,v,H,W)}function m(n,a={},g,v,j){let{as:B=g,children:W,refName:K="ref",...ee}=F(n,["unmount","static"]),et=void 0!==n.ref?{[K]:n.ref}:{},er="function"==typeof W?W(a):W;"className"in ee&&ee.className&&"function"==typeof ee.className&&(ee.className=ee.className(a));let en={};if(a){let n=!1,g=[];for(let[v,j]of Object.entries(a))"boolean"==typeof j&&(n=!0),!0===j&&g.push(v);n&&(en["data-headlessui-state"]=g.join(" "))}if(B===z.Fragment&&Object.keys(x(ee)).length>0){if(!(0,z.isValidElement)(er)||Array.isArray(er)&&er.length>1)throw Error(['Passing props on "Fragment"!',"",`The current component <${v} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ee).map(n=>` - ${n}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(n=>` - ${n}`).join(` `)].join(` `));let n=er.props,a="function"==typeof(null==n?void 0:n.className)?(...a)=>(0,H.A)(null==n?void 0:n.className(...a),ee.className):(0,H.A)(null==n?void 0:n.className,ee.className),g=a?{className:a}:{};return(0,z.cloneElement)(er,Object.assign({},R(er.props,x(F(ee,["ref"]))),en,et,{ref:j(er.ref,et.ref)},g))}return(0,z.createElement)(B,Object.assign({},F(ee,["ref"]),B!==z.Fragment&&et,B!==z.Fragment&&en),er)}function k(...n){return n.every(n=>null==n)?void 0:a=>{for(let g of n)null!=g&&("function"==typeof g?g(a):g.current=a)}}function R(...n){if(0===n.length)return{};if(1===n.length)return n[0];let a={},g={};for(let v of n)for(let n in v)n.startsWith("on")&&"function"==typeof v[n]?(null!=g[n]||(g[n]=[]),g[n].push(v[n])):a[n]=v[n];if(a.disabled||a["aria-disabled"])return Object.assign(a,Object.fromEntries(Object.keys(g).map(n=>[n,void 0])));for(let n in g)Object.assign(a,{[n](a,...v){for(let j of g[n]){if((a instanceof Event||(null==a?void 0:a.nativeEvent)instanceof Event)&&a.defaultPrevented)return;j(a,...v)}}});return a}function U(n){var a;return Object.assign((0,z.forwardRef)(n),{displayName:null!=(a=n.displayName)?a:n.name})}function x(n){let a=Object.assign({},n);for(let n in a)void 0===a[n]&&delete a[n];return a}function F(n,a=[]){let g=Object.assign({},n);for(let n of a)n in g&&delete g[n];return g}},4814:function(n,a,g){"use strict";a.Z=function(){for(var n,a,g=0,v="",j=arguments.length;g0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides.mdx",route:"/guides",timestamp:1730928152e3,title:"Guias",headings:d},pageNextRoute:"/guides"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7846)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5874],{7846:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides",function(){return i(1303)}])},1303:function(e,n,i){"use strict";i.r(n),i.d(n,{__toc:function(){return d}});var s=i(2676),t=i(2140),r=i(8745);let d=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Guias"}),"\n",(0,s.jsx)(n.p,{children:"Guias gerais para trabalhar com recursos."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./guides/git",children:"Git"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./guides/nodejs",children:"NodeJS"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./guides/pnpm",children:"PNPM"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./guides/types",children:"Ox Types"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"./guides/vscode",children:"Visual Studio Code"})}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides.mdx",route:"/guides",timestamp:1730940204e3,title:"Guias",headings:d},pageNextRoute:"/guides"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7846)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/guides/git-fe60e1c26d20aaaf.js b/_next/static/chunks/pages/guides/git-23a2084072d62aed.js similarity index 96% rename from _next/static/chunks/pages/guides/git-fe60e1c26d20aaaf.js rename to _next/static/chunks/pages/guides/git-23a2084072d62aed.js index d487844579..29e80d52bb 100644 --- a/_next/static/chunks/pages/guides/git-fe60e1c26d20aaaf.js +++ b/_next/static/chunks/pages/guides/git-23a2084072d62aed.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6730],{7444:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/git",function(){return a(149)}])},149:function(e,t,a){"use strict";a.r(t),a.d(t,{__toc:function(){return i}});var s=a(2676),n=a(2140),r=a(8745);let i=[];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{children:"Git"}),"\n",(0,s.jsx)(t.p,{children:"Git \xe9 um sistema de controle de vers\xe3o, permitindo que mudan\xe7as sejam rastreadas, mescladas e revertidas de maneira eficaz."}),"\n",(0,s.jsx)(t.p,{children:"Como nossos recursos est\xe3o hospedados no GitHub, pode ser muito \xfatil aprender a criar seu pr\xf3prio reposit\xf3rio para acompanhar as altera\xe7\xf5es e se manter atualizado. Se voc\xea planeja fazer suas pr\xf3prias mudan\xe7as em nossos recursos, isso permitir\xe1 que voc\xea mantenha suas altera\xe7\xf5es sem risco de perda de dados."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Consulte o ",(0,s.jsx)(t.a,{href:"https://docs.github.com/pt/get-started/quickstart/set-up-git#setting-up-git",children:"guia do GitHub para configurar o Git"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["Voc\xea pode usar um cliente GUI para Git, como o ",(0,s.jsx)(t.a,{href:"https://www.gitkraken.com/",children:"GitKraken"}),", para melhorar seu fluxo de trabalho e manter as mudan\xe7as de forma mais f\xe1cil."]}),"\n"]})]})}t.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,r.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/git.mdx",route:"/guides/git",timestamp:1730928152e3,title:"Git",headings:i},pageNextRoute:"/guides/git"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7444)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6730],{7444:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/git",function(){return a(149)}])},149:function(e,t,a){"use strict";a.r(t),a.d(t,{__toc:function(){return i}});var s=a(2676),n=a(2140),r=a(8745);let i=[];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{children:"Git"}),"\n",(0,s.jsx)(t.p,{children:"Git \xe9 um sistema de controle de vers\xe3o, permitindo que mudan\xe7as sejam rastreadas, mescladas e revertidas de maneira eficaz."}),"\n",(0,s.jsx)(t.p,{children:"Como nossos recursos est\xe3o hospedados no GitHub, pode ser muito \xfatil aprender a criar seu pr\xf3prio reposit\xf3rio para acompanhar as altera\xe7\xf5es e se manter atualizado. Se voc\xea planeja fazer suas pr\xf3prias mudan\xe7as em nossos recursos, isso permitir\xe1 que voc\xea mantenha suas altera\xe7\xf5es sem risco de perda de dados."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Consulte o ",(0,s.jsx)(t.a,{href:"https://docs.github.com/pt/get-started/quickstart/set-up-git#setting-up-git",children:"guia do GitHub para configurar o Git"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["Voc\xea pode usar um cliente GUI para Git, como o ",(0,s.jsx)(t.a,{href:"https://www.gitkraken.com/",children:"GitKraken"}),", para melhorar seu fluxo de trabalho e manter as mudan\xe7as de forma mais f\xe1cil."]}),"\n"]})]})}t.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,r.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/git.mdx",route:"/guides/git",timestamp:1730940204e3,title:"Git",headings:i},pageNextRoute:"/guides/git"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7444)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/guides/nodejs-c4f4fdfaaaafd600.js b/_next/static/chunks/pages/guides/nodejs-658dc4bc9de75cf4.js similarity index 96% rename from _next/static/chunks/pages/guides/nodejs-c4f4fdfaaaafd600.js rename to _next/static/chunks/pages/guides/nodejs-658dc4bc9de75cf4.js index afd86cdf50..18980228e2 100644 --- a/_next/static/chunks/pages/guides/nodejs-c4f4fdfaaaafd600.js +++ b/_next/static/chunks/pages/guides/nodejs-658dc4bc9de75cf4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8679],{2220:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/nodejs",function(){return t(3461)}])},3461:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return r}});var o=t(2676),s=t(2140),i=t(8745);let r=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code"},(0,i.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Node.js"}),"\n",(0,o.jsx)(n.p,{children:"Node.js \xe9 um runtime de JavaScript utilizado para criar aplica\xe7\xf5es. No contexto do FiveM, ele \xe9 necess\xe1rio para agrupar recursos em um \xfanico pacote que pode ser executado tanto no servidor quanto no cliente."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://nodejs.org",children:"Baixe"})," e instale a vers\xe3o LTS do Node.js."]}),"\n",(0,o.jsx)(n.li,{children:"Abra um terminal de linha de comando (ex.: Terminal, Prompt de Comando)."}),"\n",(0,o.jsxs)(n.li,{children:["Digite ",(0,o.jsx)(n.code,{children:"node --version"})," para confirmar a instala\xe7\xe3o com sucesso."]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/nodejs.mdx",route:"/guides/nodejs",frontMatter:{title:"Node.js"},timestamp:1730928152e3,title:"Node.js",headings:r},pageNextRoute:"/guides/nodejs"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2220)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8679],{2220:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/nodejs",function(){return t(3461)}])},3461:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return r}});var o=t(2676),s=t(2140),i=t(8745);let r=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code"},(0,i.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Node.js"}),"\n",(0,o.jsx)(n.p,{children:"Node.js \xe9 um runtime de JavaScript utilizado para criar aplica\xe7\xf5es. No contexto do FiveM, ele \xe9 necess\xe1rio para agrupar recursos em um \xfanico pacote que pode ser executado tanto no servidor quanto no cliente."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://nodejs.org",children:"Baixe"})," e instale a vers\xe3o LTS do Node.js."]}),"\n",(0,o.jsx)(n.li,{children:"Abra um terminal de linha de comando (ex.: Terminal, Prompt de Comando)."}),"\n",(0,o.jsxs)(n.li,{children:["Digite ",(0,o.jsx)(n.code,{children:"node --version"})," para confirmar a instala\xe7\xe3o com sucesso."]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/nodejs.mdx",route:"/guides/nodejs",frontMatter:{title:"Node.js"},timestamp:1730940204e3,title:"Node.js",headings:r},pageNextRoute:"/guides/nodejs"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2220)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/guides/pnpm-f33ca18d0ba4e258.js b/_next/static/chunks/pages/guides/pnpm-12de05e5722248b1.js similarity index 98% rename from _next/static/chunks/pages/guides/pnpm-f33ca18d0ba4e258.js rename to _next/static/chunks/pages/guides/pnpm-12de05e5722248b1.js index 2f83e13a4f..febdbd63ec 100644 --- a/_next/static/chunks/pages/guides/pnpm-f33ca18d0ba4e258.js +++ b/_next/static/chunks/pages/guides/pnpm-12de05e5722248b1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9302],{5110:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/pnpm",function(){return n(6469)}])},6469:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var i=n(2676),r=n(2140),o=n(8745);let t=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",pre:"pre",span:"span"},(0,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"pnpm"}),"\n",(0,i.jsx)(s.p,{children:"pnpm \xe9 um gerenciador de pacotes r\xe1pido e eficiente em termos de espa\xe7o em disco, sendo uma alternativa ao npm e ao yarn."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Certifique-se de ter ",(0,i.jsx)(s.a,{href:"./nodejs",children:"instalado o Node.js"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"Abra um terminal de linha de comando (ex.: Terminal, Prompt de Comando)."}),"\n",(0,i.jsxs)(s.li,{children:["Digite ",(0,i.jsx)(s.code,{children:"npm install -g pnpm"})," para instalar o pacote globalmente."]}),"\n",(0,i.jsxs)(s.li,{children:["Voc\xea pode instalar depend\xeancias com o pnpm utilizando ",(0,i.jsx)(s.code,{children:"pnpm i"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Voc\xea pode consultar os arquivos ",(0,i.jsx)(s.code,{children:"package.json"})," para os scripts dispon\xedveis, por exemplo:"]}),"\n",(0,i.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"start"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"watch"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite build --watch"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"build"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tsc && vite build"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"preview"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite preview"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"format"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier --write \\"./src/**/*.{ts,tsx,css}\\""'})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,i.jsxs)(s.p,{children:["Usando o exemplo acima, ",(0,i.jsx)(s.code,{children:"pnpm build"})," ir\xe1 rodar o script de build para o pacote fornecido."]})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/pnpm.mdx",route:"/guides/pnpm",frontMatter:{title:"pnpm"},timestamp:1730928152e3,title:"pnpm",headings:t},pageNextRoute:"/guides/pnpm"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5110)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9302],{5110:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/pnpm",function(){return n(6469)}])},6469:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var i=n(2676),r=n(2140),o=n(8745);let t=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",pre:"pre",span:"span"},(0,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"pnpm"}),"\n",(0,i.jsx)(s.p,{children:"pnpm \xe9 um gerenciador de pacotes r\xe1pido e eficiente em termos de espa\xe7o em disco, sendo uma alternativa ao npm e ao yarn."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Certifique-se de ter ",(0,i.jsx)(s.a,{href:"./nodejs",children:"instalado o Node.js"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"Abra um terminal de linha de comando (ex.: Terminal, Prompt de Comando)."}),"\n",(0,i.jsxs)(s.li,{children:["Digite ",(0,i.jsx)(s.code,{children:"npm install -g pnpm"})," para instalar o pacote globalmente."]}),"\n",(0,i.jsxs)(s.li,{children:["Voc\xea pode instalar depend\xeancias com o pnpm utilizando ",(0,i.jsx)(s.code,{children:"pnpm i"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Voc\xea pode consultar os arquivos ",(0,i.jsx)(s.code,{children:"package.json"})," para os scripts dispon\xedveis, por exemplo:"]}),"\n",(0,i.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"start"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"watch"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite build --watch"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"build"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tsc && vite build"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"preview"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite preview"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"format"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier --write \\"./src/**/*.{ts,tsx,css}\\""'})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,i.jsxs)(s.p,{children:["Usando o exemplo acima, ",(0,i.jsx)(s.code,{children:"pnpm build"})," ir\xe1 rodar o script de build para o pacote fornecido."]})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/pnpm.mdx",route:"/guides/pnpm",frontMatter:{title:"pnpm"},timestamp:1730940204e3,title:"pnpm",headings:t},pageNextRoute:"/guides/pnpm"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5110)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/guides/types-87c0fda4c54424ab.js b/_next/static/chunks/pages/guides/types-b34b94dc91de57a9.js similarity index 98% rename from _next/static/chunks/pages/guides/types-87c0fda4c54424ab.js rename to _next/static/chunks/pages/guides/types-b34b94dc91de57a9.js index 7df41f1794..c6b7b9844e 100644 --- a/_next/static/chunks/pages/guides/types-87c0fda4c54424ab.js +++ b/_next/static/chunks/pages/guides/types-b34b94dc91de57a9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[970],{2598:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/types",function(){return a(2269)}])},2269:function(e,s,a){"use strict";a.r(s),a.d(s,{__toc:function(){return r}});var n=a(2676),i=a(2140),t=a(8745),o=a(7100);let r=[{depth:3,value:"Configurar git, vscode e extens\xf5es do vscode",id:"configurar-git-vscode-e-extens\xf5es-do-vscode"},{depth:3,value:"Baixar nossas defini\xe7\xf5es de tipo Lua",id:"baixar-nossas-defini\xe7\xf5es-de-tipo-lua"},{depth:3,value:"Atualizar suas configura\xe7\xf5es",id:"atualizar-suas-configura\xe7\xf5es"}];function _createMdxContent(e){let s=Object.assign({h3:"h3",pre:"pre",code:"code",span:"span",p:"p"},(0,t.a)(),e.components);return(0,n.jsxs)(o.Rg,{children:[(0,n.jsx)(s.h3,{id:"configurar-git-vscode-e-extens\xf5es-do-vscode",children:"Configurar git, vscode e extens\xf5es do vscode"}),(0,n.jsx)(s.h3,{id:"baixar-nossas-defini\xe7\xf5es-de-tipo-lua",children:"Baixar nossas defini\xe7\xf5es de tipo Lua"}),(0,n.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_types.git"})]})})}),(0,n.jsx)(s.h3,{id:"atualizar-suas-configura\xe7\xf5es",children:"Atualizar suas configura\xe7\xf5es"}),(0,n.jsxs)(s.p,{children:["Voc\xea pode modificar as configura\xe7\xf5es de usu\xe1rio, espa\xe7o de trabalho ou pasta no vscode.\nCrie uma entrada em ",(0,n.jsx)(s.code,{children:"Lua.workspace.library"})," apontando para o diret\xf3rio clonado ou subdiret\xf3rios espec\xedficos."]}),(0,n.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Lua.workspace.library"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_types/types"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_lib"'})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"],"})})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/types.mdx",route:"/guides/types",timestamp:1730928152e3,title:"Types",headings:r},pageNextRoute:"/guides/types"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2598)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[970],{2598:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/types",function(){return a(2269)}])},2269:function(e,s,a){"use strict";a.r(s),a.d(s,{__toc:function(){return r}});var n=a(2676),i=a(2140),t=a(8745),o=a(7100);let r=[{depth:3,value:"Configurar git, vscode e extens\xf5es do vscode",id:"configurar-git-vscode-e-extens\xf5es-do-vscode"},{depth:3,value:"Baixar nossas defini\xe7\xf5es de tipo Lua",id:"baixar-nossas-defini\xe7\xf5es-de-tipo-lua"},{depth:3,value:"Atualizar suas configura\xe7\xf5es",id:"atualizar-suas-configura\xe7\xf5es"}];function _createMdxContent(e){let s=Object.assign({h3:"h3",pre:"pre",code:"code",span:"span",p:"p"},(0,t.a)(),e.components);return(0,n.jsxs)(o.Rg,{children:[(0,n.jsx)(s.h3,{id:"configurar-git-vscode-e-extens\xf5es-do-vscode",children:"Configurar git, vscode e extens\xf5es do vscode"}),(0,n.jsx)(s.h3,{id:"baixar-nossas-defini\xe7\xf5es-de-tipo-lua",children:"Baixar nossas defini\xe7\xf5es de tipo Lua"}),(0,n.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_types.git"})]})})}),(0,n.jsx)(s.h3,{id:"atualizar-suas-configura\xe7\xf5es",children:"Atualizar suas configura\xe7\xf5es"}),(0,n.jsxs)(s.p,{children:["Voc\xea pode modificar as configura\xe7\xf5es de usu\xe1rio, espa\xe7o de trabalho ou pasta no vscode.\nCrie uma entrada em ",(0,n.jsx)(s.code,{children:"Lua.workspace.library"})," apontando para o diret\xf3rio clonado ou subdiret\xf3rios espec\xedficos."]}),(0,n.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Lua.workspace.library"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_types/types"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_lib"'})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"],"})})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/types.mdx",route:"/guides/types",timestamp:1730940204e3,title:"Types",headings:r},pageNextRoute:"/guides/types"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2598)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/guides/vscode-f1be7d7cf689a400.js b/_next/static/chunks/pages/guides/vscode-383ea04695482eee.js similarity index 99% rename from _next/static/chunks/pages/guides/vscode-f1be7d7cf689a400.js rename to _next/static/chunks/pages/guides/vscode-383ea04695482eee.js index 78e001bd60..b2b9a8b46c 100644 --- a/_next/static/chunks/pages/guides/vscode-f1be7d7cf689a400.js +++ b/_next/static/chunks/pages/guides/vscode-383ea04695482eee.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3318],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var o=n(5271),i=n(507),r=n.n(i),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&__defNormalProp(e,n,t[n]);if(l)for(var n of l(t))h.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,d(t)),__objRest=(e,t)=>{var n={};for(var o in e)u.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&l)for(var o of l(e))0>t.indexOf(o)&&h.call(e,o)&&(n[o]=e[o]);return n},createReactComponent=(e,t,n)=>{let i=(0,o.forwardRef)((t,i)=>{var{color:r="currentColor",size:a=24,stroke:c=2,children:d}=t,l=__objRest(t,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},s),{width:a,height:a,stroke:r,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),l),[...n.map(([e,t])=>(0,o.createElement)(e,t)),...d||[]])});return i.propTypes={color:r().string,size:r().oneOfType([r().string,r().number]),stroke:r().oneOfType([r().string,r().number])},i.displayName=`${t}`,i}},9289:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/vscode",function(){return n(3159)}])},3159:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return c}});var o=n(2676),i=n(2140),r=n(8745),s=n(3786),a=n(7100);let c=[{depth:2,value:"Extens\xf5es recomendadas",id:"extens\xf5es-recomendadas"},{depth:3,value:"sumneko.lua",id:"sumnekolua"},{depth:3,value:"overextended.cfxlua-vscode",id:"overextendedcfxlua-vscode"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ul:"ul",li:"li",a:"a",img:"img"},(0,r.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{children:"VS Code"}),"\n",(0,o.jsx)(t.p,{children:"O Visual Studio Code \xe9 nosso editor recomendado ao trabalhar com Lua."}),"\n",(0,o.jsx)(s.o6,{link:"https://code.visualstudio.com/Download"}),"\n",(0,o.jsx)(t.h2,{id:"extens\xf5es-recomendadas",children:"Extens\xf5es recomendadas"}),"\n",(0,o.jsx)(t.p,{children:"As extens\xf5es permitem que voc\xea adicione linguagens, depuradores e outras ferramentas ao VS Code, melhorando sua experi\xeancia como desenvolvedor."}),"\n",(0,o.jsx)(t.h3,{id:"sumnekolua",children:"sumneko.lua"}),"\n",(0,o.jsx)(a.UW,{type:"warning",children:(0,o.jsx)(t.p,{children:"Cuidado ao usar essa extens\xe3o com SSH no vsCode. Ela \xe9 conhecida por consumir RAM e CPU excessivamente no servidor e pode trav\xe1-lo."})}),"\n",(0,o.jsx)(t.p,{children:"O Lua Language Server fornece numerosos recursos de linguagem para tornar o desenvolvimento mais f\xe1cil e r\xe1pido, por exemplo:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Anota\xe7\xf5es"}),"\n",(0,o.jsx)(t.li,{children:"Autocompletar"}),"\n",(0,o.jsx)(t.li,{children:"Formata\xe7\xe3o de c\xf3digo"}),"\n",(0,o.jsx)(t.li,{children:"Diagn\xf3sticos/avisos"}),"\n",(0,o.jsx)(t.li,{children:"Verifica\xe7\xe3o de tipo din\xe2mica"}),"\n",(0,o.jsx)(t.li,{children:"Verifica\xe7\xe3o de sintaxe"}),"\n"]}),"\n",(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(s.eX,{link:"https://github.com/LuaLS/lua-language-server"}),(0,o.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=sumneko.lua"}),(0,o.jsx)(s.WR,{link:"https://github.com/LuaLS/lua-language-server/wiki"})]}),"\n",(0,o.jsx)(t.h3,{id:"overextendedcfxlua-vscode",children:"overextended.cfxlua-vscode"}),"\n",(0,o.jsxs)(t.p,{children:["Funciona junto com o Lua Language Server para fornecer declara\xe7\xf5es de fun\xe7\xe3o e tipo do ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/code/components/citizen-scripting-lua/src/LuaScriptRuntime.cpp",children:"runtime Lua"})," da Cfx, ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/lua/tree/luaglm-dev/cfx",children:"dialeto Lua"}),", ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/data/shared/citizen/scripting/lua/scheduler.lua",children:"globais de ambiente"})," e nativos do jogo."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://user-images.githubusercontent.com/65407488/141656446-21f9105a-9371-4bb3-9089-ab672930f830.png",alt:""})}),"\n",(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(s.eX,{link:"https://github.com/overextended/cfxlua-vscode"}),(0,o.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=overextended.cfxlua-vscode"})]})]})}t.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,r.a)(),e.components);return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/vscode.mdx",route:"/guides/vscode",frontMatter:{title:"VS Code"},timestamp:1730928152e3,title:"VS Code",headings:c},pageNextRoute:"/guides/vscode"})},3786:function(e,t,n){"use strict";n.d(t,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var o=n(2676);n(5271);var i=n(5850),r=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),s=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:t="left",children:n,icon:i,link:r}=e;return(0,o.jsx)("div",{className:"h-fit w-fit",children:(0,o.jsx)("a",{href:r,children:(0,o.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===t&&(0,o.jsx)("div",{children:i}),n,"right"===t&&(0,o.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(r,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},4049:function(e,t,n){"use strict";var o=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,i,r,s){if(s!==o){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9289)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3318],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var o=n(5271),i=n(507),r=n.n(i),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&__defNormalProp(e,n,t[n]);if(l)for(var n of l(t))h.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,d(t)),__objRest=(e,t)=>{var n={};for(var o in e)u.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&l)for(var o of l(e))0>t.indexOf(o)&&h.call(e,o)&&(n[o]=e[o]);return n},createReactComponent=(e,t,n)=>{let i=(0,o.forwardRef)((t,i)=>{var{color:r="currentColor",size:a=24,stroke:c=2,children:d}=t,l=__objRest(t,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},s),{width:a,height:a,stroke:r,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),l),[...n.map(([e,t])=>(0,o.createElement)(e,t)),...d||[]])});return i.propTypes={color:r().string,size:r().oneOfType([r().string,r().number]),stroke:r().oneOfType([r().string,r().number])},i.displayName=`${t}`,i}},9289:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/vscode",function(){return n(3159)}])},3159:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return c}});var o=n(2676),i=n(2140),r=n(8745),s=n(3786),a=n(7100);let c=[{depth:2,value:"Extens\xf5es recomendadas",id:"extens\xf5es-recomendadas"},{depth:3,value:"sumneko.lua",id:"sumnekolua"},{depth:3,value:"overextended.cfxlua-vscode",id:"overextendedcfxlua-vscode"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ul:"ul",li:"li",a:"a",img:"img"},(0,r.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{children:"VS Code"}),"\n",(0,o.jsx)(t.p,{children:"O Visual Studio Code \xe9 nosso editor recomendado ao trabalhar com Lua."}),"\n",(0,o.jsx)(s.o6,{link:"https://code.visualstudio.com/Download"}),"\n",(0,o.jsx)(t.h2,{id:"extens\xf5es-recomendadas",children:"Extens\xf5es recomendadas"}),"\n",(0,o.jsx)(t.p,{children:"As extens\xf5es permitem que voc\xea adicione linguagens, depuradores e outras ferramentas ao VS Code, melhorando sua experi\xeancia como desenvolvedor."}),"\n",(0,o.jsx)(t.h3,{id:"sumnekolua",children:"sumneko.lua"}),"\n",(0,o.jsx)(a.UW,{type:"warning",children:(0,o.jsx)(t.p,{children:"Cuidado ao usar essa extens\xe3o com SSH no vsCode. Ela \xe9 conhecida por consumir RAM e CPU excessivamente no servidor e pode trav\xe1-lo."})}),"\n",(0,o.jsx)(t.p,{children:"O Lua Language Server fornece numerosos recursos de linguagem para tornar o desenvolvimento mais f\xe1cil e r\xe1pido, por exemplo:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Anota\xe7\xf5es"}),"\n",(0,o.jsx)(t.li,{children:"Autocompletar"}),"\n",(0,o.jsx)(t.li,{children:"Formata\xe7\xe3o de c\xf3digo"}),"\n",(0,o.jsx)(t.li,{children:"Diagn\xf3sticos/avisos"}),"\n",(0,o.jsx)(t.li,{children:"Verifica\xe7\xe3o de tipo din\xe2mica"}),"\n",(0,o.jsx)(t.li,{children:"Verifica\xe7\xe3o de sintaxe"}),"\n"]}),"\n",(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(s.eX,{link:"https://github.com/LuaLS/lua-language-server"}),(0,o.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=sumneko.lua"}),(0,o.jsx)(s.WR,{link:"https://github.com/LuaLS/lua-language-server/wiki"})]}),"\n",(0,o.jsx)(t.h3,{id:"overextendedcfxlua-vscode",children:"overextended.cfxlua-vscode"}),"\n",(0,o.jsxs)(t.p,{children:["Funciona junto com o Lua Language Server para fornecer declara\xe7\xf5es de fun\xe7\xe3o e tipo do ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/code/components/citizen-scripting-lua/src/LuaScriptRuntime.cpp",children:"runtime Lua"})," da Cfx, ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/lua/tree/luaglm-dev/cfx",children:"dialeto Lua"}),", ",(0,o.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/data/shared/citizen/scripting/lua/scheduler.lua",children:"globais de ambiente"})," e nativos do jogo."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://user-images.githubusercontent.com/65407488/141656446-21f9105a-9371-4bb3-9089-ab672930f830.png",alt:""})}),"\n",(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(s.eX,{link:"https://github.com/overextended/cfxlua-vscode"}),(0,o.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=overextended.cfxlua-vscode"})]})]})}t.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,r.a)(),e.components);return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/vscode.mdx",route:"/guides/vscode",frontMatter:{title:"VS Code"},timestamp:1730940204e3,title:"VS Code",headings:c},pageNextRoute:"/guides/vscode"})},3786:function(e,t,n){"use strict";n.d(t,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var o=n(2676);n(5271);var i=n(5850),r=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),s=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:t="left",children:n,icon:i,link:r}=e;return(0,o.jsx)("div",{className:"h-fit w-fit",children:(0,o.jsx)("a",{href:r,children:(0,o.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===t&&(0,o.jsx)("div",{children:i}),n,"right"===t&&(0,o.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(r,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},4049:function(e,t,n){"use strict";var o=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,i,r,s){if(s!==o){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9289)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/index-bd7af27cde16afa8.js b/_next/static/chunks/pages/index-97f4a5cbc3f1ab48.js similarity index 98% rename from _next/static/chunks/pages/index-bd7af27cde16afa8.js rename to _next/static/chunks/pages/index-97f4a5cbc3f1ab48.js index 05ecb1f09a..399dfb4529 100644 --- a/_next/static/chunks/pages/index-bd7af27cde16afa8.js +++ b/_next/static/chunks/pages/index-97f4a5cbc3f1ab48.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{2616:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(986)}])},986:function(e,a,r){"use strict";r.r(a),r.d(a,{__toc:function(){return s}});var o=r(2676),n=r(2140),t=r(8745);let s=[{depth:2,value:"To the Overextended team",id:"to-the-overextended-team"},{depth:2,value:"To the Qbox team",id:"to-the-qbox-team"},{depth:2,value:"Ajude nosso time",id:"ajude-nosso-time"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:2,value:"Fivemerr",id:"fivemerr"}];function _createMdxContent(e){let a=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",code:"code"},(0,t.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,o.jsx)(a.p,{children:"Aqui voc\xea pode encontrar a documenta\xe7\xe3o oficial para os recursos desenvolvidos ou traduzidos pela mri-Qbox."}),"\n",(0,o.jsxs)(a.p,{children:["Esta documenta\xe7\xe3o foi baseada nas documenta\xe7\xf5es oficiais de ",(0,o.jsx)(a.a,{href:"https://overextended.dev",children:"Overextended"})," e ",(0,o.jsx)(a.a,{href:"https://docs.qbox.re",children:"Qbox"})," e ter\xe1 os recursos deles traduzidos para o portugu\xeas."]}),"\n",(0,o.jsx)(a.p,{children:'Se voc\xea acha que algo na documenta\xe7\xe3o n\xe3o est\xe1 correto, voc\xea pode ir at\xe9 aquela p\xe1gina, clicar em "Editar esta p\xe1gina" e nos enviar um Pull Request.'}),"\n",(0,o.jsx)(a.h2,{id:"to-the-overextended-team",children:"To the Overextended team"}),"\n",(0,o.jsx)(a.p,{children:"We left the links pointing to your original documentation and discount codes/custom URLs in order to thank you for your awesome work. Please reach to us if are there any issues."}),"\n",(0,o.jsx)(a.h2,{id:"to-the-qbox-team",children:"To the Qbox team"}),"\n",(0,o.jsx)(a.p,{children:"We left the links pointing to your original documentation in order to thank you for your awesome work. Please reach to us if are there any issues."}),"\n",(0,o.jsx)(a.h2,{id:"ajude-nosso-time",children:"Ajude nosso time"}),"\n",(0,o.jsx)(a.p,{children:"N\xf3s adoramos a ideia de criar e compartilhar recursos gratuitos e abertos, mas eles geralmente requerem tempo e esforço para manterem e suportar."}),"\n",(0,o.jsxs)(a.p,{children:["Se voc\xea usa nossas resources frequentemente e curte o que a gente faz, considere contribuir para nos ajudar. Nos procure no ",(0,o.jsx)(a.a,{href:"https://discord.gg/uEfGD4mmVh",children:"Discord"})," para saber mais."]}),"\n",(0,o.jsx)(a.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," \xe9 um servi\xe7o de gerenciamento em nuvem voltado para servidores de jogos, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administra\xe7\xe3o do seu servidor FiveM."]}),"\n",(0,o.jsx)(a.p,{children:"Os servi\xe7os incluem um plano gratuito com espa\xe7o de armazenamento de m\xeddia limitado, al\xe9m de v\xe1rios planos pagos projetados para acomodar servidores maiores que precisam de mais espa\xe7o de armazenamento e recursos de registro."}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemanage.com/?ref=overextended",children:"Iniciar com Fivemanage"})," E use o c\xf3digo ",(0,o.jsx)(a.code,{children:"OX10"})," para obter 10% de desconto na sua assinatura – para sempre!"]}),"\n",(0,o.jsx)(a.h2,{id:"fivemerr",children:"Fivemerr"}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemerr.com",children:"Fivemerr"})," \xe9 um servi\xe7o de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administra\xe7\xe3o do seu servidor FiveM."]})]})}a.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:a}=Object.assign({},(0,t.a)(),e.components);return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/index.mdx",route:"/",frontMatter:{title:"Introdu\xe7\xe3o"},timestamp:1730928152e3,title:"Introdu\xe7\xe3o",headings:s},pageNextRoute:"/"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2616)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{2616:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(986)}])},986:function(e,a,r){"use strict";r.r(a),r.d(a,{__toc:function(){return s}});var o=r(2676),n=r(2140),t=r(8745);let s=[{depth:2,value:"To the Overextended team",id:"to-the-overextended-team"},{depth:2,value:"To the Qbox team",id:"to-the-qbox-team"},{depth:2,value:"Ajude nosso time",id:"ajude-nosso-time"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:2,value:"Fivemerr",id:"fivemerr"}];function _createMdxContent(e){let a=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",code:"code"},(0,t.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,o.jsx)(a.p,{children:"Aqui voc\xea pode encontrar a documenta\xe7\xe3o oficial para os recursos desenvolvidos ou traduzidos pela mri-Qbox."}),"\n",(0,o.jsxs)(a.p,{children:["Esta documenta\xe7\xe3o foi baseada nas documenta\xe7\xf5es oficiais de ",(0,o.jsx)(a.a,{href:"https://overextended.dev",children:"Overextended"})," e ",(0,o.jsx)(a.a,{href:"https://docs.qbox.re",children:"Qbox"})," e ter\xe1 os recursos deles traduzidos para o portugu\xeas."]}),"\n",(0,o.jsx)(a.p,{children:'Se voc\xea acha que algo na documenta\xe7\xe3o n\xe3o est\xe1 correto, voc\xea pode ir at\xe9 aquela p\xe1gina, clicar em "Editar esta p\xe1gina" e nos enviar um Pull Request.'}),"\n",(0,o.jsx)(a.h2,{id:"to-the-overextended-team",children:"To the Overextended team"}),"\n",(0,o.jsx)(a.p,{children:"We left the links pointing to your original documentation and discount codes/custom URLs in order to thank you for your awesome work. Please reach to us if are there any issues."}),"\n",(0,o.jsx)(a.h2,{id:"to-the-qbox-team",children:"To the Qbox team"}),"\n",(0,o.jsx)(a.p,{children:"We left the links pointing to your original documentation in order to thank you for your awesome work. Please reach to us if are there any issues."}),"\n",(0,o.jsx)(a.h2,{id:"ajude-nosso-time",children:"Ajude nosso time"}),"\n",(0,o.jsx)(a.p,{children:"N\xf3s adoramos a ideia de criar e compartilhar recursos gratuitos e abertos, mas eles geralmente requerem tempo e esforço para manterem e suportar."}),"\n",(0,o.jsxs)(a.p,{children:["Se voc\xea usa nossas resources frequentemente e curte o que a gente faz, considere contribuir para nos ajudar. Nos procure no ",(0,o.jsx)(a.a,{href:"https://discord.gg/uEfGD4mmVh",children:"Discord"})," para saber mais."]}),"\n",(0,o.jsx)(a.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," \xe9 um servi\xe7o de gerenciamento em nuvem voltado para servidores de jogos, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administra\xe7\xe3o do seu servidor FiveM."]}),"\n",(0,o.jsx)(a.p,{children:"Os servi\xe7os incluem um plano gratuito com espa\xe7o de armazenamento de m\xeddia limitado, al\xe9m de v\xe1rios planos pagos projetados para acomodar servidores maiores que precisam de mais espa\xe7o de armazenamento e recursos de registro."}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemanage.com/?ref=overextended",children:"Iniciar com Fivemanage"})," E use o c\xf3digo ",(0,o.jsx)(a.code,{children:"OX10"})," para obter 10% de desconto na sua assinatura – para sempre!"]}),"\n",(0,o.jsx)(a.h2,{id:"fivemerr",children:"Fivemerr"}),"\n",(0,o.jsxs)(a.p,{children:[(0,o.jsx)(a.a,{href:"https://fivemerr.com",children:"Fivemerr"})," \xe9 um servi\xe7o de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administra\xe7\xe3o do seu servidor FiveM."]})]})}a.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:a}=Object.assign({},(0,t.a)(),e.components);return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/index.mdx",route:"/",frontMatter:{title:"Introdu\xe7\xe3o"},timestamp:1730940204e3,title:"Introdu\xe7\xe3o",headings:s},pageNextRoute:"/"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2616)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended-42ba0a692cc78b75.js b/_next/static/chunks/pages/overextended-1ec79392be31acde.js similarity index 99% rename from _next/static/chunks/pages/overextended-42ba0a692cc78b75.js rename to _next/static/chunks/pages/overextended-1ec79392be31acde.js index 50ddc0d864..169b41f985 100644 --- a/_next/static/chunks/pages/overextended-42ba0a692cc78b75.js +++ b/_next/static/chunks/pages/overextended-1ec79392be31acde.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6231],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),s=n.n(o),a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},i=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&__defNormalProp(e,n,t[n]);if(p)for(var n of p(t))u.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,d(t)),__objRest=(e,t)=>{var n={};for(var r in e)l.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&p)for(var r of p(e))0>t.indexOf(r)&&u.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,t,n)=>{let o=(0,r.forwardRef)((t,o)=>{var{color:s="currentColor",size:i=24,stroke:c=2,children:d}=t,p=__objRest(t,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},a),{width:i,height:i,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),p),[...n.map(([e,t])=>(0,r.createElement)(e,t)),...d||[]])});return o.propTypes={color:s().string,size:s().oneOfType([s().string,s().number]),stroke:s().oneOfType([s().string,s().number])},o.displayName=`${t}`,o}},6121:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended",function(){return n(6884)}])},6884:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return i},default:function(){return c}});var r=n(2676),o=n(2140),s=n(8745),a=(0,n(5850).Z)("coffee","IconCoffee",[["path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1",key:"svg-0"}],["path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2",key:"svg-1"}],["path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2",key:"svg-2"}],["path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z",key:"svg-3"}],["path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555",key:"svg-4"}]]),components_DonateLink=e=>{let{image:t,name:n,kofiName:o}=e;return(0,r.jsxs)("div",{className:"flex w-32 flex-col items-center justify-center gap-2",children:[(0,r.jsx)("p",{children:n}),(0,r.jsx)("img",{src:t,alt:"".concat(n,"-image"),className:"rounded-md bg-neutral-100 shadow-md dark:bg-neutral-900"}),(0,r.jsx)("a",{href:"https://ko-fi.com/".concat(o),target:"_blank",className:"w-full",children:(0,r.jsxs)("button",{className:"flex w-full items-center justify-center gap-2 rounded-md bg-green-500/20 p-2 text-green-500 hover:bg-green-500/30",children:[(0,r.jsx)(a,{}),"Apoie"]})})]})};let i=[{depth:2,value:"Apoie a equipe Overextended",id:"apoie-a-equipe-overextended"},{depth:2,value:"C\xf3digos de Criador",id:"c\xf3digos-de-criador"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",em:"em",ul:"ul",li:"li",a:"a"},(0,s.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,r.jsx)(t.p,{children:"Aqui voc\xea pode encontrar toda a documenta\xe7\xe3o oficial dos recursos desenvolvidos pela equipe Overextended."}),"\n",(0,r.jsx)(t.h2,{id:"apoie-a-equipe-overextended",children:"Apoie a equipe Overextended"}),"\n",(0,r.jsxs)(t.p,{children:["Eles gostam de poder criar e compartilhar trabalhos ",(0,r.jsx)(t.em,{children:"livres e de c\xf3digo aberto"}),", mas eles frequentemente exigem tempo e esfor\xe7o consider\xe1veis para manuten\xe7\xe3o e suporte."]}),"\n",(0,r.jsx)(t.p,{children:"Se voc\xea usa frequentemente esses recursos e gosta do que fazem, considere apoi\xe1-los para que possam continuar o trabalho."}),"\n",(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap justify-evenly gap-4",children:[(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/65407488?v=4",name:"Linden",kofiName:"thelindat"}),(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/39926192?v=4",name:"Luke",kofiName:"lukewastaken"}),(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/31368547?v=4",name:"DokaDoka",kofiName:"dokadoka"})]}),"\n",(0,r.jsx)(t.h2,{id:"c\xf3digos-de-criador",children:"C\xf3digos de Criador"}),"\n",(0,r.jsx)(t.p,{children:"Os c\xf3digos de criador permitem que as lojas Tebex compartilhem uma porcentagem da compra com a Overextended, enquanto oferecem um desconto ao cliente. Eles fazem esses acordos para divulgar criadores confi\xe1veis que atendem aos crit\xe9rios deles."}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Os recursos s\xe3o altamente configur\xe1veis ou, preferencialmente, com c\xf3digo-fonte dispon\xedvel."}),"\n",(0,r.jsx)(t.li,{children:"Confiam que os clientes receber\xe3o assist\xeancia."}),"\n",(0,r.jsx)(t.li,{children:"O criador \xe9 um membro conhecido da comunidade Overextended."}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Mais informa\xe7\xf5es sobre esses criadores est\xe3o dispon\xedveis no ",(0,r.jsx)(t.a,{href:"https://discord.com/channels/813030955598086174/1028912864389496903",children:"Discord Overextended"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Para acessar os c\xf3digos ",(0,r.jsx)(t.a,{href:"https://overextended.dev/#creator-codes",children:"clique aqui"})]})]})}var c=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,s.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended.mdx",route:"/overextended",frontMatter:{title:"Introdu\xe7\xe3o"},timestamp:1730928152e3,title:"Introdu\xe7\xe3o",headings:i},pageNextRoute:"/overextended"})},4049:function(e,t,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,o,s,a){if(a!==r){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6121)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6231],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),s=n.n(o),a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},i=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&__defNormalProp(e,n,t[n]);if(p)for(var n of p(t))u.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,d(t)),__objRest=(e,t)=>{var n={};for(var r in e)l.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&p)for(var r of p(e))0>t.indexOf(r)&&u.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,t,n)=>{let o=(0,r.forwardRef)((t,o)=>{var{color:s="currentColor",size:i=24,stroke:c=2,children:d}=t,p=__objRest(t,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},a),{width:i,height:i,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),p),[...n.map(([e,t])=>(0,r.createElement)(e,t)),...d||[]])});return o.propTypes={color:s().string,size:s().oneOfType([s().string,s().number]),stroke:s().oneOfType([s().string,s().number])},o.displayName=`${t}`,o}},6121:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended",function(){return n(6884)}])},6884:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return i},default:function(){return c}});var r=n(2676),o=n(2140),s=n(8745),a=(0,n(5850).Z)("coffee","IconCoffee",[["path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1",key:"svg-0"}],["path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2",key:"svg-1"}],["path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2",key:"svg-2"}],["path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z",key:"svg-3"}],["path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555",key:"svg-4"}]]),components_DonateLink=e=>{let{image:t,name:n,kofiName:o}=e;return(0,r.jsxs)("div",{className:"flex w-32 flex-col items-center justify-center gap-2",children:[(0,r.jsx)("p",{children:n}),(0,r.jsx)("img",{src:t,alt:"".concat(n,"-image"),className:"rounded-md bg-neutral-100 shadow-md dark:bg-neutral-900"}),(0,r.jsx)("a",{href:"https://ko-fi.com/".concat(o),target:"_blank",className:"w-full",children:(0,r.jsxs)("button",{className:"flex w-full items-center justify-center gap-2 rounded-md bg-green-500/20 p-2 text-green-500 hover:bg-green-500/30",children:[(0,r.jsx)(a,{}),"Apoie"]})})]})};let i=[{depth:2,value:"Apoie a equipe Overextended",id:"apoie-a-equipe-overextended"},{depth:2,value:"C\xf3digos de Criador",id:"c\xf3digos-de-criador"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",em:"em",ul:"ul",li:"li",a:"a"},(0,s.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,r.jsx)(t.p,{children:"Aqui voc\xea pode encontrar toda a documenta\xe7\xe3o oficial dos recursos desenvolvidos pela equipe Overextended."}),"\n",(0,r.jsx)(t.h2,{id:"apoie-a-equipe-overextended",children:"Apoie a equipe Overextended"}),"\n",(0,r.jsxs)(t.p,{children:["Eles gostam de poder criar e compartilhar trabalhos ",(0,r.jsx)(t.em,{children:"livres e de c\xf3digo aberto"}),", mas eles frequentemente exigem tempo e esfor\xe7o consider\xe1veis para manuten\xe7\xe3o e suporte."]}),"\n",(0,r.jsx)(t.p,{children:"Se voc\xea usa frequentemente esses recursos e gosta do que fazem, considere apoi\xe1-los para que possam continuar o trabalho."}),"\n",(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap justify-evenly gap-4",children:[(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/65407488?v=4",name:"Linden",kofiName:"thelindat"}),(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/39926192?v=4",name:"Luke",kofiName:"lukewastaken"}),(0,r.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/31368547?v=4",name:"DokaDoka",kofiName:"dokadoka"})]}),"\n",(0,r.jsx)(t.h2,{id:"c\xf3digos-de-criador",children:"C\xf3digos de Criador"}),"\n",(0,r.jsx)(t.p,{children:"Os c\xf3digos de criador permitem que as lojas Tebex compartilhem uma porcentagem da compra com a Overextended, enquanto oferecem um desconto ao cliente. Eles fazem esses acordos para divulgar criadores confi\xe1veis que atendem aos crit\xe9rios deles."}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Os recursos s\xe3o altamente configur\xe1veis ou, preferencialmente, com c\xf3digo-fonte dispon\xedvel."}),"\n",(0,r.jsx)(t.li,{children:"Confiam que os clientes receber\xe3o assist\xeancia."}),"\n",(0,r.jsx)(t.li,{children:"O criador \xe9 um membro conhecido da comunidade Overextended."}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Mais informa\xe7\xf5es sobre esses criadores est\xe3o dispon\xedveis no ",(0,r.jsx)(t.a,{href:"https://discord.com/channels/813030955598086174/1028912864389496903",children:"Discord Overextended"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Para acessar os c\xf3digos ",(0,r.jsx)(t.a,{href:"https://overextended.dev/#creator-codes",children:"clique aqui"})]})]})}var c=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,s.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended.mdx",route:"/overextended",frontMatter:{title:"Introdu\xe7\xe3o"},timestamp:1730940204e3,title:"Introdu\xe7\xe3o",headings:i},pageNextRoute:"/overextended"})},4049:function(e,t,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,o,s,a){if(a!==r){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6121)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core-90db394b4adc3bbe.js b/_next/static/chunks/pages/overextended/ox_core-de29f7477bbcca0b.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core-90db394b4adc3bbe.js rename to _next/static/chunks/pages/overextended/ox_core-de29f7477bbcca0b.js index 0caa74b6a7..7312a1673d 100644 --- a/_next/static/chunks/pages/overextended/ox_core-90db394b4adc3bbe.js +++ b/_next/static/chunks/pages/overextended/ox_core-de29f7477bbcca0b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2840],{5850:function(e,n,s){"use strict";s.d(n,{Z:function(){return createReactComponent}});var r=s(5271),i=s(507),o=s.n(i),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,l=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,s)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,__spreadValues=(e,n)=>{for(var s in n||(n={}))h.call(n,s)&&__defNormalProp(e,s,n[s]);if(d)for(var s of d(n))x.call(n,s)&&__defNormalProp(e,s,n[s]);return e},__spreadProps=(e,n)=>c(e,l(n)),__objRest=(e,n)=>{var s={};for(var r in e)h.call(e,r)&&0>n.indexOf(r)&&(s[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>n.indexOf(r)&&x.call(e,r)&&(s[r]=e[r]);return s},createReactComponent=(e,n,s)=>{let i=(0,r.forwardRef)((n,i)=>{var{color:o="currentColor",size:a=24,stroke:c=2,children:l}=n,d=__objRest(n,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},t),{width:a,height:a,stroke:o,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...s.map(([e,n])=>(0,r.createElement)(e,n)),...l||[]])});return i.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},i.displayName=`${n}`,i}},9221:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core",function(){return s(4757)}])},4757:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),i=s(2140),o=s(8745),t=s(7100),a=s(8713),c=s(3786);let l=[{depth:2,value:"Receita txAdmin",id:"receita-txadmin"},{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Instale todas as depend\xeancias do recurso.",id:"instale-todas-as-depend\xeancias-do-recurso"},{depth:3,value:"Baixe a \xfaltima vers\xe3o ou compile o c\xf3digo-fonte.",id:"baixe-a-\xfaltima-vers\xe3o-ou-compile-o-c\xf3digo-fonte"},{depth:3,value:"Instale depend\xeancias opcionais.",id:"instale-depend\xeancias-opcionais"},{depth:2,value:"Usando ox_core nos seus recursos",id:"usando-ox_core-nos-seus-recursos"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Configura\xe7\xe3o",id:"configura\xe7\xe3o"},{depth:3,value:"Replicados",id:"replicados"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",a:"a",strong:"strong",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Ox Core"}),"\n",(0,r.jsx)(a.Z,{repo:"https://github.com/overextended/ox_core"}),"\n",(0,r.jsx)(n.p,{children:"Um framework moderno para FiveM, projetado para oferecer suporte adequado a recursos como OneSync, statebags e entidades no lado do servidor."}),"\n",(0,r.jsx)(n.h2,{id:"receita-txadmin",children:"Receita txAdmin"}),"\n",(0,r.jsxs)(n.p,{children:["Se voc\xea est\xe1 procurando instalar e configurar rapidamente o ox_core, tente usar ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/txAdminRecipe",children:"nossa receita"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["Recomendamos ",(0,r.jsx)(n.strong,{children:"fortemente"})," consultar os ",(0,r.jsx)(n.a,{href:"../guides",children:"Guias"})," para configurar as ferramentas de desenvolvimento necess\xe1rias."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(n.h3,{id:"instale-todas-as-depend\xeancias-do-recurso",children:"Instale todas as depend\xeancias do recurso."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(n.h3,{id:"baixe-a-\xfaltima-vers\xe3o-ou-compile-o-c\xf3digo-fonte",children:["Baixe a \xfaltima ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/ox_core/releases/latest",children:"vers\xe3o"})," ou compile o c\xf3digo-fonte."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Configure ",(0,r.jsx)(n.a,{href:"../guides/git",children:"Git"}),", ",(0,r.jsx)(n.a,{href:"../guides/nodejs",children:"Node.js"}),", e ",(0,r.jsx)(n.a,{href:"../guides/pnpm",children:"pnpm"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Baixe e configure ",(0,r.jsx)(n.a,{href:"https://mariadb.com/downloads/community/community-server/",children:"MariaDB 11.4+"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"Execute os seguintes comandos no seu CLI (ex.: Terminal, Prompt de Comando)."}),"\n"]}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_core.git"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(n.h3,{id:"instale-depend\xeancias-opcionais",children:"Instale depend\xeancias opcionais."}),(0,r.jsx)(n.p,{children:"Esses recursos n\xe3o s\xe3o estritamente necess\xe1rios, mas s\xe3o fortemente recomendados."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../ox_inventory/",children:"ox_inventory"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/project-error/npwd",children:"npwd"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/iLLeniumStudios/illenium-appearance/archive/refs/heads/main.zip",children:"illenium-appearance"})}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"usando-ox_core-nos-seus-recursos",children:"Usando ox_core nos seus recursos"}),"\n",(0,r.jsx)(n.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(n.p,{children:["Voc\xea pode importar as defini\xe7\xf5es do ox_core carregando ",(0,r.jsx)(n.code,{children:"@ox_core/lib/init.lua"})," no seu recurso."]}),"\n",(0,r.jsxs)(t.mQ,{items:["fxmanifest.lua","require"],children:[(0,r.jsxs)(t.OK,{children:[(0,r.jsxs)(n.p,{children:["Isto pode ser um ",(0,r.jsx)(n.code,{children:"client_script"})," ou ",(0,r.jsx)(n.code,{children:"server_script"}),", se preferir."]}),(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"shared_script"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_core/lib/init.lua'"})]})})})]}),(0,r.jsxs)(t.OK,{children:[(0,r.jsxs)(n.p,{children:["Se preferir, voc\xea pode usar nossa fun\xe7\xe3o ",(0,r.jsx)(n.a,{href:"../ox_lib/Modules/Require/Shared",children:"require"})," do ",(0,r.jsx)(n.a,{href:"../ox_lib",children:"ox_lib"}),"."]}),(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Ox "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_core/lib/init'"})]})})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,r.jsx)(n.p,{children:"Para usar o ox_core com seus recursos JavaScript, voc\xea precisar\xe1 do nosso pacote npm, que fornece suporte completo para TypeScript e Intellisense."}),"\n",(0,r.jsx)(c.aj,{link:"https://www.npmjs.com/package/@overextended/ox_core"}),"\n",(0,r.jsxs)(n.p,{children:["Para come\xe7ar, experimente nosso ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/fivem-typescript-boilerplate",children:"fivem-typescript-boilerplate"})," e instale o pacote ox_core."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/ox_core"})]})})}),"\n",(0,r.jsx)(n.h2,{id:"configura\xe7\xe3o",children:"Configura\xe7\xe3o"}),"\n",(0,r.jsxs)(n.p,{children:["A configura\xe7\xe3o do recurso \xe9 gerenciada usando ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"replicados",children:"Replicados"}),"\n",(0,r.jsxs)(n.p,{children:["Esses convars devem usar o comando ",(0,r.jsx)(n.code,{children:"setr"})," para serem lidos pelos clientes."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:debug"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"false"})]}),"\n",(0,r.jsxs)(n.li,{children:["Ativa mensagens e comandos de depura\xe7\xe3o. Habilitado por padr\xe3o ao usar ",(0,r.jsx)(n.code,{children:"pnpm watch"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:characterSlots"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"1"})]}),"\n",(0,r.jsx)(n.li,{children:"Define o n\xfamero de slots de personagem dispon\xedveis para recursos de sele\xe7\xe3o de personagens (ex.: ox_charselect)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:plateFormat"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:'"........"'})]}),"\n",(0,r.jsxs)(n.li,{children:["Consulte ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x79780FD2",children:"SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:deathSystem"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Ativa o sistema de morte e respawn integrado."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:characterSelect"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Ativa o registro de personagem integrado e utiliza esse personagem ao entrar."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:spawnLocation"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"[-258.211, -293.077, 21.6132, 206.0]"})]}),"\n",(0,r.jsx)(n.li,{children:"Define o local de spawn padr\xe3o para personagens rec\xe9m-criados."}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core.mdx",route:"/overextended/ox_core",timestamp:1730928152e3,title:"Ox Core",headings:l},pageNextRoute:"/overextended/ox_core"})},3786:function(e,n,s){"use strict";s.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=s(2676);s(5271);var i=s(5850),o=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),t=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),l=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:s,icon:i,link:o}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:o,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,r.jsx)("div",{children:i}),s,"right"===n&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,s){"use strict";var r=s(2676);s(5271);var i=s(3786);n.Z=e=>{let{repo:n,docs:s}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:n}),(0,r.jsx)(i.Vg,{link:"".concat(n,"/releases")}),s&&(0,r.jsx)(i.WR,{link:s})]})}},4049:function(e,n,s){"use strict";var r=s(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,s,i,o,t){if(t!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,s){e.exports=s(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9221)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2840],{5850:function(e,n,s){"use strict";s.d(n,{Z:function(){return createReactComponent}});var r=s(5271),i=s(507),o=s.n(i),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,l=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,s)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,__spreadValues=(e,n)=>{for(var s in n||(n={}))h.call(n,s)&&__defNormalProp(e,s,n[s]);if(d)for(var s of d(n))x.call(n,s)&&__defNormalProp(e,s,n[s]);return e},__spreadProps=(e,n)=>c(e,l(n)),__objRest=(e,n)=>{var s={};for(var r in e)h.call(e,r)&&0>n.indexOf(r)&&(s[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>n.indexOf(r)&&x.call(e,r)&&(s[r]=e[r]);return s},createReactComponent=(e,n,s)=>{let i=(0,r.forwardRef)((n,i)=>{var{color:o="currentColor",size:a=24,stroke:c=2,children:l}=n,d=__objRest(n,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},t),{width:a,height:a,stroke:o,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...s.map(([e,n])=>(0,r.createElement)(e,n)),...l||[]])});return i.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},i.displayName=`${n}`,i}},9221:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core",function(){return s(4757)}])},4757:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),i=s(2140),o=s(8745),t=s(7100),a=s(8713),c=s(3786);let l=[{depth:2,value:"Receita txAdmin",id:"receita-txadmin"},{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Instale todas as depend\xeancias do recurso.",id:"instale-todas-as-depend\xeancias-do-recurso"},{depth:3,value:"Baixe a \xfaltima vers\xe3o ou compile o c\xf3digo-fonte.",id:"baixe-a-\xfaltima-vers\xe3o-ou-compile-o-c\xf3digo-fonte"},{depth:3,value:"Instale depend\xeancias opcionais.",id:"instale-depend\xeancias-opcionais"},{depth:2,value:"Usando ox_core nos seus recursos",id:"usando-ox_core-nos-seus-recursos"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Configura\xe7\xe3o",id:"configura\xe7\xe3o"},{depth:3,value:"Replicados",id:"replicados"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",a:"a",strong:"strong",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Ox Core"}),"\n",(0,r.jsx)(a.Z,{repo:"https://github.com/overextended/ox_core"}),"\n",(0,r.jsx)(n.p,{children:"Um framework moderno para FiveM, projetado para oferecer suporte adequado a recursos como OneSync, statebags e entidades no lado do servidor."}),"\n",(0,r.jsx)(n.h2,{id:"receita-txadmin",children:"Receita txAdmin"}),"\n",(0,r.jsxs)(n.p,{children:["Se voc\xea est\xe1 procurando instalar e configurar rapidamente o ox_core, tente usar ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/txAdminRecipe",children:"nossa receita"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["Recomendamos ",(0,r.jsx)(n.strong,{children:"fortemente"})," consultar os ",(0,r.jsx)(n.a,{href:"../guides",children:"Guias"})," para configurar as ferramentas de desenvolvimento necess\xe1rias."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(n.h3,{id:"instale-todas-as-depend\xeancias-do-recurso",children:"Instale todas as depend\xeancias do recurso."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(n.h3,{id:"baixe-a-\xfaltima-vers\xe3o-ou-compile-o-c\xf3digo-fonte",children:["Baixe a \xfaltima ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/ox_core/releases/latest",children:"vers\xe3o"})," ou compile o c\xf3digo-fonte."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Configure ",(0,r.jsx)(n.a,{href:"../guides/git",children:"Git"}),", ",(0,r.jsx)(n.a,{href:"../guides/nodejs",children:"Node.js"}),", e ",(0,r.jsx)(n.a,{href:"../guides/pnpm",children:"pnpm"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Baixe e configure ",(0,r.jsx)(n.a,{href:"https://mariadb.com/downloads/community/community-server/",children:"MariaDB 11.4+"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"Execute os seguintes comandos no seu CLI (ex.: Terminal, Prompt de Comando)."}),"\n"]}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_core.git"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(n.h3,{id:"instale-depend\xeancias-opcionais",children:"Instale depend\xeancias opcionais."}),(0,r.jsx)(n.p,{children:"Esses recursos n\xe3o s\xe3o estritamente necess\xe1rios, mas s\xe3o fortemente recomendados."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../ox_inventory/",children:"ox_inventory"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/project-error/npwd",children:"npwd"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://github.com/iLLeniumStudios/illenium-appearance/archive/refs/heads/main.zip",children:"illenium-appearance"})}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"usando-ox_core-nos-seus-recursos",children:"Usando ox_core nos seus recursos"}),"\n",(0,r.jsx)(n.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(n.p,{children:["Voc\xea pode importar as defini\xe7\xf5es do ox_core carregando ",(0,r.jsx)(n.code,{children:"@ox_core/lib/init.lua"})," no seu recurso."]}),"\n",(0,r.jsxs)(t.mQ,{items:["fxmanifest.lua","require"],children:[(0,r.jsxs)(t.OK,{children:[(0,r.jsxs)(n.p,{children:["Isto pode ser um ",(0,r.jsx)(n.code,{children:"client_script"})," ou ",(0,r.jsx)(n.code,{children:"server_script"}),", se preferir."]}),(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"shared_script"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_core/lib/init.lua'"})]})})})]}),(0,r.jsxs)(t.OK,{children:[(0,r.jsxs)(n.p,{children:["Se preferir, voc\xea pode usar nossa fun\xe7\xe3o ",(0,r.jsx)(n.a,{href:"../ox_lib/Modules/Require/Shared",children:"require"})," do ",(0,r.jsx)(n.a,{href:"../ox_lib",children:"ox_lib"}),"."]}),(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Ox "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_core/lib/init'"})]})})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,r.jsx)(n.p,{children:"Para usar o ox_core com seus recursos JavaScript, voc\xea precisar\xe1 do nosso pacote npm, que fornece suporte completo para TypeScript e Intellisense."}),"\n",(0,r.jsx)(c.aj,{link:"https://www.npmjs.com/package/@overextended/ox_core"}),"\n",(0,r.jsxs)(n.p,{children:["Para come\xe7ar, experimente nosso ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/fivem-typescript-boilerplate",children:"fivem-typescript-boilerplate"})," e instale o pacote ox_core."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/ox_core"})]})})}),"\n",(0,r.jsx)(n.h2,{id:"configura\xe7\xe3o",children:"Configura\xe7\xe3o"}),"\n",(0,r.jsxs)(n.p,{children:["A configura\xe7\xe3o do recurso \xe9 gerenciada usando ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"replicados",children:"Replicados"}),"\n",(0,r.jsxs)(n.p,{children:["Esses convars devem usar o comando ",(0,r.jsx)(n.code,{children:"setr"})," para serem lidos pelos clientes."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:debug"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"false"})]}),"\n",(0,r.jsxs)(n.li,{children:["Ativa mensagens e comandos de depura\xe7\xe3o. Habilitado por padr\xe3o ao usar ",(0,r.jsx)(n.code,{children:"pnpm watch"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:characterSlots"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"1"})]}),"\n",(0,r.jsx)(n.li,{children:"Define o n\xfamero de slots de personagem dispon\xedveis para recursos de sele\xe7\xe3o de personagens (ex.: ox_charselect)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:plateFormat"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:'"........"'})]}),"\n",(0,r.jsxs)(n.li,{children:["Consulte ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x79780FD2",children:"SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:deathSystem"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Ativa o sistema de morte e respawn integrado."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:characterSelect"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Ativa o registro de personagem integrado e utiliza esse personagem ao entrar."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ox:spawnLocation"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Padr\xe3o: ",(0,r.jsx)(n.code,{children:"[-258.211, -293.077, 21.6132, 206.0]"})]}),"\n",(0,r.jsx)(n.li,{children:"Define o local de spawn padr\xe3o para personagens rec\xe9m-criados."}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core.mdx",route:"/overextended/ox_core",timestamp:1730940204e3,title:"Ox Core",headings:l},pageNextRoute:"/overextended/ox_core"})},3786:function(e,n,s){"use strict";s.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=s(2676);s(5271);var i=s(5850),o=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),t=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),l=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:s,icon:i,link:o}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:o,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,r.jsx)("div",{children:i}),s,"right"===n&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,s){"use strict";var r=s(2676);s(5271);var i=s(3786);n.Z=e=>{let{repo:n,docs:s}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:n}),(0,r.jsx)(i.Vg,{link:"".concat(n,"/releases")}),s&&(0,r.jsx)(i.WR,{link:s})]})}},4049:function(e,n,s){"use strict";var r=s(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,s,i,o,t){if(t!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,s){e.exports=s(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9221)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-066f22bc57902a1d.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-066f22bc57902a1d.js new file mode 100644 index 0000000000..187735f334 --- /dev/null +++ b/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-066f22bc57902a1d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9621],{3169:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Client/OxPlayer",function(){return s(7073)}])},7073:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),r=s(2140),a=s(8745);let t=[{depth:2,value:"OxPlayer",id:"oxplayer"},{depth:2,value:"OxPlayer.addStatus",id:"oxplayeraddstatus"},{depth:2,value:"OxPlayer.get",id:"oxplayerget"},{depth:2,value:"OxPlayer.getCoords",id:"oxplayergetcoords"},{depth:2,value:"OxPlayer.getGroup",id:"oxplayergetgroup"},{depth:2,value:"OxPlayer.getGroupByType",id:"oxplayergetgroupbytype"},{depth:2,value:"OxPlayer.getGroups",id:"oxplayergetgroups"},{depth:2,value:"OxPlayer.getStatus",id:"oxplayergetstatus"},{depth:2,value:"OxPlayer.getStatuses",id:"oxplayergetstatuses"},{depth:2,value:"OxPlayer.hasPermission",id:"oxplayerhaspermission"},{depth:2,value:"OxPlayer.removeStatus",id:"oxplayerremovestatus"},{depth:2,value:"OxPlayer.on",id:"oxplayeron"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxplayer",children:"OxPlayer"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["state: ",(0,l.jsx)(n.code,{children:"StateBagInterface"})]}),"\n",(0,l.jsxs)(n.li,{children:["userId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["charId?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddstatus",children:"OxPlayer.addStatus"}),"\n",(0,l.jsx)(n.p,{children:"Aumenta o valor de um status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["success: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerget",children:"OxPlayer.get"}),"\n",(0,l.jsx)(n.p,{children:"Retorna o valor de uma chave dos metadados do player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetcoords",children:"OxPlayer.getCoords"}),"\n",(0,l.jsx)(n.p,{children:"Retorna as coordenadas do player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vector3"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroup",children:"OxPlayer.getGroup"}),"\n",(0,l.jsx)(n.p,{children:"Retorna o grau do player em um dado grupo, ou o primeiro nome e grau em um filtro."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter: ",(0,l.jsx)(n.code,{children:"string"}),"|",(0,l.jsx)(n.code,{children:"string[]"}),"|",(0,l.jsx)(n.code,{children:"{ [string]: number }"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroupbytype",children:"OxPlayer.getGroupByType"}),"\n",(0,l.jsx)(n.p,{children:"Retorna o nome do player e o grau de um grupo com um tipo correspondente."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroupByType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroups",children:"OxPlayer.getGroups"}),"\n",(0,l.jsx)(n.p,{children:"Retorna um objeto com todos os grupos do player, usando o nome do grupo como chave."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroups"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatus",children:"OxPlayer.getStatus"}),"\n",(0,l.jsx)(n.p,{children:"Retorna o valor de um status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatuses",children:"OxPlayer.getStatuses"}),"\n",(0,l.jsx)(n.p,{children:"Retorna todos os status do player, usando o nome do status como chave."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatuses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerhaspermission",children:"OxPlayer.hasPermission"}),"\n",(0,l.jsx)(n.p,{children:"Verifica se um jogador tem uma permiss\xe3o atrav\xe9s de de seus um grupos."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hasPermission"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(permission)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["permission: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovestatus",children:"OxPlayer.removeStatus"}),"\n",(0,l.jsx)(n.p,{children:"Reduz o valor de um status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeron",children:"OxPlayer.on"}),"\n",(0,l.jsx)(n.p,{children:"Escuta por altera\xe7\xf5es nos metadados do player, especificando uma chave."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"on"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cb"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data))"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["cb: ",(0,l.jsx)(n.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"unknown"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["new value of ",(0,l.jsx)(n.code,{children:"key"})]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Client/OxPlayer.mdx",route:"/overextended/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1730940204e3,title:"OxPlayer",headings:t},pageNextRoute:"/overextended/ox_core/Classes/Client/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3169)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-2175c9fa9ae9fca9.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-2175c9fa9ae9fca9.js deleted file mode 100644 index 05fcac541d..0000000000 --- a/_next/static/chunks/pages/overextended/ox_core/Classes/Client/OxPlayer-2175c9fa9ae9fca9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9621],{3169:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Client/OxPlayer",function(){return s(7073)}])},7073:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),r=s(2140),a=s(8745);let t=[{depth:2,value:"OxPlayer",id:"oxplayer"},{depth:2,value:"OxPlayer.addStatus",id:"oxplayeraddstatus"},{depth:2,value:"OxPlayer.get",id:"oxplayerget"},{depth:2,value:"OxPlayer.getCoords",id:"oxplayergetcoords"},{depth:2,value:"OxPlayer.getGroup",id:"oxplayergetgroup"},{depth:2,value:"OxPlayer.getGroupByType",id:"oxplayergetgroupbytype"},{depth:2,value:"OxPlayer.getGroups",id:"oxplayergetgroups"},{depth:2,value:"OxPlayer.getStatus",id:"oxplayergetstatus"},{depth:2,value:"OxPlayer.getStatuses",id:"oxplayergetstatuses"},{depth:2,value:"OxPlayer.hasPermission",id:"oxplayerhaspermission"},{depth:2,value:"OxPlayer.removeStatus",id:"oxplayerremovestatus"},{depth:2,value:"OxPlayer.on",id:"oxplayeron"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxplayer",children:"OxPlayer"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["state: ",(0,l.jsx)(n.code,{children:"StateBagInterface"})]}),"\n",(0,l.jsxs)(n.li,{children:["userId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["charId?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddstatus",children:"OxPlayer.addStatus"}),"\n",(0,l.jsx)(n.p,{children:"Increases value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["success: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerget",children:"OxPlayer.get"}),"\n",(0,l.jsx)(n.p,{children:"Returns a value from the players metadata."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetcoords",children:"OxPlayer.getCoords"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's current coordinates."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vector3"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroup",children:"OxPlayer.getGroup"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's grade of a given group name, or the first matched name and grade in a filter."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter: ",(0,l.jsx)(n.code,{children:"string"}),"|",(0,l.jsx)(n.code,{children:"string[]"}),"|",(0,l.jsx)(n.code,{children:"{ [string]: number }"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroupbytype",children:"OxPlayer.getGroupByType"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's name and grade of a group with a matching type."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroupByType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroups",children:"OxPlayer.getGroups"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object of all groups the player is currently in, using the group name as a key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroups"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatus",children:"OxPlayer.getStatus"}),"\n",(0,l.jsx)(n.p,{children:"Returns the value of the status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatuses",children:"OxPlayer.getStatuses"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing all statuses, using the status name as the key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatuses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerhaspermission",children:"OxPlayer.hasPermission"}),"\n",(0,l.jsx)(n.p,{children:"Checks if a user has been granted a permission by one of their groups."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hasPermission"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(permission)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["permission: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovestatus",children:"OxPlayer.removeStatus"}),"\n",(0,l.jsx)(n.p,{children:"Reduces the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeron",children:"OxPlayer.on"}),"\n",(0,l.jsx)(n.p,{children:"Listens for changes to the players metadata, specified by a key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"on"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cb"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data))"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["cb: ",(0,l.jsx)(n.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"unknown"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["new value of ",(0,l.jsx)(n.code,{children:"key"})]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Client/OxPlayer.mdx",route:"/overextended/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1730928152e3,title:"OxPlayer",headings:t},pageNextRoute:"/overextended/ox_core/Classes/Client/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3169)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-9ae9501553f8c08b.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-9ae9501553f8c08b.js deleted file mode 100644 index d0c2082123..0000000000 --- a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-9ae9501553f8c08b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3378],{3879:function(e,n,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxAccount",function(){return c(5291)}])},5291:function(e,n,c){"use strict";c.r(n),c.d(n,{__toc:function(){return i}});var s=c(2676),l=c(2140),r=c(8745);let i=[{depth:2,value:"OxAccount",id:"oxaccount"},{depth:2,value:"OxAccountMetadata",id:"oxaccountmetadata"},{depth:2,value:"OxAccount.get",id:"oxaccountget"},{depth:2,value:"OxAccount.addBalance",id:"oxaccountaddbalance"},{depth:2,value:"OxAccount.removeBalance",id:"oxaccountremovebalance"},{depth:2,value:"OxAccount.transferBalance",id:"oxaccounttransferbalance"},{depth:2,value:"OxAccount.depositMoney",id:"oxaccountdepositmoney"},{depth:2,value:"OxAccount.withdrawMoney",id:"oxaccountwithdrawmoney"},{depth:2,value:"OxAccount.deleteAccount",id:"oxaccountdeleteaccount"},{depth:2,value:"OxAccount.getCharacterRole",id:"oxaccountgetcharacterrole"},{depth:2,value:"OxAccount.setCharacterRole",id:"oxaccountsetcharacterrole"},{depth:2,value:"OxAccount.playerHasPermission",id:"oxaccountplayerhaspermission"},{depth:2,value:"OxAccount.setShared",id:"oxaccountsetshared"},{depth:2,value:"OxAccount.createInvoice",id:"oxaccountcreateinvoice"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"oxaccount",children:"OxAccount"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["accountId",(0,s.jsx)(n.code,{children:" number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountmetadata",children:"OxAccountMetadata"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["balance: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["isDefault: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["label?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["owner?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["group?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["type: ",(0,s.jsx)(n.code,{children:"personal"})," | ",(0,s.jsx)(n.code,{children:"shared"})," | ",(0,s.jsx)(n.code,{children:"group"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountget",children:"OxAccount.get"}),"\n",(0,s.jsx)(n.p,{children:"Get the value of specific key(s) from the account's metadata."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["key: ",(0,s.jsx)(n.code,{children:"string"})," | ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"OxAccountMetadata[key]"})," | ",(0,s.jsx)(n.code,{children:"OxAccountMetadata[key][]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Returns an array if passing multiple keys."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountaddbalance",children:"OxAccount.addBalance"}),"\n",(0,s.jsx)(n.p,{children:"Add funds to the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addBalance"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ amount, message })"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["amount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,s.jsx)(n.code,{children:"'no_balance'"})," | ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountremovebalance",children:"OxAccount.removeBalance"}),"\n",(0,s.jsx)(n.p,{children:"Remove funds from the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeBalance"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ amount, message, overdraw })"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["amount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["overdraw?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,s.jsx)(n.code,{children:"'no_balance'"})," | ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccounttransferbalance",children:"OxAccount.transferBalance"}),"\n",(0,s.jsx)(n.p,{children:"Transfer funds to another account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ toId, amount, overdraw, message, note, actorId })"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["toId: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The accountId to transfer funds to."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["amount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["overdraw?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["note?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["actorId? ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The charId of the player initiating the transfer."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,s.jsx)(n.code,{children:"'no_balance'"})," | ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountdepositmoney",children:"OxAccount.depositMoney"}),"\n",(0,s.jsx)(n.p,{children:"Deposit money into the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, amount, message, note)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["amount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["note?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,s.jsx)(n.code,{children:"'insufficient_funds'"})," | ",(0,s.jsx)(n.code,{children:"'no_balance'"})," | ",(0,s.jsx)(n.code,{children:"'no_access'"})," | ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountwithdrawmoney",children:"OxAccount.withdrawMoney"}),"\n",(0,s.jsx)(n.p,{children:"Withdraw money from the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, amount, message, note)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["amount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["note?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,s.jsx)(n.code,{children:"'no_charId'"})," | ",(0,s.jsx)(n.code,{children:"'insufficient_funds'"})," | ",(0,s.jsx)(n.code,{children:"'no_balance'"})," | ",(0,s.jsx)(n.code,{children:"'no_access'"})," | ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountdeleteaccount",children:"OxAccount.deleteAccount"}),"\n",(0,s.jsx)(n.p,{children:"Mark the account as deleted. It can no longer be accessed, but remains in the database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"deleteAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountgetcharacterrole",children:"OxAccount.getCharacterRole"}),"\n",(0,s.jsx)(n.p,{children:"Get the account access role of a character by charId or stateId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCharacterRole"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountsetcharacterrole",children:"OxAccount.setCharacterRole"}),"\n",(0,s.jsx)(n.p,{children:"Set the account access role of a character by charId or stateId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setCharacterRole"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id, role)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["role?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountplayerhaspermission",children:"OxAccount.playerHasPermission"}),"\n",(0,s.jsx)(n.p,{children:"Checks if a player's active character has permission to perform an action on the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"playerHasPermission"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, permission)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["permission: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountsetshared",children:"OxAccount.setShared"}),"\n",(0,s.jsx)(n.p,{children:"Set the account as shared, allowing permissions to be assigned to other characters."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setShared"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'update_account_error'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxaccountcreateinvoice",children:"OxAccount.createInvoice"}),"\n",(0,s.jsx)(n.p,{children:"Create an unpaid invoice on the account."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"createInvoice"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoice)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["invoice: ",(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["actorId?: number;","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The charId of the player creating the invoice."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["toAccount: number;","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The accountId of the account receiving the invoice."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"amount: number;"}),"\n",(0,s.jsx)(n.li,{children:"message: string;"}),"\n",(0,s.jsx)(n.li,{children:"dueDate: string;"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message: ",(0,s.jsx)(n.code,{children:"'no_charId'"})," | ",(0,s.jsx)(n.code,{children:"'no_permission'"})," | ",(0,s.jsx)(n.code,{children:"'no_target_account'"})]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxAccount.mdx",route:"/overextended/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"},timestamp:1730928152e3,title:"OxAccount",headings:i},pageNextRoute:"/overextended/ox_core/Classes/Server/OxAccount"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3879)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-db5be0e5517ea206.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-db5be0e5517ea206.js new file mode 100644 index 0000000000..534b3cb8d9 --- /dev/null +++ b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxAccount-db5be0e5517ea206.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3378],{3879:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxAccount",function(){return s(5291)}])},5291:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return a}});var c=s(2676),l=s(2140),r=s(8745);let a=[{depth:2,value:"OxAccount",id:"oxaccount"},{depth:2,value:"OxAccountMetadata",id:"oxaccountmetadata"},{depth:2,value:"OxAccount.get",id:"oxaccountget"},{depth:2,value:"OxAccount.addBalance",id:"oxaccountaddbalance"},{depth:2,value:"OxAccount.removeBalance",id:"oxaccountremovebalance"},{depth:2,value:"OxAccount.transferBalance",id:"oxaccounttransferbalance"},{depth:2,value:"OxAccount.depositMoney",id:"oxaccountdepositmoney"},{depth:2,value:"OxAccount.withdrawMoney",id:"oxaccountwithdrawmoney"},{depth:2,value:"OxAccount.deleteAccount",id:"oxaccountdeleteaccount"},{depth:2,value:"OxAccount.getCharacterRole",id:"oxaccountgetcharacterrole"},{depth:2,value:"OxAccount.setCharacterRole",id:"oxaccountsetcharacterrole"},{depth:2,value:"OxAccount.playerHasPermission",id:"oxaccountplayerhaspermission"},{depth:2,value:"OxAccount.setShared",id:"oxaccountsetshared"},{depth:2,value:"OxAccount.createInvoice",id:"oxaccountcreateinvoice"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,r.a)(),e.components);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.h2,{id:"oxaccount",children:"OxAccount"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["accountId ",(0,c.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountmetadata",children:"OxAccountMetadata"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["id: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["balance: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["isDefault: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["label?: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["owner?: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["group?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["type: ",(0,c.jsx)(n.code,{children:"personal"})," | ",(0,c.jsx)(n.code,{children:"shared"})," | ",(0,c.jsx)(n.code,{children:"group"})]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountget",children:"OxAccount.get"}),"\n",(0,c.jsx)(n.p,{children:"Pega o valor de uma chave espec\xedfica dos metadados da conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["key: ",(0,c.jsx)(n.code,{children:"string"})," | ",(0,c.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"OxAccountMetadata[key]"})," | ",(0,c.jsx)(n.code,{children:"OxAccountMetadata[key][]"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"Retorna um array se forem passadas m\xfaltiplas chaves."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountaddbalance",children:"OxAccount.addBalance"}),"\n",(0,c.jsx)(n.p,{children:"Adiciona fundos a conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addBalance"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ amount, message })"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["amount: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["message?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,c.jsx)(n.code,{children:"'no_balance'"})," | ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountremovebalance",children:"OxAccount.removeBalance"}),"\n",(0,c.jsx)(n.p,{children:"Remove fundos da conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeBalance"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ amount, message, overdraw })"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["amount: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["message?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["overdraw?: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,c.jsx)(n.code,{children:"'no_balance'"})," | ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccounttransferbalance",children:"OxAccount.transferBalance"}),"\n",(0,c.jsx)(n.p,{children:"Transfere fundos para outra conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({ toId, amount, overdraw, message, note, actorId })"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["toId: ",(0,c.jsx)(n.code,{children:"number"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"O accountId que receber\xe1 os fundos."}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["amount: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["message?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["overdraw?: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["note?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["actorId? ",(0,c.jsx)(n.code,{children:"number"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"O charId do player que fez a transfer\xeancia."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,c.jsx)(n.code,{children:"'no_balance'"})," | ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountdepositmoney",children:"OxAccount.depositMoney"}),"\n",(0,c.jsx)(n.p,{children:"Deposita dinheiro na conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, amount, message, note)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["playerId: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["amount: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["message?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["note?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,c.jsx)(n.code,{children:"'insufficient_funds'"})," | ",(0,c.jsx)(n.code,{children:"'no_balance'"})," | ",(0,c.jsx)(n.code,{children:"'no_access'"})," | ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountwithdrawmoney",children:"OxAccount.withdrawMoney"}),"\n",(0,c.jsx)(n.p,{children:"Retira dinheiro da conta(saque)."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"transferBalance"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, amount, message, note)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["playerId: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["amount: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["message?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["note?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'amount_not_number'"})," | ",(0,c.jsx)(n.code,{children:"'no_charId'"})," | ",(0,c.jsx)(n.code,{children:"'insufficient_funds'"})," | ",(0,c.jsx)(n.code,{children:"'no_balance'"})," | ",(0,c.jsx)(n.code,{children:"'no_access'"})," | ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountdeleteaccount",children:"OxAccount.deleteAccount"}),"\n",(0,c.jsx)(n.p,{children:"Marca a conta como exclu\xedda. Ela n\xe3o pode mais ser acessada, mas permanece no banco de dados."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"deleteAccount"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountgetcharacterrole",children:"OxAccount.getCharacterRole"}),"\n",(0,c.jsx)(n.p,{children:"Pega o cargo de acesso de um personagem pelo seu charId ou stateId."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCharacterRole"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["id: ",(0,c.jsx)(n.code,{children:"number"})," | ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:(0,c.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountsetcharacterrole",children:"OxAccount.setCharacterRole"}),"\n",(0,c.jsx)(n.p,{children:"Seta o cargo de acesso de um personagem pelo seu charId ou stateId."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setCharacterRole"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id, role)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["id: ",(0,c.jsx)(n.code,{children:"number"})," | ",(0,c.jsx)(n.code,{children:"string"})]}),"\n",(0,c.jsxs)(n.li,{children:["role?: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'something_went_wrong'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountplayerhaspermission",children:"OxAccount.playerHasPermission"}),"\n",(0,c.jsx)(n.p,{children:"Verifica se o personagem ativo do jogadortem permiss\xe3o para realizar uma a\xe7\xe3o na conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"playerHasPermission"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, permission)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["playerId: ",(0,c.jsx)(n.code,{children:"number"})]}),"\n",(0,c.jsxs)(n.li,{children:["permission: ",(0,c.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:(0,c.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountsetshared",children:"OxAccount.setShared"}),"\n",(0,c.jsx)(n.p,{children:"Marca a conta como compartilhada, permitindo que permiss\xf5es sejam atribuidas a outros personagens."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setShared"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'update_account_error'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"oxaccountcreateinvoice",children:"OxAccount.createInvoice"}),"\n",(0,c.jsx)(n.p,{children:"Cria uma nova cobran\xe7a na conta."}),"\n",(0,c.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,c.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,c.jsxs)(n.span,{className:"line",children:[(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"account."}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"createInvoice"}),(0,c.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoice)"})]})})}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Par\xe2metros"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["invoice: ",(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["actorId?: number;","\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"O charId do player que fez a cobran\xe7a."}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["toAccount: number;","\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"O accountId da conta que receber\xe1 a cobran\xe7a."}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.li,{children:"amount: number;"}),"\n",(0,c.jsx)(n.li,{children:"message: string;"}),"\n",(0,c.jsx)(n.li,{children:"dueDate: string;"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.strong,{children:"Retornos"})}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"object"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["success: ",(0,c.jsx)(n.code,{children:"boolean"})]}),"\n",(0,c.jsxs)(n.li,{children:["message: ",(0,c.jsx)(n.code,{children:"'no_charId'"})," | ",(0,c.jsx)(n.code,{children:"'no_permission'"})," | ",(0,c.jsx)(n.code,{children:"'no_target_account'"})]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxAccount.mdx",route:"/overextended/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"},timestamp:1730940204e3,title:"OxAccount",headings:a},pageNextRoute:"/overextended/ox_core/Classes/Server/OxAccount"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3879)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-3815284457c246e3.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-1b26108789033740.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-3815284457c246e3.js rename to _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-1b26108789033740.js index d9be800a55..fb49f3dffb 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-3815284457c246e3.js +++ b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxPlayer-1b26108789033740.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7354],{9915:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxPlayer",function(){return s(1651)}])},1651:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return i}});var l=s(2676),r=s(2140),a=s(8745);let i=[{depth:2,value:"OxPlayer",id:"oxplayer"},{depth:2,value:"OxPlayer.addLicense",id:"oxplayeraddlicense"},{depth:2,value:"OxPlayer.addStatus",id:"oxplayeraddstatus"},{depth:2,value:"OxPlayer.createCharacter",id:"oxplayercreatecharacter"},{depth:2,value:"OxPlayer.deleteCharacter",id:"oxplayerdeletecharacter"},{depth:2,value:"OxPlayer.emit",id:"oxplayeremit"},{depth:2,value:"OxPlayer.get",id:"oxplayerget"},{depth:2,value:"OxPlayer.getAccount",id:"oxplayergetaccount"},{depth:2,value:"OxPlayer.getCoords",id:"oxplayergetcoords"},{depth:2,value:"OxPlayer.getGroup",id:"oxplayergetgroup"},{depth:2,value:"OxPlayer.getGroupByType",id:"oxplayergetgroupbytype"},{depth:2,value:"OxPlayer.getGroups",id:"oxplayergetgroups"},{depth:2,value:"OxPlayer.getLicense",id:"oxplayergetlicense"},{depth:2,value:"OxPlayer.getLicenses",id:"oxplayergetlicenses"},{depth:2,value:"OxPlayer.getState",id:"oxplayergetstate"},{depth:2,value:"OxPlayer.getStatus",id:"oxplayergetstatus"},{depth:2,value:"OxPlayer.getStatuses",id:"oxplayergetstatuses"},{depth:2,value:"OxPlayer.hasPermission",id:"oxplayerhaspermission"},{depth:2,value:"OxPlayer.logout",id:"oxplayerlogout"},{depth:2,value:"OxPlayer.payInvoice",id:"oxplayerpayinvoice"},{depth:2,value:"OxPlayer.removeLicense",id:"oxplayerremovelicense"},{depth:2,value:"OxPlayer.removeStatus",id:"oxplayerremovestatus"},{depth:2,value:"OxPlayer.save",id:"oxplayersave"},{depth:2,value:"OxPlayer.set",id:"oxplayerset"},{depth:2,value:"OxPlayer.setActiveCharacter",id:"oxplayersetactivecharacter"},{depth:2,value:"OxPlayer.setActiveGroup",id:"oxplayersetactivegroup"},{depth:2,value:"OxPlayer.setGroup",id:"oxplayersetgroup"},{depth:2,value:"OxPlayer.setStatus",id:"oxplayersetstatus"},{depth:2,value:"OxPlayer.updateLicense",id:"oxplayerupdatelicense"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxplayer",children:"OxPlayer"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["identifier: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["ped: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["source: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["state: ",(0,l.jsx)(n.code,{children:"StateBagInterface"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["userId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["username: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddlicense",children:"OxPlayer.addLicense"}),"\n",(0,l.jsx)(n.p,{children:"Grants a license to the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddstatus",children:"OxPlayer.addStatus"}),"\n",(0,l.jsx)(n.p,{children:"Increases the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayercreatecharacter",children:"OxPlayer.createCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Registers a new character for a player that has not already selected a character."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"createCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["gender: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["date: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The index of the new character in an array of all characters owned by the player."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerdeletecharacter",children:"OxPlayer.deleteCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Deletes a character with the given charId, if owned by the player and they have not selected a character."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"deleteCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(charId)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeremit",children:"OxPlayer.emit"}),"\n",(0,l.jsx)(n.p,{children:"Triggers a client event for the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"emit"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["eventName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["...args: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerget",children:"OxPlayer.get"}),"\n",(0,l.jsx)(n.p,{children:"Get the value of specific key from the player's metadata."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetaccount",children:"OxPlayer.getAccount"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's default account."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getAccount"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetcoords",children:"OxPlayer.getCoords"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's current coordinates."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vector3"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroup",children:"OxPlayer.getGroup"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's grade of a given group name, or the first matched name and grade in a filter."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter: ",(0,l.jsx)(n.code,{children:"string"})," | ",(0,l.jsx)(n.code,{children:"string[]"})," | ",(0,l.jsx)(n.code,{children:"{ [string]: number }"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"number"})," | ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number?"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroupbytype",children:"OxPlayer.getGroupByType"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's name and grade of a group with a matching type."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroupByType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroups",children:"OxPlayer.getGroups"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object of all groups the player is currently in, using the group name as a key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroups"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetlicense",children:"OxPlayer.getLicense"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing information for the specified license."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName: string): object"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"issued: number"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"suspended?: [number, number]"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"[key: string]: any"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetlicenses",children:"OxPlayer.getLicenses"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing information for all licenses."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getLicenses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"{ [string]: object }"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"issued: number"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"suspended?: [number, number]"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"[key: string]: any"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstate",children:"OxPlayer.getState"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's statebag interface."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getState"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"StateBagInterface"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatus",children:"OxPlayer.getStatus"}),"\n",(0,l.jsx)(n.p,{children:"Returns the value of the status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatuses",children:"OxPlayer.getStatuses"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing all statuses, using the status name as the key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatuses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerhaspermission",children:"OxPlayer.hasPermission"}),"\n",(0,l.jsx)(n.p,{children:"Checks if a user has been granted a permission by one of their groups."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hasPermission"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(permission)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["permission: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerlogout",children:"OxPlayer.logout"}),"\n",(0,l.jsx)(n.p,{children:"Clears data for the active character and transitions the player to character selection, if valid."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logout"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(save, dropped)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["save?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["If the active character data should be saved to the database, defaulting to ",(0,l.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["dropped?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"If the player has been disconnected from the server."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerpayinvoice",children:"OxPlayer.payInvoice"}),"\n",(0,l.jsx)(n.p,{children:"Pays an account invoice with the given invoiceId."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"payInvoice"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoiceId)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["invoiceId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["success: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["message?: ",(0,l.jsx)(n.code,{children:'"no_charId"'})," | ",(0,l.jsx)(n.code,{children:'"no_permission"'})," | ",(0,l.jsx)(n.code,{children:'"no_balance"'})," | ",(0,l.jsx)(n.code,{children:'"no_invoice"'})," | ",(0,l.jsx)(n.code,{children:'"invoice_paid"'})," | ",(0,l.jsx)(n.code,{children:'"insufficient_balance"'})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovelicense",children:"OxPlayer.removeLicense"}),"\n",(0,l.jsx)(n.p,{children:"Remove a license from the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovestatus",children:"OxPlayer.removeStatus"}),"\n",(0,l.jsx)(n.p,{children:"Reduces the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersave",children:"OxPlayer.save"}),"\n",(0,l.jsx)(n.p,{children:"Saves the active character to the database."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"save"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerset",children:"OxPlayer.set"}),"\n",(0,l.jsx)(n.p,{children:"Stores a value in the player's metadata, which can be optionally synced with the client."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, value, replicated)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n",(0,l.jsxs)(n.li,{children:["replicated?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetactivecharacter",children:"OxPlayer.setActiveCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Loads and sets a character as the player's active character. Takes a charId or an object containing new character data."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setActiveCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"number"})," | ",(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["gender: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["date: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["x?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["y?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["z?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["heading?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastPlayed?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["health?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["armour?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["isNew?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetactivegroup",children:"OxPlayer.setActiveGroup"}),"\n",(0,l.jsx)(n.p,{children:'Sets a group the player is in as their active or "primary" group. If no arguments are passed, no active group will be set.'}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setActiveGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName?: string, temp?: boolean)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["groupName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["temporary?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["If ",(0,l.jsx)(n.code,{children:"true"})," it will persist through sessions."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetgroup",children:"OxPlayer.setGroup"}),"\n",(0,l.jsx)(n.p,{children:"Sets the player's grade within a group. If grade is undefined or 0 they will be removed from the group."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["groupName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["grade?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetstatus",children:"OxPlayer.setStatus"}),"\n",(0,l.jsx)(n.p,{children:"Sets the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerupdatelicense",children:"OxPlayer.updateLicense"}),"\n",(0,l.jsx)(n.p,{children:"Sets information on a player license."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"updateLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName, key, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxPlayer.mdx",route:"/overextended/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1730928152e3,title:"OxPlayer",headings:i},pageNextRoute:"/overextended/ox_core/Classes/Server/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9915)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7354],{9915:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxPlayer",function(){return s(1651)}])},1651:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return i}});var l=s(2676),r=s(2140),a=s(8745);let i=[{depth:2,value:"OxPlayer",id:"oxplayer"},{depth:2,value:"OxPlayer.addLicense",id:"oxplayeraddlicense"},{depth:2,value:"OxPlayer.addStatus",id:"oxplayeraddstatus"},{depth:2,value:"OxPlayer.createCharacter",id:"oxplayercreatecharacter"},{depth:2,value:"OxPlayer.deleteCharacter",id:"oxplayerdeletecharacter"},{depth:2,value:"OxPlayer.emit",id:"oxplayeremit"},{depth:2,value:"OxPlayer.get",id:"oxplayerget"},{depth:2,value:"OxPlayer.getAccount",id:"oxplayergetaccount"},{depth:2,value:"OxPlayer.getCoords",id:"oxplayergetcoords"},{depth:2,value:"OxPlayer.getGroup",id:"oxplayergetgroup"},{depth:2,value:"OxPlayer.getGroupByType",id:"oxplayergetgroupbytype"},{depth:2,value:"OxPlayer.getGroups",id:"oxplayergetgroups"},{depth:2,value:"OxPlayer.getLicense",id:"oxplayergetlicense"},{depth:2,value:"OxPlayer.getLicenses",id:"oxplayergetlicenses"},{depth:2,value:"OxPlayer.getState",id:"oxplayergetstate"},{depth:2,value:"OxPlayer.getStatus",id:"oxplayergetstatus"},{depth:2,value:"OxPlayer.getStatuses",id:"oxplayergetstatuses"},{depth:2,value:"OxPlayer.hasPermission",id:"oxplayerhaspermission"},{depth:2,value:"OxPlayer.logout",id:"oxplayerlogout"},{depth:2,value:"OxPlayer.payInvoice",id:"oxplayerpayinvoice"},{depth:2,value:"OxPlayer.removeLicense",id:"oxplayerremovelicense"},{depth:2,value:"OxPlayer.removeStatus",id:"oxplayerremovestatus"},{depth:2,value:"OxPlayer.save",id:"oxplayersave"},{depth:2,value:"OxPlayer.set",id:"oxplayerset"},{depth:2,value:"OxPlayer.setActiveCharacter",id:"oxplayersetactivecharacter"},{depth:2,value:"OxPlayer.setActiveGroup",id:"oxplayersetactivegroup"},{depth:2,value:"OxPlayer.setGroup",id:"oxplayersetgroup"},{depth:2,value:"OxPlayer.setStatus",id:"oxplayersetstatus"},{depth:2,value:"OxPlayer.updateLicense",id:"oxplayerupdatelicense"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxplayer",children:"OxPlayer"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["identifier: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["ped: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["source: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["state: ",(0,l.jsx)(n.code,{children:"StateBagInterface"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["userId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["username: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddlicense",children:"OxPlayer.addLicense"}),"\n",(0,l.jsx)(n.p,{children:"Grants a license to the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeraddstatus",children:"OxPlayer.addStatus"}),"\n",(0,l.jsx)(n.p,{children:"Increases the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayercreatecharacter",children:"OxPlayer.createCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Registers a new character for a player that has not already selected a character."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"createCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["gender: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["date: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The index of the new character in an array of all characters owned by the player."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerdeletecharacter",children:"OxPlayer.deleteCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Deletes a character with the given charId, if owned by the player and they have not selected a character."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"deleteCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(charId)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayeremit",children:"OxPlayer.emit"}),"\n",(0,l.jsx)(n.p,{children:"Triggers a client event for the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"emit"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["eventName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["...args: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerget",children:"OxPlayer.get"}),"\n",(0,l.jsx)(n.p,{children:"Get the value of specific key from the player's metadata."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"unknown"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetaccount",children:"OxPlayer.getAccount"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's default account."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getAccount"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetcoords",children:"OxPlayer.getCoords"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's current coordinates."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vector3"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroup",children:"OxPlayer.getGroup"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's grade of a given group name, or the first matched name and grade in a filter."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter: ",(0,l.jsx)(n.code,{children:"string"})," | ",(0,l.jsx)(n.code,{children:"string[]"})," | ",(0,l.jsx)(n.code,{children:"{ [string]: number }"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"number"})," | ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number?"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroupbytype",children:"OxPlayer.getGroupByType"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's name and grade of a group with a matching type."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroupByType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetgroups",children:"OxPlayer.getGroups"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object of all groups the player is currently in, using the group name as a key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getGroups"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetlicense",children:"OxPlayer.getLicense"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing information for the specified license."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName: string): object"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"issued: number"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"suspended?: [number, number]"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"[key: string]: any"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetlicenses",children:"OxPlayer.getLicenses"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing information for all licenses."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getLicenses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"{ [string]: object }"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"issued: number"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"suspended?: [number, number]"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"[key: string]: any"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstate",children:"OxPlayer.getState"}),"\n",(0,l.jsx)(n.p,{children:"Returns the player's statebag interface."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getState"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"StateBagInterface"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatus",children:"OxPlayer.getStatus"}),"\n",(0,l.jsx)(n.p,{children:"Returns the value of the status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayergetstatuses",children:"OxPlayer.getStatuses"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing all statuses, using the status name as the key."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getStatuses"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"{ [string]: number }"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerhaspermission",children:"OxPlayer.hasPermission"}),"\n",(0,l.jsx)(n.p,{children:"Checks if a user has been granted a permission by one of their groups."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hasPermission"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(permission)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["permission: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerlogout",children:"OxPlayer.logout"}),"\n",(0,l.jsx)(n.p,{children:"Clears data for the active character and transitions the player to character selection, if valid."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logout"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(save, dropped)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["save?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["If the active character data should be saved to the database, defaulting to ",(0,l.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["dropped?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"If the player has been disconnected from the server."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerpayinvoice",children:"OxPlayer.payInvoice"}),"\n",(0,l.jsx)(n.p,{children:"Pays an account invoice with the given invoiceId."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"payInvoice"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoiceId)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["invoiceId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["success: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["message?: ",(0,l.jsx)(n.code,{children:'"no_charId"'})," | ",(0,l.jsx)(n.code,{children:'"no_permission"'})," | ",(0,l.jsx)(n.code,{children:'"no_balance"'})," | ",(0,l.jsx)(n.code,{children:'"no_invoice"'})," | ",(0,l.jsx)(n.code,{children:'"invoice_paid"'})," | ",(0,l.jsx)(n.code,{children:'"insufficient_balance"'})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovelicense",children:"OxPlayer.removeLicense"}),"\n",(0,l.jsx)(n.p,{children:"Remove a license from the player."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerremovestatus",children:"OxPlayer.removeStatus"}),"\n",(0,l.jsx)(n.p,{children:"Reduces the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersave",children:"OxPlayer.save"}),"\n",(0,l.jsx)(n.p,{children:"Saves the active character to the database."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"save"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerset",children:"OxPlayer.set"}),"\n",(0,l.jsx)(n.p,{children:"Stores a value in the player's metadata, which can be optionally synced with the client."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, value, replicated)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n",(0,l.jsxs)(n.li,{children:["replicated?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetactivecharacter",children:"OxPlayer.setActiveCharacter"}),"\n",(0,l.jsx)(n.p,{children:"Loads and sets a character as the player's active character. Takes a charId or an object containing new character data."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setActiveCharacter"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"number"})," | ",(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["gender: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["date: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["charId: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["stateId: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["firstName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["x?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["y?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["z?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["heading?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["lastPlayed?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["health?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["armour?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["isNew?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetactivegroup",children:"OxPlayer.setActiveGroup"}),"\n",(0,l.jsx)(n.p,{children:'Sets a group the player is in as their active or "primary" group. If no arguments are passed, no active group will be set.'}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setActiveGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName?: string, temp?: boolean)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["groupName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["temporary?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["If ",(0,l.jsx)(n.code,{children:"true"})," it will persist through sessions."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetgroup",children:"OxPlayer.setGroup"}),"\n",(0,l.jsx)(n.p,{children:"Sets the player's grade within a group. If grade is undefined or 0 they will be removed from the group."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setGroup"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["groupName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["grade?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayersetstatus",children:"OxPlayer.setStatus"}),"\n",(0,l.jsx)(n.p,{children:"Sets the value of a status."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setStatus"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(statusName, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["statusName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxplayerupdatelicense",children:"OxPlayer.updateLicense"}),"\n",(0,l.jsx)(n.p,{children:"Sets information on a player license."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"updateLicense"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(licenseName, key, value)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["licenseName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"boolean"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxPlayer.mdx",route:"/overextended/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1730940204e3,title:"OxPlayer",headings:i},pageNextRoute:"/overextended/ox_core/Classes/Server/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9915)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-23c1ae97eefc9a31.js b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-e0309a113d655570.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-23c1ae97eefc9a31.js rename to _next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-e0309a113d655570.js index 93e1671dd4..953f1c5792 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-23c1ae97eefc9a31.js +++ b/_next/static/chunks/pages/overextended/ox_core/Classes/Server/OxVehicle-e0309a113d655570.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4669],{9507:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxVehicle",function(){return s(3043)}])},3043:function(e,l,s){"use strict";s.r(l),s.d(l,{__toc:function(){return a}});var n=s(2676),i=s(2140),t=s(8745);let a=[{depth:2,value:"OxVehicle",id:"oxvehicle"},{depth:2,value:"OxVehicle.delete",id:"oxvehicledelete"},{depth:2,value:"OxVehicle.despawn",id:"oxvehicledespawn"},{depth:2,value:"OxVehicle.get",id:"oxvehicleget"},{depth:2,value:"OxVehicle.getCoords",id:"oxvehiclegetcoords"},{depth:2,value:"OxVehicle.getState",id:"oxvehiclegetstate"},{depth:2,value:"OxVehicle.getStored",id:"oxvehiclegetstored"},{depth:2,value:"OxVehicle.respawn",id:"oxvehiclerespawn"},{depth:2,value:"OxVehicle.save",id:"oxvehiclesave"},{depth:3,value:"OxVehicle.set",id:"oxvehicleset"},{depth:2,value:"OxVehicle.setGroup",id:"oxvehiclesetgroup"},{depth:2,value:"OxVehicle.setOwner",id:"oxvehiclesetowner"},{depth:2,value:"OxVehicle.setPlate",id:"oxvehiclesetplate"},{depth:2,value:"OxVehicle.setProperties",id:"oxvehiclesetproperties"},{depth:2,value:"OxVehicle.setStored",id:"oxvehiclesetstored"}];function _createMdxContent(e){let l=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong",h3:"h3",em:"em"},(0,t.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h2,{id:"oxvehicle",children:"OxVehicle"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["entity: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["make: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["model: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["netId: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["plate: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["group?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["id?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["owner?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["vin?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicledelete",children:"OxVehicle.delete"}),"\n",(0,n.jsx)(l.p,{children:"Despawns the vehicle and removes it from the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"delete"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicledespawn",children:"OxVehicle.despawn"}),"\n",(0,n.jsx)(l.p,{children:"Despawns the vehicle, optionally saving it to the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"despawn"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(save)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["save?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicleget",children:"OxVehicle.get"}),"\n",(0,n.jsx)(l.p,{children:"Get the value of specific key from the vehicle's metadata."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["key: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"unknown"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetcoords",children:"OxVehicle.getCoords"}),"\n",(0,n.jsx)(l.p,{children:"Returns the vehicle's current coordinates."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(): Vector3"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetstate",children:"OxVehicle.getState"}),"\n",(0,n.jsx)(l.p,{children:"Returns the vehicle's statebag interface."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getState"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"StateBagInterface"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetstored",children:"OxVehicle.getStored"}),"\n",(0,n.jsx)(l.p,{children:'Returns the vehicle\'s "stored" state.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getStored"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"string?"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclerespawn",children:"OxVehicle.respawn"}),"\n",(0,n.jsx)(l.p,{children:"Spawns a new entity for the vehicle, removing an existing entity if it exists and reapplying stored vehicle properties."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"respawn"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, rotation)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["coords?: ",(0,n.jsx)(l.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(l.li,{children:["rotation?: ",(0,n.jsx)(l.code,{children:"vector3"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesave",children:"OxVehicle.save"}),"\n",(0,n.jsx)(l.p,{children:"Saves the vehicle to the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"save"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"number"})}),"\n"]}),"\n",(0,n.jsx)(l.h3,{id:"oxvehicleset",children:"OxVehicle.set"}),"\n",(0,n.jsxs)(l.p,{children:["Stores a value in the vehicle's metadata, which will be saved to the database (",(0,n.jsx)(l.em,{children:"this behaviour is likely to be removed"}),")."]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(key, value)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["key: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["value: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetgroup",children:"OxVehicle.setGroup"}),"\n",(0,n.jsx)(l.p,{children:'Sets the vehicle as a group vehicle "owned" by the given group name, or removes the group if omitted.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setGroup"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["groupName?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetowner",children:"OxVehicle.setOwner"}),"\n",(0,n.jsx)(l.p,{children:"Sets the owner of a vehicle as the given charId, or removes the owner if omitted."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setOwner"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(charId)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["charId?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetplate",children:"OxVehicle.setPlate"}),"\n",(0,n.jsx)(l.p,{children:"Sets the registered plate of a vehicle to the given value. The plate will be padded or stripped to 8 characters."}),"\n",(0,n.jsx)(l.p,{children:"This plate is not necessarily the displayed plate on vehicle properties."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setPlate"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(plate: string)"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetproperties",children:"OxVehicle.setProperties"}),"\n",(0,n.jsx)(l.p,{children:"Saves the properties (mods, extras, etc.) stored on the vehicle, optionally applying them to the entity."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setProperties"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(properties, apply)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["properties: ",(0,n.jsx)(l.code,{children:"VehicleProperties"})]}),"\n",(0,n.jsxs)(l.li,{children:["apply?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetstored",children:"OxVehicle.setStored"}),"\n",(0,n.jsx)(l.p,{children:'Sets the vehicle as "stored" at the given value (e.g. impound, garage, null), and optionally despawns the vehicle.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setStored"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(value, despawn)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["value?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["despawn?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]})]})}l.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,t.a)(),e.components);return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxVehicle.mdx",route:"/overextended/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"},timestamp:1730928152e3,title:"OxVehicle",headings:a},pageNextRoute:"/overextended/ox_core/Classes/Server/OxVehicle"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9507)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4669],{9507:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Classes/Server/OxVehicle",function(){return s(3043)}])},3043:function(e,l,s){"use strict";s.r(l),s.d(l,{__toc:function(){return a}});var n=s(2676),i=s(2140),t=s(8745);let a=[{depth:2,value:"OxVehicle",id:"oxvehicle"},{depth:2,value:"OxVehicle.delete",id:"oxvehicledelete"},{depth:2,value:"OxVehicle.despawn",id:"oxvehicledespawn"},{depth:2,value:"OxVehicle.get",id:"oxvehicleget"},{depth:2,value:"OxVehicle.getCoords",id:"oxvehiclegetcoords"},{depth:2,value:"OxVehicle.getState",id:"oxvehiclegetstate"},{depth:2,value:"OxVehicle.getStored",id:"oxvehiclegetstored"},{depth:2,value:"OxVehicle.respawn",id:"oxvehiclerespawn"},{depth:2,value:"OxVehicle.save",id:"oxvehiclesave"},{depth:3,value:"OxVehicle.set",id:"oxvehicleset"},{depth:2,value:"OxVehicle.setGroup",id:"oxvehiclesetgroup"},{depth:2,value:"OxVehicle.setOwner",id:"oxvehiclesetowner"},{depth:2,value:"OxVehicle.setPlate",id:"oxvehiclesetplate"},{depth:2,value:"OxVehicle.setProperties",id:"oxvehiclesetproperties"},{depth:2,value:"OxVehicle.setStored",id:"oxvehiclesetstored"}];function _createMdxContent(e){let l=Object.assign({h2:"h2",ul:"ul",li:"li",code:"code",p:"p",pre:"pre",span:"span",strong:"strong",h3:"h3",em:"em"},(0,t.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h2,{id:"oxvehicle",children:"OxVehicle"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["entity: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["make: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["model: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["netId: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["plate: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["group?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["id?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["owner?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n",(0,n.jsxs)(l.li,{children:["vin?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicledelete",children:"OxVehicle.delete"}),"\n",(0,n.jsx)(l.p,{children:"Despawns the vehicle and removes it from the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"delete"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicledespawn",children:"OxVehicle.despawn"}),"\n",(0,n.jsx)(l.p,{children:"Despawns the vehicle, optionally saving it to the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"despawn"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(save)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["save?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehicleget",children:"OxVehicle.get"}),"\n",(0,n.jsx)(l.p,{children:"Get the value of specific key from the vehicle's metadata."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"get"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(key)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["key: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"unknown"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetcoords",children:"OxVehicle.getCoords"}),"\n",(0,n.jsx)(l.p,{children:"Returns the vehicle's current coordinates."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getCoords"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(): Vector3"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetstate",children:"OxVehicle.getState"}),"\n",(0,n.jsx)(l.p,{children:"Returns the vehicle's statebag interface."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getState"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"StateBagInterface"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclegetstored",children:"OxVehicle.getStored"}),"\n",(0,n.jsx)(l.p,{children:'Returns the vehicle\'s "stored" state.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getStored"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"string?"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclerespawn",children:"OxVehicle.respawn"}),"\n",(0,n.jsx)(l.p,{children:"Spawns a new entity for the vehicle, removing an existing entity if it exists and reapplying stored vehicle properties."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"respawn"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, rotation)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["coords?: ",(0,n.jsx)(l.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(l.li,{children:["rotation?: ",(0,n.jsx)(l.code,{children:"vector3"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesave",children:"OxVehicle.save"}),"\n",(0,n.jsx)(l.p,{children:"Saves the vehicle to the database."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"save"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Returns"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.code,{children:"number"})}),"\n"]}),"\n",(0,n.jsx)(l.h3,{id:"oxvehicleset",children:"OxVehicle.set"}),"\n",(0,n.jsxs)(l.p,{children:["Stores a value in the vehicle's metadata, which will be saved to the database (",(0,n.jsx)(l.em,{children:"this behaviour is likely to be removed"}),")."]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"player."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(key, value)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["key: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["value: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetgroup",children:"OxVehicle.setGroup"}),"\n",(0,n.jsx)(l.p,{children:'Sets the vehicle as a group vehicle "owned" by the given group name, or removes the group if omitted.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setGroup"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["groupName?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetowner",children:"OxVehicle.setOwner"}),"\n",(0,n.jsx)(l.p,{children:"Sets the owner of a vehicle as the given charId, or removes the owner if omitted."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setOwner"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(charId)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["charId?: ",(0,n.jsx)(l.code,{children:"number"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetplate",children:"OxVehicle.setPlate"}),"\n",(0,n.jsx)(l.p,{children:"Sets the registered plate of a vehicle to the given value. The plate will be padded or stripped to 8 characters."}),"\n",(0,n.jsx)(l.p,{children:"This plate is not necessarily the displayed plate on vehicle properties."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setPlate"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(plate: string)"})]})})}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetproperties",children:"OxVehicle.setProperties"}),"\n",(0,n.jsx)(l.p,{children:"Saves the properties (mods, extras, etc.) stored on the vehicle, optionally applying them to the entity."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setProperties"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(properties, apply)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["properties: ",(0,n.jsx)(l.code,{children:"VehicleProperties"})]}),"\n",(0,n.jsxs)(l.li,{children:["apply?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"oxvehiclesetstored",children:"OxVehicle.setStored"}),"\n",(0,n.jsx)(l.p,{children:'Sets the vehicle as "stored" at the given value (e.g. impound, garage, null), and optionally despawns the vehicle.'}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"vehicle."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"setStored"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(value, despawn)"})]})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["value?: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["despawn?: ",(0,n.jsx)(l.code,{children:"boolean"})]}),"\n"]})]})}l.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,t.a)(),e.components);return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Classes/Server/OxVehicle.mdx",route:"/overextended/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"},timestamp:1730940204e3,title:"OxVehicle",headings:a},pageNextRoute:"/overextended/ox_core/Classes/Server/OxVehicle"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9507)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Events/client-5b735beb5185abd7.js b/_next/static/chunks/pages/overextended/ox_core/Events/client-2960fda8150b7b19.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core/Events/client-5b735beb5185abd7.js rename to _next/static/chunks/pages/overextended/ox_core/Events/client-2960fda8150b7b19.js index 8267605d65..600e393a30 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Events/client-5b735beb5185abd7.js +++ b/_next/static/chunks/pages/overextended/ox_core/Events/client-2960fda8150b7b19.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6579],{5885:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Events/client",function(){return t(9444)}])},9444:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return l}});var n=t(2676),r=t(2140),a=t(8745),o=t(7100);let l=[{depth:2,value:"ox:playerLoaded",id:"oxplayerloaded"},{depth:2,value:"ox:statusTick",id:"oxstatustick"},{depth:2,value:"ox:setGroup",id:"oxsetgroup"},{depth:2,value:"ox:licenseAdded",id:"oxlicenseadded"},{depth:2,value:"ox:licenseRemoved",id:"oxlicenseremoved"},{depth:2,value:"ox:startCharacterSelect",id:"oxstartcharacterselect"},{depth:2,value:"ox:setActiveCharacter",id:"oxsetactivecharacter"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",hr:"hr"},(0,a.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Client Events"}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsx)(s.p,{children:"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts."})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerloaded",children:"ox:playerLoaded"}),"\n",(0,n.jsx)(s.p,{children:"When a character is loaded"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"isNew"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxstatustick",children:"ox:statusTick"}),"\n",(0,n.jsx)(s.p,{children:"On each status tick"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"statuses"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Record)"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h1,{children:"Net Events"}),"\n",(0,n.jsx)(s.h2,{id:"oxsetgroup",children:"ox:setGroup"}),"\n",(0,n.jsx)(s.p,{children:"When the character is added or removed from a group"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"grade"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseadded",children:"ox:licenseAdded"}),"\n",(0,n.jsx)(s.p,{children:"When the character got a new license"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseremoved",children:"ox:licenseRemoved"}),"\n",(0,n.jsx)(s.p,{children:"When a character's license is removed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxstartcharacterselect",children:"ox:startCharacterSelect"}),"\n",(0,n.jsx)(s.p,{children:"When the player has spawned."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"characters"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Character[]"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetactivecharacter",children:"ox:setActiveCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When the player has chosen their character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"character"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Character"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groups"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Record)"})]})})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Events/client.mdx",route:"/overextended/ox_core/Events/client",timestamp:1730928152e3,title:"Client Events",headings:l},pageNextRoute:"/overextended/ox_core/Events/client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5885)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6579],{5885:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Events/client",function(){return t(9444)}])},9444:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return l}});var n=t(2676),r=t(2140),a=t(8745),o=t(7100);let l=[{depth:2,value:"ox:playerLoaded",id:"oxplayerloaded"},{depth:2,value:"ox:statusTick",id:"oxstatustick"},{depth:2,value:"ox:setGroup",id:"oxsetgroup"},{depth:2,value:"ox:licenseAdded",id:"oxlicenseadded"},{depth:2,value:"ox:licenseRemoved",id:"oxlicenseremoved"},{depth:2,value:"ox:startCharacterSelect",id:"oxstartcharacterselect"},{depth:2,value:"ox:setActiveCharacter",id:"oxsetactivecharacter"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",hr:"hr"},(0,a.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Client Events"}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsx)(s.p,{children:"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts."})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerloaded",children:"ox:playerLoaded"}),"\n",(0,n.jsx)(s.p,{children:"When a character is loaded"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"isNew"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxstatustick",children:"ox:statusTick"}),"\n",(0,n.jsx)(s.p,{children:"On each status tick"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"statuses"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Record)"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h1,{children:"Net Events"}),"\n",(0,n.jsx)(s.h2,{id:"oxsetgroup",children:"ox:setGroup"}),"\n",(0,n.jsx)(s.p,{children:"When the character is added or removed from a group"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"grade"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseadded",children:"ox:licenseAdded"}),"\n",(0,n.jsx)(s.p,{children:"When the character got a new license"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseremoved",children:"ox:licenseRemoved"}),"\n",(0,n.jsx)(s.p,{children:"When a character's license is removed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxstartcharacterselect",children:"ox:startCharacterSelect"}),"\n",(0,n.jsx)(s.p,{children:"When the player has spawned."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"characters"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Character[]"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetactivecharacter",children:"ox:setActiveCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When the player has chosen their character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"character"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Character"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groups"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Record)"})]})})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Events/client.mdx",route:"/overextended/ox_core/Events/client",timestamp:1730940204e3,title:"Client Events",headings:l},pageNextRoute:"/overextended/ox_core/Events/client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5885)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Events/server-202465b394e0f6b8.js b/_next/static/chunks/pages/overextended/ox_core/Events/server-4113abddbb949bbd.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core/Events/server-202465b394e0f6b8.js rename to _next/static/chunks/pages/overextended/ox_core/Events/server-4113abddbb949bbd.js index c7f4cd1418..5e68681901 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Events/server-202465b394e0f6b8.js +++ b/_next/static/chunks/pages/overextended/ox_core/Events/server-4113abddbb949bbd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9598],{4472:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Events/server",function(){return r(9208)}])},9208:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return t}});var n=r(2676),a=r(2140),l=r(8745),o=r(7100);let t=[{depth:2,value:"ox:savedPlayers",id:"oxsavedplayers"},{depth:2,value:"ox:setActiveGroup",id:"oxsetactivegroup"},{depth:2,value:"ox:setGroup",id:"oxsetgroup"},{depth:2,value:"ox:licenseAdded",id:"oxlicenseadded"},{depth:2,value:"ox:licenseRemoved",id:"oxlicenseremoved"},{depth:2,value:"ox:playerLogout",id:"oxplayerlogout"},{depth:2,value:"ox:createdCharacter",id:"oxcreatedcharacter"},{depth:2,value:"ox:playerLoaded",id:"oxplayerloaded"},{depth:2,value:"ox:deletedCharacter",id:"oxdeletedcharacter"},{depth:2,value:"ox:savedVehicles",id:"oxsavedvehicles"},{depth:2,value:"ox:spawnedVehicle",id:"oxspawnedvehicle"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Server Events"}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsx)(s.p,{children:"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts."})}),"\n",(0,n.jsx)(s.h2,{id:"oxsavedplayers",children:"ox:savedPlayers"}),"\n",(0,n.jsx)(s.p,{children:"When players are saved to the database."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playersSaved"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetactivegroup",children:"ox:setActiveGroup"}),"\n",(0,n.jsx)(s.p,{children:"When the active group of a character has changed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetgroup",children:"ox:setGroup"}),"\n",(0,n.jsx)(s.p,{children:"When a character is added or removed from a group."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"grade"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseadded",children:"ox:licenseAdded"}),"\n",(0,n.jsx)(s.p,{children:"When a character receives a new license."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseremoved",children:"ox:licenseRemoved"}),"\n",(0,n.jsx)(s.p,{children:"When a character's license is removed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerlogout",children:"ox:playerLogout"}),"\n",(0,n.jsx)(s.p,{children:"When a player logs out from their current character, crashes, or otherwise disconnects from the server."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxcreatedcharacter",children:"ox:createdCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When a player has created a new character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerloaded",children:"ox:playerLoaded"}),"\n",(0,n.jsx)(s.p,{children:"When a player selects and loads a character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxdeletedcharacter",children:"ox:deletedCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When a character is deleted."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsavedvehicles",children:"ox:savedVehicles"}),"\n",(0,n.jsx)(s.p,{children:"When vehicles are saved to the database."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"vehiclesSaved"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxspawnedvehicle",children:"ox:spawnedVehicle"}),"\n",(0,n.jsxs)(s.p,{children:["When a ",(0,n.jsx)(s.code,{children:"OxVehicle"})," has spawned."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"entityId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})]})}s.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Events/server.mdx",route:"/overextended/ox_core/Events/server",timestamp:1730928152e3,title:"Server Events",headings:t},pageNextRoute:"/overextended/ox_core/Events/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4472)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9598],{4472:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Events/server",function(){return r(9208)}])},9208:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return t}});var n=r(2676),a=r(2140),l=r(8745),o=r(7100);let t=[{depth:2,value:"ox:savedPlayers",id:"oxsavedplayers"},{depth:2,value:"ox:setActiveGroup",id:"oxsetactivegroup"},{depth:2,value:"ox:setGroup",id:"oxsetgroup"},{depth:2,value:"ox:licenseAdded",id:"oxlicenseadded"},{depth:2,value:"ox:licenseRemoved",id:"oxlicenseremoved"},{depth:2,value:"ox:playerLogout",id:"oxplayerlogout"},{depth:2,value:"ox:createdCharacter",id:"oxcreatedcharacter"},{depth:2,value:"ox:playerLoaded",id:"oxplayerloaded"},{depth:2,value:"ox:deletedCharacter",id:"oxdeletedcharacter"},{depth:2,value:"ox:savedVehicles",id:"oxsavedvehicles"},{depth:2,value:"ox:spawnedVehicle",id:"oxspawnedvehicle"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Server Events"}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsx)(s.p,{children:"These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts."})}),"\n",(0,n.jsx)(s.h2,{id:"oxsavedplayers",children:"ox:savedPlayers"}),"\n",(0,n.jsx)(s.p,{children:"When players are saved to the database."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playersSaved"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetactivegroup",children:"ox:setActiveGroup"}),"\n",(0,n.jsx)(s.p,{children:"When the active group of a character has changed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsetgroup",children:"ox:setGroup"}),"\n",(0,n.jsx)(s.p,{children:"When a character is added or removed from a group."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"groupName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"grade"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseadded",children:"ox:licenseAdded"}),"\n",(0,n.jsx)(s.p,{children:"When a character receives a new license."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxlicenseremoved",children:"ox:licenseRemoved"}),"\n",(0,n.jsx)(s.p,{children:"When a character's license is removed."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"licenseName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerlogout",children:"ox:playerLogout"}),"\n",(0,n.jsx)(s.p,{children:"When a player logs out from their current character, crashes, or otherwise disconnects from the server."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxcreatedcharacter",children:"ox:createdCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When a player has created a new character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxplayerloaded",children:"ox:playerLoaded"}),"\n",(0,n.jsx)(s.p,{children:"When a player selects and loads a character."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxdeletedcharacter",children:"ox:deletedCharacter"}),"\n",(0,n.jsx)(s.p,{children:"When a character is deleted."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"userId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"charId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxsavedvehicles",children:"ox:savedVehicles"}),"\n",(0,n.jsx)(s.p,{children:"When vehicles are saved to the database."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"vehiclesSaved"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsx)(s.h2,{id:"oxspawnedvehicle",children:"ox:spawnedVehicle"}),"\n",(0,n.jsxs)(s.p,{children:["When a ",(0,n.jsx)(s.code,{children:"OxVehicle"})," has spawned."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"entityId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})]})}s.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Events/server.mdx",route:"/overextended/ox_core/Events/server",timestamp:1730940204e3,title:"Server Events",headings:t},pageNextRoute:"/overextended/ox_core/Events/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4472)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Functions/common-61886b81441249df.js b/_next/static/chunks/pages/overextended/ox_core/Functions/common-d4e6e94f30150e04.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_core/Functions/common-61886b81441249df.js rename to _next/static/chunks/pages/overextended/ox_core/Functions/common-d4e6e94f30150e04.js index bf544c1ffe..62e9e618ed 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Functions/common-61886b81441249df.js +++ b/_next/static/chunks/pages/overextended/ox_core/Functions/common-d4e6e94f30150e04.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6656],{5540:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Functions/common",function(){return s(9461)}])},9461:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),i=s(2140),c=s(8745);let t=[{depth:2,value:"Ox.GetTopVehicleStats",id:"oxgettopvehiclestats"},{depth:3,value:"VehicleStats",id:"vehiclestats"},{depth:2,value:"Ox.GetVehicleData",id:"oxgetvehicledata"},{depth:3,value:"VehicleData",id:"vehicledata"},{depth:2,value:"Ox.GetVehicleNetworkType",id:"oxgetvehiclenetworktype"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",p:"p",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",h3:"h3"},(0,c.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxgettopvehiclestats",children:"Ox.GetTopVehicleStats"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea)."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetTopVehicleStats"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(category)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["category?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"VehicleStats"})," | ",(0,l.jsx)(n.code,{children:"{ [string]: VehicleStats }"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"vehiclestats",children:"VehicleStats"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["acceleration: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["braking: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["handling: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["speed: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["traction: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxgetvehicledata",children:"Ox.GetVehicleData"}),"\n",(0,l.jsx)(n.p,{children:"Returns VehicleData for all vehicles, or optionally a specific model or array of models."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleData"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter?: ",(0,l.jsx)(n.code,{children:"string"})," | ",(0,l.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"{ [string]: VehicleData }"})," | ",(0,l.jsx)(n.code,{children:"VehicleData"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"vehicledata",children:"VehicleData"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["class: ",(0,l.jsx)(n.code,{children:"VehicleClasses"})]}),"\n",(0,l.jsxs)(n.li,{children:["doors: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["make: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["price: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["seats: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["weapons?: ",(0,l.jsx)(n.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxgetvehiclenetworktype",children:"Ox.GetVehicleNetworkType"}),"\n",(0,l.jsx)(n.p,{children:"Returns the netobj type of a vehicle model, which may differ from the vehicle type (e.g. blimp is networked as heli)."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleNetworkType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(modelName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["modelName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Functions/common.mdx",route:"/overextended/ox_core/Functions/common",timestamp:1730928152e3,title:"Common",headings:t},pageNextRoute:"/overextended/ox_core/Functions/common"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5540)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6656],{5540:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Functions/common",function(){return s(9461)}])},9461:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),i=s(2140),c=s(8745);let t=[{depth:2,value:"Ox.GetTopVehicleStats",id:"oxgettopvehiclestats"},{depth:3,value:"VehicleStats",id:"vehiclestats"},{depth:2,value:"Ox.GetVehicleData",id:"oxgetvehicledata"},{depth:3,value:"VehicleData",id:"vehicledata"},{depth:2,value:"Ox.GetVehicleNetworkType",id:"oxgetvehiclenetworktype"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",p:"p",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",h3:"h3"},(0,c.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h2,{id:"oxgettopvehiclestats",children:"Ox.GetTopVehicleStats"}),"\n",(0,l.jsx)(n.p,{children:"Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea)."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetTopVehicleStats"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(category)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["category?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"VehicleStats"})," | ",(0,l.jsx)(n.code,{children:"{ [string]: VehicleStats }"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"vehiclestats",children:"VehicleStats"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["acceleration: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["braking: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["handling: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["speed: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["traction: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxgetvehicledata",children:"Ox.GetVehicleData"}),"\n",(0,l.jsx)(n.p,{children:"Returns VehicleData for all vehicles, or optionally a specific model or array of models."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleData"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["filter?: ",(0,l.jsx)(n.code,{children:"string"})," | ",(0,l.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"{ [string]: VehicleData }"})," | ",(0,l.jsx)(n.code,{children:"VehicleData"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"vehicledata",children:"VehicleData"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"object"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["class: ",(0,l.jsx)(n.code,{children:"VehicleClasses"})]}),"\n",(0,l.jsxs)(n.li,{children:["doors: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["make: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["price: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["seats: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["type: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["weapons?: ",(0,l.jsx)(n.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"oxgetvehiclenetworktype",children:"Ox.GetVehicleNetworkType"}),"\n",(0,l.jsx)(n.p,{children:"Returns the netobj type of a vehicle model, which may differ from the vehicle type (e.g. blimp is networked as heli)."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleNetworkType"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(modelName)"})]})})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["modelName: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"string"})}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Functions/common.mdx",route:"/overextended/ox_core/Functions/common",timestamp:1730940204e3,title:"Common",headings:t},pageNextRoute:"/overextended/ox_core/Functions/common"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5540)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_core/Functions/server-c8443aa267883e7b.js b/_next/static/chunks/pages/overextended/ox_core/Functions/server-585c0d4e95ab760f.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_core/Functions/server-c8443aa267883e7b.js rename to _next/static/chunks/pages/overextended/ox_core/Functions/server-585c0d4e95ab760f.js index 3077eb47d0..109ac5f2a7 100644 --- a/_next/static/chunks/pages/overextended/ox_core/Functions/server-c8443aa267883e7b.js +++ b/_next/static/chunks/pages/overextended/ox_core/Functions/server-585c0d4e95ab760f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1908],{4240:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Functions/server",function(){return l(9104)}])},9104:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var s=l(2676),r=l(2140),i=l(8745);let a=[{depth:2,value:"Ox.CreateAccount",id:"oxcreateaccount"},{depth:2,value:"Ox.CreateGroup",id:"oxcreategroup"},{depth:2,value:"Ox.CreateVehicle",id:"oxcreatevehicle"},{depth:2,value:"Ox.DeleteAccountInvoice",id:"oxdeleteaccountinvoice"},{depth:2,value:"Ox.DeleteGroup",id:"oxdeletegroup"},{depth:2,value:"Ox.GenerateVehiclePlate",id:"oxgeneratevehicleplate"},{depth:2,value:"Ox.GenerateVehicleVin",id:"oxgeneratevehiclevin"},{depth:2,value:"Ox.GetAccount",id:"oxgetaccount"},{depth:2,value:"Ox.GetCharacterAccount",id:"oxgetcharacteraccount"},{depth:2,value:"Ox.GetCharIdFromStateId",id:"oxgetcharidfromstateid"},{depth:2,value:"Ox.GetGroupAccount",id:"oxgetgroupaccount"},{depth:2,value:"Ox.GetGroupsByType",id:"oxgetgroupsbytype"},{depth:2,value:"Ox.GetPlayer",id:"oxgetplayer"},{depth:2,value:"Ox.GetPlayerFromFilter",id:"oxgetplayerfromfilter"},{depth:2,value:"Ox.GetPlayerFromUserId",id:"oxgetplayerfromuserid"},{depth:2,value:"Ox.GetPlayers",id:"oxgetplayers"},{depth:2,value:"Ox.GetVehicle",id:"oxgetvehicle"},{depth:2,value:"Ox.GetVehicleFromNetId",id:"oxgetvehiclefromnetid"},{depth:2,value:"Ox.GetVehicleFromVin",id:"oxgetvehiclefromvin"},{depth:2,value:"Ox.RemoveGroupPermission",id:"oxremovegrouppermission"},{depth:2,value:"Ox.SaveAllPlayers",id:"oxsaveallplayers"},{depth:2,value:"Ox.SaveAllVehicles",id:"oxsaveallvehicles"},{depth:2,value:"Ox.SetGroupPermission",id:"oxsetgrouppermission"},{depth:2,value:"Ox.SpawnVehicle",id:"oxspawnvehicle"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",p:"p",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",br:"br",em:"em"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"oxcreateaccount",children:"Ox.CreateAccount"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new account for a character with the given charId or stateId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(ownerId, label)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["ownerId: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxcreategroup",children:"Ox.CreateGroup"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new group from the given data, handling all database interactions internally."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateGroup"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grades: ",(0,s.jsx)(n.code,{children:"object[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["accountRole?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["type?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["colour?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["hasAccount?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxcreatevehicle",children:"Ox.CreateVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new vehicle, which will be saved to the database if it has an assigned owner or group."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data, coords, heading)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"string"})," | ",(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["model: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["owner?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["group?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["stored?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["properties?: ",(0,s.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["coords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["heading?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxdeleteaccountinvoice",children:"Ox.DeleteAccountInvoice"}),"\n",(0,s.jsx)(n.p,{children:"Deletes the account invoice with the given invoiceId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteAccountInvoice"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoiceId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["invoiceId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxdeletegroup",children:"Ox.DeleteGroup"}),"\n",(0,s.jsx)(n.p,{children:"Deletes all data associated with the given group name, such as group grades, vehicles, etc."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteGroup"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgeneratevehicleplate",children:"Ox.GenerateVehiclePlate"}),"\n",(0,s.jsx)(n.p,{children:"Generate a unique vehicle plate that doesn't exist in database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GenerateVehiclePlate"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgeneratevehiclevin",children:"Ox.GenerateVehicleVin"}),"\n",(0,s.jsx)(n.p,{children:"Generate a unique vehicle identification number that doesn't exist in database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GenerateVehicleVin"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(modelName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["modelName: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Vehicle information (i.e. model and make) are used as part of the VIN."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetaccount",children:"Ox.GetAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the ",(0,s.jsx)(n.code,{children:"OxAccount"})," with the given accountId."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(accountId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["accountId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetcharacteraccount",children:"Ox.GetCharacterAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the default ",(0,s.jsx)(n.code,{children:"OxAccount"})," for a character by their charId or stateId."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetCharacterAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetcharidfromstateid",children:"Ox.GetCharIdFromStateId"}),"\n",(0,s.jsxs)(n.p,{children:["Get a character's charId from their stateId.",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"Note: This queries the database and shouldn't be used excessively"})]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetCharIdFromStateId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(stateId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["stateId: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetgroupaccount",children:"Ox.GetGroupAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the ",(0,s.jsx)(n.code,{children:"OxAccount"})," for a group."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetGroupAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetgroupsbytype",children:"Ox.GetGroupsByType"}),"\n",(0,s.jsx)(n.p,{children:"Returns an array of group names which have the given group type."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetGroupsByType"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupType)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupType: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string[]"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayer",children:"Ox.GetPlayer"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxPlayer"})," from its enity id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entityId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["userId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayerfromfilter",children:"Ox.GetPlayerFromFilter"}),"\n",(0,s.jsxs)(n.p,{children:["Get the first ",(0,s.jsx)(n.code,{children:"OxPlayer"})," matching a filter."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromFilter"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["filter?: ",(0,s.jsx)(n.code,{children:"{ [string]: any }"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Compare player fields and metadata against the given key-value pairs."}),"\n",(0,s.jsx)(n.li,{children:"Groups can be given as a string or array of strings to match."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayerfromuserid",children:"Ox.GetPlayerFromUserId"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxPlayer"})," from its user id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromUserId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(userId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["userId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayers",children:"Ox.GetPlayers"}),"\n",(0,s.jsxs)(n.p,{children:["Get an array of containing ",(0,s.jsx)(n.code,{children:"OxPlayer"})," for all players matching a filter, if given."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayers"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["filter?: ",(0,s.jsx)(n.code,{children:"{ [string]: any }"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Compare player fields and metadata against the given key-value pairs."}),"\n",(0,s.jsx)(n.li,{children:"Groups can be given as a string or array of strings to match."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer[]"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehicle",children:"Ox.GetVehicle"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its entity id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entityId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entityId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehiclefromnetid",children:"Ox.GetVehicleFromNetId"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its network id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleFromNetId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehiclefromvin",children:"Ox.GetVehicleFromVin"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its VIN."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleFromVin"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vin)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["vin: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxremovegrouppermission",children:"Ox.RemoveGroupPermission"}),"\n",(0,s.jsx)(n.p,{children:"Removes a permission from a specified group and minimum grade."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveGroupPermission"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade, permission)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grade: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["permission: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxsaveallplayers",children:"Ox.SaveAllPlayers"}),"\n",(0,s.jsx)(n.p,{children:"Save all players to the database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SaveAllPlayers"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.h2,{id:"oxsaveallvehicles",children:"Ox.SaveAllVehicles"}),"\n",(0,s.jsx)(n.p,{children:"Save all vehicles to the database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SaveAllVehicles"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.h2,{id:"oxsetgrouppermission",children:"Ox.SetGroupPermission"}),"\n",(0,s.jsx)(n.p,{children:"Assigns a permission to a specified group and minimum grade, which will be inherited by higher grades."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SetGroupPermission"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade, permission, value)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grade: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["permission: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["value: ",(0,s.jsx)(n.code,{children:"allow"})," | ",(0,s.jsx)(n.code,{children:"deny"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxspawnvehicle",children:"Ox.SpawnVehicle"}),"\n",(0,s.jsxs)(n.p,{children:["Spawns an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," with the given dbId, if it hasn't already been spawned."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SpawnVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(dbId, coords, heading)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["dbId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["heading?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Functions/server.mdx",route:"/overextended/ox_core/Functions/server",timestamp:1730928152e3,title:"Server",headings:a},pageNextRoute:"/overextended/ox_core/Functions/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4240)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1908],{4240:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_core/Functions/server",function(){return l(9104)}])},9104:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var s=l(2676),r=l(2140),i=l(8745);let a=[{depth:2,value:"Ox.CreateAccount",id:"oxcreateaccount"},{depth:2,value:"Ox.CreateGroup",id:"oxcreategroup"},{depth:2,value:"Ox.CreateVehicle",id:"oxcreatevehicle"},{depth:2,value:"Ox.DeleteAccountInvoice",id:"oxdeleteaccountinvoice"},{depth:2,value:"Ox.DeleteGroup",id:"oxdeletegroup"},{depth:2,value:"Ox.GenerateVehiclePlate",id:"oxgeneratevehicleplate"},{depth:2,value:"Ox.GenerateVehicleVin",id:"oxgeneratevehiclevin"},{depth:2,value:"Ox.GetAccount",id:"oxgetaccount"},{depth:2,value:"Ox.GetCharacterAccount",id:"oxgetcharacteraccount"},{depth:2,value:"Ox.GetCharIdFromStateId",id:"oxgetcharidfromstateid"},{depth:2,value:"Ox.GetGroupAccount",id:"oxgetgroupaccount"},{depth:2,value:"Ox.GetGroupsByType",id:"oxgetgroupsbytype"},{depth:2,value:"Ox.GetPlayer",id:"oxgetplayer"},{depth:2,value:"Ox.GetPlayerFromFilter",id:"oxgetplayerfromfilter"},{depth:2,value:"Ox.GetPlayerFromUserId",id:"oxgetplayerfromuserid"},{depth:2,value:"Ox.GetPlayers",id:"oxgetplayers"},{depth:2,value:"Ox.GetVehicle",id:"oxgetvehicle"},{depth:2,value:"Ox.GetVehicleFromNetId",id:"oxgetvehiclefromnetid"},{depth:2,value:"Ox.GetVehicleFromVin",id:"oxgetvehiclefromvin"},{depth:2,value:"Ox.RemoveGroupPermission",id:"oxremovegrouppermission"},{depth:2,value:"Ox.SaveAllPlayers",id:"oxsaveallplayers"},{depth:2,value:"Ox.SaveAllVehicles",id:"oxsaveallvehicles"},{depth:2,value:"Ox.SetGroupPermission",id:"oxsetgrouppermission"},{depth:2,value:"Ox.SpawnVehicle",id:"oxspawnvehicle"}];function _createMdxContent(e){let n=Object.assign({h2:"h2",p:"p",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",br:"br",em:"em"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"oxcreateaccount",children:"Ox.CreateAccount"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new account for a character with the given charId or stateId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(ownerId, label)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["ownerId: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxcreategroup",children:"Ox.CreateGroup"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new group from the given data, handling all database interactions internally."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateGroup"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grades: ",(0,s.jsx)(n.code,{children:"object[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["accountRole?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["type?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["colour?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["hasAccount?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxcreatevehicle",children:"Ox.CreateVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Creates a new vehicle, which will be saved to the database if it has an assigned owner or group."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data, coords, heading)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"string"})," | ",(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["model: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["owner?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["group?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["stored?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["properties?: ",(0,s.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["coords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["heading?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxdeleteaccountinvoice",children:"Ox.DeleteAccountInvoice"}),"\n",(0,s.jsx)(n.p,{children:"Deletes the account invoice with the given invoiceId."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteAccountInvoice"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(invoiceId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["invoiceId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"object"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["success: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["message?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxdeletegroup",children:"Ox.DeleteGroup"}),"\n",(0,s.jsx)(n.p,{children:"Deletes all data associated with the given group name, such as group grades, vehicles, etc."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteGroup"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgeneratevehicleplate",children:"Ox.GenerateVehiclePlate"}),"\n",(0,s.jsx)(n.p,{children:"Generate a unique vehicle plate that doesn't exist in database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GenerateVehiclePlate"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgeneratevehiclevin",children:"Ox.GenerateVehicleVin"}),"\n",(0,s.jsx)(n.p,{children:"Generate a unique vehicle identification number that doesn't exist in database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GenerateVehicleVin"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(modelName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["modelName: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Vehicle information (i.e. model and make) are used as part of the VIN."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetaccount",children:"Ox.GetAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the ",(0,s.jsx)(n.code,{children:"OxAccount"})," with the given accountId."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(accountId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["accountId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetcharacteraccount",children:"Ox.GetCharacterAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the default ",(0,s.jsx)(n.code,{children:"OxAccount"})," for a character by their charId or stateId."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetCharacterAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," | ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetcharidfromstateid",children:"Ox.GetCharIdFromStateId"}),"\n",(0,s.jsxs)(n.p,{children:["Get a character's charId from their stateId.",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"Note: This queries the database and shouldn't be used excessively"})]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetCharIdFromStateId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(stateId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["stateId: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"number"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetgroupaccount",children:"Ox.GetGroupAccount"}),"\n",(0,s.jsxs)(n.p,{children:["Get the ",(0,s.jsx)(n.code,{children:"OxAccount"})," for a group."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetGroupAccount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxAccount"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetgroupsbytype",children:"Ox.GetGroupsByType"}),"\n",(0,s.jsx)(n.p,{children:"Returns an array of group names which have the given group type."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetGroupsByType"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupType)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupType: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"string[]"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayer",children:"Ox.GetPlayer"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxPlayer"})," from its enity id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entityId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["userId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayerfromfilter",children:"Ox.GetPlayerFromFilter"}),"\n",(0,s.jsxs)(n.p,{children:["Get the first ",(0,s.jsx)(n.code,{children:"OxPlayer"})," matching a filter."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromFilter"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["filter?: ",(0,s.jsx)(n.code,{children:"{ [string]: any }"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Compare player fields and metadata against the given key-value pairs."}),"\n",(0,s.jsx)(n.li,{children:"Groups can be given as a string or array of strings to match."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayerfromuserid",children:"Ox.GetPlayerFromUserId"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxPlayer"})," from its user id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromUserId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(userId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["userId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetplayers",children:"Ox.GetPlayers"}),"\n",(0,s.jsxs)(n.p,{children:["Get an array of containing ",(0,s.jsx)(n.code,{children:"OxPlayer"})," for all players matching a filter, if given."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayers"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(filter)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["filter?: ",(0,s.jsx)(n.code,{children:"{ [string]: any }"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Compare player fields and metadata against the given key-value pairs."}),"\n",(0,s.jsx)(n.li,{children:"Groups can be given as a string or array of strings to match."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxPlayer[]"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehicle",children:"Ox.GetVehicle"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its entity id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entityId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entityId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehiclefromnetid",children:"Ox.GetVehicleFromNetId"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its network id."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleFromNetId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netId)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxgetvehiclefromvin",children:"Ox.GetVehicleFromVin"}),"\n",(0,s.jsxs)(n.p,{children:["Get an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," from its VIN."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehicleFromVin"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vin)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["vin: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxremovegrouppermission",children:"Ox.RemoveGroupPermission"}),"\n",(0,s.jsx)(n.p,{children:"Removes a permission from a specified group and minimum grade."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveGroupPermission"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade, permission)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grade: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["permission: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxsaveallplayers",children:"Ox.SaveAllPlayers"}),"\n",(0,s.jsx)(n.p,{children:"Save all players to the database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SaveAllPlayers"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.h2,{id:"oxsaveallvehicles",children:"Ox.SaveAllVehicles"}),"\n",(0,s.jsx)(n.p,{children:"Save all vehicles to the database."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SaveAllVehicles"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(n.h2,{id:"oxsetgrouppermission",children:"Ox.SetGroupPermission"}),"\n",(0,s.jsx)(n.p,{children:"Assigns a permission to a specified group and minimum grade, which will be inherited by higher grades."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SetGroupPermission"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(groupName, grade, permission, value)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["groupName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["grade: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["permission: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["value: ",(0,s.jsx)(n.code,{children:"allow"})," | ",(0,s.jsx)(n.code,{children:"deny"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"oxspawnvehicle",children:"Ox.SpawnVehicle"}),"\n",(0,s.jsxs)(n.p,{children:["Spawns an ",(0,s.jsx)(n.code,{children:"OxVehicle"})," with the given dbId, if it hasn't already been spawned."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Ox."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SpawnVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(dbId, coords, heading)"})]})})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["dbId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["heading?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"OxVehicle"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_core/Functions/server.mdx",route:"/overextended/ox_core/Functions/server",timestamp:1730940204e3,title:"Server",headings:a},pageNextRoute:"/overextended/ox_core/Functions/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4240)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_doorlock-8638bab924dc0b50.js b/_next/static/chunks/pages/overextended/ox_doorlock-5268bd03a3224de0.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_doorlock-8638bab924dc0b50.js rename to _next/static/chunks/pages/overextended/ox_doorlock-5268bd03a3224de0.js index a1a766c0c8..b6fcd6839f 100644 --- a/_next/static/chunks/pages/overextended/ox_doorlock-8638bab924dc0b50.js +++ b/_next/static/chunks/pages/overextended/ox_doorlock-5268bd03a3224de0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7743],{5850:function(e,n,o){"use strict";o.d(n,{Z:function(){return createReactComponent}});var s=o(5271),r=o(507),i=o.n(r),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,o)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,__spreadValues=(e,n)=>{for(var o in n||(n={}))h.call(n,o)&&__defNormalProp(e,o,n[o]);if(l)for(var o of l(n))x.call(n,o)&&__defNormalProp(e,o,n[o]);return e},__spreadProps=(e,n)=>c(e,d(n)),__objRest=(e,n)=>{var o={};for(var s in e)h.call(e,s)&&0>n.indexOf(s)&&(o[s]=e[s]);if(null!=e&&l)for(var s of l(e))0>n.indexOf(s)&&x.call(e,s)&&(o[s]=e[s]);return o},createReactComponent=(e,n,o)=>{let r=(0,s.forwardRef)((n,r)=>{var{color:i="currentColor",size:a=24,stroke:c=2,children:d}=n,l=__objRest(n,["color","size","stroke","children"]);return(0,s.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},t),{width:a,height:a,stroke:i,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),l),[...o.map(([e,n])=>(0,s.createElement)(e,n)),...d||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${n}`,r}},6665:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock",function(){return o(1370)}])},1370:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return c}});var s=o(2676),r=o(2140),i=o(8745),t=o(7100),a=o(8713);let c=[{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Instale todas as depend\xeancias do recurso.",id:"instale-todas-as-depend\xeancias-do-recurso"},{depth:3,value:"Baixe uma release ou compile o c\xf3digo-fonte.",id:"baixe-uma-release-ou-compile-o-c\xf3digo-fonte"},{depth:3,value:"Instale depend\xeancias opcionais.",id:"instale-depend\xeancias-opcionais"},{depth:2,value:"Abrindo a UI",id:"abrindo-a-ui"},{depth:2,value:"Converter portas",id:"converter-portas"},{depth:2,value:"Adicionando novos \xe1udios nativos",id:"adicionando-novos-\xe1udios-nativos"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Doorlock"}),"\n",(0,s.jsx)(a.Z,{repo:"https://github.com/overextended/ox_doorlock"}),"\n",(0,s.jsx)(n.p,{children:"Um recurso de gerenciamento de portas que pode ser usado de forma independente ou junto com ox_core, qbx_core e es_extended."}),"\n",(0,s.jsx)(n.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,s.jsx)(t.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["Recomendamos ",(0,s.jsx)(n.strong,{children:"fortemente"})," que consulte os ",(0,s.jsx)(n.a,{href:"../guides",children:"Guias"})," para configurar Git, Node.js e pnpm."]})}),"\n",(0,s.jsxs)(t.Rg,{children:[(0,s.jsx)(n.h3,{id:"instale-todas-as-depend\xeancias-do-recurso",children:"Instale todas as depend\xeancias do recurso."}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,s.jsxs)(n.h3,{id:"baixe-uma-release-ou-compile-o-c\xf3digo-fonte",children:["Baixe uma ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_doorlock/releases",children:"release"})," ou compile o c\xf3digo-fonte."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_doorlock.git"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_doorlock/web"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,s.jsx)(n.h3,{id:"instale-depend\xeancias-opcionais",children:"Instale depend\xeancias opcionais."}),(0,s.jsx)(n.p,{children:"Esses recursos n\xe3o s\xe3o obrigat\xf3rios, mas oferecem funcionalidades adicionais."}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]}),"\n",(0,s.jsx)(n.h2,{id:"abrindo-a-ui",children:"Abrindo a UI"}),"\n",(0,s.jsxs)(n.p,{children:["Se voc\xea instalou e iniciou o recurso, pode usar o comando ",(0,s.jsx)(n.code,{children:"/doorlock"})," para abrir a interface de usu\xe1rio."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Caso o cursor seja exibido, mas a UI n\xe3o apare\xe7a, ent\xe3o voc\xea n\xe3o a construiu corretamente."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Talvez voc\xea n\xe3o tenha permiss\xe3o para usar o comando."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Insira ",(0,s.jsx)(n.code,{children:"test_ace player.1 command.doorlock"})," no console do servidor (substitua 1 pelo seu ID de servidor)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"converter-portas",children:"Converter portas"}),"\n",(0,s.jsxs)(n.p,{children:["Arquivos de configura\xe7\xe3o de portas escritos para ",(0,s.jsx)(n.code,{children:"nui_doorlock"})," podem ser automaticamente adicionados ao seu banco de dados MySQL."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Todos os arquivos com extens\xe3o ",(0,s.jsx)(n.code,{children:".lua"})," colocados no diret\xf3rio ",(0,s.jsx)(n.code,{children:"ox_doorlock/convert"})," ser\xe3o lidos ao iniciar o recurso."]}),"\n",(0,s.jsx)(n.li,{children:"Se o diret\xf3rio n\xe3o existir, voc\xea pode cri\xe1-lo."}),"\n",(0,s.jsxs)(n.li,{children:["A convers\xe3o n\xe3o pode ser garantida, especialmente se o arquivo de configura\xe7\xe3o n\xe3o foi escrito para ",(0,s.jsx)(n.code,{children:"nui_doorlock"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"adicionando-novos-\xe1udios-nativos",children:"Adicionando novos \xe1udios nativos"}),"\n",(0,s.jsxs)(n.p,{children:["Um guia pode ser encontrado ",(0,s.jsx)(n.a,{href:"https://forum.cfx.re/t/how-to-make-a-simplesound-using-native-audio/5156001",children:"aqui"})," para adicionar novos \xe1udios nativos."]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock.mdx",route:"/overextended/ox_doorlock",timestamp:1730928152e3,title:"Ox Doorlock",headings:c},pageNextRoute:"/overextended/ox_doorlock"})},3786:function(e,n,o){"use strict";o.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var s=o(2676);o(5271);var r=o(5850),i=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),t=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:o,icon:r,link:i}=e;return(0,s.jsx)("div",{className:"h-fit w-fit",children:(0,s.jsx)("a",{href:i,children:(0,s.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,s.jsx)("div",{children:r}),o,"right"===n&&(0,s.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,o){"use strict";var s=o(2676);o(5271);var r=o(3786);n.Z=e=>{let{repo:n,docs:o}=e;return(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,s.jsx)(r.eX,{link:n}),(0,s.jsx)(r.Vg,{link:"".concat(n,"/releases")}),o&&(0,s.jsx)(r.WR,{link:o})]})}},4049:function(e,n,o){"use strict";var s=o(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,o,r,i,t){if(t!==s){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,o){e.exports=o(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6665)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7743],{5850:function(e,n,o){"use strict";o.d(n,{Z:function(){return createReactComponent}});var s=o(5271),r=o(507),i=o.n(r),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,o)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,__spreadValues=(e,n)=>{for(var o in n||(n={}))h.call(n,o)&&__defNormalProp(e,o,n[o]);if(l)for(var o of l(n))x.call(n,o)&&__defNormalProp(e,o,n[o]);return e},__spreadProps=(e,n)=>c(e,d(n)),__objRest=(e,n)=>{var o={};for(var s in e)h.call(e,s)&&0>n.indexOf(s)&&(o[s]=e[s]);if(null!=e&&l)for(var s of l(e))0>n.indexOf(s)&&x.call(e,s)&&(o[s]=e[s]);return o},createReactComponent=(e,n,o)=>{let r=(0,s.forwardRef)((n,r)=>{var{color:i="currentColor",size:a=24,stroke:c=2,children:d}=n,l=__objRest(n,["color","size","stroke","children"]);return(0,s.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},t),{width:a,height:a,stroke:i,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),l),[...o.map(([e,n])=>(0,s.createElement)(e,n)),...d||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${n}`,r}},6665:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock",function(){return o(1370)}])},1370:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return c}});var s=o(2676),r=o(2140),i=o(8745),t=o(7100),a=o(8713);let c=[{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Instale todas as depend\xeancias do recurso.",id:"instale-todas-as-depend\xeancias-do-recurso"},{depth:3,value:"Baixe uma release ou compile o c\xf3digo-fonte.",id:"baixe-uma-release-ou-compile-o-c\xf3digo-fonte"},{depth:3,value:"Instale depend\xeancias opcionais.",id:"instale-depend\xeancias-opcionais"},{depth:2,value:"Abrindo a UI",id:"abrindo-a-ui"},{depth:2,value:"Converter portas",id:"converter-portas"},{depth:2,value:"Adicionando novos \xe1udios nativos",id:"adicionando-novos-\xe1udios-nativos"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Doorlock"}),"\n",(0,s.jsx)(a.Z,{repo:"https://github.com/overextended/ox_doorlock"}),"\n",(0,s.jsx)(n.p,{children:"Um recurso de gerenciamento de portas que pode ser usado de forma independente ou junto com ox_core, qbx_core e es_extended."}),"\n",(0,s.jsx)(n.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,s.jsx)(t.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["Recomendamos ",(0,s.jsx)(n.strong,{children:"fortemente"})," que consulte os ",(0,s.jsx)(n.a,{href:"../guides",children:"Guias"})," para configurar Git, Node.js e pnpm."]})}),"\n",(0,s.jsxs)(t.Rg,{children:[(0,s.jsx)(n.h3,{id:"instale-todas-as-depend\xeancias-do-recurso",children:"Instale todas as depend\xeancias do recurso."}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,s.jsxs)(n.h3,{id:"baixe-uma-release-ou-compile-o-c\xf3digo-fonte",children:["Baixe uma ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_doorlock/releases",children:"release"})," ou compile o c\xf3digo-fonte."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_doorlock.git"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_doorlock/web"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,s.jsx)(n.h3,{id:"instale-depend\xeancias-opcionais",children:"Instale depend\xeancias opcionais."}),(0,s.jsx)(n.p,{children:"Esses recursos n\xe3o s\xe3o obrigat\xf3rios, mas oferecem funcionalidades adicionais."}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]}),"\n",(0,s.jsx)(n.h2,{id:"abrindo-a-ui",children:"Abrindo a UI"}),"\n",(0,s.jsxs)(n.p,{children:["Se voc\xea instalou e iniciou o recurso, pode usar o comando ",(0,s.jsx)(n.code,{children:"/doorlock"})," para abrir a interface de usu\xe1rio."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Caso o cursor seja exibido, mas a UI n\xe3o apare\xe7a, ent\xe3o voc\xea n\xe3o a construiu corretamente."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Talvez voc\xea n\xe3o tenha permiss\xe3o para usar o comando."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Insira ",(0,s.jsx)(n.code,{children:"test_ace player.1 command.doorlock"})," no console do servidor (substitua 1 pelo seu ID de servidor)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"converter-portas",children:"Converter portas"}),"\n",(0,s.jsxs)(n.p,{children:["Arquivos de configura\xe7\xe3o de portas escritos para ",(0,s.jsx)(n.code,{children:"nui_doorlock"})," podem ser automaticamente adicionados ao seu banco de dados MySQL."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Todos os arquivos com extens\xe3o ",(0,s.jsx)(n.code,{children:".lua"})," colocados no diret\xf3rio ",(0,s.jsx)(n.code,{children:"ox_doorlock/convert"})," ser\xe3o lidos ao iniciar o recurso."]}),"\n",(0,s.jsx)(n.li,{children:"Se o diret\xf3rio n\xe3o existir, voc\xea pode cri\xe1-lo."}),"\n",(0,s.jsxs)(n.li,{children:["A convers\xe3o n\xe3o pode ser garantida, especialmente se o arquivo de configura\xe7\xe3o n\xe3o foi escrito para ",(0,s.jsx)(n.code,{children:"nui_doorlock"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"adicionando-novos-\xe1udios-nativos",children:"Adicionando novos \xe1udios nativos"}),"\n",(0,s.jsxs)(n.p,{children:["Um guia pode ser encontrado ",(0,s.jsx)(n.a,{href:"https://forum.cfx.re/t/how-to-make-a-simplesound-using-native-audio/5156001",children:"aqui"})," para adicionar novos \xe1udios nativos."]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock.mdx",route:"/overextended/ox_doorlock",timestamp:1730940204e3,title:"Ox Doorlock",headings:c},pageNextRoute:"/overextended/ox_doorlock"})},3786:function(e,n,o){"use strict";o.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var s=o(2676);o(5271);var r=o(5850),i=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),t=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),c=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:o,icon:r,link:i}=e;return(0,s.jsx)("div",{className:"h-fit w-fit",children:(0,s.jsx)("a",{href:i,children:(0,s.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,s.jsx)("div",{children:r}),o,"right"===n&&(0,s.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,o){"use strict";var s=o(2676);o(5271);var r=o(3786);n.Z=e=>{let{repo:n,docs:o}=e;return(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,s.jsx)(r.eX,{link:n}),(0,s.jsx)(r.Vg,{link:"".concat(n,"/releases")}),o&&(0,s.jsx)(r.WR,{link:o})]})}},4049:function(e,n,o){"use strict";var s=o(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,o,r,i,t){if(t!==s){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,o){e.exports=o(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6665)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_doorlock/Client/functions-2e99616017cf8767.js b/_next/static/chunks/pages/overextended/ox_doorlock/Client/functions-ac6342c598d96e34.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_doorlock/Client/functions-2e99616017cf8767.js rename to _next/static/chunks/pages/overextended/ox_doorlock/Client/functions-ac6342c598d96e34.js index c5d11986b7..dc657f2379 100644 --- a/_next/static/chunks/pages/overextended/ox_doorlock/Client/functions-2e99616017cf8767.js +++ b/_next/static/chunks/pages/overextended/ox_doorlock/Client/functions-ac6342c598d96e34.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5064],{4250:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Client/functions",function(){return n(7938)}])},7938:function(e,o,n){"use strict";n.r(o),n.d(o,{__toc:function(){return l}});var s=n(2676),t=n(2140),r=n(8745);let l=[{depth:2,value:"pickClosestDoor",id:"pickclosestdoor"},{depth:2,value:"useClosestDoor",id:"useclosestdoor"},{depth:2,value:"getClosestDoor",id:"getclosestdoor"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h1,{children:"Fun\xe7\xf5es"}),"\n",(0,s.jsx)(o.h2,{id:"pickclosestdoor",children:"pickClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Tenta arrombar a porta mais pr\xf3xima. Dependente de verifica\xe7\xf5es do lado do servidor e pode falhar."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.code,{"data-language":"lua","data-theme":"default",children:[(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"pickClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,s.jsx)(o.span,{className:"line",children:" "})]})}),"\n",(0,s.jsx)(o.h2,{id:"useclosestdoor",children:"useClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Interage com a porta mais pr\xf3xima. Dependente de verifica\xe7\xf5es do lado do servidor e pode falhar."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"useClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.h2,{id:"getclosestdoor",children:"getClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Retorna a porta mais pr\xf3xima."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.p,{children:"Retorno:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["door: ",(0,s.jsx)(o.code,{children:"number"})]}),"\n"]})]})}o.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,r.a)(),e.components);return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Client/functions.mdx",route:"/overextended/ox_doorlock/Client/functions",timestamp:1730928152e3,title:"Fun\xe7\xf5es",headings:l},pageNextRoute:"/overextended/ox_doorlock/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4250)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5064],{4250:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Client/functions",function(){return n(7938)}])},7938:function(e,o,n){"use strict";n.r(o),n.d(o,{__toc:function(){return l}});var s=n(2676),t=n(2140),r=n(8745);let l=[{depth:2,value:"pickClosestDoor",id:"pickclosestdoor"},{depth:2,value:"useClosestDoor",id:"useclosestdoor"},{depth:2,value:"getClosestDoor",id:"getclosestdoor"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h1,{children:"Fun\xe7\xf5es"}),"\n",(0,s.jsx)(o.h2,{id:"pickclosestdoor",children:"pickClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Tenta arrombar a porta mais pr\xf3xima. Dependente de verifica\xe7\xf5es do lado do servidor e pode falhar."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.code,{"data-language":"lua","data-theme":"default",children:[(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"pickClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,s.jsx)(o.span,{className:"line",children:" "})]})}),"\n",(0,s.jsx)(o.h2,{id:"useclosestdoor",children:"useClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Interage com a porta mais pr\xf3xima. Dependente de verifica\xe7\xf5es do lado do servidor e pode falhar."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"useClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.h2,{id:"getclosestdoor",children:"getClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Retorna a porta mais pr\xf3xima."}),"\n",(0,s.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(o.span,{className:"line",children:[(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.p,{children:"Retorno:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["door: ",(0,s.jsx)(o.code,{children:"number"})]}),"\n"]})]})}o.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,r.a)(),e.components);return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Client/functions.mdx",route:"/overextended/ox_doorlock/Client/functions",timestamp:1730940204e3,title:"Fun\xe7\xf5es",headings:l},pageNextRoute:"/overextended/ox_doorlock/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4250)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_doorlock/Server/events-bdf1e229bf61ee92.js b/_next/static/chunks/pages/overextended/ox_doorlock/Server/events-e3393a53b149eda9.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_doorlock/Server/events-bdf1e229bf61ee92.js rename to _next/static/chunks/pages/overextended/ox_doorlock/Server/events-e3393a53b149eda9.js index 8fec991f52..7a0f687ebe 100644 --- a/_next/static/chunks/pages/overextended/ox_doorlock/Server/events-bdf1e229bf61ee92.js +++ b/_next/static/chunks/pages/overextended/ox_doorlock/Server/events-e3393a53b149eda9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7712],{4746:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Server/events",function(){return o(5566)}])},5566:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return l}});var r=o(2676),s=o(2140),t=o(8745);let l=[{depth:2,value:"Handlers",id:"handlers"},{depth:3,value:"ox_doorlock:stateChanged",id:"ox_doorlockstatechanged"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Eventos"}),"\n",(0,r.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,r.jsxs)(n.p,{children:["Esses eventos ",(0,r.jsx)(n.strong,{children:"n\xe3o devem"})," ser acionados por nenhum outro script."]}),"\n",(0,r.jsx)(n.h3,{id:"ox_doorlockstatechanged",children:"ox_doorlock:stateChanged"}),"\n",(0,r.jsx)(n.p,{children:"Acionado quando o estado de uma porta \xe9 atualizado."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_doorlock:stateChanged'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"doorId"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"state"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"usedItem"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["source: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"nil"})]}),"\n",(0,r.jsxs)(n.li,{children:["doorId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["state: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(n.li,{children:["usedItem: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"false"})," or ",(0,r.jsx)(n.code,{children:"nil"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Server/events.mdx",route:"/overextended/ox_doorlock/Server/events",timestamp:1730928152e3,title:"Eventos",headings:l},pageNextRoute:"/overextended/ox_doorlock/Server/events"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4746)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7712],{4746:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Server/events",function(){return o(5566)}])},5566:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return l}});var r=o(2676),s=o(2140),t=o(8745);let l=[{depth:2,value:"Handlers",id:"handlers"},{depth:3,value:"ox_doorlock:stateChanged",id:"ox_doorlockstatechanged"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Eventos"}),"\n",(0,r.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,r.jsxs)(n.p,{children:["Esses eventos ",(0,r.jsx)(n.strong,{children:"n\xe3o devem"})," ser acionados por nenhum outro script."]}),"\n",(0,r.jsx)(n.h3,{id:"ox_doorlockstatechanged",children:"ox_doorlock:stateChanged"}),"\n",(0,r.jsx)(n.p,{children:"Acionado quando o estado de uma porta \xe9 atualizado."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_doorlock:stateChanged'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"doorId"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"state"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"usedItem"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["source: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"nil"})]}),"\n",(0,r.jsxs)(n.li,{children:["doorId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["state: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(n.li,{children:["usedItem: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"false"})," or ",(0,r.jsx)(n.code,{children:"nil"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Server/events.mdx",route:"/overextended/ox_doorlock/Server/events",timestamp:1730940204e3,title:"Eventos",headings:l},pageNextRoute:"/overextended/ox_doorlock/Server/events"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4746)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_doorlock/Server/functions-49054d7a86297974.js b/_next/static/chunks/pages/overextended/ox_doorlock/Server/functions-3a853fc600c7c40f.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_doorlock/Server/functions-49054d7a86297974.js rename to _next/static/chunks/pages/overextended/ox_doorlock/Server/functions-3a853fc600c7c40f.js index d98fc2de18..e0dc5e9797 100644 --- a/_next/static/chunks/pages/overextended/ox_doorlock/Server/functions-49054d7a86297974.js +++ b/_next/static/chunks/pages/overextended/ox_doorlock/Server/functions-3a853fc600c7c40f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1336],{6562:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Server/functions",function(){return n(8091)}])},8091:function(e,o,n){"use strict";n.r(o),n.d(o,{__toc:function(){return t}});var d=n(2676),r=n(2140),s=n(8745);let t=[{depth:2,value:"getDoor",id:"getdoor"},{depth:2,value:"getDoorFromName",id:"getdoorfromname"},{depth:2,value:"editDoor",id:"editdoor"},{depth:3,value:"setDoorState",id:"setdoorstate"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,s.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.h1,{children:"Fun\xe7\xf5es"}),"\n",(0,d.jsx)(o.p,{children:"Obt\xe9m os dados de uma porta com o ID fornecido, correspondendo ao ID da entrada no banco de dados."}),"\n",(0,d.jsx)(o.h2,{id:"getdoor",children:"getDoor"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getDoor"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Obt\xe9m os dados de uma porta com o ",(0,d.jsx)(o.code,{children:"id"})," fornecido, correspondendo ao ID da entrada no banco de dados."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["id: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n"]}),"\n",(0,d.jsx)(o.p,{children:"Retorno:"}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["door: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h2,{id:"getdoorfromname",children:"getDoorFromName"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getDoorFromName"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Obt\xe9m os dados de uma porta com o ",(0,d.jsx)(o.code,{children:"name"})," fornecido, correspondendo ao nome da entrada no banco de dados."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["name: ",(0,d.jsx)(o.code,{children:"string"})]}),"\n"]}),"\n",(0,d.jsx)(o.p,{children:"Retorno:"}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["door: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h2,{id:"editdoor",children:"editDoor"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"editDoor"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, data)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Edite a configura\xe7\xe3o para o ",(0,d.jsx)(o.code,{children:"doorId"})," fornecido."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["doorId: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n",(0,d.jsxs)(o.li,{children:["data: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h3,{id:"setdoorstate",children:"setDoorState"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"setDoorState"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, state)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Define uma porta com o ",(0,d.jsx)(o.code,{children:"doorId"})," fornecido como trancada se o estado for ",(0,d.jsx)(o.code,{children:"true"})," ou ",(0,d.jsx)(o.code,{children:"1"}),"."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["doorId: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n",(0,d.jsxs)(o.li,{children:["state: ",(0,d.jsx)(o.code,{children:"0"})," or ",(0,d.jsx)(o.code,{children:"1"})," or ",(0,d.jsx)(o.code,{children:"boolean"})]}),"\n"]})]})}o.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,s.a)(),e.components);return o?(0,d.jsx)(o,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Server/functions.mdx",route:"/overextended/ox_doorlock/Server/functions",timestamp:1730928152e3,title:"Fun\xe7\xf5es",headings:t},pageNextRoute:"/overextended/ox_doorlock/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6562)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1336],{6562:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/Server/functions",function(){return n(8091)}])},8091:function(e,o,n){"use strict";n.r(o),n.d(o,{__toc:function(){return t}});var d=n(2676),r=n(2140),s=n(8745);let t=[{depth:2,value:"getDoor",id:"getdoor"},{depth:2,value:"getDoorFromName",id:"getdoorfromname"},{depth:2,value:"editDoor",id:"editdoor"},{depth:3,value:"setDoorState",id:"setdoorstate"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,s.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.h1,{children:"Fun\xe7\xf5es"}),"\n",(0,d.jsx)(o.p,{children:"Obt\xe9m os dados de uma porta com o ID fornecido, correspondendo ao ID da entrada no banco de dados."}),"\n",(0,d.jsx)(o.h2,{id:"getdoor",children:"getDoor"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getDoor"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Obt\xe9m os dados de uma porta com o ",(0,d.jsx)(o.code,{children:"id"})," fornecido, correspondendo ao ID da entrada no banco de dados."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["id: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n"]}),"\n",(0,d.jsx)(o.p,{children:"Retorno:"}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["door: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h2,{id:"getdoorfromname",children:"getDoorFromName"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"getDoorFromName"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Obt\xe9m os dados de uma porta com o ",(0,d.jsx)(o.code,{children:"name"})," fornecido, correspondendo ao nome da entrada no banco de dados."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["name: ",(0,d.jsx)(o.code,{children:"string"})]}),"\n"]}),"\n",(0,d.jsx)(o.p,{children:"Retorno:"}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["door: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h2,{id:"editdoor",children:"editDoor"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"editDoor"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, data)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Edite a configura\xe7\xe3o para o ",(0,d.jsx)(o.code,{children:"doorId"})," fornecido."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["doorId: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n",(0,d.jsxs)(o.li,{children:["data: ",(0,d.jsx)(o.code,{children:"table"})]}),"\n"]}),"\n",(0,d.jsx)(o.h3,{id:"setdoorstate",children:"setDoorState"}),"\n",(0,d.jsx)(o.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(o.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(o.span,{className:"line",children:[(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_doorlock:"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-token-function)"},children:"setDoorState"}),(0,d.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, state)"})]})})}),"\n",(0,d.jsxs)(o.p,{children:["Define uma porta com o ",(0,d.jsx)(o.code,{children:"doorId"})," fornecido como trancada se o estado for ",(0,d.jsx)(o.code,{children:"true"})," ou ",(0,d.jsx)(o.code,{children:"1"}),"."]}),"\n",(0,d.jsxs)(o.ul,{children:["\n",(0,d.jsxs)(o.li,{children:["doorId: ",(0,d.jsx)(o.code,{children:"number"})]}),"\n",(0,d.jsxs)(o.li,{children:["state: ",(0,d.jsx)(o.code,{children:"0"})," or ",(0,d.jsx)(o.code,{children:"1"})," or ",(0,d.jsx)(o.code,{children:"boolean"})]}),"\n"]})]})}o.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,s.a)(),e.components);return o?(0,d.jsx)(o,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/Server/functions.mdx",route:"/overextended/ox_doorlock/Server/functions",timestamp:1730940204e3,title:"Fun\xe7\xf5es",headings:t},pageNextRoute:"/overextended/ox_doorlock/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6562)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_doorlock/settings-2ea7c9e67222a6c4.js b/_next/static/chunks/pages/overextended/ox_doorlock/settings-f132cd76f07537ba.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_doorlock/settings-2ea7c9e67222a6c4.js rename to _next/static/chunks/pages/overextended/ox_doorlock/settings-f132cd76f07537ba.js index 6658bbb745..3d9731ad0e 100644 --- a/_next/static/chunks/pages/overextended/ox_doorlock/settings-2ea7c9e67222a6c4.js +++ b/_next/static/chunks/pages/overextended/ox_doorlock/settings-f132cd76f07537ba.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9829],{1395:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/settings",function(){return r(6475)}])},6475:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return a}});var s=r(2676),i=r(2140),d=r(8745);let a=[{depth:2,value:"Geral",id:"geral"},{depth:2,value:"Personagens",id:"personagens"},{depth:2,value:"Grupos",id:"grupos"},{depth:2,value:"Itens",id:"itens"},{depth:2,value:"Arrombamento",id:"arrombamento"},{depth:2,value:"Som",id:"som"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",ul:"ul",li:"li",a:"a",p:"p",em:"em",code:"code"},(0,d.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Configura\xe7\xf5es da Porta"}),"\n",(0,s.jsx)(n.h2,{id:"geral",children:"Geral"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Nome da porta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Usado para identificar facilmente a porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["C\xf3digo de acesso","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta pode ser desbloqueada por qualquer pessoa usando o c\xf3digo ou frase."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Intervalo de autolock","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta ser\xe1 trancada ap\xf3s x segundos."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Dist\xe2ncia de intera\xe7\xe3o","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta s\xf3 pode ser usada quando estiver a x metros de dist\xe2ncia."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Taxa da porta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Velocidade de movimento da porta para portas deslizantes/garaus/autom\xe1ticas ou portas de abrir quando trancadas."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Trancada","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Define a porta como trancada por padr\xe3o."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Dupla","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta \xe9 um conjunto de duas portas, controladas juntas."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Autom\xe1tica","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Porta deslizante/garaus/autom\xe1tica."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Arrombamento","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta pode ser arrombada ao interagir com um recurso de mira."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Ocultar UI","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nenhum indicador (ou seja, \xedcone, texto) ser\xe1 exibido na porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Manter aberta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Mant\xe9m a porta aberta enquanto estiver desbloqueada."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"personagens",children:"Personagens"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Id do personagem","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Identificador do personagem usado por um framework (ou seja, player.charid, xPlayer.identifier, Player.CitizenId)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"grupos",children:"Grupos"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Grupo","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Dependente do framework, referindo-se a empregos, gangues, etc."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Grau","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"O grau m\xednimo para permitir acesso ao grupo (0 para permitir todos)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"itens",children:"Itens"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Item","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nome do item."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Tipo de metadata","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Requer suporte a metadata (ou seja, ox_inventory) para verificar slot.metadata.type."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Remover ao usar","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Remove o item ap\xf3s interagir com a porta."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"arrombamento",children:"Arrombamento"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Dificuldade","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Define a dificuldade do teste de habilidade (veja ",(0,s.jsx)(n.a,{href:"../ox_lib/Modules/Interface/Client/skillcheck",children:"documentos"}),")."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Tamanho da \xe1rea","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Tamanho da \xe1rea de dificuldade personalizada em graus."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Multiplicador de velocidade","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Multiplicador de velocidade do indicador de dificuldade personalizado."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"som",children:"Som"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Som de trancamento","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Som a ser reproduzido ao trancar a porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Som de desbloqueio","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Som a ser reproduzido ao desbloquear a porta."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Nota"}),": Os sons s\xe3o armazenados no diret\xf3rio ",(0,s.jsx)(n.code,{children:"./web/public/sounds"}),"."]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,d.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/settings.mdx",route:"/overextended/ox_doorlock/settings",frontMatter:{title:"Configura\xe7\xf5es da Porta"},timestamp:1730928152e3,title:"Configura\xe7\xf5es da Porta",headings:a},pageNextRoute:"/overextended/ox_doorlock/settings"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1395)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9829],{1395:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_doorlock/settings",function(){return r(6475)}])},6475:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return a}});var s=r(2676),i=r(2140),d=r(8745);let a=[{depth:2,value:"Geral",id:"geral"},{depth:2,value:"Personagens",id:"personagens"},{depth:2,value:"Grupos",id:"grupos"},{depth:2,value:"Itens",id:"itens"},{depth:2,value:"Arrombamento",id:"arrombamento"},{depth:2,value:"Som",id:"som"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",ul:"ul",li:"li",a:"a",p:"p",em:"em",code:"code"},(0,d.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Configura\xe7\xf5es da Porta"}),"\n",(0,s.jsx)(n.h2,{id:"geral",children:"Geral"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Nome da porta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Usado para identificar facilmente a porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["C\xf3digo de acesso","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta pode ser desbloqueada por qualquer pessoa usando o c\xf3digo ou frase."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Intervalo de autolock","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta ser\xe1 trancada ap\xf3s x segundos."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Dist\xe2ncia de intera\xe7\xe3o","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta s\xf3 pode ser usada quando estiver a x metros de dist\xe2ncia."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Taxa da porta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Velocidade de movimento da porta para portas deslizantes/garaus/autom\xe1ticas ou portas de abrir quando trancadas."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Trancada","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Define a porta como trancada por padr\xe3o."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Dupla","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta \xe9 um conjunto de duas portas, controladas juntas."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Autom\xe1tica","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Porta deslizante/garaus/autom\xe1tica."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Arrombamento","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A porta pode ser arrombada ao interagir com um recurso de mira."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Ocultar UI","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nenhum indicador (ou seja, \xedcone, texto) ser\xe1 exibido na porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Manter aberta","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Mant\xe9m a porta aberta enquanto estiver desbloqueada."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"personagens",children:"Personagens"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Id do personagem","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Identificador do personagem usado por um framework (ou seja, player.charid, xPlayer.identifier, Player.CitizenId)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"grupos",children:"Grupos"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Grupo","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Dependente do framework, referindo-se a empregos, gangues, etc."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Grau","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"O grau m\xednimo para permitir acesso ao grupo (0 para permitir todos)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"itens",children:"Itens"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Item","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nome do item."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Tipo de metadata","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Requer suporte a metadata (ou seja, ox_inventory) para verificar slot.metadata.type."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Remover ao usar","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Remove o item ap\xf3s interagir com a porta."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"arrombamento",children:"Arrombamento"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Dificuldade","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Define a dificuldade do teste de habilidade (veja ",(0,s.jsx)(n.a,{href:"../ox_lib/Modules/Interface/Client/skillcheck",children:"documentos"}),")."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Tamanho da \xe1rea","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Tamanho da \xe1rea de dificuldade personalizada em graus."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Multiplicador de velocidade","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Multiplicador de velocidade do indicador de dificuldade personalizado."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"som",children:"Som"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Som de trancamento","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Som a ser reproduzido ao trancar a porta."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Som de desbloqueio","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Som a ser reproduzido ao desbloquear a porta."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Nota"}),": Os sons s\xe3o armazenados no diret\xf3rio ",(0,s.jsx)(n.code,{children:"./web/public/sounds"}),"."]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,d.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_doorlock/settings.mdx",route:"/overextended/ox_doorlock/settings",frontMatter:{title:"Configura\xe7\xf5es da Porta"},timestamp:1730940204e3,title:"Configura\xe7\xf5es da Porta",headings:a},pageNextRoute:"/overextended/ox_doorlock/settings"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1395)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_fuel-02e7255d0c30cee3.js b/_next/static/chunks/pages/overextended/ox_fuel-d4af57b929cad8e9.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_fuel-02e7255d0c30cee3.js rename to _next/static/chunks/pages/overextended/ox_fuel-d4af57b929cad8e9.js index 862e2da75f..79096e4891 100644 --- a/_next/static/chunks/pages/overextended/ox_fuel-02e7255d0c30cee3.js +++ b/_next/static/chunks/pages/overextended/ox_fuel-d4af57b929cad8e9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1756],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),i=n.n(o),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&__defNormalProp(e,n,t[n]);if(d)for(var n of d(t))u.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>l(e,c(t)),__objRest=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>t.indexOf(r)&&u.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,t,n)=>{let o=(0,r.forwardRef)((t,o)=>{var{color:i="currentColor",size:a=24,stroke:l=2,children:c}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},s),{width:a,height:a,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,t])=>(0,r.createElement)(e,t)),...c||[]])});return o.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},o.displayName=`${t}`,o}},4715:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel",function(){return n(8205)}])},8205:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return l}});var r=n(2676),o=n(2140),i=n(8745),s=n(7100),a=n(8713);let l=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies.",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or clone the source code.",id:"download-a-release-or-clone-the-source-code"},{depth:3,value:"Install optional dependencies.",id:"install-optional-dependencies"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ul:"ul",li:"li",a:"a",pre:"pre",code:"code",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Ox Fuel"}),"\n",(0,r.jsx)(a.Z,{repo:"https://github.com/overextended/ox_fuel"}),"\n",(0,r.jsx)(t.p,{children:"A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item."}),"\n",(0,r.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(s.Rg,{children:[(0,r.jsx)(t.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_inventory/",children:"ox_inventory"})}),"\n"]}),(0,r.jsxs)(t.h3,{id:"download-a-release-or-clone-the-source-code",children:["Download a ",(0,r.jsx)(t.a,{href:"https://github.com/overextended/ox_fuel/releases",children:"release"})," or clone the source code."]}),(0,r.jsx)(t.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(t.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(t.span,{className:"line",children:[(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_fuel.git"})]})})}),(0,r.jsx)(t.h3,{id:"install-optional-dependencies",children:"Install optional dependencies."}),(0,r.jsx)(t.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]})]})}t.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,i.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel.mdx",route:"/overextended/ox_fuel",timestamp:1730928152e3,title:"Ox Fuel",headings:l},pageNextRoute:"/overextended/ox_fuel"})},3786:function(e,t,n){"use strict";n.d(t,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var o=n(5850),i=(0,o.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),s=(0,o.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,o.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,o.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,o.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:t="left",children:n,icon:o,link:i}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:i,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===t&&(0,r.jsx)("div",{children:o}),n,"right"===t&&(0,r.jsx)("div",{children:o})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,t,n){"use strict";var r=n(2676);n(5271);var o=n(3786);t.Z=e=>{let{repo:t,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(o.eX,{link:t}),(0,r.jsx)(o.Vg,{link:"".concat(t,"/releases")}),n&&(0,r.jsx)(o.WR,{link:n})]})}},4049:function(e,t,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,o,i,s){if(s!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4715)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1756],{5850:function(e,t,n){"use strict";n.d(t,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),i=n.n(o),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&__defNormalProp(e,n,t[n]);if(d)for(var n of d(t))u.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>l(e,c(t)),__objRest=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>t.indexOf(r)&&u.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,t,n)=>{let o=(0,r.forwardRef)((t,o)=>{var{color:i="currentColor",size:a=24,stroke:l=2,children:c}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},s),{width:a,height:a,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,t])=>(0,r.createElement)(e,t)),...c||[]])});return o.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},o.displayName=`${t}`,o}},4715:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel",function(){return n(8205)}])},8205:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return l}});var r=n(2676),o=n(2140),i=n(8745),s=n(7100),a=n(8713);let l=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies.",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or clone the source code.",id:"download-a-release-or-clone-the-source-code"},{depth:3,value:"Install optional dependencies.",id:"install-optional-dependencies"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ul:"ul",li:"li",a:"a",pre:"pre",code:"code",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Ox Fuel"}),"\n",(0,r.jsx)(a.Z,{repo:"https://github.com/overextended/ox_fuel"}),"\n",(0,r.jsx)(t.p,{children:"A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item."}),"\n",(0,r.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(s.Rg,{children:[(0,r.jsx)(t.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_inventory/",children:"ox_inventory"})}),"\n"]}),(0,r.jsxs)(t.h3,{id:"download-a-release-or-clone-the-source-code",children:["Download a ",(0,r.jsx)(t.a,{href:"https://github.com/overextended/ox_fuel/releases",children:"release"})," or clone the source code."]}),(0,r.jsx)(t.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(t.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(t.span,{className:"line",children:[(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_fuel.git"})]})})}),(0,r.jsx)(t.h3,{id:"install-optional-dependencies",children:"Install optional dependencies."}),(0,r.jsx)(t.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]})]})}t.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,i.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel.mdx",route:"/overextended/ox_fuel",timestamp:1730940204e3,title:"Ox Fuel",headings:l},pageNextRoute:"/overextended/ox_fuel"})},3786:function(e,t,n){"use strict";n.d(t,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var o=n(5850),i=(0,o.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),s=(0,o.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,o.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,o.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,o.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:t="left",children:n,icon:o,link:i}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:i,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===t&&(0,r.jsx)("div",{children:o}),n,"right"===t&&(0,r.jsx)("div",{children:o})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,t,n){"use strict";var r=n(2676);n(5271);var o=n(3786);t.Z=e=>{let{repo:t,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(o.eX,{link:t}),(0,r.jsx)(o.Vg,{link:"".concat(t,"/releases")}),n&&(0,r.jsx)(o.WR,{link:n})]})}},4049:function(e,t,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,o,i,s){if(s!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,t,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4715)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_fuel/Client/functions-184a719fbdeab415.js b/_next/static/chunks/pages/overextended/ox_fuel/Client/functions-7f783d51cc8e034e.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_fuel/Client/functions-184a719fbdeab415.js rename to _next/static/chunks/pages/overextended/ox_fuel/Client/functions-7f783d51cc8e034e.js index 8fe1c53043..6feea3878d 100644 --- a/_next/static/chunks/pages/overextended/ox_fuel/Client/functions-184a719fbdeab415.js +++ b/_next/static/chunks/pages/overextended/ox_fuel/Client/functions-7f783d51cc8e034e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1226],{5160:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Client/functions",function(){return n(9810)}])},9810:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var l=n(2676),r=n(2140),o=n(8745);let t=[{depth:2,value:"setMoneyCheck",id:"setmoneycheck"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Functions"}),"\n",(0,l.jsx)(s.h2,{id:"setmoneycheck",children:"setMoneyCheck"}),"\n",(0,l.jsx)(s.p,{children:"Override the built-in money check."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setMoneyCheck"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(method)"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["method: ",(0,l.jsx)(s.code,{children:"function(): number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setMoneyCheck"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ESX."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"().accounts"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"accounts "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts[i].name "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts[i].money"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Client/functions.mdx",route:"/overextended/ox_fuel/Client/functions",timestamp:1730928152e3,title:"Functions",headings:t},pageNextRoute:"/overextended/ox_fuel/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5160)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1226],{5160:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Client/functions",function(){return n(9810)}])},9810:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var l=n(2676),r=n(2140),o=n(8745);let t=[{depth:2,value:"setMoneyCheck",id:"setmoneycheck"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Functions"}),"\n",(0,l.jsx)(s.h2,{id:"setmoneycheck",children:"setMoneyCheck"}),"\n",(0,l.jsx)(s.p,{children:"Override the built-in money check."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setMoneyCheck"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(method)"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["method: ",(0,l.jsx)(s.code,{children:"function(): number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setMoneyCheck"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ESX."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerData"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"().accounts"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"accounts "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts[i].name "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" accounts[i].money"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Client/functions.mdx",route:"/overextended/ox_fuel/Client/functions",timestamp:1730940204e3,title:"Functions",headings:t},pageNextRoute:"/overextended/ox_fuel/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5160)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_fuel/Server/functions-a5d8735b0ef30294.js b/_next/static/chunks/pages/overextended/ox_fuel/Server/functions-8bc25ddb5a33283f.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_fuel/Server/functions-a5d8735b0ef30294.js rename to _next/static/chunks/pages/overextended/ox_fuel/Server/functions-8bc25ddb5a33283f.js index 167516340b..52f43fe544 100644 --- a/_next/static/chunks/pages/overextended/ox_fuel/Server/functions-a5d8735b0ef30294.js +++ b/_next/static/chunks/pages/overextended/ox_fuel/Server/functions-8bc25ddb5a33283f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2512],{8174:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Server/functions",function(){return n(4479)}])},4479:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),l=n(2140),o=n(8745);let t=[{depth:2,value:"setPaymentMethod",id:"setpaymentmethod"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Functions"}),"\n",(0,r.jsx)(s.h2,{id:"setpaymentmethod",children:"setPaymentMethod"}),"\n",(0,r.jsx)(s.p,{children:"Override the built-in payment method."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPaymentMethod"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(method)"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["method: ",(0,r.jsx)(s.code,{children:"function(): boolean?"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPaymentMethod"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"amount"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ESX."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getAccount"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").money"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAccountMoney"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amount)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'not_enough_money'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Server/functions.mdx",route:"/overextended/ox_fuel/Server/functions",timestamp:1730928152e3,title:"Functions",headings:t},pageNextRoute:"/overextended/ox_fuel/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8174)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2512],{8174:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Server/functions",function(){return n(4479)}])},4479:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),l=n(2140),o=n(8745);let t=[{depth:2,value:"setPaymentMethod",id:"setpaymentmethod"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Functions"}),"\n",(0,r.jsx)(s.h2,{id:"setpaymentmethod",children:"setPaymentMethod"}),"\n",(0,r.jsx)(s.p,{children:"Override the built-in payment method."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPaymentMethod"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(method)"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["method: ",(0,r.jsx)(s.code,{children:"function(): boolean?"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_fuel:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPaymentMethod"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"amount"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ESX."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerFromId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getAccount"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").money"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" amount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAccountMoney"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bank'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amount)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'not_enough_money'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amount "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bankAmount)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Server/functions.mdx",route:"/overextended/ox_fuel/Server/functions",timestamp:1730940204e3,title:"Functions",headings:t},pageNextRoute:"/overextended/ox_fuel/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8174)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_fuel/Shared-f292bef6fd7902a1.js b/_next/static/chunks/pages/overextended/ox_fuel/Shared-f992b2cd062dd4c0.js similarity index 94% rename from _next/static/chunks/pages/overextended/ox_fuel/Shared-f292bef6fd7902a1.js rename to _next/static/chunks/pages/overextended/ox_fuel/Shared-f992b2cd062dd4c0.js index cc8ca8d019..49df83a2e2 100644 --- a/_next/static/chunks/pages/overextended/ox_fuel/Shared-f292bef6fd7902a1.js +++ b/_next/static/chunks/pages/overextended/ox_fuel/Shared-f992b2cd062dd4c0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2250],{9953:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Shared",function(){return n(9251)}])},9251:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return s}});var l=n(2676),a=n(2140),o=n(8745);let s=[{depth:2,value:"Get vehicle fuel amount",id:"get-vehicle-fuel-amount"},{depth:2,value:"Set vehicle fuel amount",id:"set-vehicle-fuel-amount"}];function _createMdxContent(e){let t=Object.assign({h2:"h2",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"get-vehicle-fuel-amount",children:"Get vehicle fuel amount"}),"\n",(0,l.jsx)(t.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(t.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(t.span,{className:"line",children:[(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" fuel "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"Entity"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicleId).state.fuel"})]})})}),"\n",(0,l.jsx)(t.h2,{id:"set-vehicle-fuel-amount",children:"Set vehicle fuel amount"}),"\n",(0,l.jsx)(t.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(t.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(t.span,{className:"line",children:[(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"Entity"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicleId).state.fuel "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" fuelAmount"})]})})})]})}t.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Shared.mdx",route:"/overextended/ox_fuel/Shared",timestamp:1730928152e3,title:"Shared",headings:s},pageNextRoute:"/overextended/ox_fuel/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9953)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2250],{9953:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_fuel/Shared",function(){return n(9251)}])},9251:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return s}});var l=n(2676),a=n(2140),o=n(8745);let s=[{depth:2,value:"Get vehicle fuel amount",id:"get-vehicle-fuel-amount"},{depth:2,value:"Set vehicle fuel amount",id:"set-vehicle-fuel-amount"}];function _createMdxContent(e){let t=Object.assign({h2:"h2",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"get-vehicle-fuel-amount",children:"Get vehicle fuel amount"}),"\n",(0,l.jsx)(t.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(t.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(t.span,{className:"line",children:[(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" fuel "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"Entity"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicleId).state.fuel"})]})})}),"\n",(0,l.jsx)(t.h2,{id:"set-vehicle-fuel-amount",children:"Set vehicle fuel amount"}),"\n",(0,l.jsx)(t.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(t.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(t.span,{className:"line",children:[(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"Entity"}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicleId).state.fuel "}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" fuelAmount"})]})})})]})}t.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_fuel/Shared.mdx",route:"/overextended/ox_fuel/Shared",timestamp:1730940204e3,title:"Shared",headings:s},pageNextRoute:"/overextended/ox_fuel/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9953)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory-e8de91f67874b7ef.js b/_next/static/chunks/pages/overextended/ox_inventory-f90f3c4a1f166f7c.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory-e8de91f67874b7ef.js rename to _next/static/chunks/pages/overextended/ox_inventory-f90f3c4a1f166f7c.js index bb8bb91186..4b1fccb23c 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory-e8de91f67874b7ef.js +++ b/_next/static/chunks/pages/overextended/ox_inventory-f90f3c4a1f166f7c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3465],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),i=n(507),l=n.n(i),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let i=(0,r.forwardRef)((s,i)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},o),{width:t,height:t,stroke:l,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return i.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},i.displayName=`${s}`,i}},2302:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory",function(){return n(6280)}])},6280:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),i=n(2140),l=n(8745),o=n(8713),t=n(7100);let a=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or build the source code.",id:"download-a-release-or-build-the-source-code"},{depth:3,value:"Install optional dependencies",id:"install-optional-dependencies"},{depth:3,value:"Resource start order",id:"resource-start-order"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Framework incompatibilities",id:"framework-incompatibilities"},{depth:2,value:"Using an unsupported framework",id:"using-an-unsupported-framework"},{depth:3,value:"Setup a bridge submodule",id:"setup-a-bridge-submodule"},{depth:3,value:"Setup database references",id:"setup-database-references"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Ox Inventory"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_inventory"}),"\n",(0,r.jsx)(s.p,{children:'A slot-based inventory with item metadata for "item uniqueness".'}),"\n",(0,r.jsx)(t.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["If you are replacing a built-in framework inventory there will be compatibility errors.",(0,r.jsx)(s.br,{}),"\n","If you are unwilling or incapable of resolving incompatibilities, do not install this resource."]})}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["We ",(0,r.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(s.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_inventory.git"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory/web"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(s.h3,{id:"install-optional-dependencies",children:"Install optional dependencies"}),(0,r.jsx)(s.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]}),(0,r.jsx)(s.h3,{id:"resource-start-order",children:"Resource start order"}),(0,r.jsx)(s.p,{children:"It's important for your resources to start in a logical order to prevent errors from missing dependencies."}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"oxmysql"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# this should be one of the first resources"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# the name of your framework (i.e. ox_core, es_extended, qbx_core)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory"})]})]})}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Shared"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"esx"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Number of slots for player inventories"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:slots"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Maximum carry capacity for players, in grams (frameworks may override this)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weight"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"30000"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Integrated support for qtarget/ox_target stashes, shops, etc"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Note: qtarget is deprecated, a future update may drop support (ox_target only, or gated features)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:target"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Jobs with access to police armoury, evidence lockers, etc"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:police"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"police"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sheriff"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Client"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# The URL to load item images from"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:imagepath"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"nui://ox_inventory/web/images"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons will reload after reaching 0 ammo"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:autoreload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Blur the screen while accessing the inventory"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:screenblur"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Default hotkeys to access primary and secondary inventories, and hotbar"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:keys"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F2"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"K"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"TAB"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable control action when inventory is open"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:enablekeys"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [249]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons must be aimed before shooting"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:aimedfiring"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Show a list of all nearby players when giving items"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:giveplayerlist"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon draw/holster animations"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponanims"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle item notifications (add/remove)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:itemnotify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon item notifications (equip/holster)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponnotify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disable drop markers and spawn a prop instead"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropprops"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the default model used for drop props"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropmodel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prop_med_bag_01b"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disarm the player if an unexpected weapon is in use (i.e. did not use the weapon item)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponmismatch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore weapon mismatch checks for the given weapon type (e.g. ['WEAPON_SHOVEL', 'WEAPON_HANDCUFFS'])"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:ignoreweapons"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Suppress weapon and ammo pickups"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:suppresspickups"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Server"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Compare current version to latest release on GitHub"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:versioncheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Stashes will be wiped after remaining unchanged for the given time"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:clearstashes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"6 MONTH"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Discord webhook url, used for imageurl metadata content moderation (image embeds)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:webhook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Logging via ox_lib (0: Disable, 1: Standard, 2: Include AddItem/RemoveItem, and all shop purchases)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:loglevel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Item prices fluctuate in shops"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomprices"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Loot will randomly generate inside unowned vehicles and dumpsters"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Minimum job grade to remove items from evidence lockers"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:evidencegrade"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Trim whitespace from vehicle plates when checking owned vehicles"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:trimplate"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the contents of randomly generated inventories"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# [item name, minimum, maximum, loot chance]"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:vehicleloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"water"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"garbage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"panties"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"400"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bandage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dumpsterloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"mustard"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"garbage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"burger"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set items to sync with framework accounts"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:accounts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"framework-incompatibilities",children:"Framework incompatibilities"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues."}),"\n",(0,r.jsxs)(s.li,{children:["Money as an item may conflict with banking/account systems.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["You can sync these values with ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/aff8ef9e9ee3f93f177ce03b3f37895ff5781800/modules/bridge/nd/server.lua#L64-L77",children:"server.syncInventory"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Refer to issue ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/issues/1297",children:"#1297"})," for known compatibility issues."]}),"\n",(0,r.jsx)(s.h2,{id:"using-an-unsupported-framework",children:"Using an unsupported framework"}),"\n",(0,r.jsxs)(s.p,{children:["If your framework does not have official support you'll have to implement it yourself.",(0,r.jsx)(s.br,{}),"\n","If you're replacing an existing/built-in inventory system this may be complicated, but is a fairly simple task otherwise."]}),"\n",(0,r.jsx)(s.p,{children:"This setup is highly opinionated and rigid, so it's up to your own ability as a developer to make it work."}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(s.h3,{id:"setup-a-bridge-submodule",children:"Setup a bridge submodule"}),(0,r.jsx)(s.p,{children:'You\'ll want to set the target framework first - this could be the name, an acronym, or just "custom".'}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"custom"'})]})})}),(0,r.jsxs)(s.p,{children:["Copy the ",(0,r.jsx)(s.code,{children:"ox"})," directory from the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/tree/main/modules/bridge",children:"bridge"})," directory and give it the name you used above."]}),(0,r.jsx)(s.p,{children:"The bare minimum functions and event handlers are added here, but you'll need to change them to match your framework; we can't provide any help here. You can refer to the other framework bridges if you need inspiration."}),(0,r.jsx)(s.h3,{id:"setup-database-references",children:"Setup database references"}),(0,r.jsxs)(s.p,{children:["Take a look at the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/mysql/server.lua",children:"mysql"})," module. You'll need to reference your player/vehicle tables and id columns."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"elseif"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" shared.framework "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'custom' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerTable "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'characters' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing player / character data"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerColumn "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'charid' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the character (i.e. identifier, citizenid, id)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleTable "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicles' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing owned vehicle data"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleColumn "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'id' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the vehicle (i.e. plate, vin, id)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory.mdx",route:"/overextended/ox_inventory",timestamp:1730928152e3,title:"Ox Inventory",headings:a},pageNextRoute:"/overextended/ox_inventory"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var i=n(5850),l=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),o=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:i,link:l}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:l,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:i}),n,"right"===s&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var i=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:s}),(0,r.jsx)(i.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,i,l,o){if(o!==r){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2302)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3465],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),i=n(507),l=n.n(i),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let i=(0,r.forwardRef)((s,i)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},o),{width:t,height:t,stroke:l,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return i.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},i.displayName=`${s}`,i}},2302:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory",function(){return n(6280)}])},6280:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),i=n(2140),l=n(8745),o=n(8713),t=n(7100);let a=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or build the source code.",id:"download-a-release-or-build-the-source-code"},{depth:3,value:"Install optional dependencies",id:"install-optional-dependencies"},{depth:3,value:"Resource start order",id:"resource-start-order"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Framework incompatibilities",id:"framework-incompatibilities"},{depth:2,value:"Using an unsupported framework",id:"using-an-unsupported-framework"},{depth:3,value:"Setup a bridge submodule",id:"setup-a-bridge-submodule"},{depth:3,value:"Setup database references",id:"setup-database-references"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Ox Inventory"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_inventory"}),"\n",(0,r.jsx)(s.p,{children:'A slot-based inventory with item metadata for "item uniqueness".'}),"\n",(0,r.jsx)(t.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["If you are replacing a built-in framework inventory there will be compatibility errors.",(0,r.jsx)(s.br,{}),"\n","If you are unwilling or incapable of resolving incompatibilities, do not install this resource."]})}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["We ",(0,r.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(s.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_inventory.git"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory/web"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(s.h3,{id:"install-optional-dependencies",children:"Install optional dependencies"}),(0,r.jsx)(s.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]}),(0,r.jsx)(s.h3,{id:"resource-start-order",children:"Resource start order"}),(0,r.jsx)(s.p,{children:"It's important for your resources to start in a logical order to prevent errors from missing dependencies."}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"oxmysql"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# this should be one of the first resources"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# the name of your framework (i.e. ox_core, es_extended, qbx_core)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory"})]})]})}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Shared"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"esx"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Number of slots for player inventories"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:slots"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Maximum carry capacity for players, in grams (frameworks may override this)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weight"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"30000"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Integrated support for qtarget/ox_target stashes, shops, etc"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Note: qtarget is deprecated, a future update may drop support (ox_target only, or gated features)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:target"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Jobs with access to police armoury, evidence lockers, etc"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:police"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"police"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sheriff"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Client"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# The URL to load item images from"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:imagepath"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"nui://ox_inventory/web/images"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons will reload after reaching 0 ammo"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:autoreload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Blur the screen while accessing the inventory"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:screenblur"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Default hotkeys to access primary and secondary inventories, and hotbar"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:keys"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F2"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"K"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"TAB"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable control action when inventory is open"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:enablekeys"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [249]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons must be aimed before shooting"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:aimedfiring"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Show a list of all nearby players when giving items"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:giveplayerlist"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon draw/holster animations"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponanims"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle item notifications (add/remove)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:itemnotify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon item notifications (equip/holster)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponnotify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disable drop markers and spawn a prop instead"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropprops"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the default model used for drop props"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropmodel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prop_med_bag_01b"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disarm the player if an unexpected weapon is in use (i.e. did not use the weapon item)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponmismatch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore weapon mismatch checks for the given weapon type (e.g. ['WEAPON_SHOVEL', 'WEAPON_HANDCUFFS'])"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:ignoreweapons"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Suppress weapon and ammo pickups"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:suppresspickups"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"### Server"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Compare current version to latest release on GitHub"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:versioncheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Stashes will be wiped after remaining unchanged for the given time"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:clearstashes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"6 MONTH"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Discord webhook url, used for imageurl metadata content moderation (image embeds)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:webhook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Logging via ox_lib (0: Disable, 1: Standard, 2: Include AddItem/RemoveItem, and all shop purchases)"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:loglevel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Item prices fluctuate in shops"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomprices"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Loot will randomly generate inside unowned vehicles and dumpsters"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Minimum job grade to remove items from evidence lockers"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:evidencegrade"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Trim whitespace from vehicle plates when checking owned vehicles"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:trimplate"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the contents of randomly generated inventories"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# [item name, minimum, maximum, loot chance]"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:vehicleloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"water"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"garbage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"panties"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"400"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bandage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dumpsterloot"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"mustard"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"garbage"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"burger"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set items to sync with framework accounts"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:accounts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"money"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"framework-incompatibilities",children:"Framework incompatibilities"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues."}),"\n",(0,r.jsxs)(s.li,{children:["Money as an item may conflict with banking/account systems.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["You can sync these values with ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/aff8ef9e9ee3f93f177ce03b3f37895ff5781800/modules/bridge/nd/server.lua#L64-L77",children:"server.syncInventory"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Refer to issue ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/issues/1297",children:"#1297"})," for known compatibility issues."]}),"\n",(0,r.jsx)(s.h2,{id:"using-an-unsupported-framework",children:"Using an unsupported framework"}),"\n",(0,r.jsxs)(s.p,{children:["If your framework does not have official support you'll have to implement it yourself.",(0,r.jsx)(s.br,{}),"\n","If you're replacing an existing/built-in inventory system this may be complicated, but is a fairly simple task otherwise."]}),"\n",(0,r.jsx)(s.p,{children:"This setup is highly opinionated and rigid, so it's up to your own ability as a developer to make it work."}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(s.h3,{id:"setup-a-bridge-submodule",children:"Setup a bridge submodule"}),(0,r.jsx)(s.p,{children:'You\'ll want to set the target framework first - this could be the name, an acronym, or just "custom".'}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"custom"'})]})})}),(0,r.jsxs)(s.p,{children:["Copy the ",(0,r.jsx)(s.code,{children:"ox"})," directory from the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/tree/main/modules/bridge",children:"bridge"})," directory and give it the name you used above."]}),(0,r.jsx)(s.p,{children:"The bare minimum functions and event handlers are added here, but you'll need to change them to match your framework; we can't provide any help here. You can refer to the other framework bridges if you need inspiration."}),(0,r.jsx)(s.h3,{id:"setup-database-references",children:"Setup database references"}),(0,r.jsxs)(s.p,{children:["Take a look at the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/mysql/server.lua",children:"mysql"})," module. You'll need to reference your player/vehicle tables and id columns."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"elseif"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" shared.framework "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'custom' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerTable "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'characters' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing player / character data"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerColumn "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'charid' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the character (i.e. identifier, citizenid, id)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleTable "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicles' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing owned vehicle data"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleColumn "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'id' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the vehicle (i.e. plate, vin, id)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory.mdx",route:"/overextended/ox_inventory",timestamp:1730940204e3,title:"Ox Inventory",headings:a},pageNextRoute:"/overextended/ox_inventory"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var i=n(5850),l=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),o=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:i,link:l}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:l,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:i}),n,"right"===s&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var i=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:s}),(0,r.jsx)(i.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,i,l,o){if(o!==r){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2302)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Events/Client-ee339fa97e09cb8e.js b/_next/static/chunks/pages/overextended/ox_inventory/Events/Client-60718e999f94ba2c.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Events/Client-ee339fa97e09cb8e.js rename to _next/static/chunks/pages/overextended/ox_inventory/Events/Client-60718e999f94ba2c.js index 9e5a1d7aaa..abc77bfd72 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Events/Client-ee339fa97e09cb8e.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Events/Client-60718e999f94ba2c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9414],{4759:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Events/Client",function(){return r(9614)}])},9614:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return l}});var s=r(2676),t=r(2140),o=r(8745),i=r(7100);let l=[{depth:2,value:"Event Triggers",id:"event-triggers"},{depth:3,value:"ox_inventory:disarm",id:"ox_inventorydisarm"},{depth:2,value:"Event Handlers",id:"event-handlers"},{depth:3,value:"ox_inventory:updateInventory",id:"ox_inventoryupdateinventory"},{depth:3,value:"ox_inventory:currentWeapon",id:"ox_inventorycurrentweapon"},{depth:3,value:"ox_inventory:itemCount",id:"ox_inventoryitemcount"},{depth:3,value:"ox_inventory:updateWeaponComponent",id:"ox_inventoryupdateweaponcomponent"},{depth:3,value:"ox_inventory:usedItem",id:"ox_inventoryuseditem"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",br:"br",em:"em"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Client"}),"\n",(0,s.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,s.jsx)(n.h2,{id:"event-triggers",children:"Event Triggers"}),"\n",(0,s.jsx)(i.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"are safe"})," to trigger and handle in other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventorydisarm",children:"ox_inventory:disarm"}),"\n",(0,s.jsx)(n.p,{children:"Can be triggered to force the player to disarm."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:disarm'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", playerId, noAnim)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["noAnim: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["If ",(0,s.jsx)(n.code,{children:"true"}),", disarm animation will be skipped"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"event-handlers",children:"Event Handlers"}),"\n",(0,s.jsx)(i.UW,{type:"warning",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryupdateinventory",children:"ox_inventory:updateInventory"}),"\n",(0,s.jsxs)(n.p,{children:["Triggered after inventory slots have been updated, included on load.",(0,s.jsx)(n.br,{}),"\n","Changes is a table containing all updated slot data indexed by slotId. Empty slots are ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:updateInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"changes"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["changes: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventorycurrentweapon",children:"ox_inventory:currentWeapon"}),"\n",(0,s.jsx)(n.p,{children:"Triggered when a weapon is equipped or its metadata is altered."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:currentWeapon'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"weapon"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["weapon?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryitemcount",children:"ox_inventory:itemCount"}),"\n",(0,s.jsxs)(n.p,{children:["Triggered when the amount of an item in the player's inventory is changed.",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"Note: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem."})]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:itemCount'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"itemName"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"totalCount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["itemName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["totalCount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryupdateweaponcomponent",children:"ox_inventory:updateWeaponComponent"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:updateWeaponComponent'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"action"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"componentHash"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"componentItem"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["action: ",(0,s.jsx)(n.code,{children:"'added' | 'removed'"})]}),"\n",(0,s.jsxs)(n.li,{children:["componentHash: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["componentItem: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:usedItem'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"slotId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["slotId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["metadata?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Events/Client.mdx",route:"/overextended/ox_inventory/Events/Client",timestamp:1730928152e3,title:"Client",headings:l},pageNextRoute:"/overextended/ox_inventory/Events/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4759)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9414],{4759:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Events/Client",function(){return r(9614)}])},9614:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return l}});var s=r(2676),t=r(2140),o=r(8745),i=r(7100);let l=[{depth:2,value:"Event Triggers",id:"event-triggers"},{depth:3,value:"ox_inventory:disarm",id:"ox_inventorydisarm"},{depth:2,value:"Event Handlers",id:"event-handlers"},{depth:3,value:"ox_inventory:updateInventory",id:"ox_inventoryupdateinventory"},{depth:3,value:"ox_inventory:currentWeapon",id:"ox_inventorycurrentweapon"},{depth:3,value:"ox_inventory:itemCount",id:"ox_inventoryitemcount"},{depth:3,value:"ox_inventory:updateWeaponComponent",id:"ox_inventoryupdateweaponcomponent"},{depth:3,value:"ox_inventory:usedItem",id:"ox_inventoryuseditem"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",br:"br",em:"em"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Client"}),"\n",(0,s.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,s.jsx)(n.h2,{id:"event-triggers",children:"Event Triggers"}),"\n",(0,s.jsx)(i.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"are safe"})," to trigger and handle in other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventorydisarm",children:"ox_inventory:disarm"}),"\n",(0,s.jsx)(n.p,{children:"Can be triggered to force the player to disarm."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:disarm'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", playerId, noAnim)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["noAnim: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["If ",(0,s.jsx)(n.code,{children:"true"}),", disarm animation will be skipped"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"event-handlers",children:"Event Handlers"}),"\n",(0,s.jsx)(i.UW,{type:"warning",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryupdateinventory",children:"ox_inventory:updateInventory"}),"\n",(0,s.jsxs)(n.p,{children:["Triggered after inventory slots have been updated, included on load.",(0,s.jsx)(n.br,{}),"\n","Changes is a table containing all updated slot data indexed by slotId. Empty slots are ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:updateInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"changes"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["changes: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventorycurrentweapon",children:"ox_inventory:currentWeapon"}),"\n",(0,s.jsx)(n.p,{children:"Triggered when a weapon is equipped or its metadata is altered."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:currentWeapon'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"weapon"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["weapon?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryitemcount",children:"ox_inventory:itemCount"}),"\n",(0,s.jsxs)(n.p,{children:["Triggered when the amount of an item in the player's inventory is changed.",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.em,{children:"Note: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem."})]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:itemCount'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"itemName"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"totalCount"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["itemName: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["totalCount: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryupdateweaponcomponent",children:"ox_inventory:updateWeaponComponent"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:updateWeaponComponent'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"action"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"componentHash"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"componentItem"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["action: ",(0,s.jsx)(n.code,{children:"'added' | 'removed'"})]}),"\n",(0,s.jsxs)(n.li,{children:["componentHash: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["componentItem: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:usedItem'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"slotId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["slotId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["metadata?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Events/Client.mdx",route:"/overextended/ox_inventory/Events/Client",timestamp:1730940204e3,title:"Client",headings:l},pageNextRoute:"/overextended/ox_inventory/Events/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4759)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Events/Server-46aad65316dc87a0.js b/_next/static/chunks/pages/overextended/ox_inventory/Events/Server-8ae409cf39d7bdee.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Events/Server-46aad65316dc87a0.js rename to _next/static/chunks/pages/overextended/ox_inventory/Events/Server-8ae409cf39d7bdee.js index dabd50e79c..a92150d049 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Events/Server-46aad65316dc87a0.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Events/Server-8ae409cf39d7bdee.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2487],{6793:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Events/Server",function(){return r(3177)}])},3177:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return l}});var s=r(2676),o=r(2140),t=r(8745),i=r(7100);let l=[{depth:2,value:"Handlers",id:"handlers"},{depth:3,value:"ox_inventory:openedInventory",id:"ox_inventoryopenedinventory"},{depth:3,value:"ox_inventory:closedInventory",id:"ox_inventoryclosedinventory"},{depth:3,value:"ox_inventory:usedItem",id:"ox_inventoryuseditem"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Server"}),"\n",(0,s.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,s.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,s.jsx)(i.UW,{type:"warning",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryopenedinventory",children:"ox_inventory:openedInventory"}),"\n",(0,s.jsx)(n.p,{children:"Triggered after an inventory is opened by a player."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:openedInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventoryId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["inventoryId: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryclosedinventory",children:"ox_inventory:closedInventory"}),"\n",(0,s.jsx)(n.p,{children:"Triggered after an inventory is closed by a player."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:closedInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventoryId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:usedItem'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"slotId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["slotId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["metadata?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Events/Server.mdx",route:"/overextended/ox_inventory/Events/Server",timestamp:1730928152e3,title:"Server",headings:l},pageNextRoute:"/overextended/ox_inventory/Events/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6793)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2487],{6793:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Events/Server",function(){return r(3177)}])},3177:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return l}});var s=r(2676),o=r(2140),t=r(8745),i=r(7100);let l=[{depth:2,value:"Handlers",id:"handlers"},{depth:3,value:"ox_inventory:openedInventory",id:"ox_inventoryopenedinventory"},{depth:3,value:"ox_inventory:closedInventory",id:"ox_inventoryclosedinventory"},{depth:3,value:"ox_inventory:usedItem",id:"ox_inventoryuseditem"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Server"}),"\n",(0,s.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,s.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,s.jsx)(i.UW,{type:"warning",children:(0,s.jsxs)(n.p,{children:["These events ",(0,s.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryopenedinventory",children:"ox_inventory:openedInventory"}),"\n",(0,s.jsx)(n.p,{children:"Triggered after an inventory is opened by a player."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:openedInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventoryId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["inventoryId: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryclosedinventory",children:"ox_inventory:closedInventory"}),"\n",(0,s.jsx)(n.p,{children:"Triggered after an inventory is closed by a player."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:closedInventory'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventoryId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:usedItem'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"playerId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"slotId"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["name: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["slotId: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["metadata?: ",(0,s.jsx)(n.code,{children:"table"})]}),"\n"]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Events/Server.mdx",route:"/overextended/ox_inventory/Events/Server",timestamp:1730940204e3,title:"Server",headings:l},pageNextRoute:"/overextended/ox_inventory/Events/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6793)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-a0c014a89e3a01f6.js b/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-2fa2c0d2e67d23a9.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-a0c014a89e3a01f6.js rename to _next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-2fa2c0d2e67d23a9.js index 245b69cbff..cec92aa988 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-a0c014a89e3a01f6.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/esx-2fa2c0d2e67d23a9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7090],{6189:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Frameworks/esx",function(){return n(8986)}])},8986:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var r=n(2676),o=n(2140),i=n(8745),t=n(7100);let l=[{depth:2,value:"Compatibility",id:"compatibility"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Convert ESX inventory data",id:"convert-esx-inventory-data"},{depth:2,value:"Optional Optimisation",id:"optional-optimisation"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",ul:"ul",li:"li",a:"a",code:"code",h2:"h2",p:"p",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"ESX"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["You will need a ",(0,r.jsx)(s.a,{href:"https://github.com/esx-framework/esx_core",children:"compatible version of ESX Legacy"})," (1.6.0 or higher)."]}),"\n",(0,r.jsxs)(s.li,{children:["You can convert player inventories with ",(0,r.jsx)(s.code,{children:"convertinventory esx"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["All items in the database will be migrated to the internal item data.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Always restart the resource when items are migrated!"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,r.jsx)(s.p,{children:"Ox Inventory is a complete replacement for existing item, inventory, and weapon systems; it is inherently incompatible with ESX and any resources that rely on default behaviour."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Loadouts do not exist and weapons are treated as items."}),"\n",(0,r.jsx)(s.li,{children:"Standard shops and stashes (i.e. esx_shops, esx_weaponshop, and esx_policejob)."}),"\n",(0,r.jsx)(s.li,{children:"Resources that alter the default esx inventory or provide a ui (i.e. esx_trunkinventory, esx_inventoryhud)."}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Use a compatible version of ",(0,r.jsx)(s.a,{href:"https://github.com/esx-framework/esx-legacy",children:"ESX Legacy"})," (1.6.0+)."]}),"\n",(0,r.jsxs)(s.li,{children:["Modify your ",(0,r.jsx)(s.code,{children:"server.cfg"}),", starting ox_inventory immediately after es_extended."]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"yaml","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"yaml","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start oxmysql"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start ox_lib"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start es_extended"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start qtarget"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start ox_inventory"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"convert-esx-inventory-data",children:"Convert ESX inventory data"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Start the server and type ",(0,r.jsx)(s.code,{children:"convertinventory esx"})," into the server console."]}),"\n",(0,r.jsxs)(s.li,{children:["Optionally, type ",(0,r.jsx)(s.code,{children:"convertinventory esxproperty"})," into the server console."]}),"\n",(0,r.jsx)(s.li,{children:"Restart the server once conversion is complete."}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"optional-optimisation",children:"Optional Optimisation"}),"\n",(0,r.jsxs)(s.p,{children:["All item related functions from xPlayer, such as ",(0,r.jsx)(s.code,{children:"xPlayer.getInventoryItem"}),", have been modified for compatibility purposes; however they are considered deprecated."]}),"\n",(0,r.jsx)(s.p,{children:"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."}),"\n",(0,r.jsx)(s.p,{children:"You should read through the functions section for further information, but the following should give you a decent idea."}),"\n",(0,r.jsxs)(t.mQ,{items:["ESX","Ox Inventory"],children:[(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"acetone"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"antifreeze"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sudo"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,r.jsxs)(t.OK,{children:[(0,r.jsx)(s.p,{children:"Add the following code somewhere in your resource to cache the exports metatable."}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]})})}),(0,r.jsx)(s.p,{children:"You will be able to reference any functions exposed through the export."}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.acetone "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.antifreeze "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.sudo "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})]})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Frameworks/esx.mdx",route:"/overextended/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"},timestamp:1730928152e3,title:"ESX",headings:l},pageNextRoute:"/overextended/ox_inventory/Frameworks/esx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6189)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7090],{6189:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Frameworks/esx",function(){return n(8986)}])},8986:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var r=n(2676),o=n(2140),i=n(8745),t=n(7100);let l=[{depth:2,value:"Compatibility",id:"compatibility"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Convert ESX inventory data",id:"convert-esx-inventory-data"},{depth:2,value:"Optional Optimisation",id:"optional-optimisation"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",ul:"ul",li:"li",a:"a",code:"code",h2:"h2",p:"p",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"ESX"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["You will need a ",(0,r.jsx)(s.a,{href:"https://github.com/esx-framework/esx_core",children:"compatible version of ESX Legacy"})," (1.6.0 or higher)."]}),"\n",(0,r.jsxs)(s.li,{children:["You can convert player inventories with ",(0,r.jsx)(s.code,{children:"convertinventory esx"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["All items in the database will be migrated to the internal item data.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Always restart the resource when items are migrated!"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,r.jsx)(s.p,{children:"Ox Inventory is a complete replacement for existing item, inventory, and weapon systems; it is inherently incompatible with ESX and any resources that rely on default behaviour."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Loadouts do not exist and weapons are treated as items."}),"\n",(0,r.jsx)(s.li,{children:"Standard shops and stashes (i.e. esx_shops, esx_weaponshop, and esx_policejob)."}),"\n",(0,r.jsx)(s.li,{children:"Resources that alter the default esx inventory or provide a ui (i.e. esx_trunkinventory, esx_inventoryhud)."}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Use a compatible version of ",(0,r.jsx)(s.a,{href:"https://github.com/esx-framework/esx-legacy",children:"ESX Legacy"})," (1.6.0+)."]}),"\n",(0,r.jsxs)(s.li,{children:["Modify your ",(0,r.jsx)(s.code,{children:"server.cfg"}),", starting ox_inventory immediately after es_extended."]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"yaml","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"yaml","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start oxmysql"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start ox_lib"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start es_extended"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start qtarget"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"start ox_inventory"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"convert-esx-inventory-data",children:"Convert ESX inventory data"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Start the server and type ",(0,r.jsx)(s.code,{children:"convertinventory esx"})," into the server console."]}),"\n",(0,r.jsxs)(s.li,{children:["Optionally, type ",(0,r.jsx)(s.code,{children:"convertinventory esxproperty"})," into the server console."]}),"\n",(0,r.jsx)(s.li,{children:"Restart the server once conversion is complete."}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"optional-optimisation",children:"Optional Optimisation"}),"\n",(0,r.jsxs)(s.p,{children:["All item related functions from xPlayer, such as ",(0,r.jsx)(s.code,{children:"xPlayer.getInventoryItem"}),", have been modified for compatibility purposes; however they are considered deprecated."]}),"\n",(0,r.jsx)(s.p,{children:"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."}),"\n",(0,r.jsx)(s.p,{children:"You should read through the functions section for further information, but the following should give you a decent idea."}),"\n",(0,r.jsxs)(t.mQ,{items:["ESX","Ox Inventory"],children:[(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:").count "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"acetone"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"antifreeze"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" xPlayer."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeInventoryItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sudo"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,r.jsxs)(t.OK,{children:[(0,r.jsx)(s.p,{children:"Add the following code somewhere in your resource to cache the exports metatable."}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]})})}),(0,r.jsx)(s.p,{children:"You will be able to reference any functions exposed through the export."}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.acetone "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.antifreeze "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items.sudo "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'acetone'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'antifreeze'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'sudo'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})]})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Frameworks/esx.mdx",route:"/overextended/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"},timestamp:1730940204e3,title:"ESX",headings:l},pageNextRoute:"/overextended/ox_inventory/Frameworks/esx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6189)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-cfd45d6066f1a402.js b/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-e904a8e414d2cbe8.js similarity index 94% rename from _next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-cfd45d6066f1a402.js rename to _next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-e904a8e414d2cbe8.js index f82652f02a..17836cf2cc 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-cfd45d6066f1a402.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Frameworks/qbx-e904a8e414d2cbe8.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2311],{3343:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Frameworks/qbx",function(){return r(3583)}])},3583:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return s}});var t=r(2676),o=r(2140),i=r(8745);r(7100);let s=[{depth:2,value:"Installation",id:"installation"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",em:"em",ul:"ul",li:"li",a:"a",h2:"h2",code:"code"},(0,i.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Qbox Project"}),"\n",(0,t.jsx)(n.p,{children:"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory)."}),"\n",(0,t.jsxs)(n.p,{children:["We ",(0,t.jsx)(n.em,{children:"strongly"})," advise using Qbox as an alternative to QBCore."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/Qbox-project/",children:"Qbox Project GitHub"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://discord.gg/AtbwBuJHN5",children:"Qbox Project Discord"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Setup ",(0,t.jsx)(n.a,{href:"https://github.com/Qbox-project/qbx_core",children:"qbox"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Edit your ",(0,t.jsx)(n.code,{children:"server.cfg"}),".","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Add ",(0,t.jsx)(n.code,{children:'setr inventory:framework "qbx"'})," before starting your resources."]}),"\n",(0,t.jsx)(n.li,{children:"Start ox_inventory immediately after qbx_core."}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Frameworks/qbx.mdx",route:"/overextended/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"},timestamp:1730928152e3,title:"Qbox",headings:s},pageNextRoute:"/overextended/ox_inventory/Frameworks/qbx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3343)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2311],{3343:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Frameworks/qbx",function(){return r(3583)}])},3583:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return s}});var t=r(2676),o=r(2140),i=r(8745);r(7100);let s=[{depth:2,value:"Installation",id:"installation"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",em:"em",ul:"ul",li:"li",a:"a",h2:"h2",code:"code"},(0,i.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Qbox Project"}),"\n",(0,t.jsx)(n.p,{children:"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory)."}),"\n",(0,t.jsxs)(n.p,{children:["We ",(0,t.jsx)(n.em,{children:"strongly"})," advise using Qbox as an alternative to QBCore."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/Qbox-project/",children:"Qbox Project GitHub"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://discord.gg/AtbwBuJHN5",children:"Qbox Project Discord"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Setup ",(0,t.jsx)(n.a,{href:"https://github.com/Qbox-project/qbx_core",children:"qbox"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Edit your ",(0,t.jsx)(n.code,{children:"server.cfg"}),".","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Add ",(0,t.jsx)(n.code,{children:'setr inventory:framework "qbx"'})," before starting your resources."]}),"\n",(0,t.jsx)(n.li,{children:"Start ox_inventory immediately after qbx_core."}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Frameworks/qbx.mdx",route:"/overextended/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"},timestamp:1730940204e3,title:"Qbox",headings:s},pageNextRoute:"/overextended/ox_inventory/Frameworks/qbx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3343)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Client-0b0967838719d751.js b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Client-18df2b8507471a52.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Functions/Client-0b0967838719d751.js rename to _next/static/chunks/pages/overextended/ox_inventory/Functions/Client-18df2b8507471a52.js index a2f19e6cd4..f092eebe1b 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Client-0b0967838719d751.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Client-18df2b8507471a52.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6226],{7209:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Client",function(){return n(5086)}])},5086:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"openInventory",id:"openinventory"},{depth:2,value:"openNearbyInventory",id:"opennearbyinventory"},{depth:2,value:"closeInventory",id:"closeinventory"},{depth:2,value:"Items",id:"items"},{depth:2,value:"useItem",id:"useitem"},{depth:2,value:"useSlot",id:"useslot"},{depth:2,value:"setStashTarget",id:"setstashtarget"},{depth:2,value:"getCurrentWeapon",id:"getcurrentweapon"},{depth:2,value:"displayMetadata",id:"displaymetadata"},{depth:2,value:"giveItemToTarget",id:"giveitemtotarget"},{depth:2,value:"weaponWheel",id:"weaponwheel"},{depth:2,value:"Search",id:"search"},{depth:3,value:"Count",id:"count"},{depth:3,value:"Slots",id:"slots"},{depth:2,value:"GetItemCount",id:"getitemcount"},{depth:2,value:"GetPlayerItems",id:"getplayeritems"},{depth:2,value:"GetPlayerWeight",id:"getplayerweight"},{depth:2,value:"GetPlayerMaxWeight",id:"getplayermaxweight"},{depth:2,value:"GetSlotIdWithItem",id:"getslotidwithitem"},{depth:2,value:"GetSlotsIdWithItem",id:"getslotsidwithitem"},{depth:2,value:"GetSlotWithItem",id:"getslotwithitem"},{depth:2,value:"GetSlotsWithItem",id:"getslotswithitem"},{depth:2,value:"Statebags",id:"statebags"},{depth:3,value:"invBusy",id:"invbusy"},{depth:4,value:"Disable opening inventory",id:"disable-opening-inventory"},{depth:3,value:"invHotkeys",id:"invhotkeys"},{depth:3,value:"invOpen",id:"invopen"},{depth:3,value:"canUseWeapons",id:"canuseweapons"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",a:"a",br:"br",h3:"h3",h4:"h4"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Client"}),"\n",(0,l.jsx)(s.h2,{id:"openinventory",children:"openInventory"}),"\n",(0,l.jsx)(s.p,{children:"Opens an inventory using the passed data."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(invType, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invType: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'player'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'shop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'stash'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'crafting'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'container'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'drop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'glovebox'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'trunk'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'dumpster'"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Examples"})}),"\n",(0,l.jsxs)(t.mQ,{items:["Player","Shop","Stash"],children:[(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open the target player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsxs)(s.p,{children:['Open the fourth "General Store" ',(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/shops.lua#L14",children:"location"}),"."]}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shop'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]})})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsxs)(s.p,{children:["Open the first stash in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/stashes.lua#L2-L19",children:"data/stashes"}),"."]}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a custom stash (created on the server with RegisterStash)."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'society_police'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a stash with a specific owner."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_locker'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:xxxxxxxx' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})]})]}),"\n",(0,l.jsx)(s.h2,{id:"opennearbyinventory",children:"openNearbyInventory"}),"\n",(0,l.jsx)(s.p,{children:"If possible opens the nearby player's inventory."}),"\n",(0,l.jsx)(s.p,{children:"The player trying to open the inventory must be able to open their own and\nif the player does not have a police job, the target player must be fatally injured or\nplaying one of the death anims."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openNearbyInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"closeinventory",children:"closeInventory"}),"\n",(0,l.jsx)(s.p,{children:"Closes the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"closeInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(s.p,{children:["Returns a table of all registered items. The format is as defined in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"data/items.lua"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Optionally takes the name of an item, returning only data for that item (getting all data is not recommended)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than retrieving information from the server."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames[item] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data.label"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"useitem",children:"useItem"}),"\n",(0,l.jsxs)(s.p,{children:["Uses the passed item, then triggers the callback function.",(0,l.jsx)(s.br,{}),"\n","Should be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data, cb)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["cb?: ",(0,l.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Does the ped need to heal?"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Use the bandage"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- The item has been used, so trigger the effects"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetEntityHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"math.min"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(maxHealth, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Don't use the item"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"useslot",children:"useSlot"}),"\n",(0,l.jsx)(s.p,{children:"Uses the item in the given inventory slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(slot)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setstashtarget",children:"setStashTarget"}),"\n",(0,l.jsx)(s.p,{children:"Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setStashTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["id: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash id."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setStashTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'motel5'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bobsmith'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"getcurrentweapon",children:"getCurrentWeapon"}),"\n",(0,l.jsx)(s.p,{children:"Get data for the currently equipped weapon."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"You can also listen for changes to the current weapon using an event handler."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:currentWeapon'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"currentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" CurrentWeapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" currentWeapon"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["currentWeapon?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["ammo?: ",(0,l.jsx)(s.code,{children:"string"})," Name of the item used as ammo."]}),"\n",(0,l.jsxs)(s.li,{children:["hash: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["melee: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["ammo?: ",(0,l.jsx)(s.code,{children:"number"})," Amount of ammo loaded into the weapon."]}),"\n",(0,l.jsxs)(s.li,{children:["components?: ",(0,l.jsx)(s.code,{children:"table"})," Array of component item names, used to apply weapon components."]}),"\n",(0,l.jsxs)(s.li,{children:["durability?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["registered?: ",(0,l.jsx)(s.code,{children:"string"})," Name of the player that bought the weapon at a shop."]}),"\n",(0,l.jsxs)(s.li,{children:["serial?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})," Name of the item."]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"displaymetadata",children:"displayMetadata"}),"\n",(0,l.jsx)(s.p,{children:"Sets a metadata property to display in the tooltip."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(metadata, value)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"{ [string], [string] }"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is a string then it's the metadata property you want to display, value is ",(0,l.jsx)(s.strong,{children:"not"})," optional then."]}),"\n",(0,l.jsx)(s.li,{children:"Can be a table of key-value pairs, key being the metadata property and value being the label for that property."}),"\n",(0,l.jsxs)(s.li,{children:["Can be an array of string arrays, i.e. ",(0,l.jsx)(s.code,{children:"{ {'key', 'label' }, {'key2', 'label2' }"})," to set the display order."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value?: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Label for the string metadata property to be displayed."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mustard "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ketchup "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Ketchup'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"giveitemtotarget",children:"giveItemToTarget"}),"\n",(0,l.jsx)(s.p,{children:"Gives an item from the player's inventory to another player."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"giveItemToTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(serverId, slotId, count)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["serverId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The serverId of the target player."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The slotId of the item to give."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The amount of the item to give, with ",(0,l.jsx)(s.code,{children:"nil"}),", ",(0,l.jsx)(s.code,{children:"0"})," or a value above the slot count giving the entire stack away."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"weaponwheel",children:"weaponWheel"}),"\n",(0,l.jsx)(s.p,{children:"Enables the weapon wheel, but disables the use of inventory weapons."}),"\n",(0,l.jsx)(s.p,{children:'Mostly used for weaponised vehicles, though could be called for "minigames"'}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"weaponWheel"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["state: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"search",children:"Search"}),"\n",(0,l.jsx)(s.p,{children:"Searches the inventory for an item, or list of items, with the result varying based on the first argument."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(search, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["search: ",(0,l.jsx)(s.code,{children:"'slots'"})," or ",(0,l.jsx)(s.code,{children:"'count'"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"'slots'"})," returns a table of slots where the item was found at."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"'count'"})," returns the count of the specified item in player's inventory. If searching for multiple items\nreturns key-value pairs of itemName = count."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be a single item name or array of item names."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is provided as a string it will search the item's ",(0,l.jsx)(s.code,{children:"metadata.type"})," property."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"count",children:"Count"}),"\n",(0,l.jsxs)(t.mQ,{items:["Single item","Multiple items"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'skin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, {grade"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"1"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name, count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})})]}),"\n",(0,l.jsx)(s.h3,{id:"slots",children:"Slots"}),"\n",(0,l.jsxs)(t.mQ,{items:["Single item","Multiple items"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slots'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" _, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' contains '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.count"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slots'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'skin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(items) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" _, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.slot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' contains '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.count"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})})]}),"\n",(0,l.jsx)(s.h2,{id:"getitemcount",children:"GetItemCount"}),"\n",(0,l.jsx)(s.p,{children:"Get the total item count for all items in the player's inventory with the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayeritems",children:"GetPlayerItems"}),"\n",(0,l.jsx)(s.p,{children:"Get all items in the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayerweight",children:"GetPlayerWeight"}),"\n",(0,l.jsx)(s.p,{children:"Get the total weight of all items in the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["totalWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayermaxweight",children:"GetPlayerMaxWeight"}),"\n",(0,l.jsx)(s.p,{children:"Get the maximum carry weight of the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidwithitem",children:"GetSlotIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get a slot id in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotsidwithitem",children:"GetSlotsIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get all slot ids in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotIds: ",(0,l.jsx)(s.code,{children:"number[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotwithitem",children:"GetSlotWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data for a slot in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotswithitem",children:"GetSlotsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data all slots in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotsData: ",(0,l.jsx)(s.code,{children:"table[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"statebags",children:"Statebags"}),"\n",(0,l.jsx)(s.h3,{id:"invbusy",children:"invBusy"}),"\n",(0,l.jsxs)(s.p,{children:["Returns whether the player's inventory is currently running an action (i.e. using an item).",(0,l.jsx)(s.br,{}),"\n","Can be set to true to disable opening the inventory."]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invBusy: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" LocalPlayer.state.invBusy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when busy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when not busy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h4,{id:"disable-opening-inventory",children:"Disable opening inventory"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"invhotkeys",children:"invHotkeys"}),"\n",(0,l.jsx)(s.p,{children:"Allows you to enable/disable a player's access to inventory hotkeys."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invHotkeys: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.invHotkeys "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"invopen",children:"invOpen"}),"\n",(0,l.jsx)(s.p,{children:"Returns whether the player's inventory is currently open or not."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invOpen: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invOpen "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" LocalPlayer.state.invOpen"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invOpen "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when open"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when closed"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"canuseweapons",children:"canUseWeapons"}),"\n",(0,l.jsx)(s.p,{children:"Allows you to enable/disable the use of weapons for a player."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.canUseWeapons "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]})})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Client.mdx",route:"/overextended/ox_inventory/Functions/Client",timestamp:1730928152e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_inventory/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7209)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6226],{7209:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Client",function(){return n(5086)}])},5086:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"openInventory",id:"openinventory"},{depth:2,value:"openNearbyInventory",id:"opennearbyinventory"},{depth:2,value:"closeInventory",id:"closeinventory"},{depth:2,value:"Items",id:"items"},{depth:2,value:"useItem",id:"useitem"},{depth:2,value:"useSlot",id:"useslot"},{depth:2,value:"setStashTarget",id:"setstashtarget"},{depth:2,value:"getCurrentWeapon",id:"getcurrentweapon"},{depth:2,value:"displayMetadata",id:"displaymetadata"},{depth:2,value:"giveItemToTarget",id:"giveitemtotarget"},{depth:2,value:"weaponWheel",id:"weaponwheel"},{depth:2,value:"Search",id:"search"},{depth:3,value:"Count",id:"count"},{depth:3,value:"Slots",id:"slots"},{depth:2,value:"GetItemCount",id:"getitemcount"},{depth:2,value:"GetPlayerItems",id:"getplayeritems"},{depth:2,value:"GetPlayerWeight",id:"getplayerweight"},{depth:2,value:"GetPlayerMaxWeight",id:"getplayermaxweight"},{depth:2,value:"GetSlotIdWithItem",id:"getslotidwithitem"},{depth:2,value:"GetSlotsIdWithItem",id:"getslotsidwithitem"},{depth:2,value:"GetSlotWithItem",id:"getslotwithitem"},{depth:2,value:"GetSlotsWithItem",id:"getslotswithitem"},{depth:2,value:"Statebags",id:"statebags"},{depth:3,value:"invBusy",id:"invbusy"},{depth:4,value:"Disable opening inventory",id:"disable-opening-inventory"},{depth:3,value:"invHotkeys",id:"invhotkeys"},{depth:3,value:"invOpen",id:"invopen"},{depth:3,value:"canUseWeapons",id:"canuseweapons"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",a:"a",br:"br",h3:"h3",h4:"h4"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Client"}),"\n",(0,l.jsx)(s.h2,{id:"openinventory",children:"openInventory"}),"\n",(0,l.jsx)(s.p,{children:"Opens an inventory using the passed data."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(invType, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invType: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'player'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'shop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'stash'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'crafting'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'container'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'drop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'glovebox'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'trunk'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'dumpster'"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Examples"})}),"\n",(0,l.jsxs)(t.mQ,{items:["Player","Shop","Stash"],children:[(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open the target player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsxs)(s.p,{children:['Open the fourth "General Store" ',(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/shops.lua#L14",children:"location"}),"."]}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shop'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]})})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsxs)(s.p,{children:["Open the first stash in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/stashes.lua#L2-L19",children:"data/stashes"}),"."]}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a custom stash (created on the server with RegisterStash)."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'society_police'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a stash with a specific owner."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_locker'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:xxxxxxxx' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})]})]}),"\n",(0,l.jsx)(s.h2,{id:"opennearbyinventory",children:"openNearbyInventory"}),"\n",(0,l.jsx)(s.p,{children:"If possible opens the nearby player's inventory."}),"\n",(0,l.jsx)(s.p,{children:"The player trying to open the inventory must be able to open their own and\nif the player does not have a police job, the target player must be fatally injured or\nplaying one of the death anims."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openNearbyInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"closeinventory",children:"closeInventory"}),"\n",(0,l.jsx)(s.p,{children:"Closes the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"closeInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(s.p,{children:["Returns a table of all registered items. The format is as defined in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"data/items.lua"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Optionally takes the name of an item, returning only data for that item (getting all data is not recommended)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than retrieving information from the server."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames[item] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data.label"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"useitem",children:"useItem"}),"\n",(0,l.jsxs)(s.p,{children:["Uses the passed item, then triggers the callback function.",(0,l.jsx)(s.br,{}),"\n","Should be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.)."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data, cb)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["cb?: ",(0,l.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Does the ped need to heal?"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Use the bandage"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- The item has been used, so trigger the effects"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetEntityHealth"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"math.min"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(maxHealth, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(health "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Don't use the item"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"useslot",children:"useSlot"}),"\n",(0,l.jsx)(s.p,{children:"Uses the item in the given inventory slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"useSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(slot)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setstashtarget",children:"setStashTarget"}),"\n",(0,l.jsx)(s.p,{children:"Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setStashTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["id: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash id."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setStashTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'motel5'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bobsmith'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"getcurrentweapon",children:"getCurrentWeapon"}),"\n",(0,l.jsx)(s.p,{children:"Get data for the currently equipped weapon."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"You can also listen for changes to the current weapon using an event handler."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:currentWeapon'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"currentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" CurrentWeapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" currentWeapon"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["currentWeapon?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["ammo?: ",(0,l.jsx)(s.code,{children:"string"})," Name of the item used as ammo."]}),"\n",(0,l.jsxs)(s.li,{children:["hash: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["melee: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["ammo?: ",(0,l.jsx)(s.code,{children:"number"})," Amount of ammo loaded into the weapon."]}),"\n",(0,l.jsxs)(s.li,{children:["components?: ",(0,l.jsx)(s.code,{children:"table"})," Array of component item names, used to apply weapon components."]}),"\n",(0,l.jsxs)(s.li,{children:["durability?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["registered?: ",(0,l.jsx)(s.code,{children:"string"})," Name of the player that bought the weapon at a shop."]}),"\n",(0,l.jsxs)(s.li,{children:["serial?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})," Name of the item."]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"displaymetadata",children:"displayMetadata"}),"\n",(0,l.jsx)(s.p,{children:"Sets a metadata property to display in the tooltip."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(metadata, value)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"{ [string], [string] }"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is a string then it's the metadata property you want to display, value is ",(0,l.jsx)(s.strong,{children:"not"})," optional then."]}),"\n",(0,l.jsx)(s.li,{children:"Can be a table of key-value pairs, key being the metadata property and value being the label for that property."}),"\n",(0,l.jsxs)(s.li,{children:["Can be an array of string arrays, i.e. ",(0,l.jsx)(s.code,{children:"{ {'key', 'label' }, {'key2', 'label2' }"})," to set the display order."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value?: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Label for the string metadata property to be displayed."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mustard "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mustard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ketchup "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Ketchup'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"giveitemtotarget",children:"giveItemToTarget"}),"\n",(0,l.jsx)(s.p,{children:"Gives an item from the player's inventory to another player."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"giveItemToTarget"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(serverId, slotId, count)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["serverId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The serverId of the target player."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The slotId of the item to give."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The amount of the item to give, with ",(0,l.jsx)(s.code,{children:"nil"}),", ",(0,l.jsx)(s.code,{children:"0"})," or a value above the slot count giving the entire stack away."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"weaponwheel",children:"weaponWheel"}),"\n",(0,l.jsx)(s.p,{children:"Enables the weapon wheel, but disables the use of inventory weapons."}),"\n",(0,l.jsx)(s.p,{children:'Mostly used for weaponised vehicles, though could be called for "minigames"'}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"weaponWheel"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["state: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"search",children:"Search"}),"\n",(0,l.jsx)(s.p,{children:"Searches the inventory for an item, or list of items, with the result varying based on the first argument."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(search, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["search: ",(0,l.jsx)(s.code,{children:"'slots'"})," or ",(0,l.jsx)(s.code,{children:"'count'"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"'slots'"})," returns a table of slots where the item was found at."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"'count'"})," returns the count of the specified item in player's inventory. If searching for multiple items\nreturns key-value pairs of itemName = count."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be a single item name or array of item names."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is provided as a string it will search the item's ",(0,l.jsx)(s.code,{children:"metadata.type"})," property."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"count",children:"Count"}),"\n",(0,l.jsxs)(t.mQ,{items:["Single item","Multiple items"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'skin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, {grade"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"1"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name, count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})})]}),"\n",(0,l.jsx)(s.h3,{id:"slots",children:"Slots"}),"\n",(0,l.jsxs)(t.mQ,{items:["Single item","Multiple items"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slots'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" _, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' contains '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.count"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slots'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'skin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(items) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" _, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.slot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' contains '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v.count"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You have '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"count"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})})]}),"\n",(0,l.jsx)(s.h2,{id:"getitemcount",children:"GetItemCount"}),"\n",(0,l.jsx)(s.p,{children:"Get the total item count for all items in the player's inventory with the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayeritems",children:"GetPlayerItems"}),"\n",(0,l.jsx)(s.p,{children:"Get all items in the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayerweight",children:"GetPlayerWeight"}),"\n",(0,l.jsx)(s.p,{children:"Get the total weight of all items in the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["totalWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getplayermaxweight",children:"GetPlayerMaxWeight"}),"\n",(0,l.jsx)(s.p,{children:"Get the maximum carry weight of the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidwithitem",children:"GetSlotIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get a slot id in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotsidwithitem",children:"GetSlotsIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get all slot ids in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotIds: ",(0,l.jsx)(s.code,{children:"number[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotwithitem",children:"GetSlotWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data for a slot in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotswithitem",children:"GetSlotsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data all slots in the player's inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotsData: ",(0,l.jsx)(s.code,{children:"table[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"statebags",children:"Statebags"}),"\n",(0,l.jsx)(s.h3,{id:"invbusy",children:"invBusy"}),"\n",(0,l.jsxs)(s.p,{children:["Returns whether the player's inventory is currently running an action (i.e. using an item).",(0,l.jsx)(s.br,{}),"\n","Can be set to true to disable opening the inventory."]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invBusy: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" LocalPlayer.state.invBusy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when busy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when not busy"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h4,{id:"disable-opening-inventory",children:"Disable opening inventory"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.invBusy "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"invhotkeys",children:"invHotkeys"}),"\n",(0,l.jsx)(s.p,{children:"Allows you to enable/disable a player's access to inventory hotkeys."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invHotkeys: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.invHotkeys "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]})})}),"\n",(0,l.jsx)(s.h3,{id:"invopen",children:"invOpen"}),"\n",(0,l.jsx)(s.p,{children:"Returns whether the player's inventory is currently open or not."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["invOpen: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invOpen "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" LocalPlayer.state.invOpen"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" invOpen "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when open"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff when closed"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h3,{id:"canuseweapons",children:"canUseWeapons"}),"\n",(0,l.jsx)(s.p,{children:"Allows you to enable/disable the use of weapons for a player."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"LocalPlayer.state.canUseWeapons "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]})})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Client.mdx",route:"/overextended/ox_inventory/Functions/Client",timestamp:1730940204e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_inventory/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7209)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server-30281090b09f7ac0.js b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server-00b3a343644f75bd.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Functions/Server-30281090b09f7ac0.js rename to _next/static/chunks/pages/overextended/ox_inventory/Functions/Server-00b3a343644f75bd.js index 1e96a3974c..35a95ffe0f 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server-30281090b09f7ac0.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server-00b3a343644f75bd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6706],{9852:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Server",function(){return n(4641)}])},4641:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"setPlayerInventory",id:"setplayerinventory"},{depth:2,value:"forceOpenInventory",id:"forceopeninventory"},{depth:2,value:"UpdateVehicle",id:"updatevehicle"},{depth:2,value:"Items",id:"items"},{depth:2,value:"AddItem",id:"additem"},{depth:2,value:"RemoveItem",id:"removeitem"},{depth:2,value:"GetItem",id:"getitem"},{depth:2,value:"ConvertItems",id:"convertitems"},{depth:2,value:"CanCarryItem",id:"cancarryitem"},{depth:2,value:"CanCarryAmount",id:"cancarryamount"},{depth:2,value:"CanCarryWeight",id:"cancarryweight"},{depth:2,value:"SetMaxWeight",id:"setmaxweight"},{depth:2,value:"CanSwapItem",id:"canswapitem"},{depth:2,value:"GetItemCount",id:"getitemcount"},{depth:2,value:"GetItemSlots",id:"getitemslots"},{depth:2,value:"GetSlot",id:"getslot"},{depth:2,value:"GetSlotForItem",id:"getslotforitem"},{depth:2,value:"GetSlotIdWithItem",id:"getslotidwithitem"},{depth:2,value:"GetSlotIdsWithItem",id:"getslotidswithitem"},{depth:2,value:"GetSlotWithItem",id:"getslotwithitem"},{depth:2,value:"GetSlotsWithItem",id:"getslotswithitem"},{depth:2,value:"GetEmptySlot",id:"getemptyslot"},{depth:2,value:"GetContainerFromSlot",id:"getcontainerfromslot"},{depth:2,value:"SetSlotCount",id:"setslotcount"},{depth:2,value:"GetInventory",id:"getinventory"},{depth:2,value:"GetInventoryItems",id:"getinventoryitems"},{depth:2,value:"InspectInventory",id:"inspectinventory"},{depth:2,value:"ConfiscateInventory",id:"confiscateinventory"},{depth:2,value:"ReturnInventory",id:"returninventory"},{depth:2,value:"ClearInventory",id:"clearinventory"},{depth:2,value:"Search",id:"search"},{depth:2,value:"RegisterStash",id:"registerstash"},{depth:2,value:"CreateTemporaryStash",id:"createtemporarystash"},{depth:2,value:"CustomDrop",id:"customdrop"},{depth:2,value:"CreateDropFromPlayer",id:"createdropfromplayer"},{depth:2,value:"GetCurrentWeapon",id:"getcurrentweapon"},{depth:2,value:"SetDurability",id:"setdurability"},{depth:2,value:"SetMetadata",id:"setmetadata"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",strong:"strong",em:"em"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Server"}),"\n",(0,l.jsx)(s.h2,{id:"setplayerinventory",children:"setPlayerInventory"}),"\n",(0,l.jsx)(s.p,{children:"Creates and sets the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPlayerInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(player, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["player: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["identifier: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["groups?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["sex?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["dateofbirth?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"If not provided will load player's inventory data from the db."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"forceopeninventory",children:"forceOpenInventory"}),"\n",(0,l.jsx)(s.p,{children:"Opens an inventory using the passed data.\nForces a player to open an inventory, without usual security checks (groups, coords)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, invType, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["invType: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'player'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'stash'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'container'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'drop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'glovebox'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'trunk'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'dumpster'"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsxs)(t.mQ,{items:["Player","Stash"],children:[(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open the target player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Admin command to open a player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'openplayerinv'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"tonumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(args["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open a custom stash (created on the server with RegisterStash)."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'society_police'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a stash with a specific owner."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_locker'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:xxxxxxxx' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})]})]}),"\n",(0,l.jsx)(s.h2,{id:"updatevehicle",children:"UpdateVehicle"}),"\n",(0,l.jsx)(s.p,{children:"Update the internal reference to vehicle stashes, without triggering a save or updating the database."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"UpdateVehicle"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(oldPlate, newPlate)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["oldPlate: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["newPlate: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(s.p,{children:["Returns a table of all registered items. The format is as defined in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"data/items.lua"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Optionally takes the name of an item, returning only data for that item (getting all data is not recommended)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ESX."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterServerCallback"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'crafting:itemNames'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"cb"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames[item] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data.label"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cb"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemNames)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"additem",children:"AddItem"}),"\n",(0,l.jsx)(s.p,{children:"Adds an item into the specified inventory."}),"\n",(0,l.jsxs)(s.p,{children:["Should be used alongside ",(0,l.jsx)(s.a,{href:"#cancarryitem",children:"CanCarryItem"})," otherwise, the maximum weight may be exceeded."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata, slot, cb)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The inventory's unique id, or a table with the id and owner.","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"1"})]}),"\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"gloveVGH283"})]}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{ id = 'personallocker', owner = 'license:xxxxxx'}"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The name of the item to add to the target."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The number of items to add."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'A table of unique data to attach to the item object. A string will create a table with the "type" field.'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slot?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"A specific slot to add the item to. If the slot is invalid, the first available slot will be used instead."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["cb?: function(success: ",(0,l.jsx)(s.code,{children:"boolean"}),", response?: ",(0,l.jsx)(s.code,{children:"string"}),")"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If used for glovebox, trunk or stash you must first check the inventory is loaded with ",(0,l.jsx)(s.a,{href:"./GetInventory",children:"GetInventory"})]}),"\n",(0,l.jsxs)(s.p,{children:["Returns ",(0,l.jsx)(s.code,{children:"success, response"})," if cb is undefined, otherwise they are used in the callback only."]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:'Possible value of the "response" argument, on failure:'})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'"invalid_item": the item doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"invalid_inventory": the inventory doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"inventory_full": no free slots'}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success, response "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'gloveVGH283'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bread'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'-- if no slots are available, the value will be "inventory_full"'})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "metadata": [],'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Bread",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slot": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "bread",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 150'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"removeitem",children:"RemoveItem"}),"\n",(0,l.jsx)(s.p,{children:"Removes the specified item from the specified inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata, slot, ignoreTotal)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The inventory's unique id, or a table with the id and owner.","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"1"})]}),"\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"gloveVGH283"})]}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{ id = 'personallocker', owner = 'license:xxxxxx'}"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The name of the item to remove from the target."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The number of items to remove."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Only remove items with matching metadata properties."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slot?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"A specific slot to remove the item from. If the slot is invalid, the first available slot will be used instead."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["ignoreTotal?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Removes as many items as possible up to count."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Returns success: ",(0,l.jsx)(s.code,{children:"boolean"}),", response: ",(0,l.jsx)(s.code,{children:"string?"}),"."]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:'Possible values of "response" on failure:'})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'"invalid_item": the item doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"invalid_inventory": the inventory doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"not_enough_items": inventory did not contain enough of the given item'}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Removes 2 water from the glovebox for the given plate."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'gloveVGH283'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"getitem",children:"GetItem"}),"\n",(0,l.jsxs)(s.p,{children:["Returns ",(0,l.jsx)(s.em,{children:"generic"})," item data from the specified inventory, with the total count."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, metadata, returnsCount)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be items array."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"any"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Only returns the count of items that strictly match the given metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["returnsCount?: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If ",(0,l.jsx)(s.code,{children:"returnsCount"})," is set to true, the returned value will be the ",(0,l.jsx)(s.code,{children:"count"})," based on\nhow many times the item was found.\nOtherwise returns the data related to the item ",(0,l.jsx)(s.em,{children:"and"})," its total count found in the inventory."]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(item, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "consume": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count": 15,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 500,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"convertitems",children:"ConvertItems"}),"\n",(0,l.jsx)(s.p,{children:"Takes traditional item data and updates it to support ox_inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ConvertItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, items)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Data Conversion Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"Old: [{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bread"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"New: [{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"slot"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"name"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"count"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"slot"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"name"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bread"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"count"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryitem",children:"CanCarryItem"}),"\n",(0,l.jsx)(s.p,{children:"Returns true or false depending if the inventory can carry the specified item."}),"\n",(0,l.jsx)(s.p,{children:"The function checks for inventory weight and available slots."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be array of items."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is passed as string then ",(0,l.jsx)(s.code,{children:"metadata.type"})," will be checked."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks if the player calling the event can carry 3 water items"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff if can carry"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff if can't carry"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryamount",children:"CanCarryAmount"}),"\n",(0,l.jsx)(s.p,{children:"Returns the amount a player can hold based on available weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryAmount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be array to check multiple items."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks how much you can carry"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"amountToAdd "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryAmount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stone'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Adds the amount"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stone'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amountToAdd)"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryweight",children:"CanCarryWeight"}),"\n",(0,l.jsx)(s.p,{children:"Returns if inventory can carry specified weight and free inventory weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, weight)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks if player can carry 1000 grams."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fillAmount "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" canCarryWeight, freeWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, fillAmount)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" freeWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player can't carry weight."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"elseif"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" canCarryWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Modify fillAmount, because inventory can't carry specified weight"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fillAmount "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" freeWeight"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do something"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"setmaxweight",children:"SetMaxWeight"}),"\n",(0,l.jsx)(s.p,{children:"Sets the maximum weight available for an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, maxWeight)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the max weight for player 1's inventory to 20kg."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"20000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"canswapitem",children:"CanSwapItem"}),"\n",(0,l.jsx)(s.p,{children:"Returns true if the item swap is possible based on inventory weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanSwapItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, firstItem, firstItemCount, testItem, testItemCount)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["firstItem: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["firstItemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["testItem: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["testItemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getitemcount",children:"GetItemCount"}),"\n",(0,l.jsx)(s.p,{children:"Get the total item count for all items in an inventory with the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getitemslots",children:"GetItemSlots"}),"\n",(0,l.jsx)(s.p,{children:"Returns the number of slots the specified item is in, the item's total count and the remaining empty slots."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemSlots"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslot",children:"GetSlot"}),"\n",(0,l.jsx)(s.p,{children:"Returns the specified slot data as a table."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot)"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(slot, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 2000,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "metadata": [],'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slot": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count: 4'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"getslotforitem",children:"GetSlotForItem"}),"\n",(0,l.jsx)(s.p,{children:"Get the slot id of an existing item matching the given data, or an empty slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotForItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidwithitem",children:"GetSlotIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get a slot id in an inventory matching the given item name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidswithitem",children:"GetSlotIdsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get all slot ids in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotIds: ",(0,l.jsx)(s.code,{children:"number[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotwithitem",children:"GetSlotWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data for a slot in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotswithitem",children:"GetSlotsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data all slots in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotsData: ",(0,l.jsx)(s.code,{children:"table[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getemptyslot",children:"GetEmptySlot"}),"\n",(0,l.jsx)(s.p,{children:"Get the first available empty slot in an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEmptySlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getcontainerfromslot",children:"GetContainerFromSlot"}),"\n",(0,l.jsx)(s.p,{children:"Returns the inventory associated with the container linked in the slot of the given inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetContainerFromSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slotId)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["containerData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setslotcount",children:"SetSlotCount"}),"\n",(0,l.jsx)(s.p,{children:"Sets the number of slots available for an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetSlotCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slots)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the slot count for player 1's inventory to 10."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetSlotCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"getinventory",children:"GetInventory"}),"\n",(0,l.jsx)(s.p,{children:"Returns the inventory associated with the ID (and owner if defined). Otherwise returns null."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'example_stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory, {indent "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "id": "example_stash,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Police Stash",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "type": "stash,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slots": 50,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 0,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "maxWeight": 100000,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "owner": false,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"getinventoryitems",children:"GetInventoryItems"}),"\n",(0,l.jsx)(s.p,{children:"Returns all slots with items in a inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventoryItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerItems "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventoryItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"inspectinventory",children:"InspectInventory"}),"\n",(0,l.jsx)(s.p,{children:"Inspect the player their inventory. You will not be able to modify the inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"InspectInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(target, source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["target: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"confiscateinventory",children:"ConfiscateInventory"}),"\n",(0,l.jsx)(s.p,{children:"Clears a player's inventory and saves it to a stash."}),"\n",(0,l.jsxs)(s.p,{children:["Use ",(0,l.jsx)(s.a,{href:"#returninventory",children:"ReturnInventory"})," to return the confiscated inventory back to\nthe player."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ConfiscateInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"returninventory",children:"ReturnInventory"}),"\n",(0,l.jsx)(s.p,{children:"Returns the confiscated inventory back to the player."}),"\n",(0,l.jsxs)(s.p,{children:["Use it alongside ",(0,l.jsx)(s.a,{href:"#confiscateinventory",children:"ConfiscateInventory"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ReturnInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"clearinventory",children:"ClearInventory"}),"\n",(0,l.jsxs)(s.p,{children:["Clears the specified inventory. The ",(0,l.jsx)(s.code,{children:"keep"})," argument is either a string or an array of strings containing the name(s) of the item(s) to keep in the inventory after clearing."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ClearInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, keep)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["keep?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"string[]"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"search",children:"Search"}),"\n",(0,l.jsx)(s.p,{children:"Searches an inventory for a specified item."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, search, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["search: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"search"})," can be either ",(0,l.jsx)(s.code,{children:"'slots'"})," or ",(0,l.jsx)(s.code,{children:"'count'"}),", where slots will return a table of data\nand count will return the found amount of the specified item."]}),"\n",(0,l.jsx)(s.h2,{id:"registerstash",children:"RegisterStash"}),"\n",(0,l.jsx)(s.p,{children:"Creates a new custom stash."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id, label, slots, maxWeight, owner, groups, coords)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["id: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash identifier when loading from the database."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Display name when inventory is open."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})," or ",(0,l.jsx)(s.code,{children:"nil"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"string"}),": Can only access the stash linked to the owner."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"true"}),": Each player has a unique stash but can request other player's stashes."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"nil"}),": Always shared."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["groups: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Table of player groups (jobs) able to access the stash."}),"\n",(0,l.jsx)(s.li,{children:"Table of group names where the numeric value is the minimum grade required."}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{['police'] = 0, ['ambulance'] = 2}"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords?: ",(0,l.jsx)(s.code,{children:"vector3"})," or ",(0,l.jsx)(s.code,{children:"vector3[]"})]}),"\n"]}),"\n",(0,l.jsx)(t.UW,{children:(0,l.jsx)(s.p,{children:"This function needs to be triggered before a player can open the stash."})}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),(0,l.jsx)("br",{}),"\nFor a use case example on this function check out the written ",(0,l.jsx)(s.a,{href:"../Guides/stashes",children:"Guide"})," for it."]}),"\n",(0,l.jsx)(s.h2,{id:"createtemporarystash",children:"CreateTemporaryStash"}),"\n",(0,l.jsx)(s.p,{children:"Creates a temporary stash which will be removed after some time."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateTemporaryStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(properties)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["properties: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"string"}),": Can only access the stash linked to the owner."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"true"}),": Each player has a unique stash but can request other player's stashes."]}),"\n",(0,l.jsxs)(s.li,{children:["The inventory is always shared if ",(0,l.jsx)(s.code,{children:"false"})," or ",(0,l.jsx)(s.code,{children:"nil"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["groups?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Table of group names (e.g. jobs) where the numeric value is the minimum grade required."}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{['police'] = 0, ['ambulance'] = 2}"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords?: ",(0,l.jsx)(s.code,{children:"vector3"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash can only be accessed while nearby."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["items?: ",(0,l.jsx)(s.code,{children:"{ [number]: string, [number]: number, [number]?: table }[]"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"An array of tables, containing a sequence of itemName, count, metadata."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mystash "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateTemporaryStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mystash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WEAPON_MINISMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ammo-9'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mineral water' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} }"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:openInventory'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", mystash)"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"customdrop",children:"CustomDrop"}),"\n",(0,l.jsx)(s.p,{children:"Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648')."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(prefix, items, coords, slots, maxWeight, instance, model)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["prefix: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords: ",(0,l.jsx)(s.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["instance?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["model?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create a generic drop with a marker"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Carcass'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { grade "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hide'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { grade "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}}"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, coords)"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create a drop with an entity"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WEAPON_MINISMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ammo-9'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerPed"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")), "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`w_sb_minismg`"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"createdropfromplayer",children:"CreateDropFromPlayer"}),"\n",(0,l.jsx)(s.p,{children:"Creates a new drop with the contents of a player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateDropFromPlayer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["dropId: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dropId "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateDropFromPlayer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"getcurrentweapon",children:"GetCurrentWeapon"}),"\n",(0,l.jsx)(s.p,{children:"Returns the player's currently equipped weapon as a table."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- inv: string or number"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv)"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setdurability",children:"SetDurability"}),"\n",(0,l.jsx)(s.p,{children:"Sets durability onto the specified slot."}),"\n",(0,l.jsx)(s.p,{children:"Can be used for repairing weapons."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot, durability)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["durability: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the durability of the item in slot 3 of source player's inventory to 100"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the durability of the source player's current weapon to 100"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, weapon.slot, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"setmetadata",children:"SetMetadata"}),"\n",(0,l.jsx)(s.p,{children:"Sets metadata on the specified slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" k, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\\n______________'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\\n- index '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"k)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.name, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slot: '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.slot, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'metadata: '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"break"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"water.metadata.type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'clean'"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, water.slot, water.metadata)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modified %sx water in slot %s with new metadata'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water.count, water.slot))"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Server.mdx",route:"/overextended/ox_inventory/Functions/Server",timestamp:1730928152e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_inventory/Functions/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9852)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6706],{9852:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Server",function(){return n(4641)}])},4641:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"setPlayerInventory",id:"setplayerinventory"},{depth:2,value:"forceOpenInventory",id:"forceopeninventory"},{depth:2,value:"UpdateVehicle",id:"updatevehicle"},{depth:2,value:"Items",id:"items"},{depth:2,value:"AddItem",id:"additem"},{depth:2,value:"RemoveItem",id:"removeitem"},{depth:2,value:"GetItem",id:"getitem"},{depth:2,value:"ConvertItems",id:"convertitems"},{depth:2,value:"CanCarryItem",id:"cancarryitem"},{depth:2,value:"CanCarryAmount",id:"cancarryamount"},{depth:2,value:"CanCarryWeight",id:"cancarryweight"},{depth:2,value:"SetMaxWeight",id:"setmaxweight"},{depth:2,value:"CanSwapItem",id:"canswapitem"},{depth:2,value:"GetItemCount",id:"getitemcount"},{depth:2,value:"GetItemSlots",id:"getitemslots"},{depth:2,value:"GetSlot",id:"getslot"},{depth:2,value:"GetSlotForItem",id:"getslotforitem"},{depth:2,value:"GetSlotIdWithItem",id:"getslotidwithitem"},{depth:2,value:"GetSlotIdsWithItem",id:"getslotidswithitem"},{depth:2,value:"GetSlotWithItem",id:"getslotwithitem"},{depth:2,value:"GetSlotsWithItem",id:"getslotswithitem"},{depth:2,value:"GetEmptySlot",id:"getemptyslot"},{depth:2,value:"GetContainerFromSlot",id:"getcontainerfromslot"},{depth:2,value:"SetSlotCount",id:"setslotcount"},{depth:2,value:"GetInventory",id:"getinventory"},{depth:2,value:"GetInventoryItems",id:"getinventoryitems"},{depth:2,value:"InspectInventory",id:"inspectinventory"},{depth:2,value:"ConfiscateInventory",id:"confiscateinventory"},{depth:2,value:"ReturnInventory",id:"returninventory"},{depth:2,value:"ClearInventory",id:"clearinventory"},{depth:2,value:"Search",id:"search"},{depth:2,value:"RegisterStash",id:"registerstash"},{depth:2,value:"CreateTemporaryStash",id:"createtemporarystash"},{depth:2,value:"CustomDrop",id:"customdrop"},{depth:2,value:"CreateDropFromPlayer",id:"createdropfromplayer"},{depth:2,value:"GetCurrentWeapon",id:"getcurrentweapon"},{depth:2,value:"SetDurability",id:"setdurability"},{depth:2,value:"SetMetadata",id:"setmetadata"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",strong:"strong",em:"em"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Server"}),"\n",(0,l.jsx)(s.h2,{id:"setplayerinventory",children:"setPlayerInventory"}),"\n",(0,l.jsx)(s.p,{children:"Creates and sets the player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setPlayerInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(player, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["player: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["identifier: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["groups?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["sex?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["dateofbirth?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"If not provided will load player's inventory data from the db."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"forceopeninventory",children:"forceOpenInventory"}),"\n",(0,l.jsx)(s.p,{children:"Opens an inventory using the passed data.\nForces a player to open an inventory, without usual security checks (groups, coords)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, invType, data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["invType: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'player'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'stash'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'container'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'drop'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'glovebox'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'trunk'"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"'dumpster'"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsxs)(t.mQ,{items:["Player","Stash"],children:[(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open the target player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Admin command to open a player's inventory."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'openplayerinv'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"tonumber"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(args["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]}),(0,l.jsxs)(t.OK,{children:[(0,l.jsx)(s.p,{children:"Open a custom stash (created on the server with RegisterStash)."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'society_police'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsx)(s.p,{children:"Open a stash with a specific owner."}),(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceOpenInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { id "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_locker'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:xxxxxxxx' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})]})]}),"\n",(0,l.jsx)(s.h2,{id:"updatevehicle",children:"UpdateVehicle"}),"\n",(0,l.jsx)(s.p,{children:"Update the internal reference to vehicle stashes, without triggering a save or updating the database."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"UpdateVehicle"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(oldPlate, newPlate)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["oldPlate: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["newPlate: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(s.p,{children:["Returns a table of all registered items. The format is as defined in ",(0,l.jsx)(s.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"data/items.lua"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Optionally takes the name of an item, returning only data for that item (getting all data is not recommended)."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemName)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemName?: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ESX."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterServerCallback"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'crafting:itemNames'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"cb"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item, data "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemNames[item] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data.label"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cb"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemNames)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"additem",children:"AddItem"}),"\n",(0,l.jsx)(s.p,{children:"Adds an item into the specified inventory."}),"\n",(0,l.jsxs)(s.p,{children:["Should be used alongside ",(0,l.jsx)(s.a,{href:"#cancarryitem",children:"CanCarryItem"})," otherwise, the maximum weight may be exceeded."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata, slot, cb)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The inventory's unique id, or a table with the id and owner.","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"1"})]}),"\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"gloveVGH283"})]}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{ id = 'personallocker', owner = 'license:xxxxxx'}"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The name of the item to add to the target."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The number of items to add."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'A table of unique data to attach to the item object. A string will create a table with the "type" field.'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slot?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"A specific slot to add the item to. If the slot is invalid, the first available slot will be used instead."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["cb?: function(success: ",(0,l.jsx)(s.code,{children:"boolean"}),", response?: ",(0,l.jsx)(s.code,{children:"string"}),")"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If used for glovebox, trunk or stash you must first check the inventory is loaded with ",(0,l.jsx)(s.a,{href:"./GetInventory",children:"GetInventory"})]}),"\n",(0,l.jsxs)(s.p,{children:["Returns ",(0,l.jsx)(s.code,{children:"success, response"})," if cb is undefined, otherwise they are used in the callback only."]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:'Possible value of the "response" argument, on failure:'})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'"invalid_item": the item doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"invalid_inventory": the inventory doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"inventory_full": no free slots'}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success, response "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'gloveVGH283'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bread'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'-- if no slots are available, the value will be "inventory_full"'})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "metadata": [],'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Bread",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slot": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "bread",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 150'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"removeitem",children:"RemoveItem"}),"\n",(0,l.jsx)(s.p,{children:"Removes the specified item from the specified inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata, slot, ignoreTotal)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["The inventory's unique id, or a table with the id and owner.","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"1"})]}),"\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"gloveVGH283"})]}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{ id = 'personallocker', owner = 'license:xxxxxx'}"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The name of the item to remove from the target."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"The number of items to remove."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Only remove items with matching metadata properties."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slot?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"A specific slot to remove the item from. If the slot is invalid, the first available slot will be used instead."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["ignoreTotal?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Removes as many items as possible up to count."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Returns success: ",(0,l.jsx)(s.code,{children:"boolean"}),", response: ",(0,l.jsx)(s.code,{children:"string?"}),"."]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:'Possible values of "response" on failure:'})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:'"invalid_item": the item doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"invalid_inventory": the inventory doesn\'t exist'}),"\n",(0,l.jsx)(s.li,{children:'"not_enough_items": inventory did not contain enough of the given item'}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Removes 2 water from the glovebox for the given plate."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RemoveItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'gloveVGH283'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"getitem",children:"GetItem"}),"\n",(0,l.jsxs)(s.p,{children:["Returns ",(0,l.jsx)(s.em,{children:"generic"})," item data from the specified inventory, with the total count."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, metadata, returnsCount)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be items array."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"any"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Only returns the count of items that strictly match the given metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["returnsCount?: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["If ",(0,l.jsx)(s.code,{children:"returnsCount"})," is set to true, the returned value will be the ",(0,l.jsx)(s.code,{children:"count"})," based on\nhow many times the item was found.\nOtherwise returns the data related to the item ",(0,l.jsx)(s.em,{children:"and"})," its total count found in the inventory."]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(item, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "consume": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count": 15,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 500,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"convertitems",children:"ConvertItems"}),"\n",(0,l.jsx)(s.p,{children:"Takes traditional item data and updates it to support ox_inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ConvertItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, items)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Data Conversion Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"Old: [{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bread"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"New: [{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"slot"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"name"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cola"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"count"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"slot"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"name"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bread"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"count"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:":"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}]"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryitem",children:"CanCarryItem"}),"\n",(0,l.jsx)(s.p,{children:"Returns true or false depending if the inventory can carry the specified item."}),"\n",(0,l.jsx)(s.p,{children:"The function checks for inventory weight and available slots."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, count, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be array of items."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["If metadata is passed as string then ",(0,l.jsx)(s.code,{children:"metadata.type"})," will be checked."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks if the player calling the event can carry 3 water items"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff if can carry"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do stuff if can't carry"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryamount",children:"CanCarryAmount"}),"\n",(0,l.jsx)(s.p,{children:"Returns the amount a player can hold based on available weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryAmount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Can be array to check multiple items."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks how much you can carry"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"amountToAdd "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryAmount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stone'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Adds the amount"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stone'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", amountToAdd)"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"cancarryweight",children:"CanCarryWeight"}),"\n",(0,l.jsx)(s.p,{children:"Returns if inventory can carry specified weight and free inventory weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, weight)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Checks if player can carry 1000 grams."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fillAmount "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" canCarryWeight, freeWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanCarryWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId, fillAmount)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" freeWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player can't carry weight."})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"elseif"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" canCarryWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Modify fillAmount, because inventory can't carry specified weight"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fillAmount "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" freeWeight"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Do something"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"setmaxweight",children:"SetMaxWeight"}),"\n",(0,l.jsx)(s.p,{children:"Sets the maximum weight available for an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, maxWeight)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the max weight for player 1's inventory to 20kg."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMaxWeight"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"20000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"canswapitem",children:"CanSwapItem"}),"\n",(0,l.jsx)(s.p,{children:"Returns true if the item swap is possible based on inventory weight."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CanSwapItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, firstItem, firstItemCount, testItem, testItemCount)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["firstItem: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["firstItemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["testItem: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["testItemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getitemcount",children:"GetItemCount"}),"\n",(0,l.jsx)(s.p,{children:"Get the total item count for all items in an inventory with the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["itemCount: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getitemslots",children:"GetItemSlots"}),"\n",(0,l.jsx)(s.p,{children:"Returns the number of slots the specified item is in, the item's total count and the remaining empty slots."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItemSlots"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslot",children:"GetSlot"}),"\n",(0,l.jsx)(s.p,{children:"Returns the specified slot data as a table."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot)"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(slot, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 2000,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "name": "water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "metadata": [],'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slot": 1,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Water",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "close": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "stack": true,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "count: 4'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"getslotforitem",children:"GetSlotForItem"}),"\n",(0,l.jsx)(s.p,{children:"Get the slot id of an existing item matching the given data, or an empty slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotForItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidwithitem",children:"GetSlotIdWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get a slot id in an inventory matching the given item name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotidswithitem",children:"GetSlotIdsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get all slot ids in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotIdsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotIds: ",(0,l.jsx)(s.code,{children:"number[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotwithitem",children:"GetSlotWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data for a slot in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getslotswithitem",children:"GetSlotsWithItem"}),"\n",(0,l.jsx)(s.p,{children:"Get data all slots in an inventory matching the given name and metadata."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlotsWithItem"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, itemName, metadata, strict)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["itemName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["strict?: ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Strictly match metadata properties, otherwise use partial matching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotsData: ",(0,l.jsx)(s.code,{children:"table[]?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getemptyslot",children:"GetEmptySlot"}),"\n",(0,l.jsx)(s.p,{children:"Get the first available empty slot in an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEmptySlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"getcontainerfromslot",children:"GetContainerFromSlot"}),"\n",(0,l.jsx)(s.p,{children:"Returns the inventory associated with the container linked in the slot of the given inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetContainerFromSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slotId)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slotId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["containerData: ",(0,l.jsx)(s.code,{children:"table?"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setslotcount",children:"SetSlotCount"}),"\n",(0,l.jsx)(s.p,{children:"Sets the number of slots available for an inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetSlotCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slots)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the slot count for player 1's inventory to 10."})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetSlotCount"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"getinventory",children:"GetInventory"}),"\n",(0,l.jsx)(s.p,{children:"Returns the inventory associated with the ID (and owner if defined). Otherwise returns null."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'example_stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory, {indent "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[["})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" {"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "id": "example_stash,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "label": "Police Stash",'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "type": "stash,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "slots": 50,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "weight": 0,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "maxWeight": 100000,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:' "owner": false,'})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" ..."})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"]]"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"getinventoryitems",children:"GetInventoryItems"}),"\n",(0,l.jsx)(s.p,{children:"Returns all slots with items in a inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventoryItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, owner)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"table"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerItems "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetInventoryItems"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"inspectinventory",children:"InspectInventory"}),"\n",(0,l.jsx)(s.p,{children:"Inspect the player their inventory. You will not be able to modify the inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"InspectInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(target, source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["target: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"confiscateinventory",children:"ConfiscateInventory"}),"\n",(0,l.jsx)(s.p,{children:"Clears a player's inventory and saves it to a stash."}),"\n",(0,l.jsxs)(s.p,{children:["Use ",(0,l.jsx)(s.a,{href:"#returninventory",children:"ReturnInventory"})," to return the confiscated inventory back to\nthe player."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ConfiscateInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"returninventory",children:"ReturnInventory"}),"\n",(0,l.jsx)(s.p,{children:"Returns the confiscated inventory back to the player."}),"\n",(0,l.jsxs)(s.p,{children:["Use it alongside ",(0,l.jsx)(s.a,{href:"#confiscateinventory",children:"ConfiscateInventory"}),"."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ReturnInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["source: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"clearinventory",children:"ClearInventory"}),"\n",(0,l.jsxs)(s.p,{children:["Clears the specified inventory. The ",(0,l.jsx)(s.code,{children:"keep"})," argument is either a string or an array of strings containing the name(s) of the item(s) to keep in the inventory after clearing."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ClearInventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, keep)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["keep?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"string[]"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"search",children:"Search"}),"\n",(0,l.jsx)(s.p,{children:"Searches an inventory for a specified item."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, search, item, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["search: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["item: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)(s.code,{children:"search"})," can be either ",(0,l.jsx)(s.code,{children:"'slots'"})," or ",(0,l.jsx)(s.code,{children:"'count'"}),", where slots will return a table of data\nand count will return the found amount of the specified item."]}),"\n",(0,l.jsx)(s.h2,{id:"registerstash",children:"RegisterStash"}),"\n",(0,l.jsx)(s.p,{children:"Creates a new custom stash."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id, label, slots, maxWeight, owner, groups, coords)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["id: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash identifier when loading from the database."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Display name when inventory is open."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"boolean"})," or ",(0,l.jsx)(s.code,{children:"nil"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"string"}),": Can only access the stash linked to the owner."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"true"}),": Each player has a unique stash but can request other player's stashes."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"nil"}),": Always shared."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["groups: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Table of player groups (jobs) able to access the stash."}),"\n",(0,l.jsx)(s.li,{children:"Table of group names where the numeric value is the minimum grade required."}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{['police'] = 0, ['ambulance'] = 2}"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords?: ",(0,l.jsx)(s.code,{children:"vector3"})," or ",(0,l.jsx)(s.code,{children:"vector3[]"})]}),"\n"]}),"\n",(0,l.jsx)(t.UW,{children:(0,l.jsx)(s.p,{children:"This function needs to be triggered before a player can open the stash."})}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsxs)(s.p,{children:[(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),(0,l.jsx)("br",{}),"\nFor a use case example on this function check out the written ",(0,l.jsx)(s.a,{href:"../Guides/stashes",children:"Guide"})," for it."]}),"\n",(0,l.jsx)(s.h2,{id:"createtemporarystash",children:"CreateTemporaryStash"}),"\n",(0,l.jsx)(s.p,{children:"Creates a temporary stash which will be removed after some time."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateTemporaryStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(properties)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["properties: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["owner?: ",(0,l.jsx)(s.code,{children:"string"})," ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"boolean"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"string"}),": Can only access the stash linked to the owner."]}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"true"}),": Each player has a unique stash but can request other player's stashes."]}),"\n",(0,l.jsxs)(s.li,{children:["The inventory is always shared if ",(0,l.jsx)(s.code,{children:"false"})," or ",(0,l.jsx)(s.code,{children:"nil"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["groups?: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Table of group names (e.g. jobs) where the numeric value is the minimum grade required."}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"{['police'] = 0, ['ambulance'] = 2}"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords?: ",(0,l.jsx)(s.code,{children:"vector3"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Stash can only be accessed while nearby."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["items?: ",(0,l.jsx)(s.code,{children:"{ [number]: string, [number]: number, [number]?: table }[]"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"An array of tables, containing a sequence of itemName, count, metadata."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inventoryId: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mystash "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateTemporaryStash"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mystash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" maxWeight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WEAPON_MINISMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ammo-9'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mineral water' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} }"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:openInventory'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", mystash)"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"customdrop",children:"CustomDrop"}),"\n",(0,l.jsx)(s.p,{children:"Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648')."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(prefix, items, coords, slots, maxWeight, instance, model)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["prefix: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["items: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["name: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["count: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata?: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["coords: ",(0,l.jsx)(s.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(s.li,{children:["slots?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["maxWeight?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["instance?: ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["model?: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create a generic drop with a marker"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Carcass'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'meat'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { grade "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hide'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { grade "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'deer' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}}"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, coords)"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create a drop with an entity"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CustomDrop"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WEAPON_MINISMG'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ammo-9'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerPed"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")), "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`w_sb_minismg`"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"createdropfromplayer",children:"CreateDropFromPlayer"}),"\n",(0,l.jsx)(s.p,{children:"Creates a new drop with the contents of a player's inventory."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateDropFromPlayer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(playerId)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Return:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["dropId: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dropId "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateDropFromPlayer"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(s.h2,{id:"getcurrentweapon",children:"GetCurrentWeapon"}),"\n",(0,l.jsx)(s.p,{children:"Returns the player's currently equipped weapon as a table."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- inv: string or number"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv)"})]})]})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"setdurability",children:"SetDurability"}),"\n",(0,l.jsx)(s.p,{children:"Sets durability onto the specified slot."}),"\n",(0,l.jsx)(s.p,{children:"Can be used for repairing weapons."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot, durability)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["durability: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the durability of the item in slot 3 of source player's inventory to 100"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Set the durability of the source player's current weapon to 100"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentWeapon"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weapon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetDurability"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, weapon.slot, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(s.h2,{id:"setmetadata",children:"SetMetadata"}),"\n",(0,l.jsx)(s.p,{children:"Sets metadata on the specified slot."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inv, slot, metadata)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["inv: ",(0,l.jsx)(s.code,{children:"table"})," or ",(0,l.jsx)(s.code,{children:"string"})," or ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["slot: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["metadata: ",(0,l.jsx)(s.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)("br",{}),"\n",(0,l.jsx)("u",{children:(0,l.jsx)(s.strong,{children:"Example"})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Search"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" k, v "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"in"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pairs"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\\n______________'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\\n- index '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"k)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.name, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'slot: '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"v.slot, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'metadata: '"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(v.metadata))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" v"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"break"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"water.metadata.type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'clean'"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SetMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, water.slot, water.metadata)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modified %sx water in slot %s with new metadata'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(water.count, water.slot))"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Server.mdx",route:"/overextended/ox_inventory/Functions/Server",timestamp:1730940204e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_inventory/Functions/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9852)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-b67a624167aebf0c.js b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-667d9833725f0007.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-b67a624167aebf0c.js rename to _next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-667d9833725f0007.js index baeb3d287e..22268235ed 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-b67a624167aebf0c.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Functions/Server/Hooks-667d9833725f0007.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7632],{3327:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Server/Hooks",function(){return n(4915)}])},4915:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return i}});var r=n(2676),l=n(2140),o=n(8745);let i=[{depth:2,value:"registerHook",id:"registerhook"},{depth:3,value:"swapItems",id:"swapitems"},{depth:3,value:"openInventory",id:"openinventory"},{depth:3,value:"createItem",id:"createitem"},{depth:3,value:"buyItem",id:"buyitem"},{depth:3,value:"craftItem",id:"craftitem"},{depth:2,value:"removeHooks",id:"removehooks"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",h3:"h3",br:"br",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Hooks"}),"\n",(0,r.jsx)(s.p,{children:"Event hooks allow 3rd party resources to define new behaviour without modifying the inventory code directly."}),"\n",(0,r.jsx)(s.h2,{id:"registerhook",children:"registerHook"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", options)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["payload: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["options?: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["print?: ",(0,r.jsx)(s.code,{children:"boolean"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Print to the console when triggering the event."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["itemFilter?: ",(0,r.jsx)(s.code,{children:"{ [string]: true }"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The event will only trigger for items defined as keys in a set."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryFilter?: ",(0,r.jsx)(s.code,{children:"string[]"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["The event will only trigger for inventories that match one of the ",(0,r.jsx)(s.a,{href:"http://www.easyuo.com/openeuo/wiki/index.php/Lua_Patterns_and_Captures_(Regular_Expressions)",children:"patterns"})," in the array."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["typeFilter?: ",(0,r.jsx)(s.code,{children:"{ [string]: true }"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The event will only trigger for inventories with one of the provided types (e.g. 'player', 'stash')"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"Return:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["hookId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"swapitems",children:"swapItems"}),"\n",(0,r.jsxs)(s.p,{children:['Triggered when moving any item from one slot to another, or when "giving" an item.',(0,r.jsx)(s.br,{}),"\n","By returning ",(0,r.jsx)(s.code,{children:"false"}),", you can cancel the action and revert the inventory state."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["action: ",(0,r.jsx)(s.code,{children:"'move'"})," or ",(0,r.jsx)(s.code,{children:"'stack'"})," or ",(0,r.jsx)(s.code,{children:"'swap'"})," or ",(0,r.jsx)(s.code,{children:"'give'"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromInventory: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["toType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromSlot: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot?: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:'Blacklists "water" from being moved into or from gloveboxes and trunks.'}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'swapItems'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventoryFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^glove[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^trunk[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"openinventory",children:"openInventory"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryId: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when a player tries to open a secondary inventory.",(0,r.jsx)(s.br,{}),"\n","By returning ",(0,r.jsx)(s.code,{children:"false"}),", you can cancel the action and keep the player's inventory closed."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Disables gloveboxes and trunks."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'openInventory'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventoryFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^glove[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^trunk[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"createitem",children:"createItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["inventoryId?: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["metadata: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["item: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when an item is created, either by buying it, using AddItem, or when converting inventory data.",(0,r.jsx)(s.br,{}),"\n","By returning a table you can modify or replace the metadata given to an item."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:'Sets the label for "water" to "Mineral Water".'}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'createItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" payload.metadata"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata.label "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mineral Water'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"buyitem",children:"buyItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["shopType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["shopId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["itemName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["metadata: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["price: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["totalPrice: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["currency?: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when an item is about to be purchased and can return ",(0,r.jsx)(s.code,{children:"false"})," to prevent the transaction."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Prevents players from purchasing items at General stores."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'buyItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,r.jsx)(s.h3,{id:"craftitem",children:"craftItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["benchId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["benchIndex: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["recipe: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["duration: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["ingredients: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["slot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["weight: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Prevent lockpicks from being crafted by players."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'craftItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lockpick "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,r.jsx)(s.h2,{id:"removehooks",children:"removeHooks"}),"\n",(0,r.jsxs)(s.p,{children:["Removes a hook created by the invoking resource with the the specified id.",(0,r.jsx)(s.br,{}),"\n","If no id is specified then all hooks registered by the resource are removed."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeHooks"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["id?: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Server/Hooks.mdx",route:"/overextended/ox_inventory/Functions/Server/Hooks",timestamp:1730928152e3,title:"Hooks",headings:i},pageNextRoute:"/overextended/ox_inventory/Functions/Server/Hooks"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3327)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7632],{3327:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Functions/Server/Hooks",function(){return n(4915)}])},4915:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return i}});var r=n(2676),l=n(2140),o=n(8745);let i=[{depth:2,value:"registerHook",id:"registerhook"},{depth:3,value:"swapItems",id:"swapitems"},{depth:3,value:"openInventory",id:"openinventory"},{depth:3,value:"createItem",id:"createitem"},{depth:3,value:"buyItem",id:"buyitem"},{depth:3,value:"craftItem",id:"craftitem"},{depth:2,value:"removeHooks",id:"removehooks"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",h3:"h3",br:"br",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Hooks"}),"\n",(0,r.jsx)(s.p,{children:"Event hooks allow 3rd party resources to define new behaviour without modifying the inventory code directly."}),"\n",(0,r.jsx)(s.h2,{id:"registerhook",children:"registerHook"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", options)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["payload: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["options?: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["print?: ",(0,r.jsx)(s.code,{children:"boolean"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Print to the console when triggering the event."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["itemFilter?: ",(0,r.jsx)(s.code,{children:"{ [string]: true }"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The event will only trigger for items defined as keys in a set."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryFilter?: ",(0,r.jsx)(s.code,{children:"string[]"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["The event will only trigger for inventories that match one of the ",(0,r.jsx)(s.a,{href:"http://www.easyuo.com/openeuo/wiki/index.php/Lua_Patterns_and_Captures_(Regular_Expressions)",children:"patterns"})," in the array."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["typeFilter?: ",(0,r.jsx)(s.code,{children:"{ [string]: true }"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The event will only trigger for inventories with one of the provided types (e.g. 'player', 'stash')"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"Return:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["hookId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"swapitems",children:"swapItems"}),"\n",(0,r.jsxs)(s.p,{children:['Triggered when moving any item from one slot to another, or when "giving" an item.',(0,r.jsx)(s.br,{}),"\n","By returning ",(0,r.jsx)(s.code,{children:"false"}),", you can cancel the action and revert the inventory state."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["action: ",(0,r.jsx)(s.code,{children:"'move'"})," or ",(0,r.jsx)(s.code,{children:"'stack'"})," or ",(0,r.jsx)(s.code,{children:"'swap'"})," or ",(0,r.jsx)(s.code,{children:"'give'"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromInventory: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["toType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["fromSlot: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot?: ",(0,r.jsx)(s.code,{children:"table"})," or ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:'Blacklists "water" from being moved into or from gloveboxes and trunks.'}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'swapItems'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventoryFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^glove[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^trunk[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"openinventory",children:"openInventory"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryId: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["inventoryType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when a player tries to open a secondary inventory.",(0,r.jsx)(s.br,{}),"\n","By returning ",(0,r.jsx)(s.code,{children:"false"}),", you can cancel the action and keep the player's inventory closed."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Disables gloveboxes and trunks."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'openInventory'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventoryFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^glove[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'^trunk[%w]+'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"createitem",children:"createItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["inventoryId?: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["metadata: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["item: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when an item is created, either by buying it, using AddItem, or when converting inventory data.",(0,r.jsx)(s.br,{}),"\n","By returning a table you can modify or replace the metadata given to an item."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:'Sets the label for "water" to "Mineral Water".'}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'createItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" payload.metadata"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata.label "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Mineral Water'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" metadata"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"buyitem",children:"buyItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["shopType: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["shopId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["itemName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["metadata: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["price: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["totalPrice: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["currency?: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Triggered when an item is about to be purchased and can return ",(0,r.jsx)(s.code,{children:"false"})," to prevent the transaction."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Prevents players from purchasing items at General stores."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'buyItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" water "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,r.jsx)(s.h3,{id:"craftitem",children:"craftItem"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Payload: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["source: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["benchId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["benchIndex: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["recipe: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["count: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["duration: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["ingredients: ",(0,r.jsx)(s.code,{children:"table"})]}),"\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["slot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["weight: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["toInventory: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["toSlot: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example"})}),"\n",(0,r.jsx)(s.p,{children:"Prevent lockpicks from being crafted by players."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'craftItem'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(payload, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" print "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lockpick "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "})]})}),"\n",(0,r.jsx)(s.h2,{id:"removehooks",children:"removeHooks"}),"\n",(0,r.jsxs)(s.p,{children:["Removes a hook created by the invoking resource with the the specified id.",(0,r.jsx)(s.br,{}),"\n","If no id is specified then all hooks registered by the resource are removed."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeHooks"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["id?: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Functions/Server/Hooks.mdx",route:"/overextended/ox_inventory/Functions/Server/Hooks",timestamp:1730940204e3,title:"Hooks",headings:i},pageNextRoute:"/overextended/ox_inventory/Functions/Server/Hooks"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3327)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-d288acc9f72310b7.js b/_next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-15196d309caf119e.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-d288acc9f72310b7.js rename to _next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-15196d309caf119e.js index 2c4e999d73..edfed29769 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-d288acc9f72310b7.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Guides/crafting-15196d309caf119e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2537],{4205:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/crafting",function(){return n(7341)}])},7341:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745);let o=[{depth:2,value:"Crafting definition",id:"crafting-definition"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Crafting"}),"\n",(0,l.jsxs)(e.p,{children:["Crafting locations, items and their ingredients are defined in ",(0,l.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/crafting.lua",children:"data/crafting.lua"}),"."]}),"\n",(0,l.jsx)(e.h2,{id:"crafting-definition",children:"Crafting definition"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'lockpick'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ingredients "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" garbage "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" WEAPON_HAMMER "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.1"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { durability "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garbage'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ingredients "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cola "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'An empty soda can.'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", weight "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", image "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'trash_can' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1147.083008"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2002.662109"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"13.180260"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zones "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1146.2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2002.05"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"13.2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" size "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3.8"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.05"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.15"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rotation "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"315.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blip "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"566"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", colour "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"31"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", scale "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.8"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["items: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ingredients: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item ingredients can be seen in the item tooltip."}),"\n",(0,l.jsxs)(e.li,{children:["Key-value pairs of item name and consume count","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"key - Item name."}),"\n",(0,l.jsx)(e.li,{children:"value - If 1 or above it's the consume count, if below 1 and above 0 it's the durability consume amount, if\nset to 0 then the item is required but not consumed."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["duration: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Crafting duration in milliseconds."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["count: ",(0,l.jsx)(e.code,{children:"number"})," or ",(0,l.jsx)(e.code,{children:"table"})," (min, max)","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item amount received upon crafting."}),"\n",(0,l.jsx)(e.li,{children:"If set it to table it requires two number first one is minimum number and second one is maximum, it will generate a random number between those two numbers to add the crafted item to player."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Metadata applied to the item being crafted."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["points: ",(0,l.jsx)(e.code,{children:"vector3[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Interaction locations that will open the crafting inventory."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["groups: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Key-value pairs of job name and minimum grade to access the crafting location."}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:'{["police"] = 0, ["ambulance"] = 2}'})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["zones: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"ox_lib targeting zones used for ox_target."}),"\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["size: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["rotation: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["blip: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Blip sprite number."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colour: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["scale: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/crafting.mdx",route:"/overextended/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"},timestamp:1730928152e3,title:"Crafting",headings:o},pageNextRoute:"/overextended/ox_inventory/Guides/crafting"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4205)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2537],{4205:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/crafting",function(){return n(7341)}])},7341:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745);let o=[{depth:2,value:"Crafting definition",id:"crafting-definition"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Crafting"}),"\n",(0,l.jsxs)(e.p,{children:["Crafting locations, items and their ingredients are defined in ",(0,l.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/crafting.lua",children:"data/crafting.lua"}),"."]}),"\n",(0,l.jsx)(e.h2,{id:"crafting-definition",children:"Crafting definition"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'lockpick'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ingredients "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" garbage "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" WEAPON_HAMMER "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.1"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { durability "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garbage'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ingredients "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cola "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'An empty soda can.'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", weight "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", image "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'trash_can' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1147.083008"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2002.662109"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"13.180260"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zones "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1146.2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2002.05"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"13.2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" size "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3.8"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.05"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.15"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rotation "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"315.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blip "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"566"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", colour "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"31"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", scale "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.8"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["items: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ingredients: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item ingredients can be seen in the item tooltip."}),"\n",(0,l.jsxs)(e.li,{children:["Key-value pairs of item name and consume count","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"key - Item name."}),"\n",(0,l.jsx)(e.li,{children:"value - If 1 or above it's the consume count, if below 1 and above 0 it's the durability consume amount, if\nset to 0 then the item is required but not consumed."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["duration: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Crafting duration in milliseconds."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["count: ",(0,l.jsx)(e.code,{children:"number"})," or ",(0,l.jsx)(e.code,{children:"table"})," (min, max)","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item amount received upon crafting."}),"\n",(0,l.jsx)(e.li,{children:"If set it to table it requires two number first one is minimum number and second one is maximum, it will generate a random number between those two numbers to add the crafted item to player."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Metadata applied to the item being crafted."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["points: ",(0,l.jsx)(e.code,{children:"vector3[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Interaction locations that will open the crafting inventory."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["groups: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Key-value pairs of job name and minimum grade to access the crafting location."}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:'{["police"] = 0, ["ambulance"] = 2}'})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["zones: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"ox_lib targeting zones used for ox_target."}),"\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["size: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["rotation: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["blip: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Blip sprite number."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colour: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["scale: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/crafting.mdx",route:"/overextended/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"},timestamp:1730940204e3,title:"Crafting",headings:o},pageNextRoute:"/overextended/ox_inventory/Guides/crafting"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4205)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-7c711b3d35c4fb10.js b/_next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-34bc92948a6a8fcb.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-7c711b3d35c4fb10.js rename to _next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-34bc92948a6a8fcb.js index 03857a17f4..e59f07508c 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-7c711b3d35c4fb10.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Guides/creatingItems-34bc92948a6a8fcb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3735],{9876:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/creatingItems",function(){return l(110)}])},110:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return t}});var r=l(2676),n=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"Defining item data",id:"defining-item-data"},{depth:3,value:"Examples",id:"examples"},{depth:2,value:"Making the item usable",id:"making-the-item-usable"},{depth:3,value:"Client callbacks",id:"client-callbacks"},{depth:3,value:"Server callbacks",id:"server-callbacks"},{depth:2,value:"Creating container items",id:"creating-container-items"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",a:"a",ul:"ul",li:"li",code:"code",h3:"h3",pre:"pre",span:"span"},(0,i.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Creating Items"}),"\n",(0,r.jsx)(e.h2,{id:"defining-item-data",children:"Defining item data"}),"\n",(0,r.jsxs)(e.p,{children:["Before being able to see or use an item in game it ",(0,r.jsx)(e.strong,{children:"must"})," first be defined."]}),"\n",(0,r.jsxs)(e.p,{children:["All of the items are defined in the ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"/data/items.lua"})," file with key, value pairs.\nKey is the name (not the label) of an item and the value is a table containing the\noptions for the item."]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["Item options: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["label: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["weight?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["stack?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to false will not allow the item to be stacked."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["degrade?: ",(0,r.jsx)(e.code,{children:"number"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Amount of time in minutes the item will degrade after."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["decay?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If true the item will be deleted when durability reaches 0 (not instant for degraded items)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["close?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to false does not close the inventory on item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["description?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Item description that will be shown in the tooltip"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["consume?: ",(0,r.jsx)(e.code,{children:"number"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Item count needed and removed use."}),"\n",(0,r.jsx)(e.li,{children:"Default: 1"}),"\n",(0,r.jsx)(e.li,{children:"If set to a decimal will consume durability instead (0.2 = 20%)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["allowArmed?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to true will allow use of item while armed with a weapon."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["server?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["export?: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["client?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["export?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Export to be triggered after item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["event?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Event to be triggered after item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["status?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Adjust esx_status values after use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["anim?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Animation that will be played during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["dict: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["clip: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["prop?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Attached prop that will be displayed during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["model: ",(0,r.jsx)(e.code,{children:"string"})," or ",(0,r.jsx)(e.code,{children:"hash"})]}),"\n",(0,r.jsxs)(e.li,{children:["pos: ",(0,r.jsx)(e.code,{children:"table"})," (x, y, z)"]}),"\n",(0,r.jsxs)(e.li,{children:["rot: ",(0,r.jsx)(e.code,{children:"table"})," (x, y, z)"]}),"\n",(0,r.jsxs)(e.li,{children:["bone?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["rotOrder?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["disable?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Actions to be disabled during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["move?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["car?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["combat?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["mouse?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["sprint?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["usetime?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["cancel?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to true the player canc cancel item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["add?: ",(0,r.jsx)(e.code,{children:"function"}),"(total: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Function that triggers when receiving an item"}),"\n",(0,r.jsxs)(e.li,{children:["Returns total item count as ",(0,r.jsx)(e.code,{children:"total"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["remove?: ",(0,r.jsx)(e.code,{children:"function"}),"(total: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Function that triggers when removing an item"}),"\n",(0,r.jsxs)(e.li,{children:["Returns total item count as ",(0,r.jsx)(e.code,{children:"total"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["buttons?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["label: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["action: ",(0,r.jsx)(e.code,{children:"function"}),"(slot: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Callback function when button is clicked in context menu, returns item slot."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"examples",children:"Examples"}),"\n",(0,r.jsxs)(o.mQ,{items:["Burger","Burger with description","Burger with notification"],children:[(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" status "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { hunger "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { dict "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_inteat@burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", clip "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_int_eat_burger_fp' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'prop_cs_burger_01'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" usetime "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2500"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})}),(0,r.jsxs)(o.OK,{children:[(0,r.jsx)(e.p,{children:"A modified burger item which includes a description."}),(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Just what is the secret formula?'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" status "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { hunger "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { dict "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_inteat@burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", clip "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_int_eat_burger_fp' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'prop_cs_burger_01'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" usetime "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2500"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsx)(e.p,{children:"A modified burger item, which gives you notifications on add and remove arguments."}),(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"add"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"total"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" total "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nice burger you got there!'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"total"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" total "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You lost all of your burgers!'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})]}),"\n",(0,r.jsx)(e.h2,{id:"making-the-item-usable",children:"Making the item usable"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["If you are using ESX, you can continue using ",(0,r.jsx)(e.code,{children:"ESX.RegisterUsableItem"}),"."]}),"\n",(0,r.jsxs)(e.li,{children:["If you are using QBox, you can continue using ",(0,r.jsx)(e.code,{children:"exports.qbx_core:CreateUseableItem"}),"."]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:"Using the built-in system is more secure and provides much more functionality."}),"\n",(0,r.jsx)(e.h3,{id:"client-callbacks",children:"Client callbacks"}),"\n",(0,r.jsxs)(e.p,{children:["Item callbacks can be added by defining an export (recommended), or by adding it to ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/items/client.lua#L33",children:"items/client.lua"}),"."]}),"\n",(0,r.jsxs)(e.p,{children:["When defining ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua#L11",children:"item data"}),", adding client.export will trigger an event on item use.\nThe correct formatting is ",(0,r.jsx)(e.code,{children:"export = resourceName.exportName"}),"."]}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Does the ped need to heal? We can cancel the item from being used."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Triggers internal-code to correctly use items."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- This adds security, removes the item on use, adds progressbar support, and is necessary for server callbacks."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- The server has verified the item can be used."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" data "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.min"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(maxHealth, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Don't use the item"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h3,{id:"server-callbacks",children:"Server callbacks"}),"\n",(0,r.jsxs)(e.p,{children:["A callback function can be defined on the server to handle several events (usingItem, usedItem, buyItem).\nThis can either be an export (recommended), or added to the bottom of ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/items/server.lua",children:"items/server.lua"}),".\nWhen defining ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua#L14",children:"item data"}),", adding server.export will trigger an event for the actions above.\nThe correct formatting is ",(0,r.jsx)(e.code,{children:"export = resourceName.exportName"}),"."]}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"event"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventory"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player is attempting to use the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usingItem' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerPed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory.id)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Check if the player needs to be healed."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:">="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Returning 'false' will prevent the item from being used"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player has finished using the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usedItem' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player is attempting to purchase the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'buying' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You bought a bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h2,{id:"creating-container-items",children:"Creating container items"}),"\n",(0,r.jsx)(e.p,{children:"Like with other items the item must first be registered."}),"\n",(0,r.jsxs)(e.p,{children:["When registered you can define the item as a container in ",(0,r.jsx)(e.code,{children:"/modules/items/containers.lua"}),"\nThe key for the container is the ",(0,r.jsx)(e.code,{children:"name"})," you gave it when registering the item.\nYou can also define the number of slots, the maximum weight, blacklist and whitelist items."]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["itemName:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"slots: number"}),"\n",(0,r.jsx)(e.li,{children:"The number represents the amount of slots"}),"\n",(0,r.jsx)(e.li,{children:"maxWeight: number"}),"\n",(0,r.jsx)(e.li,{children:"The number represents the maximum weight within the container"}),"\n",(0,r.jsxs)(e.li,{children:["blacklist:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Supports single and multiple items"}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"{ 'testburger', 'testburger2' }"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["whitelist:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Supports single and multiple items"}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"{ 'testburger', 'testburger2' }"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"Register Example",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'paperbag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Paper Bag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"Properties Example",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setContainerProperties"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'paperbag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxWeight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blacklist "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testburger' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/creatingItems.mdx",route:"/overextended/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"},timestamp:1730928152e3,title:"Creating Items",headings:t},pageNextRoute:"/overextended/ox_inventory/Guides/creatingItems"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9876)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3735],{9876:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/creatingItems",function(){return l(110)}])},110:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return t}});var r=l(2676),n=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"Defining item data",id:"defining-item-data"},{depth:3,value:"Examples",id:"examples"},{depth:2,value:"Making the item usable",id:"making-the-item-usable"},{depth:3,value:"Client callbacks",id:"client-callbacks"},{depth:3,value:"Server callbacks",id:"server-callbacks"},{depth:2,value:"Creating container items",id:"creating-container-items"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",a:"a",ul:"ul",li:"li",code:"code",h3:"h3",pre:"pre",span:"span"},(0,i.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Creating Items"}),"\n",(0,r.jsx)(e.h2,{id:"defining-item-data",children:"Defining item data"}),"\n",(0,r.jsxs)(e.p,{children:["Before being able to see or use an item in game it ",(0,r.jsx)(e.strong,{children:"must"})," first be defined."]}),"\n",(0,r.jsxs)(e.p,{children:["All of the items are defined in the ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua",children:"/data/items.lua"})," file with key, value pairs.\nKey is the name (not the label) of an item and the value is a table containing the\noptions for the item."]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["Item options: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["label: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["weight?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["stack?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to false will not allow the item to be stacked."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["degrade?: ",(0,r.jsx)(e.code,{children:"number"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Amount of time in minutes the item will degrade after."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["decay?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If true the item will be deleted when durability reaches 0 (not instant for degraded items)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["close?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to false does not close the inventory on item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["description?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Item description that will be shown in the tooltip"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["consume?: ",(0,r.jsx)(e.code,{children:"number"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Item count needed and removed use."}),"\n",(0,r.jsx)(e.li,{children:"Default: 1"}),"\n",(0,r.jsx)(e.li,{children:"If set to a decimal will consume durability instead (0.2 = 20%)."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["allowArmed?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to true will allow use of item while armed with a weapon."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["server?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["export?: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["client?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["export?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Export to be triggered after item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["event?: ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Event to be triggered after item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["status?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Adjust esx_status values after use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["anim?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Animation that will be played during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["dict: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["clip: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["prop?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Attached prop that will be displayed during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["model: ",(0,r.jsx)(e.code,{children:"string"})," or ",(0,r.jsx)(e.code,{children:"hash"})]}),"\n",(0,r.jsxs)(e.li,{children:["pos: ",(0,r.jsx)(e.code,{children:"table"})," (x, y, z)"]}),"\n",(0,r.jsxs)(e.li,{children:["rot: ",(0,r.jsx)(e.code,{children:"table"})," (x, y, z)"]}),"\n",(0,r.jsxs)(e.li,{children:["bone?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["rotOrder?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["disable?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Actions to be disabled during the progress bar."}),"\n",(0,r.jsxs)(e.li,{children:["move?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["car?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["combat?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["mouse?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n",(0,r.jsxs)(e.li,{children:["sprint?: ",(0,r.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["usetime?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["cancel?: ",(0,r.jsx)(e.code,{children:"boolean"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"If set to true the player canc cancel item use."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["add?: ",(0,r.jsx)(e.code,{children:"function"}),"(total: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Function that triggers when receiving an item"}),"\n",(0,r.jsxs)(e.li,{children:["Returns total item count as ",(0,r.jsx)(e.code,{children:"total"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["remove?: ",(0,r.jsx)(e.code,{children:"function"}),"(total: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Function that triggers when removing an item"}),"\n",(0,r.jsxs)(e.li,{children:["Returns total item count as ",(0,r.jsx)(e.code,{children:"total"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["buttons?: ",(0,r.jsx)(e.code,{children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["label: ",(0,r.jsx)(e.code,{children:"string"})]}),"\n",(0,r.jsxs)(e.li,{children:["action: ",(0,r.jsx)(e.code,{children:"function"}),"(slot: ",(0,r.jsx)(e.code,{children:"number"}),")","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Callback function when button is clicked in context menu, returns item slot."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"examples",children:"Examples"}),"\n",(0,r.jsxs)(o.mQ,{items:["Burger","Burger with description","Burger with notification"],children:[(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" status "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { hunger "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { dict "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_inteat@burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", clip "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_int_eat_burger_fp' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'prop_cs_burger_01'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" usetime "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2500"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})}),(0,r.jsxs)(o.OK,{children:[(0,r.jsx)(e.p,{children:"A modified burger item which includes a description."}),(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Just what is the secret formula?'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" status "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { hunger "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { dict "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_inteat@burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", clip "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_int_eat_burger_fp' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'prop_cs_burger_01'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { x "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", y "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" usetime "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2500"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsx)(e.p,{children:"A modified burger item, which gives you notifications on add and remove arguments."}),(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Burger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"220"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"add"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"total"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" total "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nice burger you got there!'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"total"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" total "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You lost all of your burgers!'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})]}),"\n",(0,r.jsx)(e.h2,{id:"making-the-item-usable",children:"Making the item usable"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["If you are using ESX, you can continue using ",(0,r.jsx)(e.code,{children:"ESX.RegisterUsableItem"}),"."]}),"\n",(0,r.jsxs)(e.li,{children:["If you are using QBox, you can continue using ",(0,r.jsx)(e.code,{children:"exports.qbx_core:CreateUseableItem"}),"."]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:"Using the built-in system is more secure and provides much more functionality."}),"\n",(0,r.jsx)(e.h3,{id:"client-callbacks",children:"Client callbacks"}),"\n",(0,r.jsxs)(e.p,{children:["Item callbacks can be added by defining an export (recommended), or by adding it to ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/items/client.lua#L33",children:"items/client.lua"}),"."]}),"\n",(0,r.jsxs)(e.p,{children:["When defining ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua#L11",children:"item data"}),", adding client.export will trigger an event on item use.\nThe correct formatting is ",(0,r.jsx)(e.code,{children:"export = resourceName.exportName"}),"."]}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Does the ped need to heal? We can cancel the item from being used."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Triggers internal-code to correctly use items."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- This adds security, removes the item on use, adds progressbar support, and is necessary for server callbacks."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"useItem"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- The server has verified the item can be used."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" data "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.min"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(maxHealth, "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Don't use the item"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h3,{id:"server-callbacks",children:"Server callbacks"}),"\n",(0,r.jsxs)(e.p,{children:["A callback function can be defined on the server to handle several events (usingItem, usedItem, buyItem).\nThis can either be an export (recommended), or added to the bottom of ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/modules/items/server.lua",children:"items/server.lua"}),".\nWhen defining ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/items.lua#L14",children:"item data"}),", adding server.export will trigger an event for the actions above.\nThe correct formatting is ",(0,r.jsx)(e.code,{children:"export = resourceName.exportName"}),"."]}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"event"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventory"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player is attempting to use the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usingItem' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerPed "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetPlayerPed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory.id)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityMaxHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityHealth"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(playerPed)"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Check if the player needs to be healed."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" health "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:">="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxHealth "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'error'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You don\\'t need a bandage right now'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Returning 'false' will prevent the item from being used"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player has finished using the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usedItem' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You feel better already'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Player is attempting to purchase the item."})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'buying' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", inventory.id, {type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You bought a bandage'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h2,{id:"creating-container-items",children:"Creating container items"}),"\n",(0,r.jsx)(e.p,{children:"Like with other items the item must first be registered."}),"\n",(0,r.jsxs)(e.p,{children:["When registered you can define the item as a container in ",(0,r.jsx)(e.code,{children:"/modules/items/containers.lua"}),"\nThe key for the container is the ",(0,r.jsx)(e.code,{children:"name"})," you gave it when registering the item.\nYou can also define the number of slots, the maximum weight, blacklist and whitelist items."]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["itemName:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"slots: number"}),"\n",(0,r.jsx)(e.li,{children:"The number represents the amount of slots"}),"\n",(0,r.jsx)(e.li,{children:"maxWeight: number"}),"\n",(0,r.jsx)(e.li,{children:"The number represents the maximum weight within the container"}),"\n",(0,r.jsxs)(e.li,{children:["blacklist:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Supports single and multiple items"}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"{ 'testburger', 'testburger2' }"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["whitelist:","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Supports single and multiple items"}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"{ 'testburger', 'testburger2' }"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"Register Example",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'paperbag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Paper Bag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" stack "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" close "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"Properties Example",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setContainerProperties"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'paperbag'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxWeight "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blacklist "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testburger' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/creatingItems.mdx",route:"/overextended/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"},timestamp:1730940204e3,title:"Creating Items",headings:t},pageNextRoute:"/overextended/ox_inventory/Guides/creatingItems"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9876)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-7ca02f6f32850471.js b/_next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-0baf86c6925f3958.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-7ca02f6f32850471.js rename to _next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-0baf86c6925f3958.js index e94bb31289..83f2a17883 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-7ca02f6f32850471.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Guides/metadata-0baf86c6925f3958.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2577],{9079:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/metadata",function(){return r(6807)}])},6807:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return o}});var l=r(2676),n=r(2140),i=r(8745);let o=[{depth:2,value:"Creating the base item",id:"creating-the-base-item"},{depth:2,value:"Special metadata properties",id:"special-metadata-properties"},{depth:2,value:"Creating metadata items",id:"creating-metadata-items"},{depth:2,value:"Displaying custom metadata properties",id:"displaying-custom-metadata-properties"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",a:"a",em:"em"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Metadata"}),"\n",(0,l.jsx)(s.p,{children:"Item metadata is a very powerful tool that can be used to create multiple different items out of a single item."}),"\n",(0,l.jsxs)(s.p,{children:["In this guide we'll use pokemon cards as an example, but you can find an already integrated example in the inventory\nwith the ",(0,l.jsx)(s.code,{children:"garbage"})," item."]}),"\n",(0,l.jsx)(s.h2,{id:"creating-the-base-item",children:"Creating the base item"}),"\n",(0,l.jsx)(s.p,{children:"First of all we need to create a base item that we'll use to apply metadata to."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"/data/items.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pokemon card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" server "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" export "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon.pokemon_card'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.p,{children:"In this case we define the label and the weight as well since we are going to have all the cards weigh the same, but if you\ndo not want them all to weigh the same you can leave it out and apply weight through metadata."}),"\n",(0,l.jsxs)(s.p,{children:["We'll also make the item usable by calling the ",(0,l.jsx)(s.code,{children:"pokemon_card"})," export in the ",(0,l.jsx)(s.code,{children:"pokemon"})," resource."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"pokemon/server.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"event"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usingItem' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemSlot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory.id, slot)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemSlot.metadata, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"special-metadata-properties",children:"Special metadata properties"}),"\n",(0,l.jsx)(s.p,{children:"You can define any metadata property with any value you want it to have, but there are a couple metadata properties that\nhave special use cases."}),"\n",(0,l.jsx)(s.p,{children:"These properties are:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Display name of the item"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Amount the item will weigh"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["description: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Description of the item that will be displayed in the tooltip"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["image: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Image inside the image path that the item will use"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["imageurl: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Url to the image that the item will use"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["type: ",(0,l.jsx)(s.code,{children:"any"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Item type that is displayed in top right of the tooltip"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["We'll use these properties to create our pokemon cards out of the ",(0,l.jsx)(s.code,{children:"pokemon_card"})," item that we created earlier."]}),"\n",(0,l.jsx)(s.h2,{id:"creating-metadata-items",children:"Creating metadata items"}),"\n",(0,l.jsxs)(s.p,{children:["We can easily create metadata items by defining a hook using ",(0,l.jsx)(s.a,{href:"../Functions/Server/Hooks#createitem",children:"createItem"})," and adding it to a shop as well."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"/data/shops.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {name "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", metadata "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Charizard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" image "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'panties'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fire'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"84"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"pokemon/server.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemonMetadata "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" charizard "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Charizard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" image "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'panties'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fire'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"84"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'createItem'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemonMetadata[payload.metadata.type]"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon_card "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(s.p,{children:"As seen above when our item is usable, the metadata properties are all there and accessible through the slot."}),"\n",(0,l.jsx)(s.h2,{id:"displaying-custom-metadata-properties",children:"Displaying custom metadata properties"}),"\n",(0,l.jsxs)(s.p,{children:["We can display our custom metadata we set on our charizard card by either using string concatenation and adding them to\nthe description or by using the ",(0,l.jsx)(s.a,{href:"../Functions/Client#displaymetadata",children:"displayMetadata"})," ",(0,l.jsx)(s.em,{children:"client"})," function."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'HP'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ATK'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DEF'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/metadata.mdx",route:"/overextended/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"},timestamp:1730928152e3,title:"Metadata",headings:o},pageNextRoute:"/overextended/ox_inventory/Guides/metadata"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9079)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2577],{9079:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/metadata",function(){return r(6807)}])},6807:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return o}});var l=r(2676),n=r(2140),i=r(8745);let o=[{depth:2,value:"Creating the base item",id:"creating-the-base-item"},{depth:2,value:"Special metadata properties",id:"special-metadata-properties"},{depth:2,value:"Creating metadata items",id:"creating-metadata-items"},{depth:2,value:"Displaying custom metadata properties",id:"displaying-custom-metadata-properties"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",a:"a",em:"em"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Metadata"}),"\n",(0,l.jsx)(s.p,{children:"Item metadata is a very powerful tool that can be used to create multiple different items out of a single item."}),"\n",(0,l.jsxs)(s.p,{children:["In this guide we'll use pokemon cards as an example, but you can find an already integrated example in the inventory\nwith the ",(0,l.jsx)(s.code,{children:"garbage"})," item."]}),"\n",(0,l.jsx)(s.h2,{id:"creating-the-base-item",children:"Creating the base item"}),"\n",(0,l.jsx)(s.p,{children:"First of all we need to create a base item that we'll use to apply metadata to."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"/data/items.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pokemon card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" consume "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" server "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" export "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon.pokemon_card'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.p,{children:"In this case we define the label and the weight as well since we are going to have all the cards weigh the same, but if you\ndo not want them all to weigh the same you can leave it out and apply weight through metadata."}),"\n",(0,l.jsxs)(s.p,{children:["We'll also make the item usable by calling the ",(0,l.jsx)(s.code,{children:"pokemon_card"})," export in the ",(0,l.jsx)(s.code,{children:"pokemon"})," resource."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"pokemon/server.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"event"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"inventory"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"slot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'usingItem' "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemSlot "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetSlot"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory.id, slot)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(itemSlot.metadata, {indent"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsx)(s.h2,{id:"special-metadata-properties",children:"Special metadata properties"}),"\n",(0,l.jsx)(s.p,{children:"You can define any metadata property with any value you want it to have, but there are a couple metadata properties that\nhave special use cases."}),"\n",(0,l.jsx)(s.p,{children:"These properties are:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["label: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Display name of the item"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["weight: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Amount the item will weigh"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["description: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Description of the item that will be displayed in the tooltip"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["image: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Image inside the image path that the item will use"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["imageurl: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Url to the image that the item will use"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["type: ",(0,l.jsx)(s.code,{children:"any"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Item type that is displayed in top right of the tooltip"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["We'll use these properties to create our pokemon cards out of the ",(0,l.jsx)(s.code,{children:"pokemon_card"})," item that we created earlier."]}),"\n",(0,l.jsx)(s.h2,{id:"creating-metadata-items",children:"Creating metadata items"}),"\n",(0,l.jsxs)(s.p,{children:["We can easily create metadata items by defining a hook using ",(0,l.jsx)(s.a,{href:"../Functions/Server/Hooks#createitem",children:"createItem"})," and adding it to a shop as well."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"/data/shops.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"inventory "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {name "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pokemon_card'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", metadata "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Charizard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" image "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'panties'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fire'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"84"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"pokemon/server.lua",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemonMetadata "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" charizard "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Charizard'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It is said that Charizard’s fire burns hotter if it has experienced harsh battles.'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" image "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'panties'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fire'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"84"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"78"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hookId "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"registerHook"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'createItem'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"payload"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemonMetadata[payload.metadata.type]"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" itemFilter "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pokemon_card "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(s.p,{children:"As seen above when our item is usable, the metadata properties are all there and accessible through the slot."}),"\n",(0,l.jsx)(s.h2,{id:"displaying-custom-metadata-properties",children:"Displaying custom metadata properties"}),"\n",(0,l.jsxs)(s.p,{children:["We can display our custom metadata we set on our charizard card by either using string concatenation and adding them to\nthe description or by using the ",(0,l.jsx)(s.a,{href:"../Functions/Client#displaymetadata",children:"displayMetadata"})," ",(0,l.jsx)(s.em,{children:"client"})," function."]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"displayMetadata"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" hp "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'HP'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" attack "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ATK'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" defense "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DEF'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/metadata.mdx",route:"/overextended/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"},timestamp:1730940204e3,title:"Metadata",headings:o},pageNextRoute:"/overextended/ox_inventory/Guides/metadata"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9079)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Guides/shops-9e556e832f098c23.js b/_next/static/chunks/pages/overextended/ox_inventory/Guides/shops-b7bda7aabafc2150.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Guides/shops-9e556e832f098c23.js rename to _next/static/chunks/pages/overextended/ox_inventory/Guides/shops-b7bda7aabafc2150.js index 159410120f..05385207c3 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Guides/shops-9e556e832f098c23.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Guides/shops-b7bda7aabafc2150.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5020],{9033:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/shops",function(){return n(5920)}])},5920:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return i}});var l=n(2676),r=n(2140),o=n(8745);let i=[{depth:2,value:"Shop definition",id:"shop-definition"},{depth:2,value:"Register during runtime",id:"register-during-runtime"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Creating Shops"}),"\n",(0,l.jsxs)(e.p,{children:["Builtin shops are defined in ",(0,l.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/shops.lua",children:"data/shops.lua"}),", and more can be added here to benefit from the built-in markers or zones support."]}),"\n",(0,l.jsx)(e.h2,{id:"shop-definition",children:"Shop definition"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" General "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Shop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blip "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"59"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" colour "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scale "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.8"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'cola'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locations "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.7"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.49"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" targets "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Shop using a BoxZone"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" loc "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.06"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.32"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" length "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.7"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" width "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" heading "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" minZ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxZ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.9"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Shop using a ped"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ped "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`mp_m_shopkeep_01`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scenario "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WORLD_HUMAN_AA_COFFEE'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" loc "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"24.407"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.283"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.497"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" heading "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"270.311"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The label to display when the shop is open."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["blip?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Creates a blip with the given settings. Leave it undefined for no blip to be created."}),"\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["colour: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["scale: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["groups?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Key-value pairs of job name and minimum grade to access the shop.","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:'{["police"] = 0, ["ambulance"] = 2}'})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["inventory: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["price: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["currency?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item to be used as currency."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["count?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Amount of the item in the stock."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["license?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"License required to purchase the item."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata?: ",(0,l.jsx)(e.code,{children:"table"})]}),"\n",(0,l.jsxs)(e.li,{children:["grade?: ",(0,l.jsx)(e.code,{children:"number"})," | ",(0,l.jsx)(e.code,{children:"number[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Minimal grade required to purchase the item."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["locations?: ",(0,l.jsx)(e.code,{children:"vector3[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of coordinates to create unique instances of the shop archetype at, using markers."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["targets?: ",(0,l.jsx)(e.code,{children:"table[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of target settings to create unique instances of the shop archetype at, using peds or BoxZones (PolyZone data structure)."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["model?: ",(0,l.jsx)(e.code,{children:"number[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of models that can be targetted to open a shop. Used for vending machines."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Targets and model are only available when using a targeting resource like ox_target."}),"\n",(0,l.jsx)(e.h2,{id:"register-during-runtime",children:"Register during runtime"}),"\n",(0,l.jsxs)(e.p,{children:["Shops can be added using ",(0,l.jsx)(e.code,{children:"exports.ox_inventory:RegisterShop"})," on the server, however they cannot utilise any client-only features."]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Blips, markers, and zones will not be created."}),"\n",(0,l.jsx)(e.li,{children:'Must use "locations" and not "targets" to define each shop using the archetype.'}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterShop"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'TestShop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Test shop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'cola'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locations "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"223.832962"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"792.619751"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"30.695190"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" groups "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" police "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/shops.mdx",route:"/overextended/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"},timestamp:1730928152e3,title:"Creating Shops",headings:i},pageNextRoute:"/overextended/ox_inventory/Guides/shops"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9033)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5020],{9033:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/shops",function(){return n(5920)}])},5920:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return i}});var l=n(2676),r=n(2140),o=n(8745);let i=[{depth:2,value:"Shop definition",id:"shop-definition"},{depth:2,value:"Register during runtime",id:"register-during-runtime"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Creating Shops"}),"\n",(0,l.jsxs)(e.p,{children:["Builtin shops are defined in ",(0,l.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/blob/main/data/shops.lua",children:"data/shops.lua"}),", and more can be added here to benefit from the built-in markers or zones support."]}),"\n",(0,l.jsx)(e.h2,{id:"shop-definition",children:"Shop definition"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" General "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Shop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" blip "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"59"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" colour "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"69"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scale "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.8"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'cola'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locations "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.7"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.49"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" targets "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Shop using a BoxZone"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" loc "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.06"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.32"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" length "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.7"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" width "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" heading "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" minZ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" maxZ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29.9"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Shop using a ped"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ped "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`mp_m_shopkeep_01`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scenario "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'WORLD_HUMAN_AA_COFFEE'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" loc "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"24.407"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1347.283"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.497"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" heading "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"270.311"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The label to display when the shop is open."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["blip?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Creates a blip with the given settings. Leave it undefined for no blip to be created."}),"\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["colour: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["scale: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["groups?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Key-value pairs of job name and minimum grade to access the shop.","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:'{["police"] = 0, ["ambulance"] = 2}'})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["inventory: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["price: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["currency?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Item to be used as currency."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["count?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Amount of the item in the stock."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["license?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"License required to purchase the item."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata?: ",(0,l.jsx)(e.code,{children:"table"})]}),"\n",(0,l.jsxs)(e.li,{children:["grade?: ",(0,l.jsx)(e.code,{children:"number"})," | ",(0,l.jsx)(e.code,{children:"number[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Minimal grade required to purchase the item."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["locations?: ",(0,l.jsx)(e.code,{children:"vector3[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of coordinates to create unique instances of the shop archetype at, using markers."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["targets?: ",(0,l.jsx)(e.code,{children:"table[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of target settings to create unique instances of the shop archetype at, using peds or BoxZones (PolyZone data structure)."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["model?: ",(0,l.jsx)(e.code,{children:"number[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"An array of models that can be targetted to open a shop. Used for vending machines."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Targets and model are only available when using a targeting resource like ox_target."}),"\n",(0,l.jsx)(e.h2,{id:"register-during-runtime",children:"Register during runtime"}),"\n",(0,l.jsxs)(e.p,{children:["Shops can be added using ",(0,l.jsx)(e.code,{children:"exports.ox_inventory:RegisterShop"})," on the server, however they cannot utilise any client-only features."]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Blips, markers, and zones will not be created."}),"\n",(0,l.jsx)(e.li,{children:'Must use "locations" and not "targets" to define each shop using the archetype.'}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterShop"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'TestShop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Test shop'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'burger'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'cola'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", price "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locations "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"223.832962"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"792.619751"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"30.695190"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" groups "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" police "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/shops.mdx",route:"/overextended/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"},timestamp:1730940204e3,title:"Creating Shops",headings:i},pageNextRoute:"/overextended/ox_inventory/Guides/shops"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9033)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-89e012c27f1818b1.js b/_next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-9c7eb785783b49f1.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-89e012c27f1818b1.js rename to _next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-9c7eb785783b49f1.js index c0ca05da0d..18383fa123 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-89e012c27f1818b1.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/Guides/stashes-9c7eb785783b49f1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1533],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),l=n.n(o),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let o=(0,r.forwardRef)((s,o)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},i),{width:t,height:t,stroke:l,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return o.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},o.displayName=`${s}`,o}},9253:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/stashes",function(){return n(4856)}])},4856:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),o=n(2140),l=n(8745),i=n(3786);let t=[{depth:2,value:"Stash properties",id:"stash-properties"},{depth:2,value:"Example",id:"example"},{depth:2,value:"Example Resource",id:"example-resource"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Custom Stashes"}),"\n",(0,r.jsx)(s.p,{children:"We can set up custom stashes from outside the resource utilising the exported RegisterStash function."}),"\n",(0,r.jsx)(s.p,{children:"Firstly, we need to define the stashes properties."}),"\n",(0,r.jsx)(s.h2,{id:"stash-properties",children:"Stash properties"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["id: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Unique name to identify the stash in the database."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["label: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Display name when viewing the stash."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["slots: ",(0,r.jsx)(s.code,{children:"number"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Number of slots the stash will have."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["weight: ",(0,r.jsx)(s.code,{children:"number"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Maximum weight of the stash inventory."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["owner?: ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"boolean"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"true"}),": Each player has their own unique stash, but can request to open the stash of another player"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"false"}),": Only a single stash exists and is shared between all players"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"string"}),": The stash explicitly belongs to the given owner, usually a player identifier"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["groups?: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Key-value pairs of job name and minimum grade to be able to access the stash. (",(0,r.jsx)(s.code,{children:'{["police"] = 0, ["ambulance"] = 2}'}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["grade: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["coords?: ",(0,r.jsx)(s.code,{children:"vector3"})," or ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"You can set the stash coordinates to prevent the stash from being opened if the player isn't close enough."}),"\n",(0,r.jsx)(s.li,{children:"Vector or table containing the coordinates of the stash."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.p,{children:"Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Server"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42wallabyway'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42 Wallaby Way'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100000"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" owner "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'char1:license'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onServerResourceStart'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"resourceName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceName "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceName "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentResourceName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.id, stash.label, stash.slots, stash.weight, stash.owner)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Client"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42wallabyway'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"property.owner})"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"The following sample is based on esx_property's db data."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Server"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT * FROM `properties`'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"result"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" result"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:loadStashes'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties[id]"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'-- id: 1, name: WhispymoundDrive, label: 2677 Whispymound Drive, coords: {"x":118.748,"y":566.573,"z":175.697}'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.name, stash.label, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100000"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.room_menu))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Client"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", property.id) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerServerEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:loadStashes'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", property.id)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"example-resource",children:"Example Resource"}),"\n",(0,r.jsx)(s.p,{children:"We put together an example resource showcasing how to properly utilise the stash API:"}),"\n",(0,r.jsx)(i.eX,{link:"https://www.github.com/overextended/ox_inventory_examples",label:"Ox Inventory Examples"})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/stashes.mdx",route:"/overextended/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"},timestamp:1730928152e3,title:"Custom Stashes",headings:t},pageNextRoute:"/overextended/ox_inventory/Guides/stashes"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var o=n(5850),l=(0,o.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),i=(0,o.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,o.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,o.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,o.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:o,link:l}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:l,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:o}),n,"right"===s&&(0,r.jsx)("div",{children:o})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,o,l,i){if(i!==r){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9253)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1533],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),o=n(507),l=n.n(o),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let o=(0,r.forwardRef)((s,o)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:o},i),{width:t,height:t,stroke:l,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return o.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},o.displayName=`${s}`,o}},9253:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/Guides/stashes",function(){return n(4856)}])},4856:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),o=n(2140),l=n(8745),i=n(3786);let t=[{depth:2,value:"Stash properties",id:"stash-properties"},{depth:2,value:"Example",id:"example"},{depth:2,value:"Example Resource",id:"example-resource"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Custom Stashes"}),"\n",(0,r.jsx)(s.p,{children:"We can set up custom stashes from outside the resource utilising the exported RegisterStash function."}),"\n",(0,r.jsx)(s.p,{children:"Firstly, we need to define the stashes properties."}),"\n",(0,r.jsx)(s.h2,{id:"stash-properties",children:"Stash properties"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["id: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Unique name to identify the stash in the database."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["label: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Display name when viewing the stash."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["slots: ",(0,r.jsx)(s.code,{children:"number"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Number of slots the stash will have."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["weight: ",(0,r.jsx)(s.code,{children:"number"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Maximum weight of the stash inventory."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["owner?: ",(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.code,{children:"boolean"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"true"}),": Each player has their own unique stash, but can request to open the stash of another player"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"false"}),": Only a single stash exists and is shared between all players"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"string"}),": The stash explicitly belongs to the given owner, usually a player identifier"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["groups?: ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Key-value pairs of job name and minimum grade to be able to access the stash. (",(0,r.jsx)(s.code,{children:'{["police"] = 0, ["ambulance"] = 2}'}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["grade: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["coords?: ",(0,r.jsx)(s.code,{children:"vector3"})," or ",(0,r.jsx)(s.code,{children:"table"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"You can set the stash coordinates to prevent the stash from being opened if the player isn't close enough."}),"\n",(0,r.jsx)(s.li,{children:"Vector or table containing the coordinates of the stash."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.p,{children:"Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)"}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Server"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42wallabyway'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42 Wallaby Way'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slots "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weight "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100000"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" owner "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'char1:license'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"AddEventHandler"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onServerResourceStart'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"resourceName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceName "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory' "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" resourceName "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetCurrentResourceName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.id, stash.label, stash.slots, stash.weight, stash.owner)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Client"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'42wallabyway'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", owner"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"property.owner})"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"The following sample is based on esx_property's db data."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Server"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT * FROM `properties`'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"result"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" result"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:loadStashes'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" properties[id]"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" stash "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:'-- id: 1, name: WhispymoundDrive, label: 2677 Whispymound Drive, coords: {"x":118.748,"y":566.573,"z":175.697}'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterStash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.name, stash.label, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100000"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(stash.room_menu))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Client"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" exports.ox_inventory"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", property.id) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerServerEvent"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:loadStashes'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ox_inventory:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openInventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'stash'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", property.id)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"example-resource",children:"Example Resource"}),"\n",(0,r.jsx)(s.p,{children:"We put together an example resource showcasing how to properly utilise the stash API:"}),"\n",(0,r.jsx)(i.eX,{link:"https://www.github.com/overextended/ox_inventory_examples",label:"Ox Inventory Examples"})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/Guides/stashes.mdx",route:"/overextended/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"},timestamp:1730940204e3,title:"Custom Stashes",headings:t},pageNextRoute:"/overextended/ox_inventory/Guides/stashes"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var o=n(5850),l=(0,o.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),i=(0,o.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,o.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,o.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,o.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:o,link:l}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:l,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:o}),n,"right"===s&&(0,r.jsx)("div",{children:o})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,o,l,i){if(i!==r){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9253)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_inventory/issues-de3fcc592d6fdf18.js b/_next/static/chunks/pages/overextended/ox_inventory/issues-68e6d5b522009451.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_inventory/issues-de3fcc592d6fdf18.js rename to _next/static/chunks/pages/overextended/ox_inventory/issues-68e6d5b522009451.js index 616030e102..b43ec8aa0b 100644 --- a/_next/static/chunks/pages/overextended/ox_inventory/issues-de3fcc592d6fdf18.js +++ b/_next/static/chunks/pages/overextended/ox_inventory/issues-68e6d5b522009451.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6923],{147:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/issues",function(){return t(4273)}])},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return i}});var s=t(2676),r=t(2140),o=t(8745);let i=[{depth:2,value:"UI has not been built",id:"ui-has-not-been-built"},{depth:2,value:"No such export * in resource ox_inventory",id:"no-such-export--in-resource-ox_inventory"},{depth:2,value:"Stashes / trunks are not saved at server restart",id:"stashes--trunks-are-not-saved-at-server-restart"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",a:"a",br:"br",code:"code",em:"em",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Common Issues"}),"\n",(0,s.jsx)(n.h2,{id:"ui-has-not-been-built",children:"UI has not been built"}),"\n",(0,s.jsx)(n.p,{children:"Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js."}),"\n",(0,s.jsxs)(n.p,{children:["We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_inventory/releases/latest",children:"here"}),".",(0,s.jsx)(n.br,{}),"\n","Make sure you download the ",(0,s.jsx)(n.code,{children:"ox_inventory.zip"})," file as that one contains the bundled files and others are raw source code."]}),"\n",(0,s.jsxs)(n.p,{children:["If in case you wanted to edit the inventory UI you would have to build these files yourself.",(0,s.jsx)(n.br,{}),"\n","To do so please read our ",(0,s.jsx)(n.a,{href:"../ox_inventory#installation",children:(0,s.jsx)(n.em,{children:"Installation"})})," guide."]}),"\n",(0,s.jsx)(n.h2,{id:"no-such-export--in-resource-ox_inventory",children:"No such export * in resource ox_inventory"}),"\n",(0,s.jsx)(n.p,{children:'There are several likely causes for this "issue".'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An error occurred while starting ox_inventory or one of its dependencies (e.g. ox_lib)."}),"\n",(0,s.jsxs)(n.li,{children:["The resource trying to use the export (e.g. esx_addoninventory) is being started ",(0,s.jsx)(n.em,{children:"before"})," ox_inventory."]}),"\n",(0,s.jsx)(n.li,{children:"You're literally trying to call an export that does not exist, which is a you issue."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"stashes--trunks-are-not-saved-at-server-restart",children:"Stashes / trunks are not saved at server restart"}),"\n",(0,s.jsx)(n.p,{children:'Stopping a server or "restarting" it does not trigger any events or allow for saving.'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Inventories are saved at a 5 minute interval."}),"\n",(0,s.jsx)(n.li,{children:"txAdmin scheduled restarts and shutdowns will trigger a save."}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"saveinv"})," command can be used manually or triggered in the console."]}),"\n",(0,s.jsx)(n.li,{children:"All inventories are saved when the number of online players hits 0."}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/issues.mdx",route:"/overextended/ox_inventory/issues",frontMatter:{title:"Common Issues"},timestamp:1730928152e3,title:"Common Issues",headings:i},pageNextRoute:"/overextended/ox_inventory/issues"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=147)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6923],{147:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_inventory/issues",function(){return t(4273)}])},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return i}});var s=t(2676),r=t(2140),o=t(8745);let i=[{depth:2,value:"UI has not been built",id:"ui-has-not-been-built"},{depth:2,value:"No such export * in resource ox_inventory",id:"no-such-export--in-resource-ox_inventory"},{depth:2,value:"Stashes / trunks are not saved at server restart",id:"stashes--trunks-are-not-saved-at-server-restart"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",a:"a",br:"br",code:"code",em:"em",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Common Issues"}),"\n",(0,s.jsx)(n.h2,{id:"ui-has-not-been-built",children:"UI has not been built"}),"\n",(0,s.jsx)(n.p,{children:"Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js."}),"\n",(0,s.jsxs)(n.p,{children:["We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_inventory/releases/latest",children:"here"}),".",(0,s.jsx)(n.br,{}),"\n","Make sure you download the ",(0,s.jsx)(n.code,{children:"ox_inventory.zip"})," file as that one contains the bundled files and others are raw source code."]}),"\n",(0,s.jsxs)(n.p,{children:["If in case you wanted to edit the inventory UI you would have to build these files yourself.",(0,s.jsx)(n.br,{}),"\n","To do so please read our ",(0,s.jsx)(n.a,{href:"../ox_inventory#installation",children:(0,s.jsx)(n.em,{children:"Installation"})})," guide."]}),"\n",(0,s.jsx)(n.h2,{id:"no-such-export--in-resource-ox_inventory",children:"No such export * in resource ox_inventory"}),"\n",(0,s.jsx)(n.p,{children:'There are several likely causes for this "issue".'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An error occurred while starting ox_inventory or one of its dependencies (e.g. ox_lib)."}),"\n",(0,s.jsxs)(n.li,{children:["The resource trying to use the export (e.g. esx_addoninventory) is being started ",(0,s.jsx)(n.em,{children:"before"})," ox_inventory."]}),"\n",(0,s.jsx)(n.li,{children:"You're literally trying to call an export that does not exist, which is a you issue."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"stashes--trunks-are-not-saved-at-server-restart",children:"Stashes / trunks are not saved at server restart"}),"\n",(0,s.jsx)(n.p,{children:'Stopping a server or "restarting" it does not trigger any events or allow for saving.'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Inventories are saved at a 5 minute interval."}),"\n",(0,s.jsx)(n.li,{children:"txAdmin scheduled restarts and shutdowns will trigger a save."}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"saveinv"})," command can be used manually or triggered in the console."]}),"\n",(0,s.jsx)(n.li,{children:"All inventories are saved when the number of online players hits 0."}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_inventory/issues.mdx",route:"/overextended/ox_inventory/issues",frontMatter:{title:"Common Issues"},timestamp:1730940204e3,title:"Common Issues",headings:i},pageNextRoute:"/overextended/ox_inventory/issues"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=147)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib-cad8b245dd53af92.js b/_next/static/chunks/pages/overextended/ox_lib-bb548fced9172492.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib-cad8b245dd53af92.js rename to _next/static/chunks/pages/overextended/ox_lib-bb548fced9172492.js index 2a490981b0..39b76968c7 100644 --- a/_next/static/chunks/pages/overextended/ox_lib-cad8b245dd53af92.js +++ b/_next/static/chunks/pages/overextended/ox_lib-bb548fced9172492.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5409],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),i=n(507),t=n.n(i),l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},o=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?o(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let i=(0,r.forwardRef)((s,i)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},l),{width:o,height:o,stroke:t,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return i.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},i.displayName=`${s}`,i}},3753:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib",function(){return n(779)}])},779:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),i=n(2140),t=n(8745),l=n(7100),o=n(8713);let a=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Download a release or build the source code.",id:"download-a-release-or-build-the-source-code"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Usage",id:"usage"},{depth:2,value:"Using icons for interface functions",id:"using-icons-for-interface-functions"},{depth:2,value:"Building the UI",id:"building-the-ui"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",br:"br",em:"em"},(0,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Ox Lib"}),"\n",(0,r.jsx)(s.p,{children:"A standalone library for providing easily reusable code as importable modules and exports."}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_lib"}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(l.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["We ",(0,r.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(l.Rg,{children:[(0,r.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_lib/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_lib.git"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib/web"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"blue"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryShade"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:userLocales"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Allow users to select their locales using /ox_lib"})]})]})}),(0,r.jsx)(s.p,{children:"You'll also need to grant ace permissions to the resource."}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_principal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_principal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,r.jsxs)(l.OK,{children:[(0,r.jsxs)(s.p,{children:["To enable the library inside of your resource just add ",(0,r.jsx)(s.code,{children:"@ox_lib/init.lua"})," as a shared_script in your ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"})," file."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"shared_scripts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_lib/init.lua'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(s.p,{children:"Or if the library is the only shared script you use you can do:"}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"shared_script"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_lib/init.lua'"})]})})}),(0,r.jsxs)(s.p,{children:["You can specify modules to import from inside your ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"}),", or load them dynamically."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ox_libs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'locale'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'math'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'table'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(s.p,{children:"When ox_lib has been imported into your script, it will make several new globals available:"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"lib"})," for dynamically importing ox_lib modules into your script."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"require"})," for importing modules from your own script."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"cache"})," see ",(0,r.jsx)(s.a,{href:"./ox_lib/Modules/Cache/Shared",children:"here"}),"."]}),"\n"]})]}),(0,r.jsxs)(l.OK,{children:[(0,r.jsxs)(l.UW,{children:[(0,r.jsxs)(s.p,{children:["Npm package for the lib does ",(0,r.jsx)(s.strong,{children:"not"})," support all the functions that are available for Lua."]}),(0,r.jsxs)(s.p,{children:["All supported functions are located inside the ",(0,r.jsx)(s.code,{children:"resource"})," folder in the lib."]})]}),(0,r.jsxs)(s.p,{children:["You can get the npm package ",(0,r.jsx)(s.a,{href:"https://npmjs.com/package/@overextended/ox_lib",children:"here"}),"."]}),(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Usage:"}),(0,r.jsx)(s.br,{}),"\n","You can either import the whole library object which contains all the functions for that scope (client/server/shared) or you can deconstruct it and import the functions you find needed at the time."]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { versionCheck } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})})]})]}),"\n",(0,r.jsx)(s.p,{children:"You can now use the library functions inside of your resource, check the rest of the documentation to see how to utilise them."}),"\n",(0,r.jsx)(s.h2,{id:"using-icons-for-interface-functions",children:"Using icons for interface functions"}),"\n",(0,r.jsxs)(s.p,{children:["The icon library used is Font Awesome 6.0, if for the icon you define only a string the default icon type will be ",(0,r.jsx)(s.code,{children:"solid"}),".",(0,r.jsx)(s.br,{}),"\n","If you want to use a different icon type, i.e apple as a brand, you need to define icon as a table (",(0,r.jsx)(s.code,{children:"array"}),") with the first value being the icon type (",(0,r.jsx)(s.code,{children:"fas"}),", ",(0,r.jsx)(s.code,{children:"far"}),", ",(0,r.jsx)(s.code,{children:"fab"}),") as a string, and the second being the icon name."]}),"\n",(0,r.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(l.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"icon "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fab'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'apple'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]})})})}),(0,r.jsx)(l.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"icon"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fab'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'apple'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]})})})})]}),"\n",(0,r.jsx)(s.h2,{id:"building-the-ui",children:"Building the UI"}),"\n",(0,r.jsxs)(s.p,{children:["If you wish to edit any of the UI elements you will need to download the ",(0,r.jsx)(s.em,{children:"source"})," code, edit what you need and then compile it."]}),"\n",(0,r.jsx)(l.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"DO NOT"})," de-bundle and un-minify the release CSS and JS files to edit them."]})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Requirements:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://nodejs.org/",children:"Node.js (LTS)"})}),"\n",(0,r.jsx)(s.li,{children:"pnpm"}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Installing Node.js:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Download the LTS version of Node.js."}),"\n",(0,r.jsx)(s.li,{children:"Go through the install and make sure you install all of the features."}),"\n",(0,r.jsx)(s.li,{children:"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."}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Installing pnpm:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["After installing NodeJS you can install pnpm by running ",(0,r.jsx)(s.code,{children:"npm install -g pnpm"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Building the UI:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"cd into the web directory."}),"\n",(0,r.jsxs)(s.li,{children:["run ",(0,r.jsx)(s.code,{children:"pnpm i"})," to install the dependencies."]}),"\n",(0,r.jsxs)(s.li,{children:["run ",(0,r.jsx)(s.code,{children:"pnpm build"})," to build the source files."]}),"\n"]}),"\n",(0,r.jsxs)(l.UW,{type:"info",children:[(0,r.jsxs)(s.p,{children:["When working in the browser you can run ",(0,r.jsx)(s.code,{children:"pnpm start"}),", which supports hot reloads meaning that\nyou will see your changes after saving your file."]}),(0,r.jsxs)(s.p,{children:["If you want to work in game you can run ",(0,r.jsx)(s.code,{children:"pnpm start:game"})," which writes changes to disk, so\nthe only thing you have to do is restart the resource for it take affect."]})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib.mdx",route:"/overextended/ox_lib",timestamp:1730928152e3,title:"Ox Lib",headings:a},pageNextRoute:"/overextended/ox_lib"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var i=n(5850),t=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),l=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),o=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:i,link:t}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:t,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:i}),n,"right"===s&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var i=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:s}),(0,r.jsx)(i.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,i,t,l){if(l!==r){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3753)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5409],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),i=n(507),t=n.n(i),l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},o=Object.defineProperty,a=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?o(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))d.call(s,n)&&__defNormalProp(e,n,s[n]);if(h)for(var n of h(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>a(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)d.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>s.indexOf(r)&&x.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let i=(0,r.forwardRef)((s,i)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:i},l),{width:o,height:o,stroke:t,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return i.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},i.displayName=`${s}`,i}},3753:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib",function(){return n(779)}])},779:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),i=n(2140),t=n(8745),l=n(7100),o=n(8713);let a=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Download a release or build the source code.",id:"download-a-release-or-build-the-source-code"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Usage",id:"usage"},{depth:2,value:"Using icons for interface functions",id:"using-icons-for-interface-functions"},{depth:2,value:"Building the UI",id:"building-the-ui"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",br:"br",em:"em"},(0,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Ox Lib"}),"\n",(0,r.jsx)(s.p,{children:"A standalone library for providing easily reusable code as importable modules and exports."}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_lib"}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(l.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["We ",(0,r.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(l.Rg,{children:[(0,r.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/ox_lib/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_lib.git"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib/web"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"blue"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryShade"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:userLocales"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Allow users to select their locales using /ox_lib"})]})]})}),(0,r.jsx)(s.p,{children:"You'll also need to grant ace permissions to the resource."}),(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_principal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_principal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,r.jsxs)(l.OK,{children:[(0,r.jsxs)(s.p,{children:["To enable the library inside of your resource just add ",(0,r.jsx)(s.code,{children:"@ox_lib/init.lua"})," as a shared_script in your ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"})," file."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"shared_scripts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_lib/init.lua'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(s.p,{children:"Or if the library is the only shared script you use you can do:"}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"shared_script"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@ox_lib/init.lua'"})]})})}),(0,r.jsxs)(s.p,{children:["You can specify modules to import from inside your ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"}),", or load them dynamically."]}),(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ox_libs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'locale'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'math'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'table'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(s.p,{children:"When ox_lib has been imported into your script, it will make several new globals available:"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"lib"})," for dynamically importing ox_lib modules into your script."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"require"})," for importing modules from your own script."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"cache"})," see ",(0,r.jsx)(s.a,{href:"./ox_lib/Modules/Cache/Shared",children:"here"}),"."]}),"\n"]})]}),(0,r.jsxs)(l.OK,{children:[(0,r.jsxs)(l.UW,{children:[(0,r.jsxs)(s.p,{children:["Npm package for the lib does ",(0,r.jsx)(s.strong,{children:"not"})," support all the functions that are available for Lua."]}),(0,r.jsxs)(s.p,{children:["All supported functions are located inside the ",(0,r.jsx)(s.code,{children:"resource"})," folder in the lib."]})]}),(0,r.jsxs)(s.p,{children:["You can get the npm package ",(0,r.jsx)(s.a,{href:"https://npmjs.com/package/@overextended/ox_lib",children:"here"}),"."]}),(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Usage:"}),(0,r.jsx)(s.br,{}),"\n","You can either import the whole library object which contains all the functions for that scope (client/server/shared) or you can deconstruct it and import the functions you find needed at the time."]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { versionCheck } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})})]})]}),"\n",(0,r.jsx)(s.p,{children:"You can now use the library functions inside of your resource, check the rest of the documentation to see how to utilise them."}),"\n",(0,r.jsx)(s.h2,{id:"using-icons-for-interface-functions",children:"Using icons for interface functions"}),"\n",(0,r.jsxs)(s.p,{children:["The icon library used is Font Awesome 6.0, if for the icon you define only a string the default icon type will be ",(0,r.jsx)(s.code,{children:"solid"}),".",(0,r.jsx)(s.br,{}),"\n","If you want to use a different icon type, i.e apple as a brand, you need to define icon as a table (",(0,r.jsx)(s.code,{children:"array"}),") with the first value being the icon type (",(0,r.jsx)(s.code,{children:"fas"}),", ",(0,r.jsx)(s.code,{children:"far"}),", ",(0,r.jsx)(s.code,{children:"fab"}),") as a string, and the second being the icon name."]}),"\n",(0,r.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(l.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"icon "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fab'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'apple'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]})})})}),(0,r.jsx)(l.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"icon"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fab'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'apple'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]})})})})]}),"\n",(0,r.jsx)(s.h2,{id:"building-the-ui",children:"Building the UI"}),"\n",(0,r.jsxs)(s.p,{children:["If you wish to edit any of the UI elements you will need to download the ",(0,r.jsx)(s.em,{children:"source"})," code, edit what you need and then compile it."]}),"\n",(0,r.jsx)(l.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"DO NOT"})," de-bundle and un-minify the release CSS and JS files to edit them."]})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Requirements:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://nodejs.org/",children:"Node.js (LTS)"})}),"\n",(0,r.jsx)(s.li,{children:"pnpm"}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Installing Node.js:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Download the LTS version of Node.js."}),"\n",(0,r.jsx)(s.li,{children:"Go through the install and make sure you install all of the features."}),"\n",(0,r.jsx)(s.li,{children:"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."}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Installing pnpm:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["After installing NodeJS you can install pnpm by running ",(0,r.jsx)(s.code,{children:"npm install -g pnpm"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Building the UI:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"cd into the web directory."}),"\n",(0,r.jsxs)(s.li,{children:["run ",(0,r.jsx)(s.code,{children:"pnpm i"})," to install the dependencies."]}),"\n",(0,r.jsxs)(s.li,{children:["run ",(0,r.jsx)(s.code,{children:"pnpm build"})," to build the source files."]}),"\n"]}),"\n",(0,r.jsxs)(l.UW,{type:"info",children:[(0,r.jsxs)(s.p,{children:["When working in the browser you can run ",(0,r.jsx)(s.code,{children:"pnpm start"}),", which supports hot reloads meaning that\nyou will see your changes after saving your file."]}),(0,r.jsxs)(s.p,{children:["If you want to work in game you can run ",(0,r.jsx)(s.code,{children:"pnpm start:game"})," which writes changes to disk, so\nthe only thing you have to do is restart the resource for it take affect."]})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib.mdx",route:"/overextended/ox_lib",timestamp:1730940204e3,title:"Ox Lib",headings:a},pageNextRoute:"/overextended/ox_lib"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var r=n(2676);n(5271);var i=n(5850),t=(0,i.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),l=(0,i.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),o=(0,i.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),a=(0,i.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,i.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:i,link:t}=e;return(0,r.jsx)("div",{className:"h-fit w-fit",children:(0,r.jsx)("a",{href:t,children:(0,r.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,r.jsx)("div",{children:i}),n,"right"===s&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var i=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:s}),(0,r.jsx)(i.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,i,t,l){if(l!==r){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3753)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-a2567e538a35cc2b.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-2b7ff59269e65404.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-a2567e538a35cc2b.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-2b7ff59269e65404.js index c661f90847..3b1a3ea106 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-a2567e538a35cc2b.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/ACL/Server-2b7ff59269e65404.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1811],{6445:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/ACL/Server",function(){return n(5812)}])},5812:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),a=n(7100);let o=[{depth:2,value:"lib.addAce",id:"libaddace"},{depth:2,value:"lib.removeAce",id:"libremoveace"},{depth:2,value:"lib.addPrincipal",id:"libaddprincipal"},{depth:2,value:"lib.removePrincipal",id:"libremoveprincipal"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Server"}),"\n",(0,l.jsxs)(s.p,{children:["Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.",(0,l.jsx)(s.br,{}),"\n","Refer to ",(0,l.jsx)(s.a,{href:"https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917",children:"Basic Aces & Principals overview/guide"})," for more information."]}),"\n",(0,l.jsx)(s.h2,{id:"libaddace",children:"lib.addAce"}),"\n",(0,l.jsxs)(s.p,{children:["Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(s.code,{children:"false"})," sets the permission to 'deny'."]}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["principal: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["ace: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["allow: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libremoveace",children:"lib.removeAce"}),"\n",(0,l.jsxs)(s.p,{children:["Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(s.code,{children:"false"})," sets the permission to 'deny'."]}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["principal: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["ace: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["allow: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libaddprincipal",children:"lib.addPrincipal"}),"\n",(0,l.jsx)(s.p,{children:"Assigns a principal to a parent principal. Children inherit permissions from the parent."}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["child: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["parent: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libremoveprincipal",children:"lib.removePrincipal"}),"\n",(0,l.jsx)(s.p,{children:"Removes a principal from a parent principal."}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["child: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["parent: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/ACL/Server.mdx",route:"/overextended/ox_lib/Modules/ACL/Server",timestamp:1730928152e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/ACL/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6445)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1811],{6445:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/ACL/Server",function(){return n(5812)}])},5812:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),a=n(7100);let o=[{depth:2,value:"lib.addAce",id:"libaddace"},{depth:2,value:"lib.removeAce",id:"libremoveace"},{depth:2,value:"lib.addPrincipal",id:"libaddprincipal"},{depth:2,value:"lib.removePrincipal",id:"libremoveprincipal"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Server"}),"\n",(0,l.jsxs)(s.p,{children:["Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.",(0,l.jsx)(s.br,{}),"\n","Refer to ",(0,l.jsx)(s.a,{href:"https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917",children:"Basic Aces & Principals overview/guide"})," for more information."]}),"\n",(0,l.jsx)(s.h2,{id:"libaddace",children:"lib.addAce"}),"\n",(0,l.jsxs)(s.p,{children:["Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(s.code,{children:"false"})," sets the permission to 'deny'."]}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["principal: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["ace: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["allow: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libremoveace",children:"lib.removeAce"}),"\n",(0,l.jsxs)(s.p,{children:["Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(s.code,{children:"false"})," sets the permission to 'deny'."]}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removeAce"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["principal: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["ace: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["allow: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libaddprincipal",children:"lib.addPrincipal"}),"\n",(0,l.jsx)(s.p,{children:"Assigns a principal to a parent principal. Children inherit permissions from the parent."}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".addPrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["child: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["parent: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"libremoveprincipal",children:"lib.removePrincipal"}),"\n",(0,l.jsx)(s.p,{children:"Removes a principal from a parent principal."}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".removePrincipal"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["child: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["parent: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n"]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/ACL/Server.mdx",route:"/overextended/ox_lib/Modules/ACL/Server",timestamp:1730940204e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/ACL/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6445)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-9235e58a34544cc9.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-afd543f0f7644dc1.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-9235e58a34544cc9.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-afd543f0f7644dc1.js index 1e82f73a2d..e539953741 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-9235e58a34544cc9.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/AddCommand/Server-afd543f0f7644dc1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[537],{8396:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/AddCommand/Server",function(){return r(820)}])},820:function(s,e,r){"use strict";r.r(e),r.d(e,{__toc:function(){return i}});var l=r(2676),n=r(2140),o=r(8745);let i=[];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Server"}),"\n",(0,l.jsx)(e.p,{children:"Registers commands and simplifies argument validation, permissions, and chat suggestions."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName, properties, cb)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["commandName: ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"string[]"})]}),"\n",(0,l.jsxs)(e.li,{children:["properties: ",(0,l.jsx)(e.code,{children:"table"})," or ",(0,l.jsx)(e.code,{children:"false"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["help?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["restricted?: ",(0,l.jsx)(e.code,{children:"boolean"})," or ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"string[]"})]}),"\n",(0,l.jsxs)(e.li,{children:["params?: ",(0,l.jsx)(e.code,{children:"table[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["help?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["type?: ",(0,l.jsx)(e.code,{children:"'number'"})," or ",(0,l.jsx)(e.code,{children:"'playerId'"})," or ",(0,l.jsx)(e.code,{children:"'string'"})," or ",(0,l.jsx)(e.code,{children:"'longString'"})]}),"\n",(0,l.jsxs)(e.li,{children:["optional?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'giveitem'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Gives an item to a player'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" params "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'target'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'playerId'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Target player\\'s server id'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'item'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Name of the item to give'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Amount of the item to give, or blank to give 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" optional "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'metatype'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Sets the item\\'s \"metadata.type\"'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" optional "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" restricted "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"raw"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args.item)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Inventory."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args.target, item.name, args.count "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", args.metatype)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/AddCommand/Server.mdx",route:"/overextended/ox_lib/Modules/AddCommand/Server",timestamp:1730928152e3,title:"Server",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/AddCommand/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8396)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[537],{8396:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/AddCommand/Server",function(){return r(820)}])},820:function(s,e,r){"use strict";r.r(e),r.d(e,{__toc:function(){return i}});var l=r(2676),n=r(2140),o=r(8745);let i=[];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Server"}),"\n",(0,l.jsx)(e.p,{children:"Registers commands and simplifies argument validation, permissions, and chat suggestions."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName, properties, cb)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["commandName: ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"string[]"})]}),"\n",(0,l.jsxs)(e.li,{children:["properties: ",(0,l.jsx)(e.code,{children:"table"})," or ",(0,l.jsx)(e.code,{children:"false"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["help?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["restricted?: ",(0,l.jsx)(e.code,{children:"boolean"})," or ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"string[]"})]}),"\n",(0,l.jsxs)(e.li,{children:["params?: ",(0,l.jsx)(e.code,{children:"table[]"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["help?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["type?: ",(0,l.jsx)(e.code,{children:"'number'"})," or ",(0,l.jsx)(e.code,{children:"'playerId'"})," or ",(0,l.jsx)(e.code,{children:"'string'"})," or ",(0,l.jsx)(e.code,{children:"'longString'"})]}),"\n",(0,l.jsxs)(e.li,{children:["optional?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'giveitem'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Gives an item to a player'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" params "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'target'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'playerId'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Target player\\'s server id'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'item'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Name of the item to give'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'count'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Amount of the item to give, or blank to give 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" optional "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'metatype'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" help "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Sets the item\\'s \"metadata.type\"'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" optional "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" restricted "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.admin'"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"raw"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Items"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args.item)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Inventory."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"AddItem"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args.target, item.name, args.count "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", args.metatype)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/AddCommand/Server.mdx",route:"/overextended/ox_lib/Modules/AddCommand/Server",timestamp:1730940204e3,title:"Server",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/AddCommand/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8396)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-a13371c30caaeee3.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-cf3f05222c191577.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-a13371c30caaeee3.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-cf3f05222c191577.js index 0280d39e24..7eb810f31e 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-a13371c30caaeee3.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/AddKeybind/Client-cf3f05222c191577.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9556],{6188:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/AddKeybind/Client",function(){return s(3282)}])},3282:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var l=s(2676),i=s(2140),r=s(8745);let o=[{depth:2,value:"CKeybind Class",id:"ckeybind-class"},{depth:2,value:"lib.addKeybind",id:"libaddkeybind"},{depth:3,value:"Enable / Disable Keybinds",id:"enable--disable-keybinds"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsx)(n.p,{children:"Registers keybinds and simplifies interactions of the keybinds."}),"\n",(0,l.jsx)(n.h2,{id:"ckeybind-class",children:"CKeybind Class"}),"\n",(0,l.jsx)(n.p,{children:"A table representing a keybind with the following properties."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["description: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["currentKey: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Key that the current user has this keybind set to"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["disabled: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not the keybind is currently disabled"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["hash: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Internal hash of the keybind that is used to reference it within the game itself"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Default key to set the keybind to for new players"}),"\n",(0,l.jsx)(n.li,{children:"NOTE: Changing this will not change the key for existing players"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["See ",(0,l.jsx)(n.a,{href:"https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/",children:"Input Mapper Ids"})," for more information"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"An optional secondary keybind."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"An optional mapper for the secondary key, otherwise using the default mapper."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["disable: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind, disable: boolean)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Built-in function to enable / disable a keybind"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onPressed?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"User-defined function triggered on keybind press"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onReleased?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"User-defined function triggered on keybind release"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libaddkeybind",children:"lib.addKeybind"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addKeybind"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"table"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["description: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["defaultKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"None"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"keyboard"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryKey?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryMapper?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["disabled?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not the keybind should be disabled by default"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onPressed?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Function triggered on keybind press"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onReleased?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Function triggered on keybind release"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" keybind "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addKeybind"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'respects'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'press F to pay respects'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" defaultKey "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'F'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onPressed"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pressed %s (%s)'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(self.currentKey, self.name))"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onReleased"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'released %s (%s)'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(self.currentKey, self.name))"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(n.h3,{id:"enable--disable-keybinds",children:"Enable / Disable Keybinds"}),"\n",(0,l.jsx)(n.p,{children:"Keybinds can be enabled / disabled by using the disable method."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"keybind:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disable"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"-- disables the keybind"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"keybind:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disable"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"-- enables the keybind"})]})]})})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/AddKeybind/Client.mdx",route:"/overextended/ox_lib/Modules/AddKeybind/Client",timestamp:1730928152e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/AddKeybind/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6188)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9556],{6188:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/AddKeybind/Client",function(){return s(3282)}])},3282:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var l=s(2676),i=s(2140),r=s(8745);let o=[{depth:2,value:"CKeybind Class",id:"ckeybind-class"},{depth:2,value:"lib.addKeybind",id:"libaddkeybind"},{depth:3,value:"Enable / Disable Keybinds",id:"enable--disable-keybinds"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsx)(n.p,{children:"Registers keybinds and simplifies interactions of the keybinds."}),"\n",(0,l.jsx)(n.h2,{id:"ckeybind-class",children:"CKeybind Class"}),"\n",(0,l.jsx)(n.p,{children:"A table representing a keybind with the following properties."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["description: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["currentKey: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Key that the current user has this keybind set to"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["disabled: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not the keybind is currently disabled"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["hash: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Internal hash of the keybind that is used to reference it within the game itself"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Default key to set the keybind to for new players"}),"\n",(0,l.jsx)(n.li,{children:"NOTE: Changing this will not change the key for existing players"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["See ",(0,l.jsx)(n.a,{href:"https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/",children:"Input Mapper Ids"})," for more information"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"An optional secondary keybind."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"An optional mapper for the secondary key, otherwise using the default mapper."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["disable: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind, disable: boolean)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Built-in function to enable / disable a keybind"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onPressed?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"User-defined function triggered on keybind press"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onReleased?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"User-defined function triggered on keybind release"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libaddkeybind",children:"lib.addKeybind"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addKeybind"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["data: ",(0,l.jsx)(n.code,{children:"table"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["name: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["description: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["defaultKey?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"None"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["defaultMapper?: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"keyboard"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryKey?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["secondaryMapper?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["disabled?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not the keybind should be disabled by default"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onPressed?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Function triggered on keybind press"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onReleased?: ",(0,l.jsx)(n.code,{children:"function(self: CKeybind)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Function triggered on keybind release"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" keybind "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addKeybind"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'respects'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'press F to pay respects'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" defaultKey "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'F'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onPressed"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pressed %s (%s)'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(self.currentKey, self.name))"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onReleased"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'released %s (%s)'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(self.currentKey, self.name))"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,l.jsx)(n.h3,{id:"enable--disable-keybinds",children:"Enable / Disable Keybinds"}),"\n",(0,l.jsx)(n.p,{children:"Keybinds can be enabled / disabled by using the disable method."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"keybind:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disable"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"-- disables the keybind"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"keybind:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disable"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"-- enables the keybind"})]})]})})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/AddKeybind/Client.mdx",route:"/overextended/ox_lib/Modules/AddKeybind/Client",timestamp:1730940204e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/AddKeybind/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6188)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-cb724c85177cc5ef.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-741dfaf742b47f73.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-cb724c85177cc5ef.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-741dfaf742b47f73.js index b730a2e041..2193098e5d 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-cb724c85177cc5ef.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Array/Shared-741dfaf742b47f73.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3087],{8127:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Array/Shared",function(){return n(2347)}])},2347:function(e,r,n){"use strict";n.r(r),n.d(r,{__toc:function(){return i}});var l=n(2676),s=n(2140),a=n(8745);let i=[{depth:2,value:"lib.array",id:"libarray"},{depth:3,value:"lib.array:new",id:"libarraynew"},{depth:3,value:"lib.isArray",id:"libisarray"},{depth:3,value:"lib.array.merge",id:"libarraymerge"},{depth:3,value:"lib.array.every",id:"libarrayevery"},{depth:3,value:"lib.array.filter",id:"libarrayfilter"},{depth:3,value:"lib.array.find",id:"libarrayfind"},{depth:3,value:"lib.array.findIndex",id:"libarrayfindindex"},{depth:3,value:"lib.array.indexOf",id:"libarrayindexof"},{depth:3,value:"lib.array.forEach",id:"libarrayforeach"},{depth:3,value:"lib.array.join",id:"libarrayjoin"},{depth:3,value:"lib.array.pop",id:"libarraypop"},{depth:3,value:"lib.array.push",id:"libarraypush"},{depth:3,value:"lib.array.shift",id:"libarrayshift"},{depth:3,value:"lib.array.reduce",id:"libarrayreduce"}];function _createMdxContent(e){let r=Object.assign({h1:"h1",h2:"h2",p:"p",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",br:"br"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.h1,{children:"Shared"}),"\n",(0,l.jsx)(r.h2,{id:"libarray",children:"lib.array"}),"\n",(0,l.jsx)(r.p,{children:"A table used as a prototype for the Array class. Functions can be used as class methods or standard functions."}),"\n",(0,l.jsx)(r.h3,{id:"libarraynew",children:"lib.array:new"}),"\n",(0,l.jsx)(r.p,{children:"Constructs instance of Array containing the given elements."}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array:"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["...: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libisarray",children:"lib.isArray"}),"\n",(0,l.jsx)(r.p,{children:"Determines if the given table is an instance of Array or an array-like table."}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"isArray"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["tbl: ",(0,l.jsx)(r.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["isArray: ",(0,l.jsx)(r.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraymerge",children:"lib.array.merge"}),"\n",(0,l.jsx)(r.p,{children:"Combines the elements of two arrays into a new array."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["a: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["b: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"merge"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(a, b)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Array"}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayevery",children:"lib.array.every"}),"\n",(0,l.jsx)(r.p,{children:"Tests if all elements in an array succeed in passing the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"every"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, testFn)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["success: ",(0,l.jsx)(r.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfilter",children:"lib.array.filter"}),"\n",(0,l.jsx)(r.p,{children:"Creates a new array containing the elements from an array that pass the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"filter"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, testFn)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfind",children:"lib.array.find"}),"\n",(0,l.jsx)(r.p,{children:"Returns the first element of an array the passes the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"find"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfindindex",children:"lib.array.findIndex"}),"\n",(0,l.jsx)(r.p,{children:"Returns the index of the first element of an array the passes the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"findIndex"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayindexof",children:"lib.array.indexOf"}),"\n",(0,l.jsx)(r.p,{children:"Returns the index of the first element of an array the matches the provided value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["value: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"indexOf"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, value, reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayforeach",children:"lib.array.forEach"}),"\n",(0,l.jsx)(r.p,{children:"Executes the provided function for each element in an array."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["cb: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"forEach"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayjoin",children:"lib.array.join"}),"\n",(0,l.jsx)(r.p,{children:"Concatenates all elements of an array into a string, separated by commas or the specified seperator."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["seperator?: ",(0,l.jsx)(r.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, seperator)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["str: ",(0,l.jsx)(r.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraypop",children:"lib.array.pop"}),"\n",(0,l.jsx)(r.p,{children:"Removes the last element from an array and returns the value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"pop"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraypush",children:"lib.array.push"}),"\n",(0,l.jsx)(r.p,{children:"Adds the given elements to the end of an array and returns the new array length."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["...: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"push"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["length: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayshift",children:"lib.array.shift"}),"\n",(0,l.jsx)(r.p,{children:"Removes the first element from an array and returns the value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"shift"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayreduce",children:"lib.array.reduce"}),"\n",(0,l.jsxs)(r.p,{children:['The "reducer" function is applied to every element in an array, with the previous result serving as the accumulator.',(0,l.jsx)(r.br,{}),"\n","If an initial value is provided it's used as the accumulator for the first index; otherwise iteration starts at the second index, with the first index as the accumulator."]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["reducer: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["initialValue?: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"reduce"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"accumulator"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"index"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["accumulator: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]})]})}r.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:r}=Object.assign({},(0,a.a)(),e.components);return r?(0,l.jsx)(r,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Array/Shared.mdx",route:"/overextended/ox_lib/Modules/Array/Shared",timestamp:1730928152e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Array/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8127)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3087],{8127:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Array/Shared",function(){return n(2347)}])},2347:function(e,r,n){"use strict";n.r(r),n.d(r,{__toc:function(){return i}});var l=n(2676),s=n(2140),a=n(8745);let i=[{depth:2,value:"lib.array",id:"libarray"},{depth:3,value:"lib.array:new",id:"libarraynew"},{depth:3,value:"lib.isArray",id:"libisarray"},{depth:3,value:"lib.array.merge",id:"libarraymerge"},{depth:3,value:"lib.array.every",id:"libarrayevery"},{depth:3,value:"lib.array.filter",id:"libarrayfilter"},{depth:3,value:"lib.array.find",id:"libarrayfind"},{depth:3,value:"lib.array.findIndex",id:"libarrayfindindex"},{depth:3,value:"lib.array.indexOf",id:"libarrayindexof"},{depth:3,value:"lib.array.forEach",id:"libarrayforeach"},{depth:3,value:"lib.array.join",id:"libarrayjoin"},{depth:3,value:"lib.array.pop",id:"libarraypop"},{depth:3,value:"lib.array.push",id:"libarraypush"},{depth:3,value:"lib.array.shift",id:"libarrayshift"},{depth:3,value:"lib.array.reduce",id:"libarrayreduce"}];function _createMdxContent(e){let r=Object.assign({h1:"h1",h2:"h2",p:"p",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",br:"br"},(0,a.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.h1,{children:"Shared"}),"\n",(0,l.jsx)(r.h2,{id:"libarray",children:"lib.array"}),"\n",(0,l.jsx)(r.p,{children:"A table used as a prototype for the Array class. Functions can be used as class methods or standard functions."}),"\n",(0,l.jsx)(r.h3,{id:"libarraynew",children:"lib.array:new"}),"\n",(0,l.jsx)(r.p,{children:"Constructs instance of Array containing the given elements."}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array:"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["...: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libisarray",children:"lib.isArray"}),"\n",(0,l.jsx)(r.p,{children:"Determines if the given table is an instance of Array or an array-like table."}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"isArray"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["tbl: ",(0,l.jsx)(r.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["isArray: ",(0,l.jsx)(r.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraymerge",children:"lib.array.merge"}),"\n",(0,l.jsx)(r.p,{children:"Combines the elements of two arrays into a new array."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["a: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["b: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"merge"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(a, b)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Array"}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayevery",children:"lib.array.every"}),"\n",(0,l.jsx)(r.p,{children:"Tests if all elements in an array succeed in passing the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"every"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, testFn)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["success: ",(0,l.jsx)(r.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfilter",children:"lib.array.filter"}),"\n",(0,l.jsx)(r.p,{children:"Creates a new array containing the elements from an array that pass the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"filter"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, testFn)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfind",children:"lib.array.find"}),"\n",(0,l.jsx)(r.p,{children:"Returns the first element of an array the passes the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"find"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayfindindex",children:"lib.array.findIndex"}),"\n",(0,l.jsx)(r.p,{children:"Returns the index of the first element of an array the passes the provided test function."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["testFn: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"findIndex"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayindexof",children:"lib.array.indexOf"}),"\n",(0,l.jsx)(r.p,{children:"Returns the index of the first element of an array the matches the provided value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["value: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n",(0,l.jsxs)(r.li,{children:["reverse?: ",(0,l.jsx)(r.code,{children:"boolean"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Iterate over the array in reverse order."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"indexOf"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, value, reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayforeach",children:"lib.array.forEach"}),"\n",(0,l.jsx)(r.p,{children:"Executes the provided function for each element in an array."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["cb: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"forEach"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:", reverse)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["index: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayjoin",children:"lib.array.join"}),"\n",(0,l.jsx)(r.p,{children:"Concatenates all elements of an array into a string, separated by commas or the specified seperator."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["seperator?: ",(0,l.jsx)(r.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, seperator)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["str: ",(0,l.jsx)(r.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraypop",children:"lib.array.pop"}),"\n",(0,l.jsx)(r.p,{children:"Removes the last element from an array and returns the value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"pop"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarraypush",children:"lib.array.push"}),"\n",(0,l.jsx)(r.p,{children:"Adds the given elements to the end of an array and returns the new array length."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["...: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"push"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["length: ",(0,l.jsx)(r.code,{children:"number"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayshift",children:"lib.array.shift"}),"\n",(0,l.jsx)(r.p,{children:"Removes the first element from an array and returns the value."}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"shift"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr)"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["element: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"libarrayreduce",children:"lib.array.reduce"}),"\n",(0,l.jsxs)(r.p,{children:['The "reducer" function is applied to every element in an array, with the previous result serving as the accumulator.',(0,l.jsx)(r.br,{}),"\n","If an initial value is provided it's used as the accumulator for the first index; otherwise iteration starts at the second index, with the first index as the accumulator."]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["arr: ",(0,l.jsx)(r.code,{children:"Array"})]}),"\n",(0,l.jsxs)(r.li,{children:["reducer: ",(0,l.jsx)(r.code,{children:"function"})]}),"\n",(0,l.jsxs)(r.li,{children:["initialValue?: ",(0,l.jsx)(r.code,{children:"any"})]}),"\n"]}),"\n",(0,l.jsx)(r.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(r.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(r.span,{className:"line",children:[(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"lib.array."}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-function)"},children:"reduce"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"(arr, "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"accumulator"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"element"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-parameter)"},children:"index"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(r.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["accumulator: ",(0,l.jsx)(r.code,{children:"unknown"})]}),"\n"]})]})}r.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:r}=Object.assign({},(0,a.a)(),e.components);return r?(0,l.jsx)(r,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Array/Shared.mdx",route:"/overextended/ox_lib/Modules/Array/Shared",timestamp:1730940204e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Array/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8127)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-f1457e4de3fcf155.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-c855476c8e6daea2.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-f1457e4de3fcf155.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-c855476c8e6daea2.js index a856c7a876..429ff84db6 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-f1457e4de3fcf155.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Client-c855476c8e6daea2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1004],{4506:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cache/Client",function(){return s(5431)}])},5431:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var l=s(2676),i=s(2140),r=s(8745),c=s(7100);let o=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"lib.onCache",id:"liboncache"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsxs)(n.p,{children:["Values and cache functionality available to the client, in addition to the ",(0,l.jsx)(n.a,{href:"../Shared",children:"shared"})," values."]}),"\n",(0,l.jsx)(n.h2,{id:"default-values",children:"Default values"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["ped: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["playerId: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["serverId: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player server id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["weapon: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"current weapon hash"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["seat: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle seat index"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"current player coords"}),"\n",(0,l.jsxs)(n.li,{children:["only populated if using ",(0,l.jsx)(n.code,{children:"zones"})," or ",(0,l.jsx)(n.code,{children:"points"})]}),"\n",(0,l.jsxs)(n.li,{children:["cannot be listened for with ",(0,l.jsx)(n.code,{children:"lib.onCache"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["mount: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"})," (RedM only)","\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"mount entity id"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"liboncache",children:"lib.onCache"}),"\n",(0,l.jsx)(n.p,{children:"Register an event handler that is triggered when the cached value is updated."}),"\n",(0,l.jsxs)(c.mQ,{items:["Lua","JS"],children:[(0,l.jsxs)(c.OK,{children:[(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"value"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"ped"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vehicle"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"seat"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"weapon"})}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicle'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"value"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", cache.vehicle)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", value)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]}),(0,l.jsxs)(c.OK,{children:[(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { onCache } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (value) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {});"})]})]})}),(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"ped"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vehicle"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"seat"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"weapon"})}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { cache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onCache } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicle'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (value) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".vehicle);"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" value);"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})]})]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cache/Client.mdx",route:"/overextended/ox_lib/Modules/Cache/Client",timestamp:1730928152e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Cache/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4506)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1004],{4506:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cache/Client",function(){return s(5431)}])},5431:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var l=s(2676),i=s(2140),r=s(8745),c=s(7100);let o=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"lib.onCache",id:"liboncache"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsxs)(n.p,{children:["Values and cache functionality available to the client, in addition to the ",(0,l.jsx)(n.a,{href:"../Shared",children:"shared"})," values."]}),"\n",(0,l.jsx)(n.h2,{id:"default-values",children:"Default values"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["ped: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["playerId: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["serverId: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"player server id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["weapon: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"current weapon hash"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["seat: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle seat index"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"current player coords"}),"\n",(0,l.jsxs)(n.li,{children:["only populated if using ",(0,l.jsx)(n.code,{children:"zones"})," or ",(0,l.jsx)(n.code,{children:"points"})]}),"\n",(0,l.jsxs)(n.li,{children:["cannot be listened for with ",(0,l.jsx)(n.code,{children:"lib.onCache"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["mount: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"false"})," (RedM only)","\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"mount entity id"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"liboncache",children:"lib.onCache"}),"\n",(0,l.jsx)(n.p,{children:"Register an event handler that is triggered when the cached value is updated."}),"\n",(0,l.jsxs)(c.mQ,{items:["Lua","JS"],children:[(0,l.jsxs)(c.OK,{children:[(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"value"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"ped"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vehicle"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"seat"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"weapon"})}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicle'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"value"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", cache.vehicle)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", value)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]}),(0,l.jsxs)(c.OK,{children:[(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { onCache } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(key"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (value) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {});"})]})]})}),(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["key: ",(0,l.jsx)(n.code,{children:"string"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"ped"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"vehicle"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"seat"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"weapon"})}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["value: ",(0,l.jsx)(n.code,{children:"any"})]}),"\n"]}),(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { cache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onCache } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".onCache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'vehicle'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (value) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".vehicle);"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" value);"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})]})]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cache/Client.mdx",route:"/overextended/ox_lib/Modules/Cache/Client",timestamp:1730940204e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Cache/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4506)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-b4d18d8429b84d4c.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-53ca75f308ac6590.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-b4d18d8429b84d4c.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-53ca75f308ac6590.js index 4cbdcd55c2..e6cd2a806a 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-b4d18d8429b84d4c.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cache/Shared-53ca75f308ac6590.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4533],{9578:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cache/Shared",function(){return n(4669)}])},4669:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var l=n(2676),r=n(2140),i=n(8745);let a=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"Adding new cached values",id:"adding-new-cached-values"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Shared"}),"\n",(0,l.jsx)(s.p,{children:"A table containing cached function results, which may be constants or infrequently changed."}),"\n",(0,l.jsx)(s.h2,{id:"default-values",children:"Default values"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["resource: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["the value returned by ",(0,l.jsx)(s.a,{href:"https://docs.fivem.net/natives/?_0xE5E9EBBB",children:"GetCurrentResourceName"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["game: ",(0,l.jsx)(s.code,{children:"'fxserver' | 'fivem' | 'redm'"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["the value returned by ",(0,l.jsx)(s.a,{href:"https://docs.fivem.net/natives/?_0xE8EAA18B",children:"GetGameName"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"adding-new-cached-values",children:"Adding new cached values"}),"\n",(0,l.jsx)(s.p,{children:"Values can be cached permanently, or added with a timeout."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key, func, timeout)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["key: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a unique name to store and access the cached state."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["func: ",(0,l.jsx)(s.code,{children:"function"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a function to call when the cache is invalidated/empty."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["timeout?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a timer in milliseconds to clear the cached state."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"while"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- output:"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cache/Shared.mdx",route:"/overextended/ox_lib/Modules/Cache/Shared",timestamp:1730928152e3,title:"Shared",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Cache/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9578)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4533],{9578:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cache/Shared",function(){return n(4669)}])},4669:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var l=n(2676),r=n(2140),i=n(8745);let a=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"Adding new cached values",id:"adding-new-cached-values"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Shared"}),"\n",(0,l.jsx)(s.p,{children:"A table containing cached function results, which may be constants or infrequently changed."}),"\n",(0,l.jsx)(s.h2,{id:"default-values",children:"Default values"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["resource: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["the value returned by ",(0,l.jsx)(s.a,{href:"https://docs.fivem.net/natives/?_0xE5E9EBBB",children:"GetCurrentResourceName"}),"."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["game: ",(0,l.jsx)(s.code,{children:"'fxserver' | 'fivem' | 'redm'"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["the value returned by ",(0,l.jsx)(s.a,{href:"https://docs.fivem.net/natives/?_0xE8EAA18B",children:"GetGameName"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"adding-new-cached-values",children:"Adding new cached values"}),"\n",(0,l.jsx)(s.p,{children:"Values can be cached permanently, or added with a timeout."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key, func, timeout)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["key: ",(0,l.jsx)(s.code,{children:"string"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a unique name to store and access the cached state."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["func: ",(0,l.jsx)(s.code,{children:"function"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a function to call when the cache is invalidated/empty."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["timeout?: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"a timer in milliseconds to clear the cached state."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"while"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- output:"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cache/Shared.mdx",route:"/overextended/ox_lib/Modules/Cache/Shared",timestamp:1730940204e3,title:"Shared",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Cache/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9578)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-28041d5fe5645327.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-c0434aad3d6e14fd.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-28041d5fe5645327.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-c0434aad3d6e14fd.js index 3db3dcfd83..71fd8e811c 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-28041d5fe5645327.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Client-c0434aad3d6e14fd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[335],{6109:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/JavaScript/Client",function(){return l(281)}])},281:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return i}});var r=l(2676),n=l(2140),o=l(8745);let i=[{depth:2,value:"Trigger Server Callback",id:"trigger-server-callback"},{depth:3,value:"triggerServerCallback",id:"triggerservercallback"},{depth:2,value:"Register Client Callback",id:"register-client-callback"},{depth:3,value:"onServerCallback",id:"onservercallback"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",p:"p",a:"a"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Client"}),"\n",(0,r.jsx)(s.h2,{id:"trigger-server-callback",children:"Trigger Server Callback"}),"\n",(0,r.jsx)(s.h3,{id:"triggerservercallback",children:"triggerServerCallback"}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delay"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["delay: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"null"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["..args: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"register-client-callback",children:"Register Client Callback"}),"\n",(0,r.jsx)(s.h3,{id:"onservercallback",children:"onServerCallback"}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cb)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"}),"(...args: ",(0,r.jsx)(s.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,r.jsxs)(s.p,{children:["For this example to fully make sense take a look at the example on the ",(0,r.jsx)(s.a,{href:"./Server#usage-example",children:"server"})," page for the callbacks."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" triggerServerCallback } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]})})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(args);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" clientValue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value from the client'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setTimeout"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<{ serverValue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Response from server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/JavaScript/Client.mdx",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Client",timestamp:1730928152e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Callback/JavaScript/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6109)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[335],{6109:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/JavaScript/Client",function(){return l(281)}])},281:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return i}});var r=l(2676),n=l(2140),o=l(8745);let i=[{depth:2,value:"Trigger Server Callback",id:"trigger-server-callback"},{depth:3,value:"triggerServerCallback",id:"triggerservercallback"},{depth:2,value:"Register Client Callback",id:"register-client-callback"},{depth:3,value:"onServerCallback",id:"onservercallback"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",p:"p",a:"a"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Client"}),"\n",(0,r.jsx)(s.h2,{id:"trigger-server-callback",children:"Trigger Server Callback"}),"\n",(0,r.jsx)(s.h3,{id:"triggerservercallback",children:"triggerServerCallback"}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" delay"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["delay: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"null"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["..args: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"register-client-callback",children:"Register Client Callback"}),"\n",(0,r.jsx)(s.h3,{id:"onservercallback",children:"onServerCallback"}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cb)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["eventName: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"}),"(...args: ",(0,r.jsx)(s.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,r.jsxs)(s.p,{children:["For this example to fully make sense take a look at the example on the ",(0,r.jsx)(s.a,{href:"./Server#usage-example",children:"server"})," page for the callbacks."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" triggerServerCallback } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]})})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(args);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" clientValue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value from the client'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setTimeout"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerServerCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<{ serverValue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Response from server'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/JavaScript/Client.mdx",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Client",timestamp:1730940204e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Callback/JavaScript/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6109)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-aaee8e0f03a5f86b.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-77329547a85aebc9.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-aaee8e0f03a5f86b.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-77329547a85aebc9.js index 0e3630970d..3ce0e8a4f5 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-aaee8e0f03a5f86b.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/JavaScript/Server-77329547a85aebc9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6759],{7217:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/JavaScript/Server",function(){return l(1198)}])},1198:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),r=l(2140),o=l(8745);let t=[{depth:2,value:"Trigger Client Callback",id:"trigger-client-callback"},{depth:3,value:"triggerClientCallback",id:"triggerclientcallback"},{depth:2,value:"Register Server Callback",id:"register-server-callback"},{depth:3,value:"onClientCallback",id:"onclientcallback"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",p:"p",a:"a"},(0,o.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Server"}),"\n",(0,n.jsx)(s.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,n.jsx)(s.h3,{id:"triggerclientcallback",children:"triggerClientCallback"}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["eventName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["playerId: ",(0,n.jsx)(s.code,{children:"number"})]}),"\n",(0,n.jsxs)(s.li,{children:["...args: ",(0,n.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,n.jsx)(s.h3,{id:"onclientcallback",children:"onClientCallback"}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cb)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["eventName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["cb: ",(0,n.jsx)(s.code,{children:"function"}),"(playerId: ",(0,n.jsx)(s.code,{children:"number"}),", ...args: ",(0,n.jsx)(s.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(s.p,{children:["For this example to fully make sense take a look at the example on the ",(0,n.jsx)(s.a,{href:"./Client#usage-example",children:"client"})," page for the callbacks."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" triggerClientCallback } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onClientCallback'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" serverValue"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setTimeout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<{ clientValue"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"response) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".clientValue);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Response from client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/JavaScript/Server.mdx",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Server",timestamp:1730928152e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Callback/JavaScript/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7217)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6759],{7217:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/JavaScript/Server",function(){return l(1198)}])},1198:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),r=l(2140),o=l(8745);let t=[{depth:2,value:"Trigger Client Callback",id:"trigger-client-callback"},{depth:3,value:"triggerClientCallback",id:"triggerclientcallback"},{depth:2,value:"Register Server Callback",id:"register-server-callback"},{depth:3,value:"onClientCallback",id:"onclientcallback"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",p:"p",a:"a"},(0,o.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Server"}),"\n",(0,n.jsx)(s.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,n.jsx)(s.h3,{id:"triggerclientcallback",children:"triggerClientCallback"}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["eventName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["playerId: ",(0,n.jsx)(s.code,{children:"number"})]}),"\n",(0,n.jsxs)(s.li,{children:["...args: ",(0,n.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,n.jsx)(s.h3,{id:"onclientcallback",children:"onClientCallback"}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cb)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["eventName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["cb: ",(0,n.jsx)(s.code,{children:"function"}),"(playerId: ",(0,n.jsx)(s.code,{children:"number"}),", ...args: ",(0,n.jsx)(s.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(s.p,{children:["For this example to fully make sense take a look at the example on the ",(0,n.jsx)(s.a,{href:"./Client#usage-example",children:"client"})," page for the callbacks."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" triggerClientCallback } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onClientCallback'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"args);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" serverValue"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setTimeout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<{ clientValue"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"6"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"response) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".clientValue);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Response from client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/JavaScript/Server.mdx",route:"/overextended/ox_lib/Modules/Callback/JavaScript/Server",timestamp:1730940204e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Callback/JavaScript/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7217)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-a143ca2caf89c42d.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-4db1bbc34daa7457.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-a143ca2caf89c42d.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-4db1bbc34daa7457.js index 84ba0a7fbe..f88083e7f0 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-a143ca2caf89c42d.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Client-4db1bbc34daa7457.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7333],{6845:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/Lua/Client",function(){return s(338)}])},338:function(e,l,s){"use strict";s.r(l),s.d(l,{__toc:function(){return a}});var n=s(2676),r=s(2140),i=s(8745);let a=[{depth:2,value:"Trigger Server Callback",id:"trigger-server-callback"},{depth:3,value:"lib.callback",id:"libcallback"},{depth:3,value:"lib.callback.await",id:"libcallbackawait"},{depth:2,value:"Register Client Callback",id:"register-client-callback"},{depth:3,value:"lib.callback.register",id:"libcallbackregister"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h1,{children:"Client"}),"\n",(0,n.jsx)(l.h2,{id:"trigger-server-callback",children:"Trigger Server Callback"}),"\n",(0,n.jsx)(l.h3,{id:"libcallback",children:"lib.callback"}),"\n",(0,n.jsx)(l.p,{children:"The response is handled in a separate coroutine."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, delay, cb, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["delay: ",(0,n.jsx)(l.code,{children:"number"})," or ",(0,n.jsx)(l.code,{children:"false"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["cb: ",(0,n.jsx)(l.code,{children:"function"})]}),"\n",(0,n.jsxs)(l.li,{children:["...: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-parameter)"},children:"count"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(count)"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", {type "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fresh'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})]})}),"\n",(0,n.jsx)(l.h3,{id:"libcallbackawait",children:"lib.callback.await"}),"\n",(0,n.jsx)(l.p,{children:"The current coroutine is yielded until a response is received."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, delay, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["delay: ",(0,n.jsx)(l.code,{children:"number"})," or ",(0,n.jsx)(l.code,{children:"false"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["...: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", {type "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fresh'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(count)"})]})]})}),"\n",(0,n.jsx)(l.h2,{id:"register-client-callback",children:"Register Client Callback"}),"\n",(0,n.jsx)(l.h3,{id:"libcallbackregister",children:"lib.callback.register"}),"\n",(0,n.jsx)(l.p,{children:"Register an event handler for responding to server requests."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, cb)"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["cb: ",(0,n.jsx)(l.code,{children:"function"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-parameter)"},children:"radius"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" nearbyVehicles "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyVehicles"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped), radius, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" nearbyVehicles"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}l.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,i.a)(),e.components);return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Callback/Lua/Client",timestamp:1730928152e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Callback/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6845)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7333],{6845:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/Lua/Client",function(){return s(338)}])},338:function(e,l,s){"use strict";s.r(l),s.d(l,{__toc:function(){return a}});var n=s(2676),r=s(2140),i=s(8745);let a=[{depth:2,value:"Trigger Server Callback",id:"trigger-server-callback"},{depth:3,value:"lib.callback",id:"libcallback"},{depth:3,value:"lib.callback.await",id:"libcallbackawait"},{depth:2,value:"Register Client Callback",id:"register-client-callback"},{depth:3,value:"lib.callback.register",id:"libcallbackregister"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h1,{children:"Client"}),"\n",(0,n.jsx)(l.h2,{id:"trigger-server-callback",children:"Trigger Server Callback"}),"\n",(0,n.jsx)(l.h3,{id:"libcallback",children:"lib.callback"}),"\n",(0,n.jsx)(l.p,{children:"The response is handled in a separate coroutine."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, delay, cb, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["delay: ",(0,n.jsx)(l.code,{children:"number"})," or ",(0,n.jsx)(l.code,{children:"false"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["cb: ",(0,n.jsx)(l.code,{children:"function"})]}),"\n",(0,n.jsxs)(l.li,{children:["...: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-parameter)"},children:"count"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(count)"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", {type "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fresh'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})]})}),"\n",(0,n.jsx)(l.h3,{id:"libcallbackawait",children:"lib.callback.await"}),"\n",(0,n.jsx)(l.p,{children:"The current coroutine is yielded until a response is received."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, delay, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["delay: ",(0,n.jsx)(l.code,{children:"number"})," or ",(0,n.jsx)(l.code,{children:"false"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:"Amount of time until this callback can be triggered again"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["...: ",(0,n.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" count "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'water'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", {type "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fresh'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(count)"})]})]})}),"\n",(0,n.jsx)(l.h2,{id:"register-client-callback",children:"Register Client Callback"}),"\n",(0,n.jsx)(l.h3,{id:"libcallbackregister",children:"lib.callback.register"}),"\n",(0,n.jsx)(l.p,{children:"Register an event handler for responding to server requests."}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(name, cb)"})]})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["name: ",(0,n.jsx)(l.code,{children:"string"})]}),"\n",(0,n.jsxs)(l.li,{children:["cb: ",(0,n.jsx)(l.code,{children:"function"})]}),"\n"]}),"\n",(0,n.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(l.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-parameter)"},children:"radius"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" nearbyVehicles "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyVehicles"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped), radius, "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:" nearbyVehicles"})]}),"\n",(0,n.jsxs)(l.span,{className:"line",children:[(0,n.jsx)(l.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}l.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,i.a)(),e.components);return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Callback/Lua/Client",timestamp:1730940204e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Callback/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6845)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-e866e5ed5fd8553c.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-bc08bd90e27acb35.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-e866e5ed5fd8553c.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-bc08bd90e27acb35.js index 4f63171d6f..e5591d791c 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-e866e5ed5fd8553c.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Callback/Lua/Server-bc08bd90e27acb35.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6694],{5283:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/Lua/Server",function(){return l(7785)}])},7785:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var r=l(2676),n=l(2140),i=l(8745);let a=[{depth:2,value:"Trigger Client Callback",id:"trigger-client-callback"},{depth:3,value:"lib.callback",id:"libcallback"},{depth:3,value:"lib.callback.await",id:"libcallbackawait"},{depth:2,value:"Register Server Callback",id:"register-server-callback"},{depth:3,value:"lib.callback.register",id:"libcallbackregister"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,r.jsx)(s.h3,{id:"libcallback",children:"lib.callback"}),"\n",(0,r.jsx)(s.p,{children:"The response is handled in a separate coroutine."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, playerId, cb, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["playerId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"})]}),"\n",(0,r.jsxs)(s.li,{children:["...: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"vehicles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteEntity"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(entity)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", args.radius)"})]})]})}),"\n",(0,r.jsx)(s.h3,{id:"libcallbackawait",children:"lib.callback.await"}),"\n",(0,r.jsx)(s.p,{children:"The current coroutine is yielded until a response is received."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, playerId, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["playerId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["...: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, args.radius)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteEntity"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(entity)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,r.jsx)(s.h3,{id:"libcallbackregister",children:"lib.callback.register"}),"\n",(0,r.jsx)(s.p,{children:"Register an event handler for responding to client requests."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, cb)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"target"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" target "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Inventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(target) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Inventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Inventory."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory, item, metadata, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/Lua/Server.mdx",route:"/overextended/ox_lib/Modules/Callback/Lua/Server",timestamp:1730928152e3,title:"Server",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Callback/Lua/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5283)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6694],{5283:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Callback/Lua/Server",function(){return l(7785)}])},7785:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var r=l(2676),n=l(2140),i=l(8745);let a=[{depth:2,value:"Trigger Client Callback",id:"trigger-client-callback"},{depth:3,value:"lib.callback",id:"libcallback"},{depth:3,value:"lib.callback.await",id:"libcallbackawait"},{depth:2,value:"Register Server Callback",id:"register-server-callback"},{depth:3,value:"lib.callback.register",id:"libcallbackregister"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,r.jsx)(s.h3,{id:"libcallback",children:"lib.callback"}),"\n",(0,r.jsx)(s.p,{children:"The response is handled in a separate coroutine."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, playerId, cb, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["playerId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"})]}),"\n",(0,r.jsxs)(s.li,{children:["...: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"callback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"vehicles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteEntity"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(entity)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", args.radius)"})]})]})}),"\n",(0,r.jsx)(s.h3,{id:"libcallbackawait",children:"lib.callback.await"}),"\n",(0,r.jsx)(s.p,{children:"The current coroutine is yielded until a response is received."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, playerId, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["playerId: ",(0,r.jsx)(s.code,{children:"number"})]}),"\n",(0,r.jsxs)(s.li,{children:["...: ",(0,r.jsx)(s.code,{children:"any"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox:getNearbyVehicles'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, args.radius)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"vehicles "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"DeleteEntity"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(entity)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,r.jsx)(s.h3,{id:"libcallbackregister",children:"lib.callback.register"}),"\n",(0,r.jsx)(s.p,{children:"Register an event handler for responding to client requests."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(name, cb)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["name: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.callback."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"register"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_inventory:getItemCount'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"source"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"metadata"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"target"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" target "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Inventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(target) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Inventory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (inventory "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Inventory."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GetItem"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(inventory, item, metadata, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Callback/Lua/Server.mdx",route:"/overextended/ox_lib/Modules/Callback/Lua/Server",timestamp:1730940204e3,title:"Server",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Callback/Lua/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5283)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-6816959537589f63.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-fdb6ddab64a03452.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-6816959537589f63.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-fdb6ddab64a03452.js index 069eb0ab81..c7949b0221 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-6816959537589f63.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Class/Shared-fdb6ddab64a03452.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71],{631:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Class/Shared",function(){return n(1823)}])},1823:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745);let o=[{depth:2,value:"Classes",id:"classes"},{depth:3,value:"Inheritance",id:"inheritance"},{depth:3,value:"Encapsulation",id:"encapsulation"},{depth:2,value:"OxClass",id:"oxclass"},{depth:3,value:"Attributes",id:"attributes"},{depth:2,value:"lib.class",id:"libclass"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Returns",id:"returns"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",ul:"ul",li:"li",a:"a",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Shared"}),"\n",(0,l.jsx)(e.h2,{id:"classes",children:"Classes"}),"\n",(0,l.jsx)(e.p,{children:"A class is a template for creating objects with set attributes and behaviours."}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Though Lua does not typically support object-oriented programming, it is possible to simulate it with ",(0,l.jsx)(e.a,{href:"https://www.lua.org/manual/5.4/manual.html#2.4",children:"metatables"}),"."]}),"\n",(0,l.jsxs)(e.li,{children:["Our implementation of classes are loosely based on ",(0,l.jsx)(e.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes",children:"JavaScript"}),"."]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"inheritance",children:"Inheritance"}),"\n",(0,l.jsx)(e.p,{children:"Classes can inherit attributes and behaviors from other classes, similar to how instances inherit from their parent class."}),"\n",(0,l.jsx)(e.p,{children:'When specifying a "super" class in a class declaration, you create a derived or "sub" class. This subclass inherits both fields and methods from its parent. This inheritance extends across multiple levels of derived classes, enabling class attributes to be shared throughout the class hierarchy.'}),"\n",(0,l.jsx)(e.h3,{id:"encapsulation",children:"Encapsulation"}),"\n",(0,l.jsx)(e.p,{children:"Encapsulation is the practice of bundling data (attributes) and methods (behaviors) within a class."}),"\n",(0,l.jsx)(e.p,{children:"This practice helps to organize related functionalities and prevents outside interference with the internal workings of the class. By encapsulating these elements, we promote modularity, maintain data integrity, and control how data is accessed and manipulated within a program."}),"\n",(0,l.jsx)(e.h2,{id:"oxclass",children:"OxClass"}),"\n",(0,l.jsxs)(e.p,{children:["OxClass is a blueprint used for all classes created with ",(0,l.jsx)(e.code,{children:"lib.class"}),". It provides some some basic attributes and behaviours shared by all classes."]}),"\n",(0,l.jsx)(e.h3,{id:"attributes",children:"Attributes"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["__name: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected field representing the name of the class."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["constructor?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected method used to instantiate a new object inheriting from a class."}),"\n",(0,l.jsxs)(e.li,{children:["Called by ",(0,l.jsx)(e.code,{children:"class:new(...)"})," if ",(0,l.jsx)(e.code,{children:"class:constructor()"})," exists."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["private?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected field which holds all private data in a class."}),"\n",(0,l.jsx)(e.li,{children:"Private data cannot be accessed outside of class methods, enforcing security and data integrity."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["super?: ",(0,l.jsx)(e.code,{children:"class"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected method referencing the constructor of a superclass."}),"\n",(0,l.jsx)(e.li,{children:"Must be called inside a class constructor when instantiating a class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libclass",children:"lib.class"}),"\n",(0,l.jsx)(e.p,{children:'This function allows you to define a new class, optionally inheriting from a parent or "super" class.'}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MyClass "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name, super)"})]})})}),"\n",(0,l.jsx)(e.h3,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["super?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sets the new class as a subset of the super class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"returns",children:"Returns"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:[(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The newly created class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"OxClass"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Person "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Person'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Person:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Person constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Professor Class (extends Person)"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Professor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" teaches "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Professor'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", Person)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"teaches"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Professor constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"super"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.teaches "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" teaches"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"My name is %s, and I will be your %s professor."'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(self.name, self.teaches))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"grade"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"paper"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" grade "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.random"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(grade)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Walter'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Chemistry'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"grade"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'my paper'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Student Class (extends Person)"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Student"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" private "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"private "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"{ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:": "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Student'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", Person)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Student constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"super"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" year"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"Hi! I'm %s, and I'm in year %s.\""}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(self.name, self.private.year))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setYear"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" year"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jesse'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Hi! I'm Jesse, and I'm in year 2."})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setYear"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Hi! I'm Jesse, and I'm in year 3."})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(jesse.private.year) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- nil"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getmetatable"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(jesse.private)) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- private"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- error"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Class/Shared.mdx",route:"/overextended/ox_lib/Modules/Class/Shared",timestamp:1730928152e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Class/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=631)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71],{631:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Class/Shared",function(){return n(1823)}])},1823:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),r=n(2140),i=n(8745);let o=[{depth:2,value:"Classes",id:"classes"},{depth:3,value:"Inheritance",id:"inheritance"},{depth:3,value:"Encapsulation",id:"encapsulation"},{depth:2,value:"OxClass",id:"oxclass"},{depth:3,value:"Attributes",id:"attributes"},{depth:2,value:"lib.class",id:"libclass"},{depth:3,value:"Parameters",id:"parameters"},{depth:3,value:"Returns",id:"returns"},{depth:3,value:"Example",id:"example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",ul:"ul",li:"li",a:"a",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Shared"}),"\n",(0,l.jsx)(e.h2,{id:"classes",children:"Classes"}),"\n",(0,l.jsx)(e.p,{children:"A class is a template for creating objects with set attributes and behaviours."}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Though Lua does not typically support object-oriented programming, it is possible to simulate it with ",(0,l.jsx)(e.a,{href:"https://www.lua.org/manual/5.4/manual.html#2.4",children:"metatables"}),"."]}),"\n",(0,l.jsxs)(e.li,{children:["Our implementation of classes are loosely based on ",(0,l.jsx)(e.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes",children:"JavaScript"}),"."]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"inheritance",children:"Inheritance"}),"\n",(0,l.jsx)(e.p,{children:"Classes can inherit attributes and behaviors from other classes, similar to how instances inherit from their parent class."}),"\n",(0,l.jsx)(e.p,{children:'When specifying a "super" class in a class declaration, you create a derived or "sub" class. This subclass inherits both fields and methods from its parent. This inheritance extends across multiple levels of derived classes, enabling class attributes to be shared throughout the class hierarchy.'}),"\n",(0,l.jsx)(e.h3,{id:"encapsulation",children:"Encapsulation"}),"\n",(0,l.jsx)(e.p,{children:"Encapsulation is the practice of bundling data (attributes) and methods (behaviors) within a class."}),"\n",(0,l.jsx)(e.p,{children:"This practice helps to organize related functionalities and prevents outside interference with the internal workings of the class. By encapsulating these elements, we promote modularity, maintain data integrity, and control how data is accessed and manipulated within a program."}),"\n",(0,l.jsx)(e.h2,{id:"oxclass",children:"OxClass"}),"\n",(0,l.jsxs)(e.p,{children:["OxClass is a blueprint used for all classes created with ",(0,l.jsx)(e.code,{children:"lib.class"}),". It provides some some basic attributes and behaviours shared by all classes."]}),"\n",(0,l.jsx)(e.h3,{id:"attributes",children:"Attributes"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["__name: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected field representing the name of the class."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["constructor?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected method used to instantiate a new object inheriting from a class."}),"\n",(0,l.jsxs)(e.li,{children:["Called by ",(0,l.jsx)(e.code,{children:"class:new(...)"})," if ",(0,l.jsx)(e.code,{children:"class:constructor()"})," exists."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["private?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected field which holds all private data in a class."}),"\n",(0,l.jsx)(e.li,{children:"Private data cannot be accessed outside of class methods, enforcing security and data integrity."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["super?: ",(0,l.jsx)(e.code,{children:"class"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"A protected method referencing the constructor of a superclass."}),"\n",(0,l.jsx)(e.li,{children:"Must be called inside a class constructor when instantiating a class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libclass",children:"lib.class"}),"\n",(0,l.jsx)(e.p,{children:'This function allows you to define a new class, optionally inheriting from a parent or "super" class.'}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MyClass "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name, super)"})]})})}),"\n",(0,l.jsx)(e.h3,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["name: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["super?: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sets the new class as a subset of the super class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"returns",children:"Returns"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:[(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The newly created class."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"OxClass"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Person "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Person'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Person:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Person constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Professor Class (extends Person)"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Professor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" teaches "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Professor'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", Person)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"teaches"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Professor constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"super"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.teaches "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" teaches"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"My name is %s, and I will be your %s professor."'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(self.name, self.teaches))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"grade"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"paper"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" grade "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.random"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(grade)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Professor:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Walter'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Chemistry'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" walter:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"grade"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'my paper'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Student Class (extends Person)"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Student"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"Person"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@field"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" private "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"private "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"{ "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:": "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"class"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Student'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", Person)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" name "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"constructor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"name"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calling Student constructor for'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"super"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" year"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"Hi! I'm %s, and I'm in year %s.\""}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(self.name, self.private.year))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"---"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"@param"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:" year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setYear"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"year"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" year"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Student:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jesse'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Hi! I'm Jesse, and I'm in year 2."})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setYear"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"introduceSelf"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Hi! I'm Jesse, and I'm in year 3."})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(jesse.private.year) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- nil"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getmetatable"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(jesse.private)) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- private"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" jesse.private.year "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- error"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Class/Shared.mdx",route:"/overextended/ox_lib/Modules/Class/Shared",timestamp:1730940204e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Class/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=631)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5a7a76059453f4b2.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5b9d263c2a62eb4b.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5a7a76059453f4b2.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5b9d263c2a62eb4b.js index 18f4daba99..4189bb0ea7 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5a7a76059453f4b2.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Cron/Server-5b9d263c2a62eb4b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3669],{2217:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cron/Server",function(){return s(6888)}])},6888:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var d=s(2676),r=s(2140),i=s(8745);let t=[{depth:2,value:"Cron expression",id:"cron-expression"},{depth:3,value:"* Wildcards",id:"-wildcards"},{depth:3,value:", Lists",id:"-lists"},{depth:3,value:"- Ranges",id:"--ranges"},{depth:3,value:"/ Steps",id:"-steps"},{depth:2,value:"Functions",id:"functions"},{depth:3,value:"lib.cron.new",id:"libcronnew"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",code:"code",strong:"strong",h3:"h3",a:"a",pre:"pre",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Server"}),"\n",(0,d.jsx)(n.p,{children:"A Lua implementation of cron, allowing tasks to be scheduled to run periodically at fixed times, dates, and intervals."}),"\n",(0,d.jsx)(n.h2,{id:"cron-expression",children:"Cron expression"}),"\n",(0,d.jsx)(n.p,{children:"A string containing five values separated by white spaces, representing a set of times to execute a task."}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Valid values"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Minutes"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"0-59"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Hours"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"0-23"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Day of month"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"1-31"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Month"}),(0,d.jsxs)(n.td,{children:[(0,d.jsx)(n.code,{children:"1-12"})," or ",(0,d.jsx)(n.code,{children:"jan-dec"})]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Day of week"}),(0,d.jsxs)(n.td,{children:[(0,d.jsx)(n.code,{children:"1-7"})," or ",(0,d.jsx)(n.code,{children:"sun-sat"})]})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Note:"})," Day of the week is set to match ",(0,d.jsx)(n.code,{children:"os.date"})," and starts at 1, unlike the cron-standard which starts at 0."]}),"\n",(0,d.jsxs)(n.h3,{id:"-wildcards",children:[(0,d.jsx)(n.code,{children:"*"})," Wildcards"]}),"\n",(0,d.jsxs)(n.p,{children:["Represents all values, e.g. ",(0,d.jsx)(n.code,{children:"* * * * *"})," will run every minute, or ",(0,d.jsx)(n.code,{children:"* * * * 1"})," will run every minute on Sunday."]}),"\n",(0,d.jsxs)(n.h3,{id:"-lists",children:[(0,d.jsx)(n.code,{children:","})," Lists"]}),"\n",(0,d.jsxs)(n.p,{children:["Commas can be used to create a list of values, e.g. ",(0,d.jsx)(n.code,{children:"* * * * sun,mon,tue"})," will run every minute on Sunday, Monday, and Tuesday."]}),"\n",(0,d.jsxs)(n.h3,{id:"--ranges",children:[(0,d.jsx)(n.code,{children:"-"})," Ranges"]}),"\n",(0,d.jsxs)(n.p,{children:["Dashes define a range of values, e.g. ",(0,d.jsx)(n.code,{children:"10-30 * * * *"})," will start running the task at the 10th minute, and every minute until the 30th minute."]}),"\n",(0,d.jsxs)(n.h3,{id:"-steps",children:[(0,d.jsx)(n.code,{children:"/"})," Steps"]}),"\n",(0,d.jsxs)(n.p,{children:["Slashes can be used for step values, e.g. ",(0,d.jsx)(n.code,{children:"* */4 * * *"})," will run every 4 hours and is shorthand for ",(0,d.jsx)(n.code,{children:"* 0,4,8,12,16,20 * * *"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,d.jsx)(n.h3,{id:"libcronnew",children:"lib.cron.new"}),"\n",(0,d.jsxs)(n.p,{children:["Creates a new ",(0,d.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cron",children:"cronjob"}),", scheduling a task to run at fixed times or intervals."]}),"\n",(0,d.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(n.span,{className:"line",children:[(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.cron."}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(expression, job, options)"})]})})}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["expression: ",(0,d.jsx)(n.code,{children:"string"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["A cron expression such as ",(0,d.jsx)(n.code,{children:"* * * * *"})," representing minute, hour, day, month, and day of the week"]}),"\n"]}),"\n"]}),"\n",(0,d.jsxs)(n.li,{children:["job: ",(0,d.jsx)(n.code,{children:"fun(task: OxTask, date: osdate)"})]}),"\n",(0,d.jsxs)(n.li,{children:["options?: ",(0,d.jsx)(n.code,{children:"table"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["debug?: ",(0,d.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Return:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["task: ",(0,d.jsx)(n.code,{children:"OxTask"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cron/Server.mdx",route:"/overextended/ox_lib/Modules/Cron/Server",timestamp:1730928152e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Cron/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2217)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3669],{2217:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Cron/Server",function(){return s(6888)}])},6888:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var d=s(2676),r=s(2140),i=s(8745);let t=[{depth:2,value:"Cron expression",id:"cron-expression"},{depth:3,value:"* Wildcards",id:"-wildcards"},{depth:3,value:", Lists",id:"-lists"},{depth:3,value:"- Ranges",id:"--ranges"},{depth:3,value:"/ Steps",id:"-steps"},{depth:2,value:"Functions",id:"functions"},{depth:3,value:"lib.cron.new",id:"libcronnew"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",code:"code",strong:"strong",h3:"h3",a:"a",pre:"pre",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Server"}),"\n",(0,d.jsx)(n.p,{children:"A Lua implementation of cron, allowing tasks to be scheduled to run periodically at fixed times, dates, and intervals."}),"\n",(0,d.jsx)(n.h2,{id:"cron-expression",children:"Cron expression"}),"\n",(0,d.jsx)(n.p,{children:"A string containing five values separated by white spaces, representing a set of times to execute a task."}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Valid values"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Minutes"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"0-59"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Hours"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"0-23"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Day of month"}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"1-31"})})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Month"}),(0,d.jsxs)(n.td,{children:[(0,d.jsx)(n.code,{children:"1-12"})," or ",(0,d.jsx)(n.code,{children:"jan-dec"})]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"Day of week"}),(0,d.jsxs)(n.td,{children:[(0,d.jsx)(n.code,{children:"1-7"})," or ",(0,d.jsx)(n.code,{children:"sun-sat"})]})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Note:"})," Day of the week is set to match ",(0,d.jsx)(n.code,{children:"os.date"})," and starts at 1, unlike the cron-standard which starts at 0."]}),"\n",(0,d.jsxs)(n.h3,{id:"-wildcards",children:[(0,d.jsx)(n.code,{children:"*"})," Wildcards"]}),"\n",(0,d.jsxs)(n.p,{children:["Represents all values, e.g. ",(0,d.jsx)(n.code,{children:"* * * * *"})," will run every minute, or ",(0,d.jsx)(n.code,{children:"* * * * 1"})," will run every minute on Sunday."]}),"\n",(0,d.jsxs)(n.h3,{id:"-lists",children:[(0,d.jsx)(n.code,{children:","})," Lists"]}),"\n",(0,d.jsxs)(n.p,{children:["Commas can be used to create a list of values, e.g. ",(0,d.jsx)(n.code,{children:"* * * * sun,mon,tue"})," will run every minute on Sunday, Monday, and Tuesday."]}),"\n",(0,d.jsxs)(n.h3,{id:"--ranges",children:[(0,d.jsx)(n.code,{children:"-"})," Ranges"]}),"\n",(0,d.jsxs)(n.p,{children:["Dashes define a range of values, e.g. ",(0,d.jsx)(n.code,{children:"10-30 * * * *"})," will start running the task at the 10th minute, and every minute until the 30th minute."]}),"\n",(0,d.jsxs)(n.h3,{id:"-steps",children:[(0,d.jsx)(n.code,{children:"/"})," Steps"]}),"\n",(0,d.jsxs)(n.p,{children:["Slashes can be used for step values, e.g. ",(0,d.jsx)(n.code,{children:"* */4 * * *"})," will run every 4 hours and is shorthand for ",(0,d.jsx)(n.code,{children:"* 0,4,8,12,16,20 * * *"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,d.jsx)(n.h3,{id:"libcronnew",children:"lib.cron.new"}),"\n",(0,d.jsxs)(n.p,{children:["Creates a new ",(0,d.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cron",children:"cronjob"}),", scheduling a task to run at fixed times or intervals."]}),"\n",(0,d.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(n.span,{className:"line",children:[(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.cron."}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(expression, job, options)"})]})})}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["expression: ",(0,d.jsx)(n.code,{children:"string"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["A cron expression such as ",(0,d.jsx)(n.code,{children:"* * * * *"})," representing minute, hour, day, month, and day of the week"]}),"\n"]}),"\n"]}),"\n",(0,d.jsxs)(n.li,{children:["job: ",(0,d.jsx)(n.code,{children:"fun(task: OxTask, date: osdate)"})]}),"\n",(0,d.jsxs)(n.li,{children:["options?: ",(0,d.jsx)(n.code,{children:"table"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["debug?: ",(0,d.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Return:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["task: ",(0,d.jsx)(n.code,{children:"OxTask"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Cron/Server.mdx",route:"/overextended/ox_lib/Modules/Cron/Server",timestamp:1730940204e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Cron/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2217)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-4e76cb88847bc8ed.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-a647a4589f2a3350.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-4e76cb88847bc8ed.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-a647a4589f2a3350.js index db3631d8c5..12d30909da 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-4e76cb88847bc8ed.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/DisableControls/Client-a647a4589f2a3350.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1089],{3259:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/DisableControls/Client",function(){return n(8211)}])},8211:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return t}});var s=n(2676),r=n(2140),o=n(8745);let t=[{depth:2,value:"lib.disableControls",id:"libdisablecontrols"},{depth:2,value:"lib.disableControls:Add",id:"libdisablecontrolsadd"},{depth:2,value:"lib.disableControls:Remove",id:"libdisablecontrolsremove"},{depth:2,value:"lib.disableControls:Clear",id:"libdisablecontrolsclear"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",br:"br",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.h1,{children:"Client"}),"\n",(0,s.jsxs)(l.p,{children:["A centralized way to track and disable ",(0,s.jsx)(l.a,{href:"https://docs.fivem.net/docs/game-references/controls/#controls",children:"game controls"}),"."]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrols",children:"lib.disableControls"}),"\n",(0,s.jsx)(l.p,{children:"Call on frame to disable all stored controls."}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"disableControls"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsadd",children:"lib.disableControls:Add"}),"\n",(0,s.jsxs)(l.p,{children:["Adds the specified control(s) to the stored list.",(0,s.jsx)(l.br,{}),"\n","If the control is already being tracked, the stored counter will be incremented."]}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Add"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to add a stored count of"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsremove",children:"lib.disableControls:Remove"}),"\n",(0,s.jsxs)(l.p,{children:["Removes the specified control(s) from the stored list.",(0,s.jsx)(l.br,{}),"\n","If the stored counter for a given control is greater than one, the stored counter will be decremented."]}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Remove"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to remove a stored count of"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsclear",children:"lib.disableControls:Clear"}),"\n",(0,s.jsx)(l.p,{children:"Clears the stored counter(s) for the specified control(s)."}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Clear"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to clear out from being tracked"}),"\n"]}),"\n"]}),"\n"]})]})}l.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,o.a)(),e.components);return l?(0,s.jsx)(l,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/DisableControls/Client.mdx",route:"/overextended/ox_lib/Modules/DisableControls/Client",timestamp:1730928152e3,title:"Client",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/DisableControls/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3259)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1089],{3259:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/DisableControls/Client",function(){return n(8211)}])},8211:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return t}});var s=n(2676),r=n(2140),o=n(8745);let t=[{depth:2,value:"lib.disableControls",id:"libdisablecontrols"},{depth:2,value:"lib.disableControls:Add",id:"libdisablecontrolsadd"},{depth:2,value:"lib.disableControls:Remove",id:"libdisablecontrolsremove"},{depth:2,value:"lib.disableControls:Clear",id:"libdisablecontrolsclear"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",br:"br",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.h1,{children:"Client"}),"\n",(0,s.jsxs)(l.p,{children:["A centralized way to track and disable ",(0,s.jsx)(l.a,{href:"https://docs.fivem.net/docs/game-references/controls/#controls",children:"game controls"}),"."]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrols",children:"lib.disableControls"}),"\n",(0,s.jsx)(l.p,{children:"Call on frame to disable all stored controls."}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"disableControls"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsadd",children:"lib.disableControls:Add"}),"\n",(0,s.jsxs)(l.p,{children:["Adds the specified control(s) to the stored list.",(0,s.jsx)(l.br,{}),"\n","If the control is already being tracked, the stored counter will be incremented."]}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Add"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to add a stored count of"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsremove",children:"lib.disableControls:Remove"}),"\n",(0,s.jsxs)(l.p,{children:["Removes the specified control(s) from the stored list.",(0,s.jsx)(l.br,{}),"\n","If the stored counter for a given control is greater than one, the stored counter will be decremented."]}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Remove"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to remove a stored count of"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(l.h2,{id:"libdisablecontrolsclear",children:"lib.disableControls:Clear"}),"\n",(0,s.jsx)(l.p,{children:"Clears the stored counter(s) for the specified control(s)."}),"\n",(0,s.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(l.span,{className:"line",children:[(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.disableControls:"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"Clear"}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,s.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsxs)(l.li,{children:["vararg: ",(0,s.jsx)(l.code,{children:"number"})," or ",(0,s.jsx)(l.code,{children:"number[]"}),"\n",(0,s.jsxs)(l.ul,{children:["\n",(0,s.jsx)(l.li,{children:"Control(s) to clear out from being tracked"}),"\n"]}),"\n"]}),"\n"]})]})}l.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,o.a)(),e.components);return l?(0,s.jsx)(l,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/DisableControls/Client.mdx",route:"/overextended/ox_lib/Modules/DisableControls/Client",timestamp:1730940204e3,title:"Client",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/DisableControls/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3259)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-038238710ad28532.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-48033b96b0efc7e2.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-038238710ad28532.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-48033b96b0efc7e2.js index 138550dc3a..db363c2c78 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-038238710ad28532.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Javascript/Client-48033b96b0efc7e2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7498],{6854:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Dui/Javascript/Client",function(){return n(6844)}])},6844:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745);let o=[{depth:3,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Client"}),"\n",(0,l.jsx)(e.p,{children:"Simple and centralised dui creation, supporting sending message, change url and deletion"}),"\n",(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["data: ",(0,l.jsx)(e.code,{children:"object"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["url: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["width: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["height: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["debug?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Returns:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["dui: ",(0,l.jsx)(e.code,{children:"Dui"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["url: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["duiObject: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["duiHandle: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["runtimeTxd: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["txdObject: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["dictName: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["txtName: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["setUrl: ",(0,l.jsx)(e.code,{children:"function"}),"(url: ",(0,l.jsx)(e.code,{children:"string"}),")"]}),"\n",(0,l.jsxs)(e.li,{children:["sendMessage: ",(0,l.jsx)(e.code,{children:"function"}),"(data: ",(0,l.jsx)(e.code,{children:"object"}),")"]}),"\n",(0,l.jsxs)(e.li,{children:["remove: ",(0,l.jsx)(e.code,{children:"function"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cache } "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" url"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`nui://"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".resource"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/web/index.html`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" width"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1920"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" height"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1080"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Change url"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setUrl"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://google.com"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Send a message"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".sendMessage"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" action"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"display"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Destroy"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".remove"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Dui/Javascript/Client.mdx",route:"/overextended/ox_lib/Modules/Dui/Javascript/Client",timestamp:1730928152e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Dui/Javascript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6854)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7498],{6854:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Dui/Javascript/Client",function(){return n(6844)}])},6844:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745);let o=[{depth:3,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Client"}),"\n",(0,l.jsx)(e.p,{children:"Simple and centralised dui creation, supporting sending message, change url and deletion"}),"\n",(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["data: ",(0,l.jsx)(e.code,{children:"object"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["url: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["width: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["height: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["debug?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Returns:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["dui: ",(0,l.jsx)(e.code,{children:"Dui"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["url: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["duiObject: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["duiHandle: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["runtimeTxd: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["txdObject: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["dictName: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["txtName: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["setUrl: ",(0,l.jsx)(e.code,{children:"function"}),"(url: ",(0,l.jsx)(e.code,{children:"string"}),")"]}),"\n",(0,l.jsxs)(e.li,{children:["sendMessage: ",(0,l.jsx)(e.code,{children:"function"}),"(data: ",(0,l.jsx)(e.code,{children:"object"}),")"]}),"\n",(0,l.jsxs)(e.li,{children:["remove: ",(0,l.jsx)(e.code,{children:"function"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cache } "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" url"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`nui://"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".resource"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/web/index.html`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" width"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1920"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" height"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1080"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Change url"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setUrl"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://google.com"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Send a message"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".sendMessage"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" action"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"display"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Destroy"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"dui"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".remove"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Dui/Javascript/Client.mdx",route:"/overextended/ox_lib/Modules/Dui/Javascript/Client",timestamp:1730940204e3,title:"Client",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Dui/Javascript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6854)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-979cfddac061c69d.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-378f747c06def096.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-979cfddac061c69d.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-378f747c06def096.js index ef50024f19..528c177803 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-979cfddac061c69d.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Dui/Lua/Client-378f747c06def096.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9520],{453:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Dui/Lua/Client",function(){return n(5433)}])},5433:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var l=n(2676),i=n(2140),r=n(8745);let c=[{depth:2,value:"lib.dui:new",id:"libduinew"},{depth:3,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Client"}),"\n",(0,l.jsx)(s.p,{children:"Simple and centralised dui creation, supporting sending message, change url and deletion"}),"\n",(0,l.jsx)(s.h2,{id:"libduinew",children:"lib.dui:new"}),"\n",(0,l.jsx)(s.p,{children:"Constructs instance of Dui."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["url: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["width: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["height: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["debug?: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Returns:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["dui: ",(0,l.jsx)(s.code,{children:"Dui"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["url: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["duiObject: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["duiHandle: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["runtimeTxd: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["txdObject: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["dictName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["txtName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["setUrl: ",(0,l.jsx)(s.code,{children:"function"}),"(url: ",(0,l.jsx)(s.code,{children:"string"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:["sendMessage: ",(0,l.jsx)(s.code,{children:"function"}),"(data: ",(0,l.jsx)(s.code,{children:"table"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:["remove: ",(0,l.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dui "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib.dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" url "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"nui://%s/web/index.html"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.resource), "})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" width "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1920"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" height "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1080"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Change url"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setUrl"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://google.com"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Send a message"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"sendMessage"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" action "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"display"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Destroy"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Dui/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Dui/Lua/Client",timestamp:1730928152e3,title:"Client",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Dui/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=453)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9520],{453:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Dui/Lua/Client",function(){return n(5433)}])},5433:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var l=n(2676),i=n(2140),r=n(8745);let c=[{depth:2,value:"lib.dui:new",id:"libduinew"},{depth:3,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Client"}),"\n",(0,l.jsx)(s.p,{children:"Simple and centralised dui creation, supporting sending message, change url and deletion"}),"\n",(0,l.jsx)(s.h2,{id:"libduinew",children:"lib.dui:new"}),"\n",(0,l.jsx)(s.p,{children:"Constructs instance of Dui."}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib.dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["data: ",(0,l.jsx)(s.code,{children:"table"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["url: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["width: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["height: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["debug?: ",(0,l.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.p,{children:"Returns:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["dui: ",(0,l.jsx)(s.code,{children:"Dui"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsxs)(s.li,{children:["url: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["duiObject: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["duiHandle: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["runtimeTxd: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["txdObject: ",(0,l.jsx)(s.code,{children:"number"})]}),"\n",(0,l.jsxs)(s.li,{children:["dictName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["txtName: ",(0,l.jsx)(s.code,{children:"string"})]}),"\n",(0,l.jsxs)(s.li,{children:["setUrl: ",(0,l.jsx)(s.code,{children:"function"}),"(url: ",(0,l.jsx)(s.code,{children:"string"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:["sendMessage: ",(0,l.jsx)(s.code,{children:"function"}),"(data: ",(0,l.jsx)(s.code,{children:"table"}),")"]}),"\n",(0,l.jsxs)(s.li,{children:["remove: ",(0,l.jsx)(s.code,{children:"function"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dui "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib.dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" url "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"nui://%s/web/index.html"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.resource), "})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" width "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1920"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" height "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1080"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Change url"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setUrl"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://google.com"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Send a message"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"sendMessage"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" action "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"display"'}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Destroy"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"dui:"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Dui/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Dui/Lua/Client",timestamp:1730940204e3,title:"Client",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Dui/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=453)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-8d36818d83bfa334.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-36f12dbfb997f8ba.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-8d36818d83bfa334.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-36f12dbfb997f8ba.js index 50e13ceced..61185baa88 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-8d36818d83bfa334.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestObject/Shared-36f12dbfb997f8ba.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4692],{997:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestObject/Shared",function(){return t(7817)}])},7817:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return o}});var s=t(2676),l=t(2140),c=t(8745);let o=[{depth:2,value:"lib.getClosestObject",id:"libgetclosestobject"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestobject",children:"lib.getClosestObject"}),"\n",(0,s.jsx)(n.p,{children:"Get the object handle and coords of the closest object to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["object?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["coords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestObject/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestObject/Shared",timestamp:1730928152e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestObject/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=997)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4692],{997:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestObject/Shared",function(){return t(7817)}])},7817:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return o}});var s=t(2676),l=t(2140),c=t(8745);let o=[{depth:2,value:"lib.getClosestObject",id:"libgetclosestobject"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestobject",children:"lib.getClosestObject"}),"\n",(0,s.jsx)(n.p,{children:"Get the object handle and coords of the closest object to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["object?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["coords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestObject/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestObject/Shared",timestamp:1730940204e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestObject/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=997)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-ca61543df34191aa.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-6ea4f5941628fa86.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-ca61543df34191aa.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-6ea4f5941628fa86.js index 829dffa7e9..fd9172dd42 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-ca61543df34191aa.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPed/Shared-6ea4f5941628fa86.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2273],{771:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestPed/Shared",function(){return s(7271)}])},7271:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var t=s(2676),d=s(2140),l=s(8745);let o=[{depth:2,value:"lib.getClosestPed",id:"libgetclosestped"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Shared"}),"\n",(0,t.jsx)(n.h2,{id:"libgetclosestped",children:"lib.getClosestPed"}),"\n",(0,t.jsx)(n.p,{children:"Get the ped handle and coords of the closest ped to a set of coordinates."}),"\n",(0,t.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPed"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["coords: ",(0,t.jsx)(n.code,{children:"vector3"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["maxDistance?: ",(0,t.jsx)(n.code,{children:"number"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,t.jsxs)(n.li,{children:["Default: ",(0,t.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["ped?: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["coords?: ",(0,t.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,d.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestPed/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestPed/Shared",timestamp:1730928152e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestPed/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=771)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2273],{771:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestPed/Shared",function(){return s(7271)}])},7271:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return o}});var t=s(2676),d=s(2140),l=s(8745);let o=[{depth:2,value:"lib.getClosestPed",id:"libgetclosestped"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Shared"}),"\n",(0,t.jsx)(n.h2,{id:"libgetclosestped",children:"lib.getClosestPed"}),"\n",(0,t.jsx)(n.p,{children:"Get the ped handle and coords of the closest ped to a set of coordinates."}),"\n",(0,t.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPed"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["coords: ",(0,t.jsx)(n.code,{children:"vector3"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["maxDistance?: ",(0,t.jsx)(n.code,{children:"number"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,t.jsxs)(n.li,{children:["Default: ",(0,t.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["ped?: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["coords?: ",(0,t.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,d.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestPed/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestPed/Shared",timestamp:1730940204e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestPed/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=771)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-f95c2156a70b2b54.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-43b30475a7fb12bb.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-f95c2156a70b2b54.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-43b30475a7fb12bb.js index dab764151b..604abf8f1d 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-f95c2156a70b2b54.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared-43b30475a7fb12bb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9036],{2344:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestPlayer/Shared",function(){return l(6018)}])},6018:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return d}});var s=l(2676),r=l(2140),t=l(8745);let d=[{depth:2,value:"lib.getClosestPlayer",id:"libgetclosestplayer"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestplayer",children:"lib.getClosestPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Get the player id, ped handle, and coords of the closest player to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["includePlayer?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["playerPed?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["playerCoords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared",timestamp:1730928152e3,title:"Shared",headings:d},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2344)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9036],{2344:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestPlayer/Shared",function(){return l(6018)}])},6018:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return d}});var s=l(2676),r=l(2140),t=l(8745);let d=[{depth:2,value:"lib.getClosestPlayer",id:"libgetclosestplayer"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestplayer",children:"lib.getClosestPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Get the player id, ped handle, and coords of the closest player to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["includePlayer?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["playerId?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["playerPed?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["playerCoords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestPlayer/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared",timestamp:1730940204e3,title:"Shared",headings:d},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestPlayer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2344)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-24e9037633936527.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-f4fa2ab23431832d.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-24e9037633936527.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-f4fa2ab23431832d.js index 3d26bbc95b..622c2b3c00 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-24e9037633936527.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared-f4fa2ab23431832d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6056],{490:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestVehicle/Shared",function(){return l(6664)}])},6664:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return i}});var s=l(2676),t=l(2140),c=l(8745);let i=[{depth:2,value:"lib.getClosestVehicle",id:"libgetclosestvehicle"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestvehicle",children:"lib.getClosestVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Get the vehicle handle and coords of the closest vehicle to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayerVehicle)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["includePlayerVehicle?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Whether or not to include the player's current vehicle. Ignored on the server."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["vehicle?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["vehicleCoords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared",timestamp:1730928152e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=490)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6056],{490:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetClosestVehicle/Shared",function(){return l(6664)}])},6664:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return i}});var s=l(2676),t=l(2140),c=l(8745);let i=[{depth:2,value:"lib.getClosestVehicle",id:"libgetclosestvehicle"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetclosestvehicle",children:"lib.getClosestVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Get the vehicle handle and coords of the closest vehicle to a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayerVehicle)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["includePlayerVehicle?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Whether or not to include the player's current vehicle. Ignored on the server."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["vehicle?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["vehicleCoords?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetClosestVehicle/Shared.mdx",route:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared",timestamp:1730940204e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/GetClosestVehicle/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=490)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-061609a515499811.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-083ef8bff97469bf.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-061609a515499811.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-083ef8bff97469bf.js index bd2e9f0765..f96339690d 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-061609a515499811.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared-083ef8bff97469bf.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5629],{4214:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyObjects/Shared",function(){return t(1550)}])},1550:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),c=t(8745);let l=[{depth:2,value:"lib.getNearbyObjects",id:"libgetnearbyobjects"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetnearbyobjects",children:"lib.getNearbyObjects"}),"\n",(0,s.jsx)(n.p,{children:"Get the object handle and coords of all objects within range of a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyObjects"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["objects: ",(0,s.jsx)(n.code,{children:"{ object: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared",timestamp:1730928152e3,title:"Shared",headings:l},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4214)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5629],{4214:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyObjects/Shared",function(){return t(1550)}])},1550:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),c=t(8745);let l=[{depth:2,value:"lib.getNearbyObjects",id:"libgetnearbyobjects"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,c.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Shared"}),"\n",(0,s.jsx)(n.h2,{id:"libgetnearbyobjects",children:"lib.getNearbyObjects"}),"\n",(0,s.jsx)(n.p,{children:"Get the object handle and coords of all objects within range of a set of coordinates."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyObjects"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["maxDistance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,s.jsxs)(n.li,{children:["Default: ",(0,s.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["objects: ",(0,s.jsx)(n.code,{children:"{ object: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,c.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyObjects/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared",timestamp:1730940204e3,title:"Shared",headings:l},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyObjects/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4214)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-5177fd049350e400.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-90f2034a93c4e434.js similarity index 94% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-5177fd049350e400.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-90f2034a93c4e434.js index 023329739c..75712ac780 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-5177fd049350e400.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared-90f2034a93c4e434.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[551],{1588:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyPeds/Shared",function(){return s(7329)}])},7329:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var d=s(2676),t=s(2140),r=s(8745);let l=[{depth:2,value:"lib.getNearbyPeds",id:"libgetnearbypeds"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Shared"}),"\n",(0,d.jsx)(n.h2,{id:"libgetnearbypeds",children:"lib.getNearbyPeds"}),"\n",(0,d.jsx)(n.p,{children:"Get the ped handle and coords of all peds within range of a set of coordinates."}),"\n",(0,d.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(n.span,{className:"line",children:[(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPeds"}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["coords: ",(0,d.jsx)(n.code,{children:"vector3"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,d.jsxs)(n.li,{children:["maxDistance?: ",(0,d.jsx)(n.code,{children:"number"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,d.jsxs)(n.li,{children:["Default: ",(0,d.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Return:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["peds: ",(0,d.jsx)(n.code,{children:"{ ped: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared",timestamp:1730928152e3,title:"Shared",headings:l},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1588)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[551],{1588:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyPeds/Shared",function(){return s(7329)}])},7329:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var d=s(2676),t=s(2140),r=s(8745);let l=[{depth:2,value:"lib.getNearbyPeds",id:"libgetnearbypeds"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Shared"}),"\n",(0,d.jsx)(n.h2,{id:"libgetnearbypeds",children:"lib.getNearbyPeds"}),"\n",(0,d.jsx)(n.p,{children:"Get the ped handle and coords of all peds within range of a set of coordinates."}),"\n",(0,d.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,d.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,d.jsxs)(n.span,{className:"line",children:[(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPeds"}),(0,d.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance)"})]})})}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["coords: ",(0,d.jsx)(n.code,{children:"vector3"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,d.jsxs)(n.li,{children:["maxDistance?: ",(0,d.jsx)(n.code,{children:"number"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,d.jsxs)(n.li,{children:["Default: ",(0,d.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Return:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["peds: ",(0,d.jsx)(n.code,{children:"{ ped: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyPeds/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared",timestamp:1730940204e3,title:"Shared",headings:l},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyPeds/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1588)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-26ff6d54a370b80e.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-66d2505fbde2db34.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-26ff6d54a370b80e.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-66d2505fbde2db34.js index 11703d5560..b6f37c3f03 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-26ff6d54a370b80e.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared-66d2505fbde2db34.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[645],{9832:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyPlayers/Shared",function(){return r(9891)}])},9891:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return d}});var l=r(2676),s=r(2140),t=r(8745);let d=[{depth:2,value:"lib.getNearbyPlayers",id:"libgetnearbyplayers"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Shared"}),"\n",(0,l.jsx)(n.h2,{id:"libgetnearbyplayers",children:"lib.getNearbyPlayers"}),"\n",(0,l.jsx)(n.p,{children:"Get the player id, ped handle, and coords of all players within range of a set of coordinates."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPlayers"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["maxDistance?: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["includePlayer?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["players: ",(0,l.jsx)(n.code,{children:"{ id: number, ped: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared",timestamp:1730928152e3,title:"Shared",headings:d},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9832)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[645],{9832:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyPlayers/Shared",function(){return r(9891)}])},9891:function(e,n,r){"use strict";r.r(n),r.d(n,{__toc:function(){return d}});var l=r(2676),s=r(2140),t=r(8745);let d=[{depth:2,value:"lib.getNearbyPlayers",id:"libgetnearbyplayers"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Shared"}),"\n",(0,l.jsx)(n.h2,{id:"libgetnearbyplayers",children:"lib.getNearbyPlayers"}),"\n",(0,l.jsx)(n.p,{children:"Get the player id, ped handle, and coords of all players within range of a set of coordinates."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPlayers"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["maxDistance?: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["includePlayer?: ",(0,l.jsx)(n.code,{children:"boolean"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["players: ",(0,l.jsx)(n.code,{children:"{ id: number, ped: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,t.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared",timestamp:1730940204e3,title:"Shared",headings:d},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyPlayers/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9832)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-f432affe9da688c3.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-dc4e8feaf1a91d9d.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-f432affe9da688c3.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-dc4e8feaf1a91d9d.js index a536282a3d..048cc5be46 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-f432affe9da688c3.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared-dc4e8feaf1a91d9d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8110],{5573:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyVehicles/Shared",function(){return l(3886)}])},3886:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return c}});var i=l(2676),r=l(2140),s=l(8745);let c=[{depth:2,value:"lib.getNearbyVehicles",id:"libgetnearbyvehicles"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,s.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Shared"}),"\n",(0,i.jsx)(n.h2,{id:"libgetnearbyvehicles",children:"lib.getNearbyVehicles"}),"\n",(0,i.jsx)(n.p,{children:"Get the vehicle handle and coords of all vehicles within range of a set of coordinates."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyVehicles"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayerVehicle)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["coords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["maxDistance?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["includePlayerVehicle?: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not to include the player's current vehicle. Ignored on the server."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["vehicles: ",(0,i.jsx)(n.code,{children:"{ vehicle: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,s.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared",timestamp:1730928152e3,title:"Shared",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5573)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8110],{5573:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/GetNearbyVehicles/Shared",function(){return l(3886)}])},3886:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return c}});var i=l(2676),r=l(2140),s=l(8745);let c=[{depth:2,value:"lib.getNearbyVehicles",id:"libgetnearbyvehicles"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,s.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Shared"}),"\n",(0,i.jsx)(n.h2,{id:"libgetnearbyvehicles",children:"lib.getNearbyVehicles"}),"\n",(0,i.jsx)(n.p,{children:"Get the vehicle handle and coords of all vehicles within range of a set of coordinates."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyVehicles"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayerVehicle)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["coords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["maxDistance?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["includePlayerVehicle?: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not to include the player's current vehicle. Ignored on the server."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["vehicles: ",(0,i.jsx)(n.code,{children:"{ vehicle: number, coords: vector3 }[]"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,s.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.mdx",route:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared",timestamp:1730940204e3,title:"Shared",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/GetNearbyVehicles/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5573)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface-1ccbecacfcef3448.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface-f74602bc464cfd81.js similarity index 97% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface-1ccbecacfcef3448.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface-f74602bc464cfd81.js index ac942a8f10..62bba96604 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface-1ccbecacfcef3448.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface-f74602bc464cfd81.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[365],{6810:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface",function(){return t(8984)}])},8984:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return a}});var r=t(2676),o=t(2140),s=t(8745);let a=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",a:"a",br:"br",em:"em"},(0,s.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Interface"}),"\n",(0,r.jsx)(n.p,{children:"If you wish to change the primary colour for the UI to better match your server's theme you can do so easily through the available convars."}),"\n",(0,r.jsx)(n.p,{children:"They don't require you to build the UI, just restart the resource."}),"\n",(0,r.jsx)(n.p,{children:"Convars:"}),"\n",(0,r.jsx)(n.pre,{"data-language":"yaml","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"yaml","data-theme":"default",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:primaryColor blue"})}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:primaryShade 8"})})]})}),"\n",(0,r.jsx)(n.p,{children:"Changing the primary colour will change the colour in elements such as the progress bar/circle, skill check, radial menu center button and hover,\ndialog confirm buttons, input field focus, and more."}),"\n",(0,r.jsx)(n.p,{children:"You can find the full list of preset colours and shades here:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"https://v6.mantine.dev/theming/colors/#default-colors",children:"https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,r.jsxs)(n.p,{children:["If you wish to create your own pallete I suggest following the guide on that page.",(0,r.jsx)(n.br,{}),"\n","Keep in mind doing so ",(0,r.jsx)(n.em,{children:"will"})," require you to download the source code and build the UI."]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,s.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface.mdx",route:"/overextended/ox_lib/Modules/Interface",frontMatter:{title:"Interface"},timestamp:1730928152e3,title:"Interface",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6810)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[365],{6810:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface",function(){return t(8984)}])},8984:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return a}});var r=t(2676),o=t(2140),s=t(8745);let a=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",pre:"pre",code:"code",span:"span",a:"a",br:"br",em:"em"},(0,s.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Interface"}),"\n",(0,r.jsx)(n.p,{children:"If you wish to change the primary colour for the UI to better match your server's theme you can do so easily through the available convars."}),"\n",(0,r.jsx)(n.p,{children:"They don't require you to build the UI, just restart the resource."}),"\n",(0,r.jsx)(n.p,{children:"Convars:"}),"\n",(0,r.jsx)(n.pre,{"data-language":"yaml","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"yaml","data-theme":"default",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:primaryColor blue"})}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:primaryShade 8"})})]})}),"\n",(0,r.jsx)(n.p,{children:"Changing the primary colour will change the colour in elements such as the progress bar/circle, skill check, radial menu center button and hover,\ndialog confirm buttons, input field focus, and more."}),"\n",(0,r.jsx)(n.p,{children:"You can find the full list of preset colours and shades here:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"https://v6.mantine.dev/theming/colors/#default-colors",children:"https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,r.jsxs)(n.p,{children:["If you wish to create your own pallete I suggest following the guide on that page.",(0,r.jsx)(n.br,{}),"\n","Keep in mind doing so ",(0,r.jsx)(n.em,{children:"will"})," require you to download the source code and build the UI."]})]})}n.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,s.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface.mdx",route:"/overextended/ox_lib/Modules/Interface",frontMatter:{title:"Interface"},timestamp:1730940204e3,title:"Interface",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6810)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-6d00830cf1dc6010.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-3d5035090cc02d89.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-6d00830cf1dc6010.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-3d5035090cc02d89.js index 7f43744f39..e6e0cdfb83 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-6d00830cf1dc6010.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/alert-3d5035090cc02d89.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4040],{1743:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/alert",function(){return l(4398)}])},4398:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"lib.alertDialog",id:"libalertdialog"},{depth:2,value:"lib.closeAlertDialog",id:"libclosealertdialog"},{depth:2,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",img:"img"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Alert Dialog"}),"\n",(0,n.jsxs)(s.p,{children:["Simple alert dialog that can display a message to the player.",(0,n.jsx)(s.br,{}),"\n","Returns whether the player pressed the confirm button or canceled the dialog."]}),"\n",(0,n.jsx)(s.h2,{id:"libalertdialog",children:"lib.alertDialog"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsxs)(o.mQ,{items:["Client","Server"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:alertDialog'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, data)"})]})})})})]})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(s.p,{children:["This function is ",(0,n.jsx)(s.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(s.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(s.code,{children:"async"}),"."]})}),(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data);"})]})]})})]})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["data: ",(0,n.jsx)(s.code,{children:"table"})," (",(0,n.jsx)(s.code,{children:"object"}),")","\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["header: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Dialog title."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["content: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Dialog body content, supports markdown."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["centered?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Centers the dialog vertically and horizontally."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["cancel?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Displays a cancel button (ESC is still available if this is not defined)."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["size?: ",(0,n.jsx)(s.code,{children:"'xs'"})," or ",(0,n.jsx)(s.code,{children:"'sm'"})," or ",(0,n.jsx)(s.code,{children:"'md'"})," or ",(0,n.jsx)(s.code,{children:"'lg'"})," or ",(0,n.jsx)(s.code,{children:"'xl'"})]}),"\n",(0,n.jsxs)(s.li,{children:["overflow?: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(s.li,{children:["labels?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Allows you to define the displayed labels for cancel and/or confirm buttons."}),"\n",(0,n.jsxs)(s.li,{children:["cancel?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["confirm?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["Returns ",(0,n.jsx)(s.code,{children:"'confirm'"})," if the player pressed the confirm button, otherwise if the player pressed the cancel button\nor has exited the dialog with ESC the return will be ",(0,n.jsx)(s.code,{children:"'cancel'"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"libclosealertdialog",children:"lib.closeAlertDialog"}),"\n",(0,n.jsxs)(s.p,{children:["Force closes the active alert dialog and sets its return data as ",(0,n.jsx)(s.code,{children:"nil"})]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"closeAlertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".closeAlertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" alert "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" header "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Hello there'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" content "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General Kenobi \\n Markdown support!'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" centered "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cancel "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(alert)"})]})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"alert"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" header"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Hello there'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" content"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General Kenobi \\n Markdown support!'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" centered"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cancel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(alert);"})]})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/Xlx86aK.png",alt:"alert_dialog"})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/alert.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"},timestamp:1730928152e3,title:"Alert Dialog",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/alert"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1743)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4040],{1743:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/alert",function(){return l(4398)}])},4398:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"lib.alertDialog",id:"libalertdialog"},{depth:2,value:"lib.closeAlertDialog",id:"libclosealertdialog"},{depth:2,value:"Example",id:"example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",img:"img"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Alert Dialog"}),"\n",(0,n.jsxs)(s.p,{children:["Simple alert dialog that can display a message to the player.",(0,n.jsx)(s.br,{}),"\n","Returns whether the player pressed the confirm button or canceled the dialog."]}),"\n",(0,n.jsx)(s.h2,{id:"libalertdialog",children:"lib.alertDialog"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsxs)(o.mQ,{items:["Client","Server"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:alertDialog'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", source, data)"})]})})})})]})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(s.p,{children:["This function is ",(0,n.jsx)(s.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(s.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(s.code,{children:"async"}),"."]})}),(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(data);"})]})]})})]})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["data: ",(0,n.jsx)(s.code,{children:"table"})," (",(0,n.jsx)(s.code,{children:"object"}),")","\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["header: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Dialog title."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["content: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Dialog body content, supports markdown."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["centered?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Centers the dialog vertically and horizontally."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["cancel?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Displays a cancel button (ESC is still available if this is not defined)."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["size?: ",(0,n.jsx)(s.code,{children:"'xs'"})," or ",(0,n.jsx)(s.code,{children:"'sm'"})," or ",(0,n.jsx)(s.code,{children:"'md'"})," or ",(0,n.jsx)(s.code,{children:"'lg'"})," or ",(0,n.jsx)(s.code,{children:"'xl'"})]}),"\n",(0,n.jsxs)(s.li,{children:["overflow?: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(s.li,{children:["labels?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Allows you to define the displayed labels for cancel and/or confirm buttons."}),"\n",(0,n.jsxs)(s.li,{children:["cancel?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["confirm?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["Returns ",(0,n.jsx)(s.code,{children:"'confirm'"})," if the player pressed the confirm button, otherwise if the player pressed the cancel button\nor has exited the dialog with ESC the return will be ",(0,n.jsx)(s.code,{children:"'cancel'"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"libclosealertdialog",children:"lib.closeAlertDialog"}),"\n",(0,n.jsxs)(s.p,{children:["Force closes the active alert dialog and sets its return data as ",(0,n.jsx)(s.code,{children:"nil"})]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"closeAlertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".closeAlertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" alert "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" header "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Hello there'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" content "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General Kenobi \\n Markdown support!'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" centered "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cancel "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(alert)"})]})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"alert"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".alertDialog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" header"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Hello there'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" content"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'General Kenobi \\n Markdown support!'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" centered"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cancel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(alert);"})]})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/Xlx86aK.png",alt:"alert_dialog"})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/alert.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"},timestamp:1730940204e3,title:"Alert Dialog",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/alert"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1743)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-1cfcee9a74767b29.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-63da6acbecf78304.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-1cfcee9a74767b29.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-63da6acbecf78304.js index 5ccf4a4356..d5f4d55d7e 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-1cfcee9a74767b29.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/clipboard-63da6acbecf78304.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6743],{9565:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/clipboard",function(){return l(3209)}])},3209:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var s=l(2676),t=l(2140),i=l(8745),r=l(7100);let a=[{depth:2,value:"lib.setClipboard",id:"libsetclipboard"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Clipboard"}),"\n",(0,s.jsx)(n.h2,{id:"libsetclipboard",children:"lib.setClipboard"}),"\n",(0,s.jsx)(n.p,{children:"Sets the player's clipboard to the specified string value."}),"\n",(0,s.jsx)(r.UW,{children:(0,s.jsx)(n.p,{children:"Will not work if focus is already taken by some NUI component."})}),"\n",(0,s.jsx)(r.UW,{children:(0,s.jsxs)(n.p,{children:["To create a new line use ",(0,s.jsx)(n.code,{children:"\\t\\n"})," not just ",(0,s.jsx)(n.code,{children:"\\n"})," in your string."]})}),"\n",(0,s.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,s.jsx)(r.OK,{children:(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setClipboard"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value)"})]})})})}),(0,s.jsx)(r.OK,{children:(0,s.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".setClipboard"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value);"})]})]})})})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["value: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/clipboard.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"},timestamp:1730928152e3,title:"Clipboard",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/clipboard"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9565)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6743],{9565:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/clipboard",function(){return l(3209)}])},3209:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var s=l(2676),t=l(2140),i=l(8745),r=l(7100);let a=[{depth:2,value:"lib.setClipboard",id:"libsetclipboard"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Clipboard"}),"\n",(0,s.jsx)(n.h2,{id:"libsetclipboard",children:"lib.setClipboard"}),"\n",(0,s.jsx)(n.p,{children:"Sets the player's clipboard to the specified string value."}),"\n",(0,s.jsx)(r.UW,{children:(0,s.jsx)(n.p,{children:"Will not work if focus is already taken by some NUI component."})}),"\n",(0,s.jsx)(r.UW,{children:(0,s.jsxs)(n.p,{children:["To create a new line use ",(0,s.jsx)(n.code,{children:"\\t\\n"})," not just ",(0,s.jsx)(n.code,{children:"\\n"})," in your string."]})}),"\n",(0,s.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,s.jsx)(r.OK,{children:(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setClipboard"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value)"})]})})})}),(0,s.jsx)(r.OK,{children:(0,s.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".setClipboard"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value);"})]})]})})})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["value: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]})]})}n.default=(0,t.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/clipboard.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"},timestamp:1730940204e3,title:"Clipboard",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/clipboard"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9565)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-1996d00401f7d415.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-b8ecc621885ddf48.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-1996d00401f7d415.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-b8ecc621885ddf48.js index 802929c101..56977f82c3 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-1996d00401f7d415.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/context-b8ecc621885ddf48.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3799],{6939:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/context",function(){return n(3706)}])},3706:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let t=[{depth:2,value:"lib.registerContext",id:"libregistercontext"},{depth:2,value:"lib.showContext",id:"libshowcontext"},{depth:2,value:"lib.hideContext",id:"libhidecontext"},{depth:2,value:"lib.getOpenContextMenu",id:"libgetopencontextmenu"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",br:"br",img:"img"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Context Menu"}),"\n",(0,l.jsx)(e.h2,{id:"libregistercontext",children:"lib.registerContext"}),"\n",(0,l.jsx)(e.p,{children:"Used for registering a context menu."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(context)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(context);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Unique menu identifier, will be used to open the menu."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["title: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Title display in the menu; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["menu?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Menu identifier - if defined there will be a back arrow next to the menu title that will take you to the menu you defined."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["canClose: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If set to false the user won't be able to exit the menu without pressing one of the buttons."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onExit?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that will be ran when the user closes their context menu with ESC."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onBack?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that will be ran when the user presses the back button to return to a previous menu."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["options: ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"object"})," or ",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["item: ",(0,l.jsx)(e.code,{children:"key"})," (",(0,l.jsx)(e.code,{children:"string"}),") or ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"object"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["title?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If not using keys then sets the title for the button; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Grays out the button and makes it unclickable."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["readOnly? ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes all hover and active styles and disables onSelect if it's defined."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["menu?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Menu identifier that the button will take you to, when defined an arrow."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onSelect: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that's ran when the button is clicked."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"FontAwesome icon that will be displayed on the left side, works the same as notification and textui icons."}),"\n",(0,l.jsx)(e.li,{children:"Also supports image urls, png and webp files but are not recommend to use over font awesome icons."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["iconColor?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Colour of the displayed icon."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["iconAnimation?: ",(0,l.jsx)(e.code,{children:"'spin'"})," ",(0,l.jsx)(e.code,{children:"'spinPulse'"})," ",(0,l.jsx)(e.code,{children:"'spinReverse'"})," ",(0,l.jsx)(e.code,{children:"'pulse'"})," ",(0,l.jsx)(e.code,{children:"'beat'"})," ",(0,l.jsx)(e.code,{children:"'fade'"})," ",(0,l.jsx)(e.code,{children:"'beatFade'"})," ",(0,l.jsx)(e.code,{children:"'bounce'"})," ",(0,l.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,l.jsxs)(e.li,{children:["progress?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Adds a progress bar filled to this percentage"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colorScheme?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Sets the color scheme of the progress bar. Current options can be found here:","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.a,{href:"https://v6.mantine.dev/theming/colors/#default-colors",children:"https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,l.jsxs)(e.li,{children:["For example: ",(0,l.jsx)(e.code,{children:"blue"})," or ",(0,l.jsx)(e.code,{children:"teal"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["arrow?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Shows an arrow on the right side like ",(0,l.jsx)(e.code,{children:"menu"})," does, useful when you are opening a menu from an event. Can be set to false to hide it."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Description that will appear under the button title that is defined as a key; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["image?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Url to an image that will be displayed in the button's metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata?: ",(0,l.jsx)(e.code,{children:"string[]"})," or ",(0,l.jsx)(e.code,{children:"object"})," or ",(0,l.jsx)(e.code,{children:"array"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Information that will display on the side upon hovering a button."}),"\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["value: ",(0,l.jsx)(e.code,{children:"any"})]}),"\n",(0,l.jsxs)(e.li,{children:["progress?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Display a progress bar in the metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colorScheme?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Same as above."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["event?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Event that the button is going to trigger."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["serverEvent?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Server event that the button is going to trigger."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["args?: ",(0,l.jsx)(e.code,{children:"any"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Arguments that will be sent to the events or onSelect function."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.p,{children:["You can register as many context menus in one ",(0,l.jsx)(e.code,{children:"lib.registerContext"})," function\nas you'd like."]}),"\n",(0,l.jsxs)(e.p,{children:["The menu can be either in the order you write it in, or sorted alphabetically.",(0,l.jsx)(e.br,{}),"\n","To sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, otherwise not using keys and instead using tables will make the menu be in the order you define it as."]}),"\n",(0,l.jsx)(e.h2,{id:"libshowcontext",children:"lib.showContext"}),"\n",(0,l.jsx)(e.p,{children:"Opens a registered context menu by its id."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libhidecontext",children:"lib.hideContext"}),"\n",(0,l.jsx)(e.p,{children:"Hides any currently visible context menu."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["onExit: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Defines whether the onExit function for the menu should be ran or not."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libgetopencontextmenu",children:"lib.getOpenContextMenu"}),"\n",(0,l.jsx)(e.p,{children:"Returns the id of the currently open context menu."}),"\n",(0,l.jsxs)(e.p,{children:["If no context menu is open returns ",(0,l.jsx)(e.code,{children:"nil"}),"."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getOpenContextMenu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getOpenContextMenu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,l.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.p,{children:"First we register the menu with our specified options then we call the show function in the command."}),"\n",(0,l.jsx)(o.UW,{children:(0,l.jsx)(e.p,{children:"Avoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu)."})}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Empty button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Disabled button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'This button is disabled'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disabled "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'circle'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Pressed the button!"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", value "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some value'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 2'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", value "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Takes you to another menu!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bars'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Open a menu from the event and send event data'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'check'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" arrow "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someValue "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Empty button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Disabled button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'This button is disabled'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disabled"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'circle'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pressed the button!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some value'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 2'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Takes you to another menu!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bars'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Open a menu from the event and send event data'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'check'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" arrow"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["Then we can also register our second menu called ",(0,l.jsx)(e.code,{children:"other_menu"})]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Other context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onBack"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Went back!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nothing here'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Other context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onBack"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Went back!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nothing here'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["And the event that we are going to run from the ",(0,l.jsx)(e.code,{children:"some_menu"})," menu, which is going to open another menu."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event value: '"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"args.someValue,"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onNet"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Event value: "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" });"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["Lastly we register a test command to show the ",(0,l.jsx)(e.code,{children:"some_menu"})," menu."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testcontext'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testcontext'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["The data from the ",(0,l.jsx)(e.code,{children:"args"})," table in the menu is passed as a first argument to the event you register."]}),"\n",(0,l.jsx)(e.p,{children:"Using this event we also register a new context menu with it's own options."}),"\n",(0,l.jsxs)(e.p,{children:["By defining a ",(0,l.jsx)(e.code,{children:"menu"})," param to be the id of the first menu we can get the back arrow button next to the menu title that will take us back."]}),"\n",(0,l.jsxs)(e.p,{children:[(0,l.jsx)(e.img,{src:"https://i.imgur.com/TkaH2P9.png",alt:"menu_example"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/0mMmwgi.png",alt:"metadata"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/RbT1tKX.png",alt:"sub_menu"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/zjIiROj.png",alt:"event_menu"})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/context.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"},timestamp:1730928152e3,title:"Context Menu",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/context"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6939)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3799],{6939:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/context",function(){return n(3706)}])},3706:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let t=[{depth:2,value:"lib.registerContext",id:"libregistercontext"},{depth:2,value:"lib.showContext",id:"libshowcontext"},{depth:2,value:"lib.hideContext",id:"libhidecontext"},{depth:2,value:"lib.getOpenContextMenu",id:"libgetopencontextmenu"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",br:"br",img:"img"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Context Menu"}),"\n",(0,l.jsx)(e.h2,{id:"libregistercontext",children:"lib.registerContext"}),"\n",(0,l.jsx)(e.p,{children:"Used for registering a context menu."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(context)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(context);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Unique menu identifier, will be used to open the menu."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["title: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Title display in the menu; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["menu?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Menu identifier - if defined there will be a back arrow next to the menu title that will take you to the menu you defined."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["canClose: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If set to false the user won't be able to exit the menu without pressing one of the buttons."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onExit?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that will be ran when the user closes their context menu with ESC."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onBack?: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that will be ran when the user presses the back button to return to a previous menu."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["options: ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"object"})," or ",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["item: ",(0,l.jsx)(e.code,{children:"key"})," (",(0,l.jsx)(e.code,{children:"string"}),") or ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"object"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["title?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If not using keys then sets the title for the button; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Grays out the button and makes it unclickable."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["readOnly? ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes all hover and active styles and disables onSelect if it's defined."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["menu?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Menu identifier that the button will take you to, when defined an arrow."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onSelect: ",(0,l.jsx)(e.code,{children:"function"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Function that's ran when the button is clicked."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"FontAwesome icon that will be displayed on the left side, works the same as notification and textui icons."}),"\n",(0,l.jsx)(e.li,{children:"Also supports image urls, png and webp files but are not recommend to use over font awesome icons."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["iconColor?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Colour of the displayed icon."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["iconAnimation?: ",(0,l.jsx)(e.code,{children:"'spin'"})," ",(0,l.jsx)(e.code,{children:"'spinPulse'"})," ",(0,l.jsx)(e.code,{children:"'spinReverse'"})," ",(0,l.jsx)(e.code,{children:"'pulse'"})," ",(0,l.jsx)(e.code,{children:"'beat'"})," ",(0,l.jsx)(e.code,{children:"'fade'"})," ",(0,l.jsx)(e.code,{children:"'beatFade'"})," ",(0,l.jsx)(e.code,{children:"'bounce'"})," ",(0,l.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,l.jsxs)(e.li,{children:["progress?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Adds a progress bar filled to this percentage"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colorScheme?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Sets the color scheme of the progress bar. Current options can be found here:","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.a,{href:"https://v6.mantine.dev/theming/colors/#default-colors",children:"https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,l.jsxs)(e.li,{children:["For example: ",(0,l.jsx)(e.code,{children:"blue"})," or ",(0,l.jsx)(e.code,{children:"teal"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["arrow?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Shows an arrow on the right side like ",(0,l.jsx)(e.code,{children:"menu"})," does, useful when you are opening a menu from an event. Can be set to false to hide it."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Description that will appear under the button title that is defined as a key; has markdown support."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["image?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Url to an image that will be displayed in the button's metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["metadata?: ",(0,l.jsx)(e.code,{children:"string[]"})," or ",(0,l.jsx)(e.code,{children:"object"})," or ",(0,l.jsx)(e.code,{children:"array"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Information that will display on the side upon hovering a button."}),"\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["value: ",(0,l.jsx)(e.code,{children:"any"})]}),"\n",(0,l.jsxs)(e.li,{children:["progress?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Display a progress bar in the metadata."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["colorScheme?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Same as above."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["event?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Event that the button is going to trigger."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["serverEvent?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Server event that the button is going to trigger."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["args?: ",(0,l.jsx)(e.code,{children:"any"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Arguments that will be sent to the events or onSelect function."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.p,{children:["You can register as many context menus in one ",(0,l.jsx)(e.code,{children:"lib.registerContext"})," function\nas you'd like."]}),"\n",(0,l.jsxs)(e.p,{children:["The menu can be either in the order you write it in, or sorted alphabetically.",(0,l.jsx)(e.br,{}),"\n","To sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, otherwise not using keys and instead using tables will make the menu be in the order you define it as."]}),"\n",(0,l.jsx)(e.h2,{id:"libshowcontext",children:"lib.showContext"}),"\n",(0,l.jsx)(e.p,{children:"Opens a registered context menu by its id."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libhidecontext",children:"lib.hideContext"}),"\n",(0,l.jsx)(e.p,{children:"Hides any currently visible context menu."}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["onExit: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Defines whether the onExit function for the menu should be ran or not."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libgetopencontextmenu",children:"lib.getOpenContextMenu"}),"\n",(0,l.jsx)(e.p,{children:"Returns the id of the currently open context menu."}),"\n",(0,l.jsxs)(e.p,{children:["If no context menu is open returns ",(0,l.jsx)(e.code,{children:"nil"}),"."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getOpenContextMenu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getOpenContextMenu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,l.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.p,{children:"First we register the menu with our specified options then we call the show function in the command."}),"\n",(0,l.jsx)(o.UW,{children:(0,l.jsx)(e.p,{children:"Avoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu)."})}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Empty button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Disabled button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'This button is disabled'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disabled "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'circle'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Pressed the button!"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", value "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some value'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 2'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", value "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Takes you to another menu!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bars'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Open a menu from the event and send event data'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'check'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" arrow "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someValue "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Empty button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Disabled button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'This button is disabled'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disabled"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Example button description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'circle'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pressed the button!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" metadata"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some value'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Value 2'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"300"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Takes you to another menu!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bars'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event button'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Open a menu from the event and send event data'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'check'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" event"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" arrow"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["Then we can also register our second menu called ",(0,l.jsx)(e.code,{children:"other_menu"})]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Other context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onBack"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Went back!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nothing here'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'other_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Other context menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onBack"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Went back!'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Nothing here'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["And the event that we are going to run from the ",(0,l.jsx)(e.code,{children:"some_menu"})," menu, which is going to open another menu."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event value: '"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"args.someValue,"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onNet"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test_event'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Event menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Event value: "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".someValue"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" });"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'event_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["Lastly we register a test command to show the ",(0,l.jsx)(e.code,{children:"some_menu"})," menu."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testcontext'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testcontext'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showContext"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,l.jsxs)(e.p,{children:["The data from the ",(0,l.jsx)(e.code,{children:"args"})," table in the menu is passed as a first argument to the event you register."]}),"\n",(0,l.jsx)(e.p,{children:"Using this event we also register a new context menu with it's own options."}),"\n",(0,l.jsxs)(e.p,{children:["By defining a ",(0,l.jsx)(e.code,{children:"menu"})," param to be the id of the first menu we can get the back arrow button next to the menu title that will take us back."]}),"\n",(0,l.jsxs)(e.p,{children:[(0,l.jsx)(e.img,{src:"https://i.imgur.com/TkaH2P9.png",alt:"menu_example"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/0mMmwgi.png",alt:"metadata"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/RbT1tKX.png",alt:"sub_menu"}),"\n",(0,l.jsx)(e.img,{src:"https://i.imgur.com/zjIiROj.png",alt:"event_menu"})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/context.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"},timestamp:1730940204e3,title:"Context Menu",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/context"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6939)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-33ef59b995df5808.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-9b579a037bf27d7d.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-33ef59b995df5808.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-9b579a037bf27d7d.js index 9b3a062679..2c4dd06d52 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-33ef59b995df5808.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/input-9b579a037bf27d7d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9803],{3416:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/input",function(){return n(1222)}])},1222:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),i=n(2140),r=n(8745),o=n(7100);let c=[{depth:2,value:"lib.inputDialog",id:"libinputdialog"},{depth:3,value:"Field Type Properties",id:"field-type-properties"},{depth:2,value:"lib.closeInputDialog",id:"libcloseinputdialog"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Basic",id:"basic"},{depth:3,value:"Advanced",id:"advanced"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",strong:"strong",img:"img"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Input Dialog"}),"\n",(0,l.jsx)(e.p,{children:"The input dialog window allows you to take data from the user by setting input fields."}),"\n",(0,l.jsx)(e.h2,{id:"libinputdialog",children:"lib.inputDialog"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(heading, rows, options)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(heading"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rows"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["heading: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["rows: ",(0,l.jsx)(e.code,{children:"string[]"})," or ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["type: ",(0,l.jsx)(e.code,{children:"'input'"})," or ",(0,l.jsx)(e.code,{children:"'number'"})," or ",(0,l.jsx)(e.code,{children:"'checkbox'"})," or ",(0,l.jsx)(e.code,{children:"'select'"})," or ",(0,l.jsx)(e.code,{children:"'slider'"})," or ",(0,l.jsx)(e.code,{children:"'color'"})," or ",(0,l.jsx)(e.code,{children:"'multi-select'"})," or ",(0,l.jsx)(e.code,{children:"'date'"})," or ",(0,l.jsx)(e.code,{children:"'date-range'"})," or ",(0,l.jsx)(e.code,{children:"'time'"})," or ",(0,l.jsx)(e.code,{children:"'textarea'"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["options?: ",(0,l.jsx)(e.code,{children:"table"}),"(",(0,l.jsx)(e.code,{children:"object"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["allowCancel: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If false the user will not be able to cancel and close the input dialog until submitted."}),"\n",(0,l.jsx)(e.li,{children:"If not defined, the user is able to cancel and close the input dialog."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"field-type-properties",children:"Field Type Properties"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"input"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["password?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["precision?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["step?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"checkbox"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["checked?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["required?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"select and multi-select"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["options: ",(0,l.jsx)(e.code,{children:"table"}),"(",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["value: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["label?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})," | ",(0,l.jsx)(e.code,{children:"table"})," (only for ",(0,l.jsx)(e.code,{children:"multi-select"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"value of the default option."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["searchable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["maxSelectedValues?: ",(0,l.jsx)(e.code,{children:"number"})," (only for ",(0,l.jsx)(e.code,{children:"multi-select"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Maxmimum number of options that can be selected."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"slider"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["step?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"color"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"'hex'"})," | ",(0,l.jsx)(e.code,{children:"'hexa'"})," | ",(0,l.jsx)(e.code,{children:"'rgb'"})," | ",(0,l.jsx)(e.code,{children:"'rgba'"})," | ",(0,l.jsx)(e.code,{children:"'hsl'"})," | ",(0,l.jsx)(e.code,{children:"'hsla'"}),";"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"date"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"true"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"True defaults to current date"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Date format to display in the field"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["returnString?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Returns the date as a string, default format is ",(0,l.jsx)(e.code,{children:"DD/MM/YYYY"}),", but if ",(0,l.jsx)(e.code,{children:"format"})," is defined it will use that."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'"01/01/2000"'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'"12/12/2023"'}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"date-range"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"[string, string]"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Date format to display in the field"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["returnString?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Returns the date as a string, default format is ",(0,l.jsx)(e.code,{children:"DD/MM/YYYY"}),", but if ",(0,l.jsx)(e.code,{children:"format"})," is defined it will use that."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"time"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"'12'"})," or ",(0,l.jsx)(e.code,{children:"'24'"})]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"textarea"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Minimum amount of rows the text area will take."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Maxmimum amount of rows the text area will take, when exceeded goes into overflow."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["autosize?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If true text area will grow with content until max rows are reached."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"The callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup."}),"\n",(0,l.jsxs)(e.p,{children:["The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index ",(0,l.jsx)(e.code,{children:"1"})," (",(0,l.jsx)(e.code,{children:"0"}),"), if we want data from the third field, that would be index ",(0,l.jsx)(e.code,{children:"3"})," (",(0,l.jsx)(e.code,{children:"2"}),"), etc..."]}),"\n",(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["Field types such as ",(0,l.jsx)(e.code,{children:"date"}),", ",(0,l.jsx)(e.code,{children:"date-range"})," and ",(0,l.jsx)(e.code,{children:"time"})," return a unix timestamp on the set value."]})}),"\n",(0,l.jsx)(e.h2,{id:"libcloseinputdialog",children:"lib.closeInputDialog"}),"\n",(0,l.jsxs)(e.p,{children:["Force closes the active input dialog and sets its return data as ",(0,l.jsx)(e.code,{children:"nil"}),"."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"closeInputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".closeInputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,l.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.h3,{id:"basic",children:"Basic"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Basic dialog'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'First row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Second row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input), input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"], input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]})]})})}),(0,l.jsxs)(o.OK,{children:[(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["This function is ",(0,l.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,l.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,l.jsx)(e.code,{children:"async"}),"."]})}),(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Basic dialog'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'First row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Second row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"input) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]})]})})]})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.img,{src:"https://i.imgur.com/KnZ0sEW.png",alt:"Example image"})}),"\n",(0,l.jsx)(e.h3,{id:"advanced",children:"Advanced"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Dialog title'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Text input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some input description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", required "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", min "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", max "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Number input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some number description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hashtag'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'color'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Colour input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", default "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#eb4034'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'date'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Date input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'far'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calendar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, default "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", format "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"DD/MM/YYYY"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Getting rgb values from colour picker"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rgb "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.math."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"torgba"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Transforming date timestamp to a readable format with Lua's os library (server-only)"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" timestamp "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" date "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"os.date"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'%Y-%m-%d %H:%M:%S'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", timestamp)"})]})]})})}),(0,l.jsxs)(o.OK,{children:[(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["This function is ",(0,l.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,l.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,l.jsx)(e.code,{children:"async"}),"."]})}),(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police locker'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Text input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some input description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" required"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" min"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" max"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Number input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some number description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hashtag'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'color'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Colour input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" default"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#eb4034'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'date'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Date input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'far'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calendar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" default"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DD/MM/YYYY'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Getting r, g and b values from colour picker"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"regExp"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" /rgb\\((\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"),\\s"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"(\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"),\\s"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"(\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:")\\)/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"colourInput"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"color"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"regExp"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".exec"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(colourInput);"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]})]})})]})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.img,{src:"https://i.imgur.com/v44YEkC.png",alt:"Example image"})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/input.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"},timestamp:1730928152e3,title:"Input Dialog",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/input"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3416)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9803],{3416:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/input",function(){return n(1222)}])},1222:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),i=n(2140),r=n(8745),o=n(7100);let c=[{depth:2,value:"lib.inputDialog",id:"libinputdialog"},{depth:3,value:"Field Type Properties",id:"field-type-properties"},{depth:2,value:"lib.closeInputDialog",id:"libcloseinputdialog"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Basic",id:"basic"},{depth:3,value:"Advanced",id:"advanced"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",strong:"strong",img:"img"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Input Dialog"}),"\n",(0,l.jsx)(e.p,{children:"The input dialog window allows you to take data from the user by setting input fields."}),"\n",(0,l.jsx)(e.h2,{id:"libinputdialog",children:"lib.inputDialog"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(heading, rows, options)"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(heading"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rows"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options);"})]})]})})})]}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["heading: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["rows: ",(0,l.jsx)(e.code,{children:"string[]"})," or ",(0,l.jsx)(e.code,{children:"table"})," (",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["type: ",(0,l.jsx)(e.code,{children:"'input'"})," or ",(0,l.jsx)(e.code,{children:"'number'"})," or ",(0,l.jsx)(e.code,{children:"'checkbox'"})," or ",(0,l.jsx)(e.code,{children:"'select'"})," or ",(0,l.jsx)(e.code,{children:"'slider'"})," or ",(0,l.jsx)(e.code,{children:"'color'"})," or ",(0,l.jsx)(e.code,{children:"'multi-select'"})," or ",(0,l.jsx)(e.code,{children:"'date'"})," or ",(0,l.jsx)(e.code,{children:"'date-range'"})," or ",(0,l.jsx)(e.code,{children:"'time'"})," or ",(0,l.jsx)(e.code,{children:"'textarea'"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["options?: ",(0,l.jsx)(e.code,{children:"table"}),"(",(0,l.jsx)(e.code,{children:"object"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["allowCancel: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If false the user will not be able to cancel and close the input dialog until submitted."}),"\n",(0,l.jsx)(e.li,{children:"If not defined, the user is able to cancel and close the input dialog."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"field-type-properties",children:"Field Type Properties"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"input"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["password?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["precision?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["step?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"checkbox"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["checked?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["required?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"select and multi-select"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["options: ",(0,l.jsx)(e.code,{children:"table"}),"(",(0,l.jsx)(e.code,{children:"array"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["value: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["label?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})," | ",(0,l.jsx)(e.code,{children:"table"})," (only for ",(0,l.jsx)(e.code,{children:"multi-select"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"value of the default option."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["searchable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["maxSelectedValues?: ",(0,l.jsx)(e.code,{children:"number"})," (only for ",(0,l.jsx)(e.code,{children:"multi-select"}),")","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Maxmimum number of options that can be selected."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"slider"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["step?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"color"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"'hex'"})," | ",(0,l.jsx)(e.code,{children:"'hexa'"})," | ",(0,l.jsx)(e.code,{children:"'rgb'"})," | ",(0,l.jsx)(e.code,{children:"'rgba'"})," | ",(0,l.jsx)(e.code,{children:"'hsl'"})," | ",(0,l.jsx)(e.code,{children:"'hsla'"}),";"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"date"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})," or ",(0,l.jsx)(e.code,{children:"true"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"True defaults to current date"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Date format to display in the field"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["returnString?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Returns the date as a string, default format is ",(0,l.jsx)(e.code,{children:"DD/MM/YYYY"}),", but if ",(0,l.jsx)(e.code,{children:"format"})," is defined it will use that."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'"01/01/2000"'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'"12/12/2023"'}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"date-range"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"[string, string]"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"string"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Date format to display in the field"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["returnString?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Returns the date as a string, default format is ",(0,l.jsx)(e.code,{children:"DD/MM/YYYY"}),", but if ",(0,l.jsx)(e.code,{children:"format"})," is defined it will use that."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"time"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["format?: ",(0,l.jsx)(e.code,{children:"'12'"})," or ",(0,l.jsx)(e.code,{children:"'24'"})]}),"\n",(0,l.jsxs)(e.li,{children:["clearable?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["\n",(0,l.jsx)(e.p,{children:"textarea"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["label: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["description?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["placeholder?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["icon?: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["required? ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["disabled?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["default?: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["min?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Minimum amount of rows the text area will take."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["max?: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Maxmimum amount of rows the text area will take, when exceeded goes into overflow."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["autosize?: ",(0,l.jsx)(e.code,{children:"boolean"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"If true text area will grow with content until max rows are reached."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"The callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup."}),"\n",(0,l.jsxs)(e.p,{children:["The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index ",(0,l.jsx)(e.code,{children:"1"})," (",(0,l.jsx)(e.code,{children:"0"}),"), if we want data from the third field, that would be index ",(0,l.jsx)(e.code,{children:"3"})," (",(0,l.jsx)(e.code,{children:"2"}),"), etc..."]}),"\n",(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["Field types such as ",(0,l.jsx)(e.code,{children:"date"}),", ",(0,l.jsx)(e.code,{children:"date-range"})," and ",(0,l.jsx)(e.code,{children:"time"})," return a unix timestamp on the set value."]})}),"\n",(0,l.jsx)(e.h2,{id:"libcloseinputdialog",children:"lib.closeInputDialog"}),"\n",(0,l.jsxs)(e.p,{children:["Force closes the active input dialog and sets its return data as ",(0,l.jsx)(e.code,{children:"nil"}),"."]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"closeInputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".closeInputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,l.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.h3,{id:"basic",children:"Basic"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Basic dialog'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'First row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Second row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input), input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"], input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]})]})})}),(0,l.jsxs)(o.OK,{children:[(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["This function is ",(0,l.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,l.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,l.jsx)(e.code,{children:"async"}),"."]})}),(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Basic dialog'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'First row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Second row'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"input) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]})]})})]})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.img,{src:"https://i.imgur.com/KnZ0sEW.png",alt:"Example image"})}),"\n",(0,l.jsx)(e.h3,{id:"advanced",children:"Advanced"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Dialog title'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Text input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some input description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", required "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", min "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", max "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Number input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some number description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hashtag'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'color'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Colour input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", default "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#eb4034'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {type "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'date'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", label "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Date input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'far'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calendar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, default "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", format "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"DD/MM/YYYY"'}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Getting rgb values from colour picker"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rgb "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.math."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"torgba"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Transforming date timestamp to a readable format with Lua's os library (server-only)"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" timestamp "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.floor"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" date "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"os.date"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'%Y-%m-%d %H:%M:%S'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", timestamp)"})]})]})})}),(0,l.jsxs)(o.OK,{children:[(0,l.jsx)(o.UW,{children:(0,l.jsxs)(e.p,{children:["This function is ",(0,l.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,l.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,l.jsx)(e.code,{children:"async"}),"."]})}),(0,l.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".inputDialog"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police locker'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Text input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some input description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" required"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" min"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" max"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"16"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'number'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Number input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Some number description'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hashtag'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple checkbox'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'color'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Colour input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" default"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#eb4034'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'date'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Date input'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'far'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'calendar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" default"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" format"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DD/MM/YYYY'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(input"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Getting r, g and b values from colour picker"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"regExp"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" /rgb\\((\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"),\\s"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"(\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"),\\s"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"(\\d"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:")\\)/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"colourInput"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" input["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"color"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"regExp"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".exec"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(colourInput);"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"color["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]);"})]})]})})]})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.img,{src:"https://i.imgur.com/v44YEkC.png",alt:"Example image"})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/input.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"},timestamp:1730940204e3,title:"Input Dialog",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/input"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3416)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-fd1f8804354720bb.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-1cd15858c4d03ece.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-fd1f8804354720bb.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-1cd15858c4d03ece.js index 59fecc7336..a092866b75 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-fd1f8804354720bb.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/menu-1cd15858c4d03ece.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6593],{5372:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/menu",function(){return l(8562)}])},8562:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return t}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"lib.registerMenu",id:"libregistermenu"},{depth:2,value:"lib.showMenu",id:"libshowmenu"},{depth:2,value:"lib.hideMenu",id:"libhidemenu"},{depth:2,value:"lib.getOpenMenu",id:"libgetopenmenu"},{depth:2,value:"lib.setMenuOptions",id:"libsetmenuoptions"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",img:"img"},(0,i.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Menu"}),"\n",(0,n.jsx)(e.p,{children:"Keyboard navigation menu with specific event functions."}),"\n",(0,n.jsx)(e.h2,{id:"libregistermenu",children:"lib.registerMenu"}),"\n",(0,n.jsx)(e.p,{children:"Registers and caches a menu under the specified id."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data, cb)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cb);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["title: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["options: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["progress?: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["colorScheme?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["icon?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"FontAwesome icon that will be displayed on the left side, works the same as notification and textui icons."}),"\n",(0,n.jsx)(e.li,{children:"Also supports image urls, png and webp files but are not recommend to use over font awesome icons."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["iconColor?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["iconAnimation?: ",(0,n.jsx)(e.code,{children:"'spin'"})," ",(0,n.jsx)(e.code,{children:"'spinPulse'"})," ",(0,n.jsx)(e.code,{children:"'spinReverse'"})," ",(0,n.jsx)(e.code,{children:"'pulse'"})," ",(0,n.jsx)(e.code,{children:"'beat'"})," ",(0,n.jsx)(e.code,{children:"'fade'"})," ",(0,n.jsx)(e.code,{children:"'beatFade'"})," ",(0,n.jsx)(e.code,{children:"'bounce'"})," ",(0,n.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,n.jsxs)(e.li,{children:["values?: ",(0,n.jsx)(e.code,{children:"string[]"})," or ",(0,n.jsx)(e.code,{children:"{ label: string, description: string }[]"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If provided creates a side scrollable list."}),"\n",(0,n.jsx)(e.li,{children:"When using object and setting description, the set description will be displayed in the menu tooltip."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["checked?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Setting either true or false will make the button a checkbox, if ",(0,n.jsx)(e.code,{children:"values"})," is also provided the button will be a\nscrollable list."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["description?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Displays tooltip below menu on hovered item with provided description."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["defaultIndex?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Sets the current index for the list to specified number."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["args?: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Allows you to pass any arguments through the button."}),"\n",(0,n.jsxs)(e.li,{children:["If the button has ",(0,n.jsx)(e.code,{children:"values"})," then ",(0,n.jsx)(e.code,{children:"isScroll"})," is automatically passed."]}),"\n",(0,n.jsxs)(e.li,{children:["If the button has ",(0,n.jsx)(e.code,{children:"checked"})," to either true or false then ",(0,n.jsx)(e.code,{children:"isCheck"})," is automatically passed."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["close?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If set to false, it won't close the menu upon interacting with this option."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["position?: ",(0,n.jsx)(e.code,{children:"'top-left'"})," or ",(0,n.jsx)(e.code,{children:"'top-right'"})," or ",(0,n.jsx)(e.code,{children:"'bottom-left'"})," or ",(0,n.jsx)(e.code,{children:"'bottom-right'"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"'top-left'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disableInput?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["canClose: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If set to false the user won't be able to exit the menu without pressing one of the buttons."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onClose: ",(0,n.jsx)(e.code,{children:"function"}),"(keyPressed?: ",(0,n.jsx)(e.code,{children:"'Escape' | 'Backspace'"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that runs when the menu is exited via ESC/Backspace."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelected: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", secondary: ",(0,n.jsx)(e.code,{children:"number"})," | ",(0,n.jsx)(e.code,{children:"boolean"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function being ran when the selected button in the menu changes."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSideScroll: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", scrollIndex: ",(0,n.jsx)(e.code,{children:"number"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function ran whenever a scroll list item is changed."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onCheck: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", checked: ",(0,n.jsx)(e.code,{children:"boolean"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function ran whenever a checkbox is toggled."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["cb: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", scrollIndex: ",(0,n.jsx)(e.code,{children:"number"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Callback function when the menu item is pressed."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libshowmenu",children:"lib.showMenu"}),"\n",(0,n.jsx)(e.p,{children:"Displays the menu with the provided id."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libhidemenu",children:"lib.hideMenu"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["If true runs the menu's ",(0,n.jsx)(e.code,{children:"onClose"})," function."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libgetopenmenu",children:"lib.getOpenMenu"}),"\n",(0,n.jsx)(e.p,{children:"Returns the id of the currently open menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getOpenMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getOpenMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libsetmenuoptions",children:"lib.setMenuOptions"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id, options, index)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" index);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["options: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")"]}),"\n",(0,n.jsxs)(e.li,{children:["index?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If specified only sets the options table on the specified options index."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)("u",{children:(0,n.jsx)(e.strong,{children:"Example:"})}),(0,n.jsx)("br",{}),"\nReplaces the 3rd index option of the specified menu"]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'New option'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'plus'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'New option'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'plus'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(e.p,{children:"First we register the menu with our specified options then we call the show function in the command."}),"\n",(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"Avoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu)."})}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu title'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSideScroll"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Scroll: "'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selected, scrollIndex, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Normal button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args.isCheck "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Check button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args.isScroll "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Scroll button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected, secondary, json."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args, {indent"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onCheck"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Check: "'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selected, checked, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onClose"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"keyPressed"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu closed'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" keyPressed "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pressed %s to close the menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(keyPressed))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Checkbox button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", checked "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button with icon'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'arrows-up-down-left-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'there'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", args "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {someArg "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nice_button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, description "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It also has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with default index'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, defaultIndex "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, args "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {someValue "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", otherValue "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'value'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected, scrollIndex, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testmenu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu title'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSideScroll"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll: '"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"secondary) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Normal button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".isCheck) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Check button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".isScroll) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onCheck"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Check: '"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onClose"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (keyPressed) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu closed'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (keyPressed) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Pressed "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"keyPressed"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" to close the menu`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Checkbox button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button with icon'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'arrows-up-down-left-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'there'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someArg"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nice_button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It also has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with default index'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" defaultIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" otherValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'value'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testmenu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})})})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/2zxbsnN.png",alt:"Example"})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/menu.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"},timestamp:1730928152e3,title:"Menu",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/menu"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5372)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6593],{5372:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/menu",function(){return l(8562)}])},8562:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return t}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let t=[{depth:2,value:"lib.registerMenu",id:"libregistermenu"},{depth:2,value:"lib.showMenu",id:"libshowmenu"},{depth:2,value:"lib.hideMenu",id:"libhidemenu"},{depth:2,value:"lib.getOpenMenu",id:"libgetopenmenu"},{depth:2,value:"lib.setMenuOptions",id:"libsetmenuoptions"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",img:"img"},(0,i.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Menu"}),"\n",(0,n.jsx)(e.p,{children:"Keyboard navigation menu with specific event functions."}),"\n",(0,n.jsx)(e.h2,{id:"libregistermenu",children:"lib.registerMenu"}),"\n",(0,n.jsx)(e.p,{children:"Registers and caches a menu under the specified id."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data, cb)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" cb);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["title: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["options: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["progress?: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["colorScheme?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["icon?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"FontAwesome icon that will be displayed on the left side, works the same as notification and textui icons."}),"\n",(0,n.jsx)(e.li,{children:"Also supports image urls, png and webp files but are not recommend to use over font awesome icons."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["iconColor?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["iconAnimation?: ",(0,n.jsx)(e.code,{children:"'spin'"})," ",(0,n.jsx)(e.code,{children:"'spinPulse'"})," ",(0,n.jsx)(e.code,{children:"'spinReverse'"})," ",(0,n.jsx)(e.code,{children:"'pulse'"})," ",(0,n.jsx)(e.code,{children:"'beat'"})," ",(0,n.jsx)(e.code,{children:"'fade'"})," ",(0,n.jsx)(e.code,{children:"'beatFade'"})," ",(0,n.jsx)(e.code,{children:"'bounce'"})," ",(0,n.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,n.jsxs)(e.li,{children:["values?: ",(0,n.jsx)(e.code,{children:"string[]"})," or ",(0,n.jsx)(e.code,{children:"{ label: string, description: string }[]"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If provided creates a side scrollable list."}),"\n",(0,n.jsx)(e.li,{children:"When using object and setting description, the set description will be displayed in the menu tooltip."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["checked?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Setting either true or false will make the button a checkbox, if ",(0,n.jsx)(e.code,{children:"values"})," is also provided the button will be a\nscrollable list."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["description?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Displays tooltip below menu on hovered item with provided description."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["defaultIndex?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Sets the current index for the list to specified number."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["args?: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Allows you to pass any arguments through the button."}),"\n",(0,n.jsxs)(e.li,{children:["If the button has ",(0,n.jsx)(e.code,{children:"values"})," then ",(0,n.jsx)(e.code,{children:"isScroll"})," is automatically passed."]}),"\n",(0,n.jsxs)(e.li,{children:["If the button has ",(0,n.jsx)(e.code,{children:"checked"})," to either true or false then ",(0,n.jsx)(e.code,{children:"isCheck"})," is automatically passed."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["close?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If set to false, it won't close the menu upon interacting with this option."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["position?: ",(0,n.jsx)(e.code,{children:"'top-left'"})," or ",(0,n.jsx)(e.code,{children:"'top-right'"})," or ",(0,n.jsx)(e.code,{children:"'bottom-left'"})," or ",(0,n.jsx)(e.code,{children:"'bottom-right'"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"'top-left'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disableInput?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"false"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["canClose: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If set to false the user won't be able to exit the menu without pressing one of the buttons."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onClose: ",(0,n.jsx)(e.code,{children:"function"}),"(keyPressed?: ",(0,n.jsx)(e.code,{children:"'Escape' | 'Backspace'"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that runs when the menu is exited via ESC/Backspace."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelected: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", secondary: ",(0,n.jsx)(e.code,{children:"number"})," | ",(0,n.jsx)(e.code,{children:"boolean"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function being ran when the selected button in the menu changes."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSideScroll: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", scrollIndex: ",(0,n.jsx)(e.code,{children:"number"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function ran whenever a scroll list item is changed."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onCheck: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", checked: ",(0,n.jsx)(e.code,{children:"boolean"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function ran whenever a checkbox is toggled."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["cb: ",(0,n.jsx)(e.code,{children:"function"}),"(selected: ",(0,n.jsx)(e.code,{children:"number"}),", scrollIndex: ",(0,n.jsx)(e.code,{children:"number"}),", args: ",(0,n.jsx)(e.code,{children:"{[string]: any}"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Callback function when the menu item is pressed."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libshowmenu",children:"lib.showMenu"}),"\n",(0,n.jsx)(e.p,{children:"Displays the menu with the provided id."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libhidemenu",children:"lib.hideMenu"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(onExit);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["If true runs the menu's ",(0,n.jsx)(e.code,{children:"onClose"})," function."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libgetopenmenu",children:"lib.getOpenMenu"}),"\n",(0,n.jsx)(e.p,{children:"Returns the id of the currently open menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getOpenMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getOpenMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libsetmenuoptions",children:"lib.setMenuOptions"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id, options, index)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" index);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["options: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")"]}),"\n",(0,n.jsxs)(e.li,{children:["index?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"If specified only sets the options table on the specified options index."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)("u",{children:(0,n.jsx)(e.strong,{children:"Example:"})}),(0,n.jsx)("br",{}),"\nReplaces the 3rd index option of the specified menu"]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'New option'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'plus'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setMenuOptions"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'New option'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'plus'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(e.p,{children:"First we register the menu with our specified options then we call the show function in the command."}),"\n",(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"Avoid constantly re-registering a menu that does not depend on any outside values (A.K.A a static menu)."})}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu title'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSideScroll"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Scroll: "'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selected, scrollIndex, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Normal button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args.isCheck "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Check button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args.isScroll "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Scroll button"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected, secondary, json."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args, {indent"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onCheck"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Check: "'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selected, checked, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onClose"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"keyPressed"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu closed'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" keyPressed "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pressed %s to close the menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"):"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"format"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(keyPressed))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", description "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Checkbox button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", checked "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button with icon'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'arrows-up-down-left-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'there'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", args "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {someArg "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nice_button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, description "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It also has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with default index'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, defaultIndex "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, args "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {someValue "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", otherValue "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'value'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected, scrollIndex, args)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testmenu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu title'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSideScroll"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll: '"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"secondary) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Normal button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".isCheck) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Check button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".isScroll) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" secondary"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onCheck"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Check: '"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onClose"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (keyPressed) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Menu closed'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (keyPressed) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Pressed "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"keyPressed"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" to close the menu`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Simple button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Checkbox button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" checked"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Scroll button with icon'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'arrows-up-down-left-right'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'there'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someArg"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nice_button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'It also has a description!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with default index'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" defaultIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'List button with args'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'can'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'side'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'scroll'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'this'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { someValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" otherValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'value'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(selected"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scrollIndex"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args);"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterCommand"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'testmenu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".showMenu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_menu_id'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})})})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/2zxbsnN.png",alt:"Example"})})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/menu.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"},timestamp:1730940204e3,title:"Menu",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/menu"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5372)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-f6091a2b66ae06fe.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-057c7c9e078f3e49.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-f6091a2b66ae06fe.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-057c7c9e078f3e49.js index 8532931fed..e7e257ea53 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-f6091a2b66ae06fe.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/notify-057c7c9e078f3e49.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6642],{5486:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/notify",function(){return n(671)}])},671:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var i=n(2676),l=n(2140),r=n(8745),o=n(7100);let t=[{depth:2,value:"lib.notify",id:"libnotify"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Standard",id:"standard"},{depth:3,value:"Custom",id:"custom"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",img:"img"},(0,r.a)(),s.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{children:"Notifications"}),"\n",(0,i.jsx)(e.h2,{id:"libnotify",children:"lib.notify"}),"\n",(0,i.jsx)(e.p,{children:"Custom notifications with a lot of styling options."}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsxs)(o.mQ,{items:["Client","Server"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", source, data)"})]})})})})]})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data);"})]})]})})})]}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["id?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"When set the current notification will be unique and only shown once on screen when spammed."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["title?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Must provide if there is no description"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["description?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Must provide if there is no title"}),"\n",(0,i.jsx)(e.li,{children:"Markdown support"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["duration?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"3000"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["showDuration?: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["position?: ",(0,i.jsx)(e.code,{children:"'top'"})," or ",(0,i.jsx)(e.code,{children:"'top-right'"})," or ",(0,i.jsx)(e.code,{children:"'top-left'"})," or ",(0,i.jsx)(e.code,{children:"'bottom'"})," or ",(0,i.jsx)(e.code,{children:"'bottom-right'"})," or ",(0,i.jsx)(e.code,{children:"'bottom-left'"})," or ",(0,i.jsx)(e.code,{children:"'center-right'"})," or ",(0,i.jsx)(e.code,{children:"'center-left'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'top-right'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["type?: ",(0,i.jsx)(e.code,{children:"'inform'"})," or ",(0,i.jsx)(e.code,{children:"'error'"})," or ",(0,i.jsx)(e.code,{children:"'success'"}),"or ",(0,i.jsx)(e.code,{children:"'warning'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'inform'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["style?: ",(0,i.jsx)(e.code,{children:"table"})," (",(0,i.jsx)(e.code,{children:"object"}),")","\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"React CSS styling format"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["icon?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Font Awesome 6 icon name"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["iconColor?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"CSS Legal Color Values"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["iconAnimation?: ",(0,i.jsx)(e.code,{children:"'spin'"})," ",(0,i.jsx)(e.code,{children:"'spinPulse'"})," ",(0,i.jsx)(e.code,{children:"'spinReverse'"})," ",(0,i.jsx)(e.code,{children:"'pulse'"})," ",(0,i.jsx)(e.code,{children:"'beat'"})," ",(0,i.jsx)(e.code,{children:"'fade'"})," ",(0,i.jsx)(e.code,{children:"'beatFade'"})," ",(0,i.jsx)(e.code,{children:"'bounce'"})," ",(0,i.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,i.jsxs)(e.li,{children:["alignIcon?: ",(0,i.jsx)(e.code,{children:"'top'"})," or ",(0,i.jsx)(e.code,{children:"'center'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'center'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["sound?: ",(0,i.jsx)(e.code,{children:"table"})," (",(0,i.jsx)(e.code,{children:"object"}),")","\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["bank?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"name of audio bank that contains the soundset provided"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["set: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Soundset the soundname is a member of."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["name: ",(0,i.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(o.UW,{children:(0,i.jsxs)(e.p,{children:["Setting ",(0,i.jsx)(e.code,{children:"iconColor"})," will get rid of the contrasted icon colour and it's circular background."]})}),"\n",(0,i.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,i.jsx)(e.h3,{id:"standard",children:"Standard"}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:"https://i.imgur.com/UOISjlm.png",alt:"notification"})}),"\n",(0,i.jsx)(e.h3,{id:"custom",children:"Custom"}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_identifier'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" showDuration "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" style "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#141517'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C1C2C5'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#909296'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ban'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" iconColor "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C53030'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_identifier'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" showDuration"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" style"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#141517'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C1C2C5'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.decription'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#909296'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ban'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" iconColor"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C53030'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:"https://i.imgur.com/1qwsJsH.png",alt:"custom_notification"})})]})}e.default=(0,l.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/notify.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"},timestamp:1730928152e3,title:"Notifications",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/notify"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5486)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6642],{5486:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/notify",function(){return n(671)}])},671:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var i=n(2676),l=n(2140),r=n(8745),o=n(7100);let t=[{depth:2,value:"lib.notify",id:"libnotify"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Standard",id:"standard"},{depth:3,value:"Custom",id:"custom"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",img:"img"},(0,r.a)(),s.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{children:"Notifications"}),"\n",(0,i.jsx)(e.h2,{id:"libnotify",children:"lib.notify"}),"\n",(0,i.jsx)(e.p,{children:"Custom notifications with a lot of styling options."}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsxs)(o.mQ,{items:["Client","Server"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:notify'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", source, data)"})]})})})})]})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data);"})]})]})})})]}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["id?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"When set the current notification will be unique and only shown once on screen when spammed."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["title?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Must provide if there is no description"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["description?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Must provide if there is no title"}),"\n",(0,i.jsx)(e.li,{children:"Markdown support"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["duration?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"3000"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["showDuration?: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["position?: ",(0,i.jsx)(e.code,{children:"'top'"})," or ",(0,i.jsx)(e.code,{children:"'top-right'"})," or ",(0,i.jsx)(e.code,{children:"'top-left'"})," or ",(0,i.jsx)(e.code,{children:"'bottom'"})," or ",(0,i.jsx)(e.code,{children:"'bottom-right'"})," or ",(0,i.jsx)(e.code,{children:"'bottom-left'"})," or ",(0,i.jsx)(e.code,{children:"'center-right'"})," or ",(0,i.jsx)(e.code,{children:"'center-left'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'top-right'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["type?: ",(0,i.jsx)(e.code,{children:"'inform'"})," or ",(0,i.jsx)(e.code,{children:"'error'"})," or ",(0,i.jsx)(e.code,{children:"'success'"}),"or ",(0,i.jsx)(e.code,{children:"'warning'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'inform'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["style?: ",(0,i.jsx)(e.code,{children:"table"})," (",(0,i.jsx)(e.code,{children:"object"}),")","\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"React CSS styling format"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["icon?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Font Awesome 6 icon name"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["iconColor?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"CSS Legal Color Values"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["iconAnimation?: ",(0,i.jsx)(e.code,{children:"'spin'"})," ",(0,i.jsx)(e.code,{children:"'spinPulse'"})," ",(0,i.jsx)(e.code,{children:"'spinReverse'"})," ",(0,i.jsx)(e.code,{children:"'pulse'"})," ",(0,i.jsx)(e.code,{children:"'beat'"})," ",(0,i.jsx)(e.code,{children:"'fade'"})," ",(0,i.jsx)(e.code,{children:"'beatFade'"})," ",(0,i.jsx)(e.code,{children:"'bounce'"})," ",(0,i.jsx)(e.code,{children:"'shake'"})]}),"\n",(0,i.jsxs)(e.li,{children:["alignIcon?: ",(0,i.jsx)(e.code,{children:"'top'"})," or ",(0,i.jsx)(e.code,{children:"'center'"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"'center'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["sound?: ",(0,i.jsx)(e.code,{children:"table"})," (",(0,i.jsx)(e.code,{children:"object"}),")","\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["bank?: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"name of audio bank that contains the soundset provided"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["set: ",(0,i.jsx)(e.code,{children:"string"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Soundset the soundname is a member of."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["name: ",(0,i.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(o.UW,{children:(0,i.jsxs)(e.p,{children:["Setting ",(0,i.jsx)(e.code,{children:"iconColor"})," will get rid of the contrasted icon colour and it's circular background."]})}),"\n",(0,i.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,i.jsx)(e.h3,{id:"standard",children:"Standard"}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'success'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:"https://i.imgur.com/UOISjlm.png",alt:"notification"})}),"\n",(0,i.jsx)(e.h3,{id:"custom",children:"Custom"}),"\n",(0,i.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_identifier'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" showDuration "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" style "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#141517'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C1C2C5'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#909296'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ban'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" iconColor "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C53030'"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,i.jsx)(o.OK,{children:(0,i.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".notify"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'some_identifier'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification title'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Notification description'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" showDuration"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" style"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#141517'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C1C2C5'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.decription'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#909296'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ban'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(e.span,{className:"line",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" iconColor"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#C53030'"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(e.span,{className:"line",children:(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:"https://i.imgur.com/1qwsJsH.png",alt:"custom_notification"})})]})}e.default=(0,l.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/notify.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"},timestamp:1730940204e3,title:"Notifications",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/notify"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5486)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-ad69f17b9c569e9b.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-59f7bad0664e36b6.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-ad69f17b9c569e9b.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-59f7bad0664e36b6.js index c40fefe505..9308c102b9 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-ad69f17b9c569e9b.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/progress-59f7bad0664e36b6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1695],{1969:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/progress",function(){return l(2852)}])},2852:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let c=[{depth:2,value:"lib.progressBar",id:"libprogressbar"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.progressCircle",id:"libprogresscircle"},{depth:3,value:"Usage Example",id:"usage-example-1"},{depth:2,value:"lib.progressActive",id:"libprogressactive"},{depth:2,value:"lib.cancelProgress",id:"libcancelprogress"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",h3:"h3",strong:"strong",img:"img"},(0,i.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Progress"}),"\n",(0,n.jsx)(e.h2,{id:"libprogressbar",children:"lib.progressBar"}),"\n",(0,n.jsx)(e.p,{children:"Displays a running progress bar."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["duration: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["useWhileDead?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowRagdoll?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowSwimming?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowCuffed?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowFalling?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["canCancel?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["anim?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["dict?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["clip: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["flag?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"49"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendIn?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"3.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendOut?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"1.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["duration?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"-1"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playbackRate?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["lockX?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockY?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockZ?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["scenario?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playEnter?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["prop?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]"}),"\n",(0,n.jsxs)(e.li,{children:["model: ",(0,n.jsx)(e.code,{children:"hash"})]}),"\n",(0,n.jsxs)(e.li,{children:["bone?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"60309"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["pos: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rot: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotOrder?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0xAFBD61CC738D9EB9",children:"The order in which yaw, pitch and roll is applied."})}),"\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disable?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["move?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["car?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["combat?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["mouse?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["sprint?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Drinking water'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(e.p,{children:["This function is ",(0,n.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(e.code,{children:"async"}),"."]})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Drinking water'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/7ZJgLjl.png",alt:"progress_bar"})}),"\n",(0,n.jsx)(e.h2,{id:"libprogresscircle",children:"lib.progressCircle"}),"\n",(0,n.jsxs)(e.p,{children:["Similar to ",(0,n.jsx)(e.code,{children:"lib.progressBar"})," except it displays a circle and you can define a position."]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["duration: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["label?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["position?: ",(0,n.jsx)(e.code,{children:"'middle'"})," or ",(0,n.jsx)(e.code,{children:"'bottom'"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"'middle'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["useWhileDead?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowRagdoll?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowSwimming?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowCuffed?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowFalling?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["canCancel?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["anim?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["dict?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["clip: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["flag?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"49"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendIn?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"3.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendOut?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"1.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["duration?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"-1"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playbackRate?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["lockX?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockY?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockZ?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["scenario?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playEnter?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["prop?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]"}),"\n",(0,n.jsxs)(e.li,{children:["model: ",(0,n.jsx)(e.code,{children:"hash"})]}),"\n",(0,n.jsxs)(e.li,{children:["bone?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"60309"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["pos: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rot: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotOrder?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0xAFBD61CC738D9EB9",children:"The order in which yaw, pitch and roll is applied."})}),"\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disable?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["move?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["car?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["combat?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["mouse?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["sprint?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"usage-example-1",children:"Usage Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bottom'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(e.p,{children:["This function is ",(0,n.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(e.code,{children:"async"}),"."]})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bottom'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/2tLbgrW.png",alt:"progress_circle"})}),"\n",(0,n.jsx)(e.h2,{id:"libprogressactive",children:"lib.progressActive"}),"\n",(0,n.jsx)(e.p,{children:"Returns true if a progress bar is currently active."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressActive"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressActive"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libcancelprogress",children:"lib.cancelProgress"}),"\n",(0,n.jsx)(e.p,{children:"If there is a progress bar active and the\nprogress bar can be cancelled then it cancels it."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"cancelProgress"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".cancelProgress"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/progress.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"},timestamp:1730928152e3,title:"Progress",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/progress"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1969)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1695],{1969:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/progress",function(){return l(2852)}])},2852:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let c=[{depth:2,value:"lib.progressBar",id:"libprogressbar"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.progressCircle",id:"libprogresscircle"},{depth:3,value:"Usage Example",id:"usage-example-1"},{depth:2,value:"lib.progressActive",id:"libprogressactive"},{depth:2,value:"lib.cancelProgress",id:"libcancelprogress"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",h3:"h3",strong:"strong",img:"img"},(0,i.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Progress"}),"\n",(0,n.jsx)(e.h2,{id:"libprogressbar",children:"lib.progressBar"}),"\n",(0,n.jsx)(e.p,{children:"Displays a running progress bar."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["duration: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["useWhileDead?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowRagdoll?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowSwimming?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowCuffed?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowFalling?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["canCancel?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["anim?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["dict?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["clip: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["flag?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"49"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendIn?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"3.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendOut?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"1.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["duration?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"-1"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playbackRate?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["lockX?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockY?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockZ?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["scenario?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playEnter?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["prop?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]"}),"\n",(0,n.jsxs)(e.li,{children:["model: ",(0,n.jsx)(e.code,{children:"hash"})]}),"\n",(0,n.jsxs)(e.li,{children:["bone?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"60309"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["pos: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rot: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotOrder?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0xAFBD61CC738D9EB9",children:"The order in which yaw, pitch and roll is applied."})}),"\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disable?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["move?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["car?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["combat?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["mouse?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["sprint?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Drinking water'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(e.p,{children:["This function is ",(0,n.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(e.code,{children:"async"}),"."]})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressBar"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Drinking water'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/7ZJgLjl.png",alt:"progress_bar"})}),"\n",(0,n.jsx)(e.h2,{id:"libprogresscircle",children:"lib.progressCircle"}),"\n",(0,n.jsxs)(e.p,{children:["Similar to ",(0,n.jsx)(e.code,{children:"lib.progressBar"})," except it displays a circle and you can define a position."]}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["duration: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["label?: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["position?: ",(0,n.jsx)(e.code,{children:"'middle'"})," or ",(0,n.jsx)(e.code,{children:"'bottom'"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"'middle'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["useWhileDead?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowRagdoll?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowSwimming?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowCuffed?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["allowFalling?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["canCancel?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["anim?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["dict?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["clip: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["flag?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"49"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendIn?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"3.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["blendOut?: ",(0,n.jsx)(e.code,{children:"float"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"1.0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["duration?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"-1"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playbackRate?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["lockX?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockY?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["lockZ?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["scenario?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Must specify either scenario or dict"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["playEnter?: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["prop?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"[ If you want to define multiple props, you can pass them as individual tables (array of objects) ]"}),"\n",(0,n.jsxs)(e.li,{children:["model: ",(0,n.jsx)(e.code,{children:"hash"})]}),"\n",(0,n.jsxs)(e.li,{children:["bone?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"60309"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["pos: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rot: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["x: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["y: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["z: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotOrder?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0xAFBD61CC738D9EB9",children:"The order in which yaw, pitch and roll is applied."})}),"\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["disable?: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["move?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["car?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["combat?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["mouse?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n",(0,n.jsxs)(e.li,{children:["sprint?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"usage-example-1",children:"Usage Example"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bottom'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsxs)(e.p,{children:["This function is ",(0,n.jsx)(e.strong,{children:"asynchronous"})," requiring you to do a ",(0,n.jsx)(e.code,{children:".then"})," callback on the promise or make your function ",(0,n.jsx)(e.code,{children:"async"}),"."]})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressCircle"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" duration"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bottom'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" useWhileDead"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" canCancel"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" disable"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" car"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" anim"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dict"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'mp_player_intdrink'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" clip"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'loop_bottle'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" prop"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" model"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`prop_ld_flow_bottle`"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pos"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.03"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.02"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rot"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {x"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" y"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" z"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when complete'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Do stuff when cancelled'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://i.imgur.com/2tLbgrW.png",alt:"progress_circle"})}),"\n",(0,n.jsx)(e.h2,{id:"libprogressactive",children:"lib.progressActive"}),"\n",(0,n.jsx)(e.p,{children:"Returns true if a progress bar is currently active."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"progressActive"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".progressActive"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libcancelprogress",children:"lib.cancelProgress"}),"\n",(0,n.jsx)(e.p,{children:"If there is a progress bar active and the\nprogress bar can be cancelled then it cancels it."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"cancelProgress"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".cancelProgress"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/progress.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"},timestamp:1730940204e3,title:"Progress",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/progress"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1969)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-6762040e438bf33e.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-16fb5087c8cf8af3.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-6762040e438bf33e.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-16fb5087c8cf8af3.js index 9f39e1e4e1..0a95836059 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-6762040e438bf33e.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/radial-16fb5087c8cf8af3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8790],{9826:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/radial",function(){return l(695)}])},695:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return a}});var n=l(2676),i=l(2140),r=l(8745),o=l(7100);let a=[{depth:2,value:"lib.addRadialItem",id:"libaddradialitem"},{depth:2,value:"lib.removeRadialItem",id:"libremoveradialitem"},{depth:2,value:"lib.clearRadialItems",id:"libclearradialitems"},{depth:2,value:"lib.registerRadial",id:"libregisterradial"},{depth:2,value:"lib.hideRadial",id:"libhideradial"},{depth:2,value:"lib.disableRadial",id:"libdisableradial"},{depth:2,value:"lib.getCurrentRadialId",id:"libgetcurrentradialid"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",ul:"ul",li:"li",code:"code",h2:"h2",p:"p",pre:"pre",span:"span",img:"img"},(0,r.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Radial Menu"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Radial menu has a global menu that's by default accessed with ",(0,n.jsx)(e.code,{children:"z"})," and only displays when there is at least one item."]}),"\n",(0,n.jsxs)(e.li,{children:["You can add and remove items from the global menu using ",(0,n.jsx)(e.code,{children:"lib.addRadialItem"})," and ",(0,n.jsx)(e.code,{children:"lib.removeRadialItem"}),"."]}),"\n",(0,n.jsxs)(e.li,{children:["Use ",(0,n.jsx)(e.code,{children:"lib.registerRadial"})," for creating sub menus and use the ",(0,n.jsx)(e.code,{children:"menu"})," property on the items to open those sub menus."]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libaddradialitem",children:"lib.addRadialItem"}),"\n",(0,n.jsx)(e.p,{children:"Item or array of items added to the global radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(items)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(items);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["items: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id that is used for removing options."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["icon: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Either a font awesome or a custom URI.1"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["iconWidth?: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["iconHeight?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"In the case of a custom URI, adjust the size of the icon."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Label uses ",(0,n.jsx)(e.code,{children:" \\n"})," to insert a newline"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["menu?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id of a menu to open."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelect: ",(0,n.jsx)(e.code,{children:"function(currentMenu: string | nil, itemIndex: number)"})," | ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that's ran when a user clicks the item."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["keepOpen?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libremoveradialitem",children:"lib.removeRadialItem"}),"\n",(0,n.jsx)(e.p,{children:"Id of an item to be removed from the global menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(item)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(item);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libclearradialitems",children:"lib.clearRadialItems"}),"\n",(0,n.jsx)(e.p,{children:"Removes all items from the radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"clearRadialItems"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".clearRadialItems"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libregisterradial",children:"lib.registerRadial"}),"\n",(0,n.jsx)(e.p,{children:"Registers a radial sub menu with predefined options."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(radial)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(radial);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["radial: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Unique menu id used to open with ",(0,n.jsx)(e.code,{children:"menu"})," prop on an item."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["items: ",(0,n.jsx)(e.code,{children:"array"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["icon: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Label uses ",(0,n.jsx)(e.code,{children:" \\n"})," to insert a newline"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["menu?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id of a menu to open."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelect?: ",(0,n.jsx)(e.code,{children:"function(currentMenu: string | nil, itemIndex: number)"})," | ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that's ran when a user clicks the item."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libhideradial",children:"lib.hideRadial"}),"\n",(0,n.jsx)(e.p,{children:"Hides the radial menu if one is open."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libdisableradial",children:"lib.disableRadial"}),"\n",(0,n.jsx)(e.p,{children:"Disallow players from opening the radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"disableRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".disableRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(state);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["state: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Whether or not radial menu should be disabled"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libgetcurrentradialid",children:"lib.getCurrentRadialId"}),"\n",(0,n.jsx)(e.p,{children:"Returns the id of the currently open radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getCurrentRadialId"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getCurrentRadialId"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"When adding radial menu items whether they are global or for a sub menu, make sure to stick to short as possible labels\nas long labels will look out of place and should not be used with the radial menu because of its density."})}),"\n",(0,n.jsx)(e.p,{children:"Here's a use case example with some global options and an option utilising the lib's points system."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(menu, item)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu' "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onSelect "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Frisk'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fingerprint'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fingerprint'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jail'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bus'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'magnifying-glass'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shield-halved'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'business_stuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'briefcase'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Business"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garage_access'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'warehouse'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Garage'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Garage'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garage_access'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"Points system in the lib isn't available for the npm package."})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"exports"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" and item "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Frisk'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fingerprint'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fingerprint'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jail'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bus'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'magnifying-glass'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(["})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shield-halved'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'business_stuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'briefcase'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})})]})})]})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{src:"https://i.imgur.com/4eYU94s.png",alt:"radial1"}),"\n",(0,n.jsx)(e.img,{src:"https://i.imgur.com/Czw7mLF.png",alt:"radial2"})]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/radial.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"},timestamp:1730928152e3,title:"Radial Menu",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/radial"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9826)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8790],{9826:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/radial",function(){return l(695)}])},695:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return a}});var n=l(2676),i=l(2140),r=l(8745),o=l(7100);let a=[{depth:2,value:"lib.addRadialItem",id:"libaddradialitem"},{depth:2,value:"lib.removeRadialItem",id:"libremoveradialitem"},{depth:2,value:"lib.clearRadialItems",id:"libclearradialitems"},{depth:2,value:"lib.registerRadial",id:"libregisterradial"},{depth:2,value:"lib.hideRadial",id:"libhideradial"},{depth:2,value:"lib.disableRadial",id:"libdisableradial"},{depth:2,value:"lib.getCurrentRadialId",id:"libgetcurrentradialid"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",ul:"ul",li:"li",code:"code",h2:"h2",p:"p",pre:"pre",span:"span",img:"img"},(0,r.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Radial Menu"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Radial menu has a global menu that's by default accessed with ",(0,n.jsx)(e.code,{children:"z"})," and only displays when there is at least one item."]}),"\n",(0,n.jsxs)(e.li,{children:["You can add and remove items from the global menu using ",(0,n.jsx)(e.code,{children:"lib.addRadialItem"})," and ",(0,n.jsx)(e.code,{children:"lib.removeRadialItem"}),"."]}),"\n",(0,n.jsxs)(e.li,{children:["Use ",(0,n.jsx)(e.code,{children:"lib.registerRadial"})," for creating sub menus and use the ",(0,n.jsx)(e.code,{children:"menu"})," property on the items to open those sub menus."]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libaddradialitem",children:"lib.addRadialItem"}),"\n",(0,n.jsx)(e.p,{children:"Item or array of items added to the global radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(items)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(items);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["items: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"})," or ",(0,n.jsx)(e.code,{children:"array"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id that is used for removing options."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["icon: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Either a font awesome or a custom URI.1"}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["iconWidth?: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["iconHeight?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"In the case of a custom URI, adjust the size of the icon."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Label uses ",(0,n.jsx)(e.code,{children:" \\n"})," to insert a newline"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["menu?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id of a menu to open."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelect: ",(0,n.jsx)(e.code,{children:"function(currentMenu: string | nil, itemIndex: number)"})," | ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that's ran when a user clicks the item."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["keepOpen?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libremoveradialitem",children:"lib.removeRadialItem"}),"\n",(0,n.jsx)(e.p,{children:"Id of an item to be removed from the global menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(item)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(item);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libclearradialitems",children:"lib.clearRadialItems"}),"\n",(0,n.jsx)(e.p,{children:"Removes all items from the radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"clearRadialItems"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".clearRadialItems"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libregisterradial",children:"lib.registerRadial"}),"\n",(0,n.jsx)(e.p,{children:"Registers a radial sub menu with predefined options."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(radial)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(radial);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["radial: ",(0,n.jsx)(e.code,{children:"table"})," (",(0,n.jsx)(e.code,{children:"object"}),")","\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["id: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Unique menu id used to open with ",(0,n.jsx)(e.code,{children:"menu"})," prop on an item."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["items: ",(0,n.jsx)(e.code,{children:"array"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["icon: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["label: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Label uses ",(0,n.jsx)(e.code,{children:" \\n"})," to insert a newline"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["menu?: ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Id of a menu to open."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onSelect?: ",(0,n.jsx)(e.code,{children:"function(currentMenu: string | nil, itemIndex: number)"})," | ",(0,n.jsx)(e.code,{children:"string"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Function that's ran when a user clicks the item."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libhideradial",children:"lib.hideRadial"}),"\n",(0,n.jsx)(e.p,{children:"Hides the radial menu if one is open."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".hideRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libdisableradial",children:"lib.disableRadial"}),"\n",(0,n.jsx)(e.p,{children:"Disallow players from opening the radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"disableRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".disableRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(state);"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["state: ",(0,n.jsx)(e.code,{children:"boolean"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"Whether or not radial menu should be disabled"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libgetcurrentradialid",children:"lib.getCurrentRadialId"}),"\n",(0,n.jsx)(e.p,{children:"Returns the id of the currently open radial menu."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getCurrentRadialId"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".getCurrentRadialId"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"When adding radial menu items whether they are global or for a sub menu, make sure to stick to short as possible labels\nas long labels will look out of place and should not be used with the radial menu because of its density."})}),"\n",(0,n.jsx)(e.p,{children:"Here's a use case example with some global options and an option utilising the lib's points system."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"exports"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"item"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(menu, item)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu' "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onSelect "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Frisk'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fingerprint'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fingerprint'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jail'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bus'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'magnifying-glass'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shield-halved'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'business_stuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'briefcase'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Business"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garage_access'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'warehouse'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Garage'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Garage'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"removeRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'garage_access'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,n.jsxs)(o.OK,{children:[(0,n.jsx)(o.UW,{children:(0,n.jsx)(e.p,{children:"Points system in the lib isn't available for the npm package."})}),(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"exports"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" item)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (menu "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" and item "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".registerRadial"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" items"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Handcuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'handcuffs'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'myMenuHandler'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Frisk'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fingerprint'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fingerprint'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jail'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bus'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'magnifying-glass'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Search'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".addRadialItem"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(["})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Police'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'shield-halved'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" menu"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'police_menu'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'business_stuff'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" label"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'briefcase'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onSelect"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Business'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})})]})})]})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{src:"https://i.imgur.com/4eYU94s.png",alt:"radial1"}),"\n",(0,n.jsx)(e.img,{src:"https://i.imgur.com/Czw7mLF.png",alt:"radial2"})]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/radial.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"},timestamp:1730940204e3,title:"Radial Menu",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/radial"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9826)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-cc50001f05c4f309.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-46f4f0aaade26375.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-cc50001f05c4f309.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-46f4f0aaade26375.js index cb01d5ad01..9cf3e5fdb6 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-cc50001f05c4f309.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/skillcheck-46f4f0aaade26375.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5319],{3315:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/skillcheck",function(){return l(4166)}])},4166:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return c}});var i=l(2676),n=l(2140),r=l(8745),t=l(7100);let c=[{depth:2,value:"lib.skillCheck",id:"libskillcheck"},{depth:2,value:"lib.skillCheckActive",id:"libskillcheckactive"},{depth:2,value:"lib.cancelSkillCheck",id:"libcancelskillcheck"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",img:"img"},(0,r.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Skill Check"}),"\n",(0,i.jsx)(s.h2,{id:"libskillcheck",children:"lib.skillCheck"}),"\n",(0,i.jsx)(s.p,{children:"Runs a skill check with the defined difficulty."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(difficulty, inputs)"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(difficulty"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inputs);"})]})]})})})]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["difficulty: ",(0,i.jsx)(s.code,{children:"'easy'"})," or ",(0,i.jsx)(s.code,{children:"'medium'"})," or ",(0,i.jsx)(s.code,{children:"'hard'"})," or ",(0,i.jsx)(s.code,{children:"table"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Preset difficulties:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["'easy' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 50, speedMultiplier: 1 }"})]}),"\n",(0,i.jsxs)(s.li,{children:["'medium' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 40, speedMultiplier: 1.5 }"})]}),"\n",(0,i.jsxs)(s.li,{children:["'hard' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 25, speedMultiplier: 1.75 }"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["Custom difficulties can be set by sending an object instead of one of the preset strings above","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["areaSize: ",(0,i.jsx)(s.code,{children:"number"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Size of the success area in degrees"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["speedMultiplier: ",(0,i.jsx)(s.code,{children:"number"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Multiplier for the speed of the indicator"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["inputs?: ",(0,i.jsx)(s.code,{children:"string[]"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"A random key will be picked from the inputs table for each skill check"}),"\n",(0,i.jsxs)(s.li,{children:["If no inputs are defined the key is defaulted to ",(0,i.jsx)(s.code,{children:"e"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"libskillcheckactive",children:"lib.skillCheckActive"}),"\n",(0,i.jsx)(s.p,{children:"Returns true if a skill check is currently active."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheckActive"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheckActive"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,i.jsx)(s.h2,{id:"libcancelskillcheck",children:"lib.cancelSkillCheck"}),"\n",(0,i.jsx)(s.p,{children:"Cancels the currently ongoing skill check."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cancelSkillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".cancelSkillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {areaSize "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"60"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", speedMultiplier "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hard'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, {"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'w'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'a'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'d'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"success"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { areaSize"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"60"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" speedMultiplier"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hard'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'w'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'a'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'d'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})})})]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://i.imgur.com/rgfkn0S.png",alt:"skillcheck_example"})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/skillcheck.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"},timestamp:1730928152e3,title:"Skill Check",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/skillcheck"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3315)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5319],{3315:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/skillcheck",function(){return l(4166)}])},4166:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return c}});var i=l(2676),n=l(2140),r=l(8745),t=l(7100);let c=[{depth:2,value:"lib.skillCheck",id:"libskillcheck"},{depth:2,value:"lib.skillCheckActive",id:"libskillcheckactive"},{depth:2,value:"lib.cancelSkillCheck",id:"libcancelskillcheck"},{depth:2,value:"Usage Example",id:"usage-example"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",img:"img"},(0,r.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Skill Check"}),"\n",(0,i.jsx)(s.h2,{id:"libskillcheck",children:"lib.skillCheck"}),"\n",(0,i.jsx)(s.p,{children:"Runs a skill check with the defined difficulty."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(difficulty, inputs)"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(difficulty"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inputs);"})]})]})})})]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["difficulty: ",(0,i.jsx)(s.code,{children:"'easy'"})," or ",(0,i.jsx)(s.code,{children:"'medium'"})," or ",(0,i.jsx)(s.code,{children:"'hard'"})," or ",(0,i.jsx)(s.code,{children:"table"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Preset difficulties:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["'easy' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 50, speedMultiplier: 1 }"})]}),"\n",(0,i.jsxs)(s.li,{children:["'medium' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 40, speedMultiplier: 1.5 }"})]}),"\n",(0,i.jsxs)(s.li,{children:["'hard' - ",(0,i.jsx)(s.code,{children:"{ areaSize: 25, speedMultiplier: 1.75 }"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["Custom difficulties can be set by sending an object instead of one of the preset strings above","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["areaSize: ",(0,i.jsx)(s.code,{children:"number"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Size of the success area in degrees"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["speedMultiplier: ",(0,i.jsx)(s.code,{children:"number"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Multiplier for the speed of the indicator"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["inputs?: ",(0,i.jsx)(s.code,{children:"string[]"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"A random key will be picked from the inputs table for each skill check"}),"\n",(0,i.jsxs)(s.li,{children:["If no inputs are defined the key is defaulted to ",(0,i.jsx)(s.code,{children:"e"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"libskillcheckactive",children:"lib.skillCheckActive"}),"\n",(0,i.jsx)(s.p,{children:"Returns true if a skill check is currently active."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheckActive"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheckActive"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,i.jsx)(s.h2,{id:"libcancelskillcheck",children:"lib.cancelSkillCheck"}),"\n",(0,i.jsx)(s.p,{children:"Cancels the currently ongoing skill check."}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cancelSkillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".cancelSkillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,i.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {areaSize "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"60"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", speedMultiplier "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hard'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, {"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'w'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'a'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'d'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]})})})}),(0,i.jsx)(t.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"success"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".skillCheck"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'easy'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { areaSize"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"60"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" speedMultiplier"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hard'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'w'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'a'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'d'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})})})]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://i.imgur.com/rgfkn0S.png",alt:"skillcheck_example"})})]})}s.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/skillcheck.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"},timestamp:1730940204e3,title:"Skill Check",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/skillcheck"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3315)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-7f932bc291812a0d.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-d95a65bcaaf58cf6.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-7f932bc291812a0d.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-d95a65bcaaf58cf6.js index 58f5b667e6..edecf12f15 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-7f932bc291812a0d.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Interface/Client/textui-d95a65bcaaf58cf6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2918],{4533:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/textui",function(){return l(9212)}])},9212:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),i=l(2140),r=l(8745),o=l(7100);let t=[{depth:2,value:"lib.showTextUI",id:"libshowtextui"},{depth:2,value:"lib.hideTextUI",id:"libhidetextui"},{depth:2,value:"lib.isTextUIOpen",id:"libistextuiopen"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Basic",id:"basic"},{depth:3,value:"Custom styling",id:"custom-styling"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",img:"img"},(0,r.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"TextUI"}),"\n",(0,n.jsx)(s.h2,{id:"libshowtextui",children:"lib.showTextUI"}),"\n",(0,n.jsx)(s.p,{children:"Show the TextUI window."}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"DO NOT"})," run this function every tick, it's intended to be used as a toggle."]})}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(text, options)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(text"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" options);"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["text: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["options?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["position?: ",(0,n.jsx)(s.code,{children:"'right-center'"})," or ",(0,n.jsx)(s.code,{children:"'left-center'"})," or ",(0,n.jsx)(s.code,{children:"'top-center'"})," or ",(0,n.jsx)(s.code,{children:"'bottom-center'"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"'right-center'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["icon?: ",(0,n.jsx)(s.code,{children:"string"})," or ",(0,n.jsx)(s.code,{children:"table"})," (",(0,n.jsx)(s.code,{children:"array"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:["iconColor?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["iconAnimation?: ",(0,n.jsx)(s.code,{children:"'spin'"})," ",(0,n.jsx)(s.code,{children:"'spinPulse'"})," ",(0,n.jsx)(s.code,{children:"'spinReverse'"})," ",(0,n.jsx)(s.code,{children:"'pulse'"})," ",(0,n.jsx)(s.code,{children:"'beat'"})," ",(0,n.jsx)(s.code,{children:"'fade'"})," ",(0,n.jsx)(s.code,{children:"'beatFade'"})," ",(0,n.jsx)(s.code,{children:"'bounce'"})," ",(0,n.jsx)(s.code,{children:"'shake'"})]}),"\n",(0,n.jsx)(s.li,{children:"style?: React.CSSProperties"}),"\n",(0,n.jsxs)(s.li,{children:["alignIcon?: ",(0,n.jsx)(s.code,{children:"'top'"})," or ",(0,n.jsx)(s.code,{children:"'center'"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"'center'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"libhidetextui",children:"lib.hideTextUI"}),"\n",(0,n.jsx)(s.p,{children:"Hides the currently visible TextUI window"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"hideTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".hideTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"libistextuiopen",children:"lib.isTextUIOpen"}),"\n",(0,n.jsx)(s.p,{children:"Returns whether Text UI is opened or not. The currently displayed text is returned as the second value."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen, text "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"isOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"text"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isTextUIOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(s.h3,{id:"basic",children:"Basic"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Fuel vehicle'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Fuel vehicle'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/uZS40fD.png",alt:"basic_example"})}),"\n",(0,n.jsx)(s.h3,{id:"custom-styling",children:"Custom styling"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Pick apple'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"top-center"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" style "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" borderRadius "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#48BB78'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'white'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Pick apple'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-center'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" style"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" borderRadius"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#48BB78'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'white'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/sy9lPC0.png",alt:"custom_example"})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/textui.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},timestamp:1730928152e3,title:"TextUI",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4533)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2918],{4533:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Interface/Client/textui",function(){return l(9212)}])},9212:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(2676),i=l(2140),r=l(8745),o=l(7100);let t=[{depth:2,value:"lib.showTextUI",id:"libshowtextui"},{depth:2,value:"lib.hideTextUI",id:"libhidetextui"},{depth:2,value:"lib.isTextUIOpen",id:"libistextuiopen"},{depth:2,value:"Usage Example",id:"usage-example"},{depth:3,value:"Basic",id:"basic"},{depth:3,value:"Custom styling",id:"custom-styling"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",strong:"strong",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3",img:"img"},(0,r.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"TextUI"}),"\n",(0,n.jsx)(s.h2,{id:"libshowtextui",children:"lib.showTextUI"}),"\n",(0,n.jsx)(s.p,{children:"Show the TextUI window."}),"\n",(0,n.jsx)(o.UW,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"DO NOT"})," run this function every tick, it's intended to be used as a toggle."]})}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(text, options)"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(text"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" options);"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["text: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["options?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["position?: ",(0,n.jsx)(s.code,{children:"'right-center'"})," or ",(0,n.jsx)(s.code,{children:"'left-center'"})," or ",(0,n.jsx)(s.code,{children:"'top-center'"})," or ",(0,n.jsx)(s.code,{children:"'bottom-center'"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"'right-center'"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["icon?: ",(0,n.jsx)(s.code,{children:"string"})," or ",(0,n.jsx)(s.code,{children:"table"})," (",(0,n.jsx)(s.code,{children:"array"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:["iconColor?: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["iconAnimation?: ",(0,n.jsx)(s.code,{children:"'spin'"})," ",(0,n.jsx)(s.code,{children:"'spinPulse'"})," ",(0,n.jsx)(s.code,{children:"'spinReverse'"})," ",(0,n.jsx)(s.code,{children:"'pulse'"})," ",(0,n.jsx)(s.code,{children:"'beat'"})," ",(0,n.jsx)(s.code,{children:"'fade'"})," ",(0,n.jsx)(s.code,{children:"'beatFade'"})," ",(0,n.jsx)(s.code,{children:"'bounce'"})," ",(0,n.jsx)(s.code,{children:"'shake'"})]}),"\n",(0,n.jsx)(s.li,{children:"style?: React.CSSProperties"}),"\n",(0,n.jsxs)(s.li,{children:["alignIcon?: ",(0,n.jsx)(s.code,{children:"'top'"})," or ",(0,n.jsx)(s.code,{children:"'center'"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"'center'"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"libhidetextui",children:"lib.hideTextUI"}),"\n",(0,n.jsx)(s.p,{children:"Hides the currently visible TextUI window"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"hideTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".hideTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"libistextuiopen",children:"lib.isTextUIOpen"}),"\n",(0,n.jsx)(s.p,{children:"Returns whether Text UI is opened or not. The currently displayed text is returned as the second value."}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen, text "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"isOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"text"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isTextUIOpen"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})})})]}),"\n",(0,n.jsx)(s.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(s.h3,{id:"basic",children:"Basic"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Fuel vehicle'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Fuel vehicle'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/uZS40fD.png",alt:"basic_example"})}),"\n",(0,n.jsx)(s.h3,{id:"custom-styling",children:"Custom styling"}),"\n",(0,n.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Pick apple'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" position "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"top-center"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" icon "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" style "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" borderRadius "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#48BB78'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'white'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,n.jsx)(o.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".showTextUI"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[E] - Pick apple'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" position"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'top-center'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" icon"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hand'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" style"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" borderRadius"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" backgroundColor"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#48BB78'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" color"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'white'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})})})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{src:"https://i.imgur.com/sy9lPC0.png",alt:"custom_example"})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Interface/Client/textui.mdx",route:"/overextended/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},timestamp:1730940204e3,title:"TextUI",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4533)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-4744f19b32e3c8bb.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-cc73e668ee89440e.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-4744f19b32e3c8bb.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-cc73e668ee89440e.js index 4ae1d344bc..fc04a71dbd 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-4744f19b32e3c8bb.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Locale/Shared-cc73e668ee89440e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5830],{6673:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Locale/Shared",function(){return l(6935)}])},6935:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return a}});var n=l(2676),r=l(2140),o=l(8745),i=l(7100);let a=[{depth:2,value:"Setup",id:"setup"},{depth:2,value:"Usage",id:"usage"},{depth:2,value:"Phrases",id:"phrases"},{depth:2,value:"lib.getLocale",id:"libgetlocale"}];function _createMdxContent(s){let e=Object.assign({p:"p",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",strong:"strong"},(0,o.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:["Allows servers to set a preferred language and attempt to load locale files in any resources using the module.\nLocale files should use the ",(0,n.jsx)(e.a,{href:"http://www.lingoes.net/en/translator/langcode.htm",children:"ISO Language Code"})," and be saved as ",(0,n.jsx)(e.code,{children:"./locales/langcode.json"})]}),"\n",(0,n.jsx)(e.h2,{id:"setup",children:"Setup"}),"\n",(0,n.jsxs)(e.p,{children:["To change the preferred language from English, add the convar to your server.cfg and change ",(0,n.jsx)(e.code,{children:"en"})," to the desired language code."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"yaml","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"yaml","data-theme":"default",children:(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:locale en"})})})}),"\n",(0,n.jsx)(e.p,{children:"Create a locales directory and a file for your language."}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",filename:"locales/en.json",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"grand_theft_auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"grand theft auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"suspect_sex"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"suspect is %s"'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",filename:"locales/fr.json",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"grand_theft_auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vol de voiture"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"homme"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"femme"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"suspect_sex"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"le suspect est %s"'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"fxmanifest.lua",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"files"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'locales/*.json'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(e.p,{children:"Initialise the locale module in your resource (once)."}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {initLocale} "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,n.jsx)(e.p,{children:"Format your strings with the new locale global.\nAdditional arguments can be sent to format the locale output."}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(str, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(str"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["str: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["vararg?: ",(0,n.jsx)(e.code,{children:"string"})," or ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,n.jsx)("u",{children:(0,n.jsx)(e.strong,{children:"Example"})}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Load the locale module"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetInterval"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'grand_theft_auto'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'suspect_sex'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'male'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Load the locale module"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setInterval"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'grand_theft_auto'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'suspect_sex'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'male'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"phrases",children:"Phrases"}),"\n",(0,n.jsx)(e.p,{children:"You can create a locale string that references other locales to construct a phrase, rather than calling locale multiple times."}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"hello"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"hello %s"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"my_name_is"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my name is %s"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"hello_my_name_is"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"${hello}! ${my_name_is}."'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello_my_name_is'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'doka'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'linden'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello_my_name_is'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'doka'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'linden'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libgetlocale",children:"lib.getLocale"}),"\n",(0,n.jsx)(e.p,{children:"Gets a locale string from another resource and adds it to the dict."}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(resource, key)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["resource: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["key: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Locale/Shared.mdx",route:"/overextended/ox_lib/Modules/Locale/Shared",timestamp:1730928152e3,title:"Shared",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Locale/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6673)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5830],{6673:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Locale/Shared",function(){return l(6935)}])},6935:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return a}});var n=l(2676),r=l(2140),o=l(8745),i=l(7100);let a=[{depth:2,value:"Setup",id:"setup"},{depth:2,value:"Usage",id:"usage"},{depth:2,value:"Phrases",id:"phrases"},{depth:2,value:"lib.getLocale",id:"libgetlocale"}];function _createMdxContent(s){let e=Object.assign({p:"p",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",strong:"strong"},(0,o.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:["Allows servers to set a preferred language and attempt to load locale files in any resources using the module.\nLocale files should use the ",(0,n.jsx)(e.a,{href:"http://www.lingoes.net/en/translator/langcode.htm",children:"ISO Language Code"})," and be saved as ",(0,n.jsx)(e.code,{children:"./locales/langcode.json"})]}),"\n",(0,n.jsx)(e.h2,{id:"setup",children:"Setup"}),"\n",(0,n.jsxs)(e.p,{children:["To change the preferred language from English, add the convar to your server.cfg and change ",(0,n.jsx)(e.code,{children:"en"})," to the desired language code."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"yaml","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"yaml","data-theme":"default",children:(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"setr ox:locale en"})})})}),"\n",(0,n.jsx)(e.p,{children:"Create a locales directory and a file for your language."}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",filename:"locales/en.json",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"grand_theft_auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"grand theft auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"suspect_sex"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"suspect is %s"'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",filename:"locales/fr.json",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"grand_theft_auto"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vol de voiture"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"male"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"homme"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"female"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"femme"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"suspect_sex"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"le suspect est %s"'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",filename:"fxmanifest.lua",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"files"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'locales/*.json'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(e.p,{children:"Initialise the locale module in your resource (once)."}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {initLocale} "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]}),"\n",(0,n.jsx)(e.p,{children:"Format your strings with the new locale global.\nAdditional arguments can be sent to format the locale output."}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(str, "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(str"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["str: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["vararg?: ",(0,n.jsx)(e.code,{children:"string"})," or ",(0,n.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,n.jsx)("u",{children:(0,n.jsx)(e.strong,{children:"Example"})}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Load the locale module"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetInterval"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'grand_theft_auto'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'suspect_sex'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'male'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// Load the locale module"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"initLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setInterval"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'grand_theft_auto'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'suspect_sex'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'male'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")))"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"phrases",children:"Phrases"}),"\n",(0,n.jsx)(e.p,{children:"You can create a locale string that references other locales to construct a phrase, rather than calling locale multiple times."}),"\n",(0,n.jsx)(e.pre,{"data-language":"json","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"hello"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"hello %s"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"my_name_is"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my name is %s"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:'"hello_my_name_is"'}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"${hello}! ${my_name_is}."'})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello_my_name_is'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'doka'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'linden'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]})})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { locale } "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"locale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'hello_my_name_is'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'doka'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'linden'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]})]})})})]}),"\n",(0,n.jsx)(e.h2,{id:"libgetlocale",children:"lib.getLocale"}),"\n",(0,n.jsx)(e.p,{children:"Gets a locale string from another resource and adds it to the dict."}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getLocale"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(resource, key)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["resource: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["key: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Locale/Shared.mdx",route:"/overextended/ox_lib/Modules/Locale/Shared",timestamp:1730940204e3,title:"Shared",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Locale/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6673)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-522b4b6d88e39b58.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-ed893d2b28535dd5.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-522b4b6d88e39b58.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-ed893d2b28535dd5.js index fa8008d321..3b23138471 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-522b4b6d88e39b58.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Logger/Server-ed893d2b28535dd5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4582],{222:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Logger/Server",function(){return s(9955)}])},9955:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var r=s(2676),i=s(2140),a=s(8745),o=s(7100);let t=[{depth:2,value:"lib.logger",id:"liblogger"},{depth:2,value:"Datadog",id:"datadog"},{depth:3,value:"Create your Datadog account",id:"create-your-datadog-account"},{depth:3,value:"Create an API key",id:"create-an-api-key"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Grafana Loki",id:"grafana-loki"},{depth:3,value:"Create your Grafana account",id:"create-your-grafana-account"},{depth:3,value:"Head to My Account",id:"head-to-my-account"},{depth:3,value:"Setup Loki",id:"setup-loki"},{depth:3,value:"Config",id:"config-1"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:3,value:"Create an account",id:"create-an-account"},{depth:3,value:"Make sure you have the Hobby or Pro plan.",id:"make-sure-you-have-the-hobby-or-pro-plan"},{depth:3,value:"Create a new token",id:"create-a-new-token"},{depth:3,value:"Config",id:"config-2"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",h3:"h3",a:"a",p:"p",br:"br"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Server"}),"\n",(0,r.jsx)(n.h2,{id:"liblogger",children:"lib.logger"}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(source, event, message, "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["source: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Preferably an active player id, otherwise an identifier, or wherever else it originated from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["event: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A name for the log event (i.e. the trigerring event or a description)"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["message: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The content for the log."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["vararg: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Additional arguments are converted to tags for additional filtering and searching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)("br",{}),"\n",(0,r.jsx)("u",{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" vehicle "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Ox."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`sultanrs`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"vector4"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"56.479122"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1116.870362"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"26.432250"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0.000030517578"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'CreateVehicle'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", json."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle))"})]})]})}),"\n",(0,r.jsx)(n.h2,{id:"datadog",children:"Datadog"}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(n.h3,{id:"create-your-datadog-account",children:["Create your ",(0,r.jsx)(n.a,{href:"https://www.datadoghq.com/",children:"Datadog"})," account"]}),(0,r.jsxs)(n.p,{children:["You will receive a free 14 day trial, otherwise refer to their ",(0,r.jsx)(n.a,{href:"https://www.datadoghq.com/pricing/",children:"pricing"})," guide.",(0,r.jsx)(n.br,{}),"\n","Free accounts are limited, however logs will still be retained for 14 days."]}),(0,r.jsxs)(n.h3,{id:"create-an-api-key",children:["Create an ",(0,r.jsx)(n.a,{href:"https://app.datadoghq.com/organization-settings/api-keys",children:"API key"})]}),(0,r.jsx)(n.p,{children:"This is a UUID used to submit logs to your Datadog organisation."}),(0,r.jsx)(n.h3,{id:"config",children:"Config"}),(0,r.jsxs)(n.p,{children:["Set your API key and ",(0,r.jsx)(n.a,{href:"https://docs.datadoghq.com/getting_started/site/",children:"Datadog site"})," using the following convars."]}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"datadog:key"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"yourapikey"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"datadog:site"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"datadoghq.com"'})]})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"grafana-loki",children:"Grafana Loki"}),"\n",(0,r.jsxs)(n.p,{children:["Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.",(0,r.jsx)(n.br,{}),"\n","It is designed to be very cost effective and easy to operate."]}),"\n",(0,r.jsxs)(o.mQ,{items:["Cloud","Self-hosted"],children:[(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Has free tier with some restrictions"}),"\n",(0,r.jsx)(n.li,{children:"Easy to manage"}),"\n",(0,r.jsx)(n.li,{children:"Easier to setup"}),"\n",(0,r.jsx)(n.li,{children:"Mostly managed by Grafana"}),"\n"]}),(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(n.h3,{id:"create-your-grafana-account",children:["Create your ",(0,r.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," account"]}),(0,r.jsxs)(n.h3,{id:"head-to-my-account",children:["Head to ",(0,r.jsx)(n.a,{href:"https://grafana.com/auth/sign-in/?plcmt=top-nav&cta=myaccount",children:"My Account"})]}),(0,r.jsx)(n.h3,{id:"setup-loki",children:"Setup Loki"}),(0,r.jsxs)(n.p,{children:['Find the Loki section in your account panel, and click "Details".\nGenerate a password and save the API key, as well as your ',(0,r.jsx)(n.code,{children:"user"})," and ",(0,r.jsx)(n.code,{children:"url"}),"."]})]})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(n.p,{children:["To setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.",(0,r.jsx)(n.br,{}),"\n","Please find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that."]}),(0,r.jsx)(n.p,{children:"Once done, setup authentication and use the username and password securing your endpoint."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"By default self-hosted loki instances do not provide any authentication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access."}),"\n"]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"config-1",children:"Config"}),"\n",(0,r.jsx)(n.p,{children:"Use the following convars to set your logging service, endpoint, and authentication details."}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"loki"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:user"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:password"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:endpoint"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]})]})}),"\n",(0,r.jsx)(n.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," is an easy-to-use, all-in-one SaaS for game servers that provides logging."]}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsx)(n.h3,{id:"create-an-account",children:"Create an account"}),(0,r.jsxs)(n.p,{children:["Sign up at ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"}),"."]}),(0,r.jsxs)(n.h3,{id:"make-sure-you-have-the-hobby-or-pro-plan",children:["Make sure you have the ",(0,r.jsx)(n.code,{children:"Hobby"})," or ",(0,r.jsx)(n.code,{children:"Pro"})," plan."]}),(0,r.jsxs)(n.p,{children:["You'll get a 14-days free trial if you do not already have an subscription, you can find more information ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/profile/billing?ref=overextended",children:"here"})," and on the ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/pricing?ref=overextended",children:"pricing"})," page."]}),(0,r.jsx)(n.h3,{id:"create-a-new-token",children:"Create a new token"}),(0,r.jsxs)(n.p,{children:["You'll need to create a new token with the type ",(0,r.jsx)(n.code,{children:"Logs"}),"."]}),(0,r.jsx)(n.h3,{id:"config-2",children:"Config"}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"fivemanage"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"fivemanage:key"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"YOUR_API_KEY"'})]})]})})]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Logger/Server.mdx",route:"/overextended/ox_lib/Modules/Logger/Server",timestamp:1730928152e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Logger/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=222)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4582],{222:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Logger/Server",function(){return s(9955)}])},9955:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var r=s(2676),i=s(2140),a=s(8745),o=s(7100);let t=[{depth:2,value:"lib.logger",id:"liblogger"},{depth:2,value:"Datadog",id:"datadog"},{depth:3,value:"Create your Datadog account",id:"create-your-datadog-account"},{depth:3,value:"Create an API key",id:"create-an-api-key"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Grafana Loki",id:"grafana-loki"},{depth:3,value:"Create your Grafana account",id:"create-your-grafana-account"},{depth:3,value:"Head to My Account",id:"head-to-my-account"},{depth:3,value:"Setup Loki",id:"setup-loki"},{depth:3,value:"Config",id:"config-1"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:3,value:"Create an account",id:"create-an-account"},{depth:3,value:"Make sure you have the Hobby or Pro plan.",id:"make-sure-you-have-the-hobby-or-pro-plan"},{depth:3,value:"Create a new token",id:"create-a-new-token"},{depth:3,value:"Config",id:"config-2"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",h3:"h3",a:"a",p:"p",br:"br"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Server"}),"\n",(0,r.jsx)(n.h2,{id:"liblogger",children:"lib.logger"}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(source, event, message, "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["source: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Preferably an active player id, otherwise an identifier, or wherever else it originated from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["event: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A name for the log event (i.e. the trigerring event or a description)"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["message: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The content for the log."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["vararg: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Additional arguments are converted to tags for additional filtering and searching."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)("br",{}),"\n",(0,r.jsx)("u",{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" vehicle "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Ox."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`sultanrs`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"vector4"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"56.479122"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1116.870362"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"26.432250"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0.000030517578"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'CreateVehicle'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", json."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle))"})]})]})}),"\n",(0,r.jsx)(n.h2,{id:"datadog",children:"Datadog"}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(n.h3,{id:"create-your-datadog-account",children:["Create your ",(0,r.jsx)(n.a,{href:"https://www.datadoghq.com/",children:"Datadog"})," account"]}),(0,r.jsxs)(n.p,{children:["You will receive a free 14 day trial, otherwise refer to their ",(0,r.jsx)(n.a,{href:"https://www.datadoghq.com/pricing/",children:"pricing"})," guide.",(0,r.jsx)(n.br,{}),"\n","Free accounts are limited, however logs will still be retained for 14 days."]}),(0,r.jsxs)(n.h3,{id:"create-an-api-key",children:["Create an ",(0,r.jsx)(n.a,{href:"https://app.datadoghq.com/organization-settings/api-keys",children:"API key"})]}),(0,r.jsx)(n.p,{children:"This is a UUID used to submit logs to your Datadog organisation."}),(0,r.jsx)(n.h3,{id:"config",children:"Config"}),(0,r.jsxs)(n.p,{children:["Set your API key and ",(0,r.jsx)(n.a,{href:"https://docs.datadoghq.com/getting_started/site/",children:"Datadog site"})," using the following convars."]}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"datadog:key"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"yourapikey"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"datadog:site"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"datadoghq.com"'})]})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"grafana-loki",children:"Grafana Loki"}),"\n",(0,r.jsxs)(n.p,{children:["Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.",(0,r.jsx)(n.br,{}),"\n","It is designed to be very cost effective and easy to operate."]}),"\n",(0,r.jsxs)(o.mQ,{items:["Cloud","Self-hosted"],children:[(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Has free tier with some restrictions"}),"\n",(0,r.jsx)(n.li,{children:"Easy to manage"}),"\n",(0,r.jsx)(n.li,{children:"Easier to setup"}),"\n",(0,r.jsx)(n.li,{children:"Mostly managed by Grafana"}),"\n"]}),(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(n.h3,{id:"create-your-grafana-account",children:["Create your ",(0,r.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," account"]}),(0,r.jsxs)(n.h3,{id:"head-to-my-account",children:["Head to ",(0,r.jsx)(n.a,{href:"https://grafana.com/auth/sign-in/?plcmt=top-nav&cta=myaccount",children:"My Account"})]}),(0,r.jsx)(n.h3,{id:"setup-loki",children:"Setup Loki"}),(0,r.jsxs)(n.p,{children:['Find the Loki section in your account panel, and click "Details".\nGenerate a password and save the API key, as well as your ',(0,r.jsx)(n.code,{children:"user"})," and ",(0,r.jsx)(n.code,{children:"url"}),"."]})]})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(n.p,{children:["To setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.",(0,r.jsx)(n.br,{}),"\n","Please find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that."]}),(0,r.jsx)(n.p,{children:"Once done, setup authentication and use the username and password securing your endpoint."}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"By default self-hosted loki instances do not provide any authentication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access."}),"\n"]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"config-1",children:"Config"}),"\n",(0,r.jsx)(n.p,{children:"Use the following convars to set your logging service, endpoint, and authentication details."}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"loki"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:user"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:password"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"loki:endpoint"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]})]})}),"\n",(0,r.jsx)(n.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," is an easy-to-use, all-in-one SaaS for game servers that provides logging."]}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsx)(n.h3,{id:"create-an-account",children:"Create an account"}),(0,r.jsxs)(n.p,{children:["Sign up at ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"}),"."]}),(0,r.jsxs)(n.h3,{id:"make-sure-you-have-the-hobby-or-pro-plan",children:["Make sure you have the ",(0,r.jsx)(n.code,{children:"Hobby"})," or ",(0,r.jsx)(n.code,{children:"Pro"})," plan."]}),(0,r.jsxs)(n.p,{children:["You'll get a 14-days free trial if you do not already have an subscription, you can find more information ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/profile/billing?ref=overextended",children:"here"})," and on the ",(0,r.jsx)(n.a,{href:"https://fivemanage.com/pricing?ref=overextended",children:"pricing"})," page."]}),(0,r.jsx)(n.h3,{id:"create-a-new-token",children:"Create a new token"}),(0,r.jsxs)(n.p,{children:["You'll need to create a new token with the type ",(0,r.jsx)(n.code,{children:"Logs"}),"."]}),(0,r.jsx)(n.h3,{id:"config-2",children:"Config"}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"fivemanage"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"fivemanage:key"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"YOUR_API_KEY"'})]})]})})]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Logger/Server.mdx",route:"/overextended/ox_lib/Modules/Logger/Server",timestamp:1730940204e3,title:"Server",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Logger/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=222)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-fa9dcc5c7d536dc2.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-8713972ace20ad89.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-fa9dcc5c7d536dc2.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-8713972ace20ad89.js index aa88956050..d0452070c3 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-fa9dcc5c7d536dc2.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Marker/Client-8713972ace20ad89.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9636],{8161:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Marker/Client",function(){return l(2118)}])},2118:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return i}});var r=l(2676),n=l(2140),o=l(8745);let i=[{depth:2,value:"lib.marker",id:"libmarker"},{depth:2,value:"Marker Class",id:"marker-class"},{depth:2,value:"lib.marker.new",id:"libmarkernew"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:3,value:"Interactive Example",id:"interactive-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span",h3:"h3"},(0,o.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Client"}),"\n",(0,r.jsx)(e.h2,{id:"libmarker",children:"lib.marker"}),"\n",(0,r.jsx)(e.p,{children:"Simple way to create markers"}),"\n",(0,r.jsx)(e.h2,{id:"marker-class",children:"Marker Class"}),"\n",(0,r.jsx)(e.p,{children:"A table representing a marker with the following properties."}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["type: ",(0,r.jsx)(e.code,{children:"number"})," or ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["This field accepts either a numerical value representing the marker ID or a string containing the name of a marker as documented on ",(0,r.jsx)(e.a,{href:"https://docs.fivem.net/docs/game-references/markers/",children:"FiveM Docs"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["coords?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n",(0,r.jsxs)(e.li,{children:["width?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["height?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["color?: ",(0,r.jsx)(e.code,{children:"{ r: number, g: number, b: number, a: number}"})]}),"\n",(0,r.jsxs)(e.li,{children:["direction?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n",(0,r.jsxs)(e.li,{children:["rotation?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"libmarkernew",children:"lib.marker.new"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["Returns: ",(0,r.jsx)(e.code,{children:"Marker"})]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { r "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", g "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", b "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", a "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"Citizen."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"while"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"draw"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Citizen."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h3,{id:"interactive-example",children:"Interactive Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"430.452759"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1026.108032"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"27.846140"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" uiText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Press [E] to get notified"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center,"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center,"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"draw"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Press [E] to get notified"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustPressed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"51"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Hello, World!"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen, currentText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" currentText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" uiText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideTextUI"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Marker/Client.mdx",route:"/overextended/ox_lib/Modules/Marker/Client",timestamp:1730928152e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Marker/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8161)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9636],{8161:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Marker/Client",function(){return l(2118)}])},2118:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return i}});var r=l(2676),n=l(2140),o=l(8745);let i=[{depth:2,value:"lib.marker",id:"libmarker"},{depth:2,value:"Marker Class",id:"marker-class"},{depth:2,value:"lib.marker.new",id:"libmarkernew"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:3,value:"Interactive Example",id:"interactive-example"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",h2:"h2",p:"p",ul:"ul",li:"li",code:"code",a:"a",pre:"pre",span:"span",h3:"h3"},(0,o.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Client"}),"\n",(0,r.jsx)(e.h2,{id:"libmarker",children:"lib.marker"}),"\n",(0,r.jsx)(e.p,{children:"Simple way to create markers"}),"\n",(0,r.jsx)(e.h2,{id:"marker-class",children:"Marker Class"}),"\n",(0,r.jsx)(e.p,{children:"A table representing a marker with the following properties."}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["type: ",(0,r.jsx)(e.code,{children:"number"})," or ",(0,r.jsx)(e.code,{children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["This field accepts either a numerical value representing the marker ID or a string containing the name of a marker as documented on ",(0,r.jsx)(e.a,{href:"https://docs.fivem.net/docs/game-references/markers/",children:"FiveM Docs"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["coords?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n",(0,r.jsxs)(e.li,{children:["width?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["height?: ",(0,r.jsx)(e.code,{children:"number"})]}),"\n",(0,r.jsxs)(e.li,{children:["color?: ",(0,r.jsx)(e.code,{children:"{ r: number, g: number, b: number, a: number}"})]}),"\n",(0,r.jsxs)(e.li,{children:["direction?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n",(0,r.jsxs)(e.li,{children:["rotation?: ",(0,r.jsx)(e.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"libmarkernew",children:"lib.marker.new"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["Returns: ",(0,r.jsx)(e.code,{children:"Marker"})]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" color "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { r "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", g "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", b "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", a "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"Citizen."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"while"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"draw"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Citizen."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,r.jsx)(e.h3,{id:"interactive-example",children:"Interactive Example"}),"\n",(0,r.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"430.452759"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1026.108032"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"27.846140"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" uiText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Press [E] to get notified"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center,"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.marker."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" center,"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" type "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" marker:"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"draw"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"showTextUI"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Press [E] to get notified"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustPressed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"51"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"notify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" description "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Hello, World!"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen, currentText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"isTextUIOpen"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" isOpen "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" currentText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" uiText "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"hideTextUI"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})]})}e.default=(0,n.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Marker/Client.mdx",route:"/overextended/ox_lib/Modules/Marker/Client",timestamp:1730940204e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Marker/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8161)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-1c48384ac813929b.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-da60596d653669f5.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-1c48384ac813929b.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-da60596d653669f5.js index e088c85c79..2b62905e64 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-1c48384ac813929b.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Math/Shared-da60596d653669f5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5929],{21:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Math/Shared",function(){return l(3336)}])},3336:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return i}});var r=l(2676),s=l(2140),a=l(8745);let i=[{depth:2,value:"lib.math",id:"libmath"},{depth:3,value:"math.toscalars",id:"mathtoscalars"},{depth:3,value:"math.tovector",id:"mathtovector"},{depth:3,value:"math.normaltorotation",id:"mathnormaltorotation"},{depth:3,value:"math.torgba",id:"mathtorgba"},{depth:3,value:"math.hextorgb",id:"mathhextorgb"},{depth:3,value:"math.tohex",id:"mathtohex"},{depth:3,value:"math.groupdigits",id:"mathgroupdigits"},{depth:3,value:"math.clamp",id:"mathclamp"},{depth:3,value:"math.round",id:"mathround"},{depth:3,value:"math.interp",id:"mathinterp"},{depth:3,value:"math.lerp",id:"mathlerp"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li",br:"br"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libmath",children:"lib.math"}),"\n",(0,r.jsx)(n.p,{children:"Extends the standard Lua math table with extra functions."}),"\n",(0,r.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math = lib.math"})})})}),"\n",(0,r.jsx)(n.h3,{id:"mathtoscalars",children:"math.toscalars"}),"\n",(0,r.jsx)(n.p,{children:"Takes a string and returns a set of scalar values."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"toscalars"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input, min, max, round)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["min?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["max?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["round?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["...: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtovector",children:"math.tovector"}),"\n",(0,r.jsx)(n.p,{children:"Takes a string or table and returns a vector value, or a number if only one value was found."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"tovector"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input, min, max, round)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"table"})]}),"\n",(0,r.jsxs)(n.li,{children:["min?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["max?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["round?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"vector2"})," or ",(0,r.jsx)(n.code,{children:"vector3"})," or ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathnormaltorotation",children:"math.normaltorotation"}),"\n",(0,r.jsx)(n.p,{children:"Takes a surface normal and tries to convert it to a vector3 rotation."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"normaltorotation"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtorgba",children:"math.torgba"}),"\n",(0,r.jsxs)(n.p,{children:["Takes a string or table and returns a vector value, or a number if only one value was found.",(0,r.jsx)(n.br,{}),"\n","Values are rounded and must be within the range of 0-255."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"torgba"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"vector2"})," or ",(0,r.jsx)(n.code,{children:"vector3"})," or ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathhextorgb",children:"math.hextorgb"}),"\n",(0,r.jsx)(n.p,{children:"Takes a hexadecimal string and returns three integers."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hextorgb"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A hexadecimal value, e.g. ",(0,r.jsx)(n.code,{children:"'eb4034'"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["r: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["g: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["b: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtohex",children:"math.tohex"}),"\n",(0,r.jsx)(n.p,{children:"Takes a number or string and formats it as a hexadecimal string."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"tohex"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(n, upper)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["n: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["upper?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["hex: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathgroupdigits",children:"math.groupdigits"}),"\n",(0,r.jsx)(n.p,{children:"Takes a number and formats it into grouped digits."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"groupdigits"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(number, seperator)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["seperator?: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:","})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["groupedDigits: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathclamp",children:"math.clamp"}),"\n",(0,r.jsx)(n.p,{children:"Clamps a number between a lower and upper limit."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"clamp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(number, lower, upper)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["lower: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["upper: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathround",children:"math.round"}),"\n",(0,r.jsx)(n.p,{children:"Rounds a number to a whole number or to the specified number of decimal places."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"round"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value, places)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["places?: ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["roundedValue: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathinterp",children:"math.interp"}),"\n",(0,r.jsxs)(n.p,{children:["Calculates an intermediate value between ",(0,r.jsx)(n.code,{children:"start"})," and ",(0,r.jsx)(n.code,{children:"finish"})," based on the interpolation ",(0,r.jsx)(n.code,{children:"factor"}),"."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"interp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(start, finish, factor)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["generic ",(0,r.jsx)(n.code,{children:"T"}),": ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"vector2"})," | ",(0,r.jsx)(n.code,{children:"vector3"})," | ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n",(0,r.jsxs)(n.li,{children:["start: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n",(0,r.jsxs)(n.li,{children:["finish: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n",(0,r.jsxs)(n.li,{children:["factor: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The interpolation factor between 0 and 1."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["result: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathlerp",children:"math.lerp"}),"\n",(0,r.jsx)(n.p,{children:"Linearly interpolates between two values over a specified duration, returning an iterator function that will run once per game-frame."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"lerp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(start, finish, duration)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["generic ",(0,r.jsx)(n.code,{children:"T"}),": ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"table"})," | ",(0,r.jsx)(n.code,{children:"vector2"})," | ",(0,r.jsx)(n.code,{children:"vector3"})," | ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n",(0,r.jsxs)(n.li,{children:["start: ",(0,r.jsx)(n.code,{children:"T"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The starting value of the interpolation"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["finish: ",(0,r.jsx)(n.code,{children:"T"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The ending value of the interpolation"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["duration: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The duration over which to interpolate over in milliseconds."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["iteratorFunction: ",(0,r.jsx)(n.code,{children:"fun(): T, number"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Math/Shared.mdx",route:"/overextended/ox_lib/Modules/Math/Shared",timestamp:1730928152e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Math/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=21)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5929],{21:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Math/Shared",function(){return l(3336)}])},3336:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return i}});var r=l(2676),s=l(2140),a=l(8745);let i=[{depth:2,value:"lib.math",id:"libmath"},{depth:3,value:"math.toscalars",id:"mathtoscalars"},{depth:3,value:"math.tovector",id:"mathtovector"},{depth:3,value:"math.normaltorotation",id:"mathnormaltorotation"},{depth:3,value:"math.torgba",id:"mathtorgba"},{depth:3,value:"math.hextorgb",id:"mathhextorgb"},{depth:3,value:"math.tohex",id:"mathtohex"},{depth:3,value:"math.groupdigits",id:"mathgroupdigits"},{depth:3,value:"math.clamp",id:"mathclamp"},{depth:3,value:"math.round",id:"mathround"},{depth:3,value:"math.interp",id:"mathinterp"},{depth:3,value:"math.lerp",id:"mathlerp"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li",br:"br"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libmath",children:"lib.math"}),"\n",(0,r.jsx)(n.p,{children:"Extends the standard Lua math table with extra functions."}),"\n",(0,r.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math = lib.math"})})})}),"\n",(0,r.jsx)(n.h3,{id:"mathtoscalars",children:"math.toscalars"}),"\n",(0,r.jsx)(n.p,{children:"Takes a string and returns a set of scalar values."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"toscalars"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input, min, max, round)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["min?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["max?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["round?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["...: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtovector",children:"math.tovector"}),"\n",(0,r.jsx)(n.p,{children:"Takes a string or table and returns a vector value, or a number if only one value was found."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"tovector"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input, min, max, round)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"table"})]}),"\n",(0,r.jsxs)(n.li,{children:["min?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["max?: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["round?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"vector2"})," or ",(0,r.jsx)(n.code,{children:"vector3"})," or ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathnormaltorotation",children:"math.normaltorotation"}),"\n",(0,r.jsx)(n.p,{children:"Takes a surface normal and tries to convert it to a vector3 rotation."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"normaltorotation"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"vector3"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtorgba",children:"math.torgba"}),"\n",(0,r.jsxs)(n.p,{children:["Takes a string or table and returns a vector value, or a number if only one value was found.",(0,r.jsx)(n.br,{}),"\n","Values are rounded and must be within the range of 0-255."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"torgba"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"})," or ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"vector2"})," or ",(0,r.jsx)(n.code,{children:"vector3"})," or ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathhextorgb",children:"math.hextorgb"}),"\n",(0,r.jsx)(n.p,{children:"Takes a hexadecimal string and returns three integers."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"hextorgb"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(input)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["input: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A hexadecimal value, e.g. ",(0,r.jsx)(n.code,{children:"'eb4034'"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["r: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["g: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["b: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathtohex",children:"math.tohex"}),"\n",(0,r.jsx)(n.p,{children:"Takes a number or string and formats it as a hexadecimal string."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"tohex"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(n, upper)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["n: ",(0,r.jsx)(n.code,{children:"number"})," or ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["upper?: ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["hex: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathgroupdigits",children:"math.groupdigits"}),"\n",(0,r.jsx)(n.p,{children:"Takes a number and formats it into grouped digits."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"groupdigits"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(number, seperator)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["seperator?: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:","})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["groupedDigits: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathclamp",children:"math.clamp"}),"\n",(0,r.jsx)(n.p,{children:"Clamps a number between a lower and upper limit."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"clamp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(number, lower, upper)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["lower: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["upper: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["number: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathround",children:"math.round"}),"\n",(0,r.jsx)(n.p,{children:"Rounds a number to a whole number or to the specified number of decimal places."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"round"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(value, places)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["value: ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["places?: ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["roundedValue: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathinterp",children:"math.interp"}),"\n",(0,r.jsxs)(n.p,{children:["Calculates an intermediate value between ",(0,r.jsx)(n.code,{children:"start"})," and ",(0,r.jsx)(n.code,{children:"finish"})," based on the interpolation ",(0,r.jsx)(n.code,{children:"factor"}),"."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"interp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(start, finish, factor)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["generic ",(0,r.jsx)(n.code,{children:"T"}),": ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"vector2"})," | ",(0,r.jsx)(n.code,{children:"vector3"})," | ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n",(0,r.jsxs)(n.li,{children:["start: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n",(0,r.jsxs)(n.li,{children:["finish: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n",(0,r.jsxs)(n.li,{children:["factor: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The interpolation factor between 0 and 1."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["result: ",(0,r.jsx)(n.code,{children:"T"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"mathlerp",children:"math.lerp"}),"\n",(0,r.jsx)(n.p,{children:"Linearly interpolates between two values over a specified duration, returning an iterator function that will run once per game-frame."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"math."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"lerp"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(start, finish, duration)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["generic ",(0,r.jsx)(n.code,{children:"T"}),": ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"table"})," | ",(0,r.jsx)(n.code,{children:"vector2"})," | ",(0,r.jsx)(n.code,{children:"vector3"})," | ",(0,r.jsx)(n.code,{children:"vector4"})]}),"\n",(0,r.jsxs)(n.li,{children:["start: ",(0,r.jsx)(n.code,{children:"T"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The starting value of the interpolation"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["finish: ",(0,r.jsx)(n.code,{children:"T"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The ending value of the interpolation"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["duration: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The duration over which to interpolate over in milliseconds."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["iteratorFunction: ",(0,r.jsx)(n.code,{children:"fun(): T, number"})]}),"\n"]})]})}n.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Math/Shared.mdx",route:"/overextended/ox_lib/Modules/Math/Shared",timestamp:1730940204e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Math/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=21)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-29e259d5650202b0.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-458f16d484fa238e.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-29e259d5650202b0.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-458f16d484fa238e.js index c904ee680c..b09c661011 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-29e259d5650202b0.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/JavaScript/Client-458f16d484fa238e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8073],{8122:function(s,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Points/JavaScript/Client",function(){return o(7295)}])},7295:function(s,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return i}});var e=o(2676),l=o(2140),r=o(8745);let i=[{depth:2,value:"Points",id:"points"}];function _createMdxContent(s){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),s.components);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.h1,{children:"Client"}),"\n",(0,e.jsx)(n.h2,{id:"points",children:"Points"}),"\n",(0,e.jsx)(n.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,e.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,e.jsx)(n.code,{"data-language":"ts","data-theme":"default",children:(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"T"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">({coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args})"})]})})}),"\n",(0,e.jsxs)(n.ul,{children:["\n",(0,e.jsxs)(n.li,{children:["coords: ",(0,e.jsx)(n.code,{children:"number[]"})]}),"\n",(0,e.jsxs)(n.li,{children:["distance: ",(0,e.jsx)(n.code,{children:"number"})]}),"\n",(0,e.jsxs)(n.li,{children:["onEnter?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["onExit?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["nearby?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["args?: ",(0,e.jsx)(n.code,{children:"T"})]}),"\n"]}),"\n",(0,e.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,e.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" cache } "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<{dunak"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}>) {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// @ts-ignore"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DrawMarker"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".x"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".y"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".z"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"180"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".currentDistance "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".currentDistance "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Inside marker'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.dunak)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".ped"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" dunak"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nerd'"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Entered range of point'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Left range of point'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})}n.default=(0,l.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),s.components);return n?(0,e.jsx)(n,{...s,children:(0,e.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Points/JavaScript/Client.mdx",route:"/overextended/ox_lib/Modules/Points/JavaScript/Client",timestamp:1730928152e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Points/JavaScript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8122)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8073],{8122:function(s,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Points/JavaScript/Client",function(){return o(7295)}])},7295:function(s,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return i}});var e=o(2676),l=o(2140),r=o(8745);let i=[{depth:2,value:"Points",id:"points"}];function _createMdxContent(s){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,r.a)(),s.components);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.h1,{children:"Client"}),"\n",(0,e.jsx)(n.h2,{id:"points",children:"Points"}),"\n",(0,e.jsx)(n.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,e.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,e.jsx)(n.code,{"data-language":"ts","data-theme":"default",children:(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"T"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">({coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args})"})]})})}),"\n",(0,e.jsxs)(n.ul,{children:["\n",(0,e.jsxs)(n.li,{children:["coords: ",(0,e.jsx)(n.code,{children:"number[]"})]}),"\n",(0,e.jsxs)(n.li,{children:["distance: ",(0,e.jsx)(n.code,{children:"number"})]}),"\n",(0,e.jsxs)(n.li,{children:["onEnter?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["onExit?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["nearby?: ",(0,e.jsx)(n.code,{children:"function"})]}),"\n",(0,e.jsxs)(n.li,{children:["args?: ",(0,e.jsx)(n.code,{children:"T"})]}),"\n"]}),"\n",(0,e.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,e.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" cache } "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<{dunak"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}>) {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// @ts-ignore"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"DrawMarker"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".x"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".y"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".z"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"180"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"null"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".currentDistance "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".currentDistance "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Inside marker'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"this"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.dunak)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" coords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".ped"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" nearby"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" dunak"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nerd'"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Entered range of point'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,e.jsx)(n.span,{className:"line",children:" "}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,e.jsxs)(n.span,{className:"line",children:[(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Left range of point'"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"point"}),(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,e.jsx)(n.span,{className:"line",children:(0,e.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})}n.default=(0,l.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),s.components);return n?(0,e.jsx)(n,{...s,children:(0,e.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Points/JavaScript/Client.mdx",route:"/overextended/ox_lib/Modules/Points/JavaScript/Client",timestamp:1730940204e3,title:"Client",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Points/JavaScript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8122)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-1a1cfd2df931315b.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-946dd6bd6dd4ae89.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-1a1cfd2df931315b.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-946dd6bd6dd4ae89.js index d28c4c5bbd..8084fcad0a 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-1a1cfd2df931315b.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Points/Lua/Client-946dd6bd6dd4ae89.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8949],{5654:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Points/Lua/Client",function(){return n(8301)}])},8301:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return r}});var l=n(2676),i=n(2140),o=n(8745);let r=[{depth:2,value:"CPoint Class",id:"cpoint-class"},{depth:2,value:"lib.points.new",id:"libpointsnew"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.points.getAllPoints",id:"libpointsgetallpoints"},{depth:2,value:"lib.points.getNearbyPoints",id:"libpointsgetnearbypoints"},{depth:2,value:"lib.points.getClosestPoint",id:"libpointsgetclosestpoint"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span",h3:"h3"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Client"}),"\n",(0,l.jsx)(e.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,l.jsx)(e.h2,{id:"cpoint-class",children:"CPoint Class"}),"\n",(0,l.jsx)(e.p,{children:"A table representing a point with the following properties."}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'The distance for the player to be "inside" a point (i.e. the point\'s radius).'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["currentDistance: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The players current distance from the centre of the point."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["isClosest?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["remove: ",(0,l.jsx)(e.code,{children:"function()"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes the point from the points registry."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onEnter?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered when player gets within ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onExit?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered when player goes beyond ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["nearby?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered on frame when within ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsnew",children:"lib.points.new"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["data: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Returns:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["point: ",(0,l.jsx)(e.code,{children:"CPoint"})]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dunak "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nerd'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'entered range of point'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'left range of point'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"DrawMarker"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.coords.x, self.coords.y, self.coords.z, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"180.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inside marker'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dunak is a '"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.dunak)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetallpoints",children:"lib.points.getAllPoints"}),"\n",(0,l.jsx)(e.p,{children:"Get a table of all points created in the resource."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getAllPoints"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["points: ",(0,l.jsx)(e.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetnearbypoints",children:"lib.points.getNearbyPoints"}),"\n",(0,l.jsx)(e.p,{children:"Get an array of all points in range of the player."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPoints"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["nearbyPoints: ",(0,l.jsx)(e.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetclosestpoint",children:"lib.points.getClosestPoint"}),"\n",(0,l.jsx)(e.p,{children:"Get the data for the closest point to the player."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPoint"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["closestPoint?: ",(0,l.jsx)(e.code,{children:"CPoint"})]}),"\n"]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Points/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Points/Lua/Client",timestamp:1730928152e3,title:"Client",headings:r},pageNextRoute:"/overextended/ox_lib/Modules/Points/Lua/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5654)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8949],{5654:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Points/Lua/Client",function(){return n(8301)}])},8301:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return r}});var l=n(2676),i=n(2140),o=n(8745);let r=[{depth:2,value:"CPoint Class",id:"cpoint-class"},{depth:2,value:"lib.points.new",id:"libpointsnew"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.points.getAllPoints",id:"libpointsgetallpoints"},{depth:2,value:"lib.points.getNearbyPoints",id:"libpointsgetnearbypoints"},{depth:2,value:"lib.points.getClosestPoint",id:"libpointsgetclosestpoint"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",pre:"pre",span:"span",h3:"h3"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Client"}),"\n",(0,l.jsx)(e.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,l.jsx)(e.h2,{id:"cpoint-class",children:"CPoint Class"}),"\n",(0,l.jsx)(e.p,{children:"A table representing a point with the following properties."}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["id: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:'The distance for the player to be "inside" a point (i.e. the point\'s radius).'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["currentDistance: ",(0,l.jsx)(e.code,{children:"number"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The players current distance from the centre of the point."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["isClosest?: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(e.li,{children:["remove: ",(0,l.jsx)(e.code,{children:"function()"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes the point from the points registry."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onEnter?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered when player gets within ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["onExit?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered when player goes beyond ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["nearby?: ",(0,l.jsx)(e.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Function triggered on frame when within ",(0,l.jsx)(e.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsnew",children:"lib.points.new"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["data: ",(0,l.jsx)(e.code,{children:"table"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["coords: ",(0,l.jsx)(e.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(e.li,{children:["distance: ",(0,l.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Returns:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["point: ",(0,l.jsx)(e.code,{children:"CPoint"})]}),"\n"]}),"\n",(0,l.jsx)(e.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"GetEntityCoords"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"5"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" dunak "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nerd'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'entered range of point'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'left range of point'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"DrawMarker"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.coords.x, self.coords.y, self.coords.z, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"180.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inside marker'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dunak is a '"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.dunak)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetallpoints",children:"lib.points.getAllPoints"}),"\n",(0,l.jsx)(e.p,{children:"Get a table of all points created in the resource."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getAllPoints"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["points: ",(0,l.jsx)(e.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetnearbypoints",children:"lib.points.getNearbyPoints"}),"\n",(0,l.jsx)(e.p,{children:"Get an array of all points in range of the player."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPoints"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["nearbyPoints: ",(0,l.jsx)(e.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libpointsgetclosestpoint",children:"lib.points.getClosestPoint"}),"\n",(0,l.jsx)(e.p,{children:"Get the data for the closest point to the player."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.points."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPoint"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(e.p,{children:"Return:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["closestPoint?: ",(0,l.jsx)(e.code,{children:"CPoint"})]}),"\n"]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Points/Lua/Client.mdx",route:"/overextended/ox_lib/Modules/Points/Lua/Client",timestamp:1730940204e3,title:"Client",headings:r},pageNextRoute:"/overextended/ox_lib/Modules/Points/Lua/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5654)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-eb08e2c855813a09.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-2a964be4123afb68.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-eb08e2c855813a09.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-2a964be4123afb68.js index bddaca0f98..90c7db5e68 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-eb08e2c855813a09.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Print/Shared-2a964be4123afb68.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1425],{9046:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Print/Shared",function(){return s(3231)}])},3231:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),i=s(2140),r=s(8745);let t=[{depth:2,value:"lib.print",id:"libprint"},{depth:3,value:"Example",id:"example"},{depth:3,value:"Levels",id:"levels"},{depth:3,value:"Config",id:"config"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Shared"}),"\n",(0,l.jsx)(n.p,{children:"Prints to console conditionally based on convars set.\nDifferent level prints are colored and labeled.\nResource name is always included."}),"\n",(0,l.jsx)(n.h2,{id:"libprint",children:"lib.print"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"info"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"verbose"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"debug"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vararg: ",(0,l.jsx)(n.code,{children:"any"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"What to print in console. Converts tables into a pretty-print format."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"query latency high: "'}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", latency)"})]})})}),"\n",(0,l.jsx)(n.h3,{id:"levels",children:"Levels"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Error"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Indicates a failure in the system."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Warn"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Warns of an unexpected condition, or a state which is likely to cause an error in the future."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Info"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Information about high-level, successful operations."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Verbose"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"More detailed information containing intermediate steps of high-level, operations"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Debug"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Used by developers to understand the system and may contain detailed trace information.\nShould generally not be turned on when not debugging."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"config",children:"Config"}),"\n",(0,l.jsx)(n.p,{children:"Use the following convars to set your print level. Prints less severe than the current level will not be executed.\nFor example, a level of info will print error, warn, and info, but not verbose nor debug. Defaults to info if not set.\nResource specific print levels override the global convar."}),"\n",(0,l.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"info"'})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel:ox_inventory"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"warn"'})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"resourceNam"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"e"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]})]})})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Print/Shared.mdx",route:"/overextended/ox_lib/Modules/Print/Shared",timestamp:1730928152e3,title:"Shared",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Print/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9046)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1425],{9046:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Print/Shared",function(){return s(3231)}])},3231:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var l=s(2676),i=s(2140),r=s(8745);let t=[{depth:2,value:"lib.print",id:"libprint"},{depth:3,value:"Example",id:"example"},{depth:3,value:"Levels",id:"levels"},{depth:3,value:"Config",id:"config"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Shared"}),"\n",(0,l.jsx)(n.p,{children:"Prints to console conditionally based on convars set.\nDifferent level prints are colored and labeled.\nResource name is always included."}),"\n",(0,l.jsx)(n.h2,{id:"libprint",children:"lib.print"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"info"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"verbose"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"debug"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vararg: ",(0,l.jsx)(n.code,{children:"any"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"What to print in console. Converts tables into a pretty-print format."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.print."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"query latency high: "'}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", latency)"})]})})}),"\n",(0,l.jsx)(n.h3,{id:"levels",children:"Levels"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Error"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Indicates a failure in the system."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Warn"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Warns of an unexpected condition, or a state which is likely to cause an error in the future."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Info"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Information about high-level, successful operations."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Verbose"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"More detailed information containing intermediate steps of high-level, operations"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Debug"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Used by developers to understand the system and may contain detailed trace information.\nShould generally not be turned on when not debugging."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"config",children:"Config"}),"\n",(0,l.jsx)(n.p,{children:"Use the following convars to set your print level. Prints less severe than the current level will not be executed.\nFor example, a level of info will print error, warn, and info, but not verbose nor debug. Defaults to info if not set.\nResource specific print levels override the global convar."}),"\n",(0,l.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"info"'})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel:ox_inventory"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"warn"'})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox:printlevel:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"<"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"resourceNam"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"e"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:">"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'})]})]})})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Print/Shared.mdx",route:"/overextended/ox_lib/Modules/Print/Shared",timestamp:1730940204e3,title:"Shared",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Print/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9046)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-0d36fbbbbdde0e09.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-f8312cd19ecec3e2.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-0d36fbbbbdde0e09.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-f8312cd19ecec3e2.js index 2a6ac27e0f..936f60ec70 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-0d36fbbbbdde0e09.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Raycast/Client-f8312cd19ecec3e2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6651],{7257:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Raycast/Client",function(){return s(1602)}])},1602:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return a}});var i=s(2676),l=s(2140),r=s(8745),t=s(7100);let a=[{depth:2,value:"lib.raycast.fromCoords",id:"libraycastfromcoords"},{depth:2,value:"lib.raycast.fromCamera",id:"libraycastfromcamera"},{depth:2,value:"lib.raycast.cam",id:"libraycastcam"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Client"}),"\n",(0,i.jsx)(n.h2,{id:"libraycastfromcoords",children:"lib.raycast.fromCoords"}),"\n",(0,i.jsx)(n.p,{children:"Starts a shapetest originating from starting coordinates and ending at destination coordinates."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.raycast."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fromCoords"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, destination, flags, ignore)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["coords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Starting coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["destination: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Destination coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["flags?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["See: ",(0,i.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["ignore?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["hit: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["entityHit: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["endCoords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["surfaceNormal: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["materialHash: ",(0,i.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"libraycastfromcamera",children:"lib.raycast.fromCamera"}),"\n",(0,i.jsx)(n.p,{children:"Starts a shapetest originating from the camera, extending to ~10m by default."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.raycast."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fromCamera"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(flags, ignore, distance)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["flags?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["See: ",(0,i.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["ignore?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["distance?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"10"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["hit: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["entityHit: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["endCoords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["surfaceNormal: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["materialHash: ",(0,i.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"libraycastcam",children:"lib.raycast.cam"}),"\n",(0,i.jsx)(t.UW,{type:"warning",children:"lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!"})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Raycast/Client.mdx",route:"/overextended/ox_lib/Modules/Raycast/Client",timestamp:1730928152e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Raycast/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7257)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6651],{7257:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Raycast/Client",function(){return s(1602)}])},1602:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return a}});var i=s(2676),l=s(2140),r=s(8745),t=s(7100);let a=[{depth:2,value:"lib.raycast.fromCoords",id:"libraycastfromcoords"},{depth:2,value:"lib.raycast.fromCamera",id:"libraycastfromcamera"},{depth:2,value:"lib.raycast.cam",id:"libraycastcam"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Client"}),"\n",(0,i.jsx)(n.h2,{id:"libraycastfromcoords",children:"lib.raycast.fromCoords"}),"\n",(0,i.jsx)(n.p,{children:"Starts a shapetest originating from starting coordinates and ending at destination coordinates."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.raycast."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fromCoords"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, destination, flags, ignore)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["coords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Starting coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["destination: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Destination coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["flags?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["See: ",(0,i.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["ignore?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["hit: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["entityHit: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["endCoords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["surfaceNormal: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["materialHash: ",(0,i.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"libraycastfromcamera",children:"lib.raycast.fromCamera"}),"\n",(0,i.jsx)(n.p,{children:"Starts a shapetest originating from the camera, extending to ~10m by default."}),"\n",(0,i.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib.raycast."}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fromCamera"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(flags, ignore, distance)"})]})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["flags?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["See: ",(0,i.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["ignore?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A bit mask with bits 1, 2, 4, or 7 relating to collider types. 4 and 7 are usually used."}),"\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["distance?: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Default: ",(0,i.jsx)(n.code,{children:"10"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Return:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["hit: ",(0,i.jsx)(n.code,{children:"boolean"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["entityHit: ",(0,i.jsx)(n.code,{children:"number"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["endCoords: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["surfaceNormal: ",(0,i.jsx)(n.code,{children:"vector3"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["materialHash: ",(0,i.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"libraycastcam",children:"lib.raycast.cam"}),"\n",(0,i.jsx)(t.UW,{type:"warning",children:"lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!"})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Raycast/Client.mdx",route:"/overextended/ox_lib/Modules/Raycast/Client",timestamp:1730940204e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Raycast/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7257)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-8f5855b38b3b1261.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-23ae413c56ac604b.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-8f5855b38b3b1261.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-23ae413c56ac604b.js index cafbcfdcb7..97801cd559 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-8f5855b38b3b1261.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Require/Shared-23ae413c56ac604b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5871],{5128:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Require/Shared",function(){return l(3252)}])},3252:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return o}});var n=l(2676),a=l(2140),r=l(8745),i=l(7100);let o=[{depth:2,value:"require",id:"require"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.load",id:"libload"},{depth:3,value:"Usage Example",id:"usage-example-1"},{depth:2,value:"lib.loadJson",id:"libloadjson"},{depth:3,value:"Usage Example",id:"usage-example-2"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",em:"em",h2:"h2",code:"code",ul:"ul",li:"li",pre:"pre",span:"span",h3:"h3"},(0,r.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Shared"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"This module is always loaded by default."})}),"\n",(0,n.jsx)(s.h2,{id:"require",children:"require"}),"\n",(0,n.jsxs)(s.p,{children:["Loads the given module. The function starts by indexing the ",(0,n.jsx)(s.code,{children:"loaded"})," table to determine whether ",(0,n.jsx)(s.code,{children:"modname"})," is already loaded. If it is, then ",(0,n.jsx)(s.code,{children:"require"})," returns the value stored at ",(0,n.jsx)(s.code,{children:"loaded[modname]"}),"."]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Module names are the path to a file relative to the resource."}),"\n",(0,n.jsxs)(s.li,{children:["The module name must point to a ",(0,n.jsx)(s.code,{children:".lua"})," file."]}),"\n",(0,n.jsxs)(s.li,{children:["Use ",(0,n.jsx)(s.code,{children:"."})," to separate directories in a path."]}),"\n",(0,n.jsxs)(s.li,{children:["Modules can be loaded from external resources using ",(0,n.jsx)(s.code,{children:"@resource.modname"}),"."]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname'"})]})})}),"\n",(0,n.jsxs)(i.UW,{type:"warning",children:[(0,n.jsxs)(s.p,{children:["Client modules must be defined in the ",(0,n.jsx)(s.code,{children:"file"})," section of the resource manifest."]}),(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"fxmanifest.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname.lua'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- or"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname.lua'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"- resources/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - mylib/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - import.lua"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - data/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - events.lua"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - myresource/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - server.lua"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"mylib/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded mylib'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"mylib/data/events.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" disconnect "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onPlayerDropped'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/server.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@mylib.import'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(mylib.events.disconnect)"})]})]})}),"\n",(0,n.jsx)(s.h2,{id:"libload",children:"lib.load"}),"\n",(0,n.jsx)(s.p,{children:"Loads and runs a Lua file at the given path. Unlike require, the chunk is not cached for future use."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath, env)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["filePath: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A path to the Lua file, using the same rules as ",(0,n.jsx)(s.code,{children:"require"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["env?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A table to use as the global environment, defaulting to ",(0,n.jsx)(s.code,{children:"_ENV"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example-1",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/data/events.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" disconnect "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onPlayerDropped'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(s.h2,{id:"libloadjson",children:"lib.loadJson"}),"\n",(0,n.jsx)(s.p,{children:"Loads a JSON file at the given path and decodes it as a table."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadJson"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["filePath: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A path to the Lua file, using the same rules as ",(0,n.jsx)(s.code,{children:"require"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example-2",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadJson"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"json","data-theme":"default",filename:"myresource/data/events.json",children:(0,n.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"disconnect"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"onPlayerDropped"'})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})}s.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Require/Shared.mdx",route:"/overextended/ox_lib/Modules/Require/Shared",timestamp:1730928152e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Require/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5128)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5871],{5128:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Require/Shared",function(){return l(3252)}])},3252:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return o}});var n=l(2676),a=l(2140),r=l(8745),i=l(7100);let o=[{depth:2,value:"require",id:"require"},{depth:3,value:"Usage Example",id:"usage-example"},{depth:2,value:"lib.load",id:"libload"},{depth:3,value:"Usage Example",id:"usage-example-1"},{depth:2,value:"lib.loadJson",id:"libloadjson"},{depth:3,value:"Usage Example",id:"usage-example-2"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",em:"em",h2:"h2",code:"code",ul:"ul",li:"li",pre:"pre",span:"span",h3:"h3"},(0,r.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Shared"}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.em,{children:"This module is always loaded by default."})}),"\n",(0,n.jsx)(s.h2,{id:"require",children:"require"}),"\n",(0,n.jsxs)(s.p,{children:["Loads the given module. The function starts by indexing the ",(0,n.jsx)(s.code,{children:"loaded"})," table to determine whether ",(0,n.jsx)(s.code,{children:"modname"})," is already loaded. If it is, then ",(0,n.jsx)(s.code,{children:"require"})," returns the value stored at ",(0,n.jsx)(s.code,{children:"loaded[modname]"}),"."]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Module names are the path to a file relative to the resource."}),"\n",(0,n.jsxs)(s.li,{children:["The module name must point to a ",(0,n.jsx)(s.code,{children:".lua"})," file."]}),"\n",(0,n.jsxs)(s.li,{children:["Use ",(0,n.jsx)(s.code,{children:"."})," to separate directories in a path."]}),"\n",(0,n.jsxs)(s.li,{children:["Modules can be loaded from external resources using ",(0,n.jsx)(s.code,{children:"@resource.modname"}),"."]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname'"})]})})}),"\n",(0,n.jsxs)(i.UW,{type:"warning",children:[(0,n.jsxs)(s.p,{children:["Client modules must be defined in the ",(0,n.jsx)(s.code,{children:"file"})," section of the resource manifest."]}),(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"fxmanifest.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname.lua'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- or"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'modname.lua'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"- resources/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - mylib/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - import.lua"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - data/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - events.lua"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - myresource/"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" - server.lua"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"mylib/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded mylib'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"mylib/data/events.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" disconnect "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onPlayerDropped'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/server.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mylib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@mylib.import'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(mylib.events.disconnect)"})]})]})}),"\n",(0,n.jsx)(s.h2,{id:"libload",children:"lib.load"}),"\n",(0,n.jsx)(s.p,{children:"Loads and runs a Lua file at the given path. Unlike require, the chunk is not cached for future use."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath, env)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["filePath: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A path to the Lua file, using the same rules as ",(0,n.jsx)(s.code,{children:"require"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["env?: ",(0,n.jsx)(s.code,{children:"table"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A table to use as the global environment, defaulting to ",(0,n.jsx)(s.code,{children:"_ENV"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example-1",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"load"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/data/events.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" disconnect "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'onPlayerDropped'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,n.jsx)(s.h2,{id:"libloadjson",children:"lib.loadJson"}),"\n",(0,n.jsx)(s.p,{children:"Loads a JSON file at the given path and decodes it as a table."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadJson"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["filePath: ",(0,n.jsx)(s.code,{children:"string"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["A path to the Lua file, using the same rules as ",(0,n.jsx)(s.code,{children:"require"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"usage-example-2",children:"Usage Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",filename:"myresource/import.lua",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" events "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadJson"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'data.events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Loaded events'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.pre,{"data-language":"json","data-theme":"default",filename:"myresource/data/events.json",children:(0,n.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:'"disconnect"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"onPlayerDropped"'})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})}s.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Require/Shared.mdx",route:"/overextended/ox_lib/Modules/Require/Shared",timestamp:1730940204e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Require/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5128)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b062721ea2eee581.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b14edcd19da9e52f.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b062721ea2eee581.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b14edcd19da9e52f.js index d9f6e6cd65..12f583ccbd 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b062721ea2eee581.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Streaming/Client-b14edcd19da9e52f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3166],{4071:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Streaming/Client",function(){return l(3469)}])},3469:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var n=l(2676),i=l(2140),t=l(8745),r=l(7100);let a=[{depth:2,value:"lib.requestAnimDict",id:"librequestanimdict"},{depth:2,value:"lib.requestAnimSet",id:"librequestanimset"},{depth:2,value:"lib.requestModel",id:"librequestmodel"},{depth:2,value:"lib.requestStreamedTextureDict",id:"librequeststreamedtexturedict"},{depth:2,value:"lib.requestNamedPtfxAsset",id:"librequestnamedptfxasset"},{depth:2,value:"lib.requestScaleformMovie",id:"librequestscaleformmovie"},{depth:2,value:"lib.requestWeaponAsset",id:"librequestweaponasset"},{depth:3,value:"WeaponResourceFlags",id:"weaponresourceflags"},{depth:3,value:"ExtraWeaponComponentFlags",id:"extraweaponcomponentflags"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li",h3:"h3"},(0,t.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Client"}),"\n",(0,n.jsxs)(s.p,{children:["Check if assets exist, such as models, and loads them into memory.",(0,n.jsx)(s.br,{}),"\n","Throws errors for invalid assets and returns true if the asset is loaded."]}),"\n",(0,n.jsx)(s.h2,{id:"librequestanimdict",children:"lib.requestAnimDict"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveAnimDict(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestAnimDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestAnimDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["dict: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestanimset",children:"lib.requestAnimSet"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveAnimSet(set)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestAnimSet"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(set, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestAnimSet"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["set: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestmodel",children:"lib.requestModel"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetModelAsNoLongerNeeded(model)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestModel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(model, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestModel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(model"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["model: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequeststreamedtexturedict",children:"lib.requestStreamedTextureDict"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetStreamedTextureDictAsNoLongerNeeded(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestStreamedTextureDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestStreamedTextureDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["dict: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestnamedptfxasset",children:"lib.requestNamedPtfxAsset"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveNamedPtfxAsset(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestNamedPtfxAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(ptFxName, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestNamedPtfxAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(ptFxName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["ptFxName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestscaleformmovie",children:"lib.requestScaleformMovie"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetScaleformMovieAsNoLongerNeeded(scaleformName)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestScaleformMovie"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(scaleformName, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestScaleformMovie"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(scaleformName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["scaleformName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"1000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestweaponasset",children:"lib.requestWeaponAsset"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveWeaponAsset(weaponType)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestWeaponAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestWeaponAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(weaponType"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weaponResourceFlags"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" extraWeaponComponentFlags)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["weaponType: ",(0,n.jsx)(s.code,{children:"string | number"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["weaponResourceFlags?: ",(0,n.jsx)(s.code,{children:"WeaponResourceFlags"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"31"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["extraWeaponComponentFlags?: ",(0,n.jsx)(s.code,{children:"ExtraWeaponComponentFlags"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"weaponresourceflags",children:"WeaponResourceFlags"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"1 WRF_REQUEST_BASE_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"2 WRF_REQUEST_COVER_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"4 WRF_REQUEST_MELEE_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"8 WRF_REQUEST_MOTION_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"16 WRF_REQUEST_STEALTH_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"32 WRF_REQUEST_ALL_MOVEMENT_VARIATION_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"31 WRF_REQUEST_ALL_ANIMS"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"extraweaponcomponentflags",children:"ExtraWeaponComponentFlags"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"0 WEAPON_COMPONENT_NONE"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"1 WEAPON_COMPONENT_FLASH"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"2 WEAPON_COMPONENT_SCOPE"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"4 WEAPON_COMPONENT_SUPP"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"8 WEAPON_COMPONENT_SCLIP2"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"16 WEAPON_COMPONENT_GRIP"})})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Streaming/Client.mdx",route:"/overextended/ox_lib/Modules/Streaming/Client",timestamp:1730928152e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Streaming/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4071)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3166],{4071:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Streaming/Client",function(){return l(3469)}])},3469:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var n=l(2676),i=l(2140),t=l(8745),r=l(7100);let a=[{depth:2,value:"lib.requestAnimDict",id:"librequestanimdict"},{depth:2,value:"lib.requestAnimSet",id:"librequestanimset"},{depth:2,value:"lib.requestModel",id:"librequestmodel"},{depth:2,value:"lib.requestStreamedTextureDict",id:"librequeststreamedtexturedict"},{depth:2,value:"lib.requestNamedPtfxAsset",id:"librequestnamedptfxasset"},{depth:2,value:"lib.requestScaleformMovie",id:"librequestscaleformmovie"},{depth:2,value:"lib.requestWeaponAsset",id:"librequestweaponasset"},{depth:3,value:"WeaponResourceFlags",id:"weaponresourceflags"},{depth:3,value:"ExtraWeaponComponentFlags",id:"extraweaponcomponentflags"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li",h3:"h3"},(0,t.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Client"}),"\n",(0,n.jsxs)(s.p,{children:["Check if assets exist, such as models, and loads them into memory.",(0,n.jsx)(s.br,{}),"\n","Throws errors for invalid assets and returns true if the asset is loaded."]}),"\n",(0,n.jsx)(s.h2,{id:"librequestanimdict",children:"lib.requestAnimDict"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveAnimDict(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestAnimDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestAnimDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["dict: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestanimset",children:"lib.requestAnimSet"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveAnimSet(set)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestAnimSet"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(set, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestAnimSet"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["set: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestmodel",children:"lib.requestModel"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetModelAsNoLongerNeeded(model)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestModel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(model, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestModel"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(model"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["model: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequeststreamedtexturedict",children:"lib.requestStreamedTextureDict"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetStreamedTextureDictAsNoLongerNeeded(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestStreamedTextureDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestStreamedTextureDict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dict"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["dict: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestnamedptfxasset",children:"lib.requestNamedPtfxAsset"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveNamedPtfxAsset(dict)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestNamedPtfxAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(ptFxName, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestNamedPtfxAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(ptFxName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["ptFxName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestscaleformmovie",children:"lib.requestScaleformMovie"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"SetScaleformMovieAsNoLongerNeeded(scaleformName)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestScaleformMovie"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(scaleformName, timeout)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestScaleformMovie"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(scaleformName"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["scaleformName: ",(0,n.jsx)(s.code,{children:"string"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"1000"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"librequestweaponasset",children:"lib.requestWeaponAsset"}),"\n",(0,n.jsx)(r.UW,{children:(0,n.jsxs)(s.p,{children:["Remember to call ",(0,n.jsx)(s.code,{children:"RemoveWeaponAsset(weaponType)"})," at the end of you code!"]})}),"\n",(0,n.jsxs)(r.mQ,{items:["Lua","JS"],children:[(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"requestWeaponAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)"})]})})})}),(0,n.jsx)(r.OK,{children:(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".requestWeaponAsset"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(weaponType"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timeout"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" weaponResourceFlags"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" extraWeaponComponentFlags)"})]})]})})})]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["weaponType: ",(0,n.jsx)(s.code,{children:"string | number"})]}),"\n",(0,n.jsxs)(s.li,{children:["timeout?: ",(0,n.jsx)(s.code,{children:"number"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Number of ticks to wait for the asset to load."}),"\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"10000"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["weaponResourceFlags?: ",(0,n.jsx)(s.code,{children:"WeaponResourceFlags"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"31"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["extraWeaponComponentFlags?: ",(0,n.jsx)(s.code,{children:"ExtraWeaponComponentFlags"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Default: ",(0,n.jsx)(s.code,{children:"0"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"weaponresourceflags",children:"WeaponResourceFlags"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"1 WRF_REQUEST_BASE_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"2 WRF_REQUEST_COVER_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"4 WRF_REQUEST_MELEE_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"8 WRF_REQUEST_MOTION_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"16 WRF_REQUEST_STEALTH_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"32 WRF_REQUEST_ALL_MOVEMENT_VARIATION_ANIMS"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"31 WRF_REQUEST_ALL_ANIMS"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"extraweaponcomponentflags",children:"ExtraWeaponComponentFlags"}),"\n",(0,n.jsx)(s.pre,{"data-language":"text","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"text","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"0 WEAPON_COMPONENT_NONE"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"1 WEAPON_COMPONENT_FLASH"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"2 WEAPON_COMPONENT_SCOPE"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"4 WEAPON_COMPONENT_SUPP"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"8 WEAPON_COMPONENT_SCLIP2"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"16 WEAPON_COMPONENT_GRIP"})})]})})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Streaming/Client.mdx",route:"/overextended/ox_lib/Modules/Streaming/Client",timestamp:1730940204e3,title:"Client",headings:a},pageNextRoute:"/overextended/ox_lib/Modules/Streaming/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4071)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-2640bc7a43c32574.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-18e358887ee90bcb.js similarity index 96% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-2640bc7a43c32574.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-18e358887ee90bcb.js index 52a2382869..6a566e6ba4 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-2640bc7a43c32574.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/String/Shared-18e358887ee90bcb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1335],{570:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/String/Shared",function(){return t(2353)}])},2353:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return s}});var r=t(2676),i=t(2140),l=t(8745);let s=[{depth:2,value:"lib.string",id:"libstring"},{depth:3,value:"string.random",id:"stringrandom"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libstring",children:"lib.string"}),"\n",(0,r.jsx)(n.p,{children:"Extends the standard Lua string table with extra functions."}),"\n",(0,r.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"string = lib.string"})})})}),"\n",(0,r.jsx)(n.h3,{id:"stringrandom",children:"string.random"}),"\n",(0,r.jsx)(n.p,{children:"Outputs a random string based on a given pattern."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"string."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"random"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(pattern, length)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["pattern: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"1"})," will output a random number from 0-9."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"A"})," will output a random letter from A-Z."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"a"})," will output a random letter from a-z."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"."})," will output a random letter or number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"^"})," will output the following character literally."]}),"\n",(0,r.jsx)(n.li,{children:"Any other character will output said character."}),"\n",(0,r.jsxs)(n.li,{children:["length?: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Sets the length of the returned string, either padding it or omitting characters."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["string: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/String/Shared.mdx",route:"/overextended/ox_lib/Modules/String/Shared",timestamp:1730928152e3,title:"Shared",headings:s},pageNextRoute:"/overextended/ox_lib/Modules/String/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=570)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1335],{570:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/String/Shared",function(){return t(2353)}])},2353:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return s}});var r=t(2676),i=t(2140),l=t(8745);let s=[{depth:2,value:"lib.string",id:"libstring"},{depth:3,value:"string.random",id:"stringrandom"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",h3:"h3",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libstring",children:"lib.string"}),"\n",(0,r.jsx)(n.p,{children:"Extends the standard Lua string table with extra functions."}),"\n",(0,r.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"string = lib.string"})})})}),"\n",(0,r.jsx)(n.h3,{id:"stringrandom",children:"string.random"}),"\n",(0,r.jsx)(n.p,{children:"Outputs a random string based on a given pattern."}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"string."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"random"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(pattern, length)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["pattern: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"1"})," will output a random number from 0-9."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"A"})," will output a random letter from A-Z."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"a"})," will output a random letter from a-z."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"."})," will output a random letter or number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"^"})," will output the following character literally."]}),"\n",(0,r.jsx)(n.li,{children:"Any other character will output said character."}),"\n",(0,r.jsxs)(n.li,{children:["length?: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Sets the length of the returned string, either padding it or omitting characters."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Return:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["string: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/String/Shared.mdx",route:"/overextended/ox_lib/Modules/String/Shared",timestamp:1730940204e3,title:"Shared",headings:s},pageNextRoute:"/overextended/ox_lib/Modules/String/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=570)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-52cd44a59da167db.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-2702beed80a9f3ca.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-52cd44a59da167db.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-2702beed80a9f3ca.js index 6f4c87c547..da364b70d2 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-52cd44a59da167db.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Table/Shared-2702beed80a9f3ca.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{981:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Table/Shared",function(){return n(8672)}])},8672:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return i}});var a=n(2676),s=n(2140),t=n(8745);let i=[{depth:2,value:"lib.table.contains",id:"libtablecontains"},{depth:2,value:"lib.table.matches",id:"libtablematches"},{depth:2,value:"lib.table.deepclone",id:"libtabledeepclone"},{depth:2,value:"lib.table.merge",id:"libtablemerge"},{depth:2,value:"lib.table.freeze",id:"libtablefreeze"},{depth:2,value:"lib.table.isFrozen",id:"libtableisfrozen"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.h1,{children:"Shared"}),"\n",(0,a.jsx)(l.p,{children:"Adds additional functions alongside the standard table library."}),"\n",(0,a.jsx)(l.h2,{id:"libtablecontains",children:"lib.table.contains"}),"\n",(0,a.jsxs)(l.p,{children:["Checks if ",(0,a.jsx)(l.code,{children:"table"})," contains the given ",(0,a.jsx)(l.code,{children:"value"}),". Only intended for simple values and unnested tables."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"contains"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl, value)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["value: ",(0,a.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["isContained: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablematches",children:"lib.table.matches"}),"\n",(0,a.jsx)(l.p,{children:"Compares if two values are equal, iterating over tables and matching both keys and values."}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"matches"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tableOne, tableTwo)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["tableTwo: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["matches: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtabledeepclone",children:"lib.table.deepclone"}),"\n",(0,a.jsx)(l.p,{children:"Recursively clones a table to ensure no table references remain."}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"deepclone"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["clonedTable: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablemerge",children:"lib.table.merge"}),"\n",(0,a.jsxs)(l.p,{children:["Merges two tables together. Duplicate keys will be added together if they are numbers, otherwise ",(0,a.jsx)(l.code,{children:"tableTwo"}),"'s value will be used."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"merge"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tableOne, tableTwo)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["tableTwo: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablefreeze",children:"lib.table.freeze"}),"\n",(0,a.jsxs)(l.p,{children:["Makes a table read-only, preventing further modification. Unfrozen tables stored within ",(0,a.jsx)(l.code,{children:"table"})," are still mutable."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"freeze"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["frozenTable: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtableisfrozen",children:"lib.table.isFrozen"}),"\n",(0,a.jsxs)(l.p,{children:["Returns true if ",(0,a.jsx)(l.code,{children:"tbl"})," is set as read-only."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"isFrozen"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["isFrozen: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]})]})}l.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,t.a)(),e.components);return l?(0,a.jsx)(l,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Table/Shared.mdx",route:"/overextended/ox_lib/Modules/Table/Shared",timestamp:1730928152e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Table/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=981)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{981:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Table/Shared",function(){return n(8672)}])},8672:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return i}});var a=n(2676),s=n(2140),t=n(8745);let i=[{depth:2,value:"lib.table.contains",id:"libtablecontains"},{depth:2,value:"lib.table.matches",id:"libtablematches"},{depth:2,value:"lib.table.deepclone",id:"libtabledeepclone"},{depth:2,value:"lib.table.merge",id:"libtablemerge"},{depth:2,value:"lib.table.freeze",id:"libtablefreeze"},{depth:2,value:"lib.table.isFrozen",id:"libtableisfrozen"}];function _createMdxContent(e){let l=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span",ul:"ul",li:"li"},(0,t.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.h1,{children:"Shared"}),"\n",(0,a.jsx)(l.p,{children:"Adds additional functions alongside the standard table library."}),"\n",(0,a.jsx)(l.h2,{id:"libtablecontains",children:"lib.table.contains"}),"\n",(0,a.jsxs)(l.p,{children:["Checks if ",(0,a.jsx)(l.code,{children:"table"})," contains the given ",(0,a.jsx)(l.code,{children:"value"}),". Only intended for simple values and unnested tables."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"contains"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl, value)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["value: ",(0,a.jsx)(l.code,{children:"any"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["isContained: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablematches",children:"lib.table.matches"}),"\n",(0,a.jsx)(l.p,{children:"Compares if two values are equal, iterating over tables and matching both keys and values."}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"matches"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tableOne, tableTwo)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["tableTwo: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["matches: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtabledeepclone",children:"lib.table.deepclone"}),"\n",(0,a.jsx)(l.p,{children:"Recursively clones a table to ensure no table references remain."}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"deepclone"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["clonedTable: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablemerge",children:"lib.table.merge"}),"\n",(0,a.jsxs)(l.p,{children:["Merges two tables together. Duplicate keys will be added together if they are numbers, otherwise ",(0,a.jsx)(l.code,{children:"tableTwo"}),"'s value will be used."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"merge"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tableOne, tableTwo)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n",(0,a.jsxs)(l.li,{children:["tableTwo: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tableOne: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtablefreeze",children:"lib.table.freeze"}),"\n",(0,a.jsxs)(l.p,{children:["Makes a table read-only, preventing further modification. Unfrozen tables stored within ",(0,a.jsx)(l.code,{children:"table"})," are still mutable."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"freeze"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["frozenTable: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.h2,{id:"libtableisfrozen",children:"lib.table.isFrozen"}),"\n",(0,a.jsxs)(l.p,{children:["Returns true if ",(0,a.jsx)(l.code,{children:"tbl"})," is set as read-only."]}),"\n",(0,a.jsx)(l.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(l.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(l.span,{className:"line",children:[(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"lib.table."}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-token-function)"},children:"isFrozen"}),(0,a.jsx)(l.span,{style:{color:"var(--shiki-color-text)"},children:"(tbl)"})]})})}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["tbl: ",(0,a.jsx)(l.code,{children:"table"})]}),"\n"]}),"\n",(0,a.jsx)(l.p,{children:"Return:"}),"\n",(0,a.jsxs)(l.ul,{children:["\n",(0,a.jsxs)(l.li,{children:["isFrozen: ",(0,a.jsx)(l.code,{children:"boolean"})]}),"\n"]})]})}l.default=(0,s.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:l}=Object.assign({},(0,t.a)(),e.components);return l?(0,a.jsx)(l,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Table/Shared.mdx",route:"/overextended/ox_lib/Modules/Table/Shared",timestamp:1730940204e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/Table/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=981)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-2c81057849f06bc8.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-636589fc6a2d11b6.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-2c81057849f06bc8.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-636589fc6a2d11b6.js index 339164aa1d..995bfeb2ab 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-2c81057849f06bc8.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Timer/Shared-636589fc6a2d11b6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7447],{8678:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Timer/Shared",function(){return l(8137)}])},8137:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return o}});var n=l(2676),r=l(2140),i=l(8745);let o=[{depth:2,value:"Timer",id:"timer"},{depth:3,value:"lib.timer",id:"libtimer"},{depth:4,value:"Example",id:"example"},{depth:2,value:"Methods",id:"methods"},{depth:3,value:"pause",id:"pause"},{depth:4,value:"Example",id:"example-1"},{depth:3,value:"play",id:"play"},{depth:4,value:"Example",id:"example-2"},{depth:3,value:"forceEnd",id:"forceend"},{depth:4,value:"Example",id:"example-3"},{depth:3,value:"isPaused",id:"ispaused"},{depth:4,value:"Example",id:"example-4"},{depth:3,value:"getTimeLeft",id:"gettimeleft"},{depth:4,value:"Example",id:"example-5"},{depth:3,value:"restart",id:"restart"},{depth:4,value:"Example",id:"example-6"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h4:"h4"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Shared"}),"\n",(0,n.jsx)(s.p,{children:"Provides a versatile timer system with options for asynchronous operation, pause and resume functionality, and callbacks on timer completion."}),"\n",(0,n.jsx)(s.h2,{id:"timer",children:"Timer"}),"\n",(0,n.jsx)(s.h3,{id:"libtimer",children:"lib.timer"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(time, onEnd, "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"async"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["time: ",(0,n.jsx)(s.code,{children:"number"})]}),"\n",(0,n.jsxs)(s.li,{children:["onEnd: ",(0,n.jsx)(s.code,{children:"function"})]}),"\n",(0,n.jsxs)(s.li,{children:["async?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["If ",(0,n.jsx)(s.code,{children:"true"})," then the timer does not block script execution on the calling thread."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["timer: ",(0,n.jsx)(s.code,{children:"OxTimer"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.h2,{id:"methods",children:"Methods"}),"\n",(0,n.jsx)(s.h3,{id:"pause",children:"pause"}),"\n",(0,n.jsxs)(s.p,{children:["Pauses an active timer until ",(0,n.jsx)(s.code,{children:"timer:play()"})," or ",(0,n.jsx)(s.code,{children:"timer:forceEnd()"})," is called."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-1",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"play",children:"play"}),"\n",(0,n.jsxs)(s.p,{children:["Resume a timer if it is paused with ",(0,n.jsx)(s.code,{children:"timer:pause()"}),"."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"play"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-2",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"play"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--timer finishes in 6 seconds rather than 5 because of the pause"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"forceend",children:"forceEnd"}),"\n",(0,n.jsx)(s.p,{children:"Immediately ends the timer and optionally triggers the onEnd callback."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceEnd"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(triggerOnEnd)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["triggerOnEnd: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-3",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceEnd"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--timer finishes in 1 second rather than 5 because of the forceEnd and the call back never runs"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"ispaused",children:"isPaused"}),"\n",(0,n.jsxs)(s.p,{children:["Checks if the timer is paused from calling ",(0,n.jsx)(s.code,{children:"timer:pause()"})," previously."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["isPaused: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-4",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- false"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- true"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"gettimeleft",children:"getTimeLeft"}),"\n",(0,n.jsx)(s.p,{children:"Returns the remaining time on the timer in the given format rounded to 2 decimal places"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(format)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- format: 'ms' = miliseconds, 's' = seconds, 'm' = minutes, 'h' = hours, nil = all returned in a table"})})]})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["format?: ",(0,n.jsx)(s.code,{children:"'ms'"})," or ",(0,n.jsx)(s.code,{children:"'s'"})," or ",(0,n.jsx)(s.code,{children:"'m'"})," or ",(0,n.jsx)(s.code,{children:"'h'"})]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["time: ",(0,n.jsx)(s.code,{children:"number"})," | ",(0,n.jsx)(s.code,{children:"{ms: number, s: number, m: number, h: number}"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-5",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ms'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 5000 miliseconds"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 5.00 seconds"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'m'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 0.08 minutes"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'h'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 0.00 hours"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- {ms = 5000, s = 5.00, m = 0.08, h = 0.00 }"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"restart",children:"restart"}),"\n",(0,n.jsx)(s.p,{children:"Resets and starts the timer."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"restart"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-6",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- this will create a timer that just keeps restarting itself"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"restart"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Timer/Shared.mdx",route:"/overextended/ox_lib/Modules/Timer/Shared",timestamp:1730928152e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Timer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8678)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7447],{8678:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Timer/Shared",function(){return l(8137)}])},8137:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return o}});var n=l(2676),r=l(2140),i=l(8745);let o=[{depth:2,value:"Timer",id:"timer"},{depth:3,value:"lib.timer",id:"libtimer"},{depth:4,value:"Example",id:"example"},{depth:2,value:"Methods",id:"methods"},{depth:3,value:"pause",id:"pause"},{depth:4,value:"Example",id:"example-1"},{depth:3,value:"play",id:"play"},{depth:4,value:"Example",id:"example-2"},{depth:3,value:"forceEnd",id:"forceend"},{depth:4,value:"Example",id:"example-3"},{depth:3,value:"isPaused",id:"ispaused"},{depth:4,value:"Example",id:"example-4"},{depth:3,value:"getTimeLeft",id:"gettimeleft"},{depth:4,value:"Example",id:"example-5"},{depth:3,value:"restart",id:"restart"},{depth:4,value:"Example",id:"example-6"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h4:"h4"},(0,i.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Shared"}),"\n",(0,n.jsx)(s.p,{children:"Provides a versatile timer system with options for asynchronous operation, pause and resume functionality, and callbacks on timer completion."}),"\n",(0,n.jsx)(s.h2,{id:"timer",children:"Timer"}),"\n",(0,n.jsx)(s.h3,{id:"libtimer",children:"lib.timer"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(time, onEnd, "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"async"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["time: ",(0,n.jsx)(s.code,{children:"number"})]}),"\n",(0,n.jsxs)(s.li,{children:["onEnd: ",(0,n.jsx)(s.code,{children:"function"})]}),"\n",(0,n.jsxs)(s.li,{children:["async?: ",(0,n.jsx)(s.code,{children:"boolean"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["If ",(0,n.jsx)(s.code,{children:"true"})," then the timer does not block script execution on the calling thread."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["timer: ",(0,n.jsx)(s.code,{children:"OxTimer"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(s.h2,{id:"methods",children:"Methods"}),"\n",(0,n.jsx)(s.h3,{id:"pause",children:"pause"}),"\n",(0,n.jsxs)(s.p,{children:["Pauses an active timer until ",(0,n.jsx)(s.code,{children:"timer:play()"})," or ",(0,n.jsx)(s.code,{children:"timer:forceEnd()"})," is called."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-1",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"play",children:"play"}),"\n",(0,n.jsxs)(s.p,{children:["Resume a timer if it is paused with ",(0,n.jsx)(s.code,{children:"timer:pause()"}),"."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"play"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-2",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"play"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--timer finishes in 6 seconds rather than 5 because of the pause"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"forceend",children:"forceEnd"}),"\n",(0,n.jsx)(s.p,{children:"Immediately ends the timer and optionally triggers the onEnd callback."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceEnd"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(triggerOnEnd)"})]})})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["triggerOnEnd: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-3",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Wait"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"forceEnd"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--timer finishes in 1 second rather than 5 because of the forceEnd and the call back never runs"})})]})}),"\n",(0,n.jsx)(s.h3,{id:"ispaused",children:"isPaused"}),"\n",(0,n.jsxs)(s.p,{children:["Checks if the timer is paused from calling ",(0,n.jsx)(s.code,{children:"timer:pause()"})," previously."]}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["isPaused: ",(0,n.jsx)(s.code,{children:"boolean"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-4",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- false"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pause"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isPaused"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- true"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"gettimeleft",children:"getTimeLeft"}),"\n",(0,n.jsx)(s.p,{children:"Returns the remaining time on the timer in the given format rounded to 2 decimal places"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(format)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- format: 'ms' = miliseconds, 's' = seconds, 'm' = minutes, 'h' = hours, nil = all returned in a table"})})]})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["format?: ",(0,n.jsx)(s.code,{children:"'ms'"})," or ",(0,n.jsx)(s.code,{children:"'s'"})," or ",(0,n.jsx)(s.code,{children:"'m'"})," or ",(0,n.jsx)(s.code,{children:"'h'"})]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"Returns:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["time: ",(0,n.jsx)(s.code,{children:"number"})," | ",(0,n.jsx)(s.code,{children:"{ms: number, s: number, m: number, h: number}"})]}),"\n"]}),"\n",(0,n.jsx)(s.h4,{id:"example-5",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ms'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 5000 miliseconds"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'s'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 5.00 seconds"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'m'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 0.08 minutes"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'h'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- 0.00 hours"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"getTimeLeft"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- {ms = 5000, s = 5.00, m = 0.08, h = 0.00 }"})]})]})}),"\n",(0,n.jsx)(s.h3,{id:"restart",children:"restart"}),"\n",(0,n.jsx)(s.p,{children:"Resets and starts the timer."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"restart"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,n.jsx)(s.h4,{id:"example-6",children:"Example"}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- this will create a timer that just keeps restarting itself"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"timer "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"timer"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5000"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"timer ended"'}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" timer:"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"restart"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "})]})})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Timer/Shared.mdx",route:"/overextended/ox_lib/Modules/Timer/Shared",timestamp:1730940204e3,title:"Shared",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Timer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8678)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-8c4c4e23bb2373a3.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-a61b6e3c1afcba25.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-8c4c4e23bb2373a3.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-a61b6e3c1afcba25.js index 042b5f0594..a0f8e84f5f 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-8c4c4e23bb2373a3.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/VehicleProperties/Client-a61b6e3c1afcba25.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6338],{5730:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/VehicleProperties/Client",function(){return s(5795)}])},5795:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var l=s(2676),r=s(2140),i=s(8745),o=s(7100);let c=[{depth:2,value:"lib.getVehicleProperties",id:"libgetvehicleproperties"},{depth:2,value:"lib.setVehicleProperties",id:"libsetvehicleproperties"},{depth:3,value:"Recommended Usage",id:"recommended-usage"},{depth:2,value:"Vehicle Properties",id:"vehicle-properties"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",h3:"h3"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsxs)(n.p,{children:["Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.",(0,l.jsx)(n.br,{}),"\n",(0,l.jsx)(n.a,{href:"https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3",children:"https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3"})]}),"\n","\n",(0,l.jsx)(n.h2,{id:"libgetvehicleproperties",children:"lib.getVehicleProperties"}),"\n",(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle handle of the vehicle to get the properties for"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehiclePedIsUsing"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()))"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehiclePedIsUsing"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()))"})]})]})})})]}),"\n",(0,l.jsx)(n.h2,{id:"libsetvehicleproperties",children:"lib.setVehicleProperties"}),"\n",(0,l.jsx)(n.p,{children:"Sets properties on a vehicle (i.e. mods, plate text, etc.) and returns true if the client owns the entity."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle, props)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"entity"})]}),"\n",(0,l.jsxs)(n.li,{children:["props: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"netid"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"NetToVeh"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netid), data)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { setVehicleProperties } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onNet"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (netid"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"NetToVeh"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netid)"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["isEntityOwner: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"recommended-usage",children:"Recommended Usage"}),"\n",(0,l.jsx)(n.p,{children:"The server should tell the owner of the entity to set properties, using the following trigger."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", entityOwner, vehNetId, data)"})]})})}),"\n",(0,l.jsx)(n.h2,{id:"vehicle-properties",children:"Vehicle Properties"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["model?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["plate?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["plateIndex?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["bodyHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["engineHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["tankHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["fuelLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["oilLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["dirtLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["color1?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["color2?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["pearlescentColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["interiorColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["dashboardColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelWidth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelSize?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["windowTint?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["xenonColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["neonEnabled?: ",(0,l.jsx)(n.code,{children:"boolean[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["neonColor?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["extras?: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n",(0,l.jsxs)(n.li,{children:["tyreSmokeColor?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSpoilers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrontBumper?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRearBumper?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSideSkirt?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modExhaust?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrame?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modGrille?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHood?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFender?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRightFender?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRoof?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modEngine?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modBrakes?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTransmission?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHorns?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSuspension?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modArmor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modNitrous?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTurbo?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSubwoofer?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSmokeEnabled?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHydraulics?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modXenon?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrontWheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modBackWheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modCustomTiresF?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modCustomTiresR?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modPlateHolder?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modVanityPlate?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrimA?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modOrnaments?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDashboard?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDial?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDoorSpeaker?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSeats?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSteeringWheel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modShifterLeavers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAPlate?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSpeakers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrunk?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHydrolic?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modEngineBlock?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAirFilter?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modStruts?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modArchCover?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAerials?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrimB?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTank?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modWindows?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDoorR?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modLivery?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRoofLivery?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modLightbar?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["windows?: ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["doors?: ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["tyres?: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n",(0,l.jsxs)(n.li,{children:["bulletProofTyres?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/VehicleProperties/Client.mdx",route:"/overextended/ox_lib/Modules/VehicleProperties/Client",timestamp:1730928152e3,title:"Client",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/VehicleProperties/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5730)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6338],{5730:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/VehicleProperties/Client",function(){return s(5795)}])},5795:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var l=s(2676),r=s(2140),i=s(8745),o=s(7100);let c=[{depth:2,value:"lib.getVehicleProperties",id:"libgetvehicleproperties"},{depth:2,value:"lib.setVehicleProperties",id:"libsetvehicleproperties"},{depth:3,value:"Recommended Usage",id:"recommended-usage"},{depth:2,value:"Vehicle Properties",id:"vehicle-properties"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",strong:"strong",h3:"h3"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{children:"Client"}),"\n",(0,l.jsxs)(n.p,{children:["Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.",(0,l.jsx)(n.br,{}),"\n",(0,l.jsx)(n.a,{href:"https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3",children:"https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L3"})]}),"\n","\n",(0,l.jsx)(n.h2,{id:"libgetvehicleproperties",children:"lib.getVehicleProperties"}),"\n",(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"vehicle handle of the vehicle to get the properties for"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehiclePedIsUsing"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()))"})]})})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".getVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"GetVehiclePedIsUsing"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PlayerPedId"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()))"})]})]})})})]}),"\n",(0,l.jsx)(n.h2,{id:"libsetvehicleproperties",children:"lib.setVehicleProperties"}),"\n",(0,l.jsx)(n.p,{children:"Sets properties on a vehicle (i.e. mods, plate text, etc.) and returns true if the client owns the entity."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(vehicle, props)"})]})})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["vehicle: ",(0,l.jsx)(n.code,{children:"entity"})]}),"\n",(0,l.jsxs)(n.li,{children:["props: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"RegisterNetEvent"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"netid"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-parameter)"},children:"data"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"NetToVeh"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netid), data)"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(n.pre,{"data-language":"ts","data-theme":"default",children:(0,l.jsxs)(n.code,{"data-language":"ts","data-theme":"default",children:[(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { setVehicleProperties } "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/client'"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onNet"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (netid"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data) "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setVehicleProperties"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"NetToVeh"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netid)"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["isEntityOwner: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"recommended-usage",children:"Recommended Usage"}),"\n",(0,l.jsx)(n.p,{children:"The server should tell the owner of the entity to set properties, using the following trigger."}),"\n",(0,l.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"TriggerClientEvent"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib:setVehicleProperties'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", entityOwner, vehNetId, data)"})]})})}),"\n",(0,l.jsx)(n.h2,{id:"vehicle-properties",children:"Vehicle Properties"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["model?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["plate?: ",(0,l.jsx)(n.code,{children:"string"})]}),"\n",(0,l.jsxs)(n.li,{children:["plateIndex?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["bodyHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["engineHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["tankHealth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["fuelLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["oilLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["dirtLevel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["color1?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["color2?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["pearlescentColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["interiorColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["dashboardColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelWidth?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheelSize?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["wheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["windowTint?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["xenonColor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["neonEnabled?: ",(0,l.jsx)(n.code,{children:"boolean[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["neonColor?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["extras?: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n",(0,l.jsxs)(n.li,{children:["tyreSmokeColor?: ",(0,l.jsx)(n.code,{children:"number"})," or ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSpoilers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrontBumper?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRearBumper?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSideSkirt?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modExhaust?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrame?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modGrille?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHood?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFender?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRightFender?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRoof?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modEngine?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modBrakes?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTransmission?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHorns?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSuspension?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modArmor?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modNitrous?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTurbo?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSubwoofer?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSmokeEnabled?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHydraulics?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modXenon?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modFrontWheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modBackWheels?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modCustomTiresF?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modCustomTiresR?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["modPlateHolder?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modVanityPlate?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrimA?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modOrnaments?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDashboard?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDial?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDoorSpeaker?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSeats?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSteeringWheel?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modShifterLeavers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAPlate?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modSpeakers?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrunk?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modHydrolic?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modEngineBlock?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAirFilter?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modStruts?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modArchCover?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modAerials?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTrimB?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modTank?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modWindows?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modDoorR?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modLivery?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modRoofLivery?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["modLightbar?: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["windows?: ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["doors?: ",(0,l.jsx)(n.code,{children:"number[]"})]}),"\n",(0,l.jsxs)(n.li,{children:["tyres?: ",(0,l.jsx)(n.code,{children:"table"})]}),"\n",(0,l.jsxs)(n.li,{children:["bulletProofTyres?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/VehicleProperties/Client.mdx",route:"/overextended/ox_lib/Modules/VehicleProperties/Client",timestamp:1730940204e3,title:"Client",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/VehicleProperties/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5730)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-3fa834b53054262d.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-b5eee2eddfc48c52.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-3fa834b53054262d.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-b5eee2eddfc48c52.js index c4ad47e30b..a12fe808ad 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-3fa834b53054262d.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Server-b5eee2eddfc48c52.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[852],{3901:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Version/Server",function(){return n(7800)}])},7800:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var r=n(2676),l=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"lib.versionCheck",id:"libversioncheck"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",a:"a",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"libversioncheck",children:"lib.versionCheck"}),"\n",(0,r.jsxs)(s.p,{children:["Compares the resource version to the latest published release on GitHub.",(0,r.jsx)(s.br,{}),"\n",(0,r.jsx)(s.a,{href:"https://docs.github.com/en/rest/reference/releases",children:"Utilises GitHub's release API"})]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(repository)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["repository: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'overextended/ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'overextended/ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Version/Server.mdx",route:"/overextended/ox_lib/Modules/Version/Server",timestamp:1730928152e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Version/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3901)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[852],{3901:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Version/Server",function(){return n(7800)}])},7800:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var r=n(2676),l=n(2140),i=n(8745),t=n(7100);let o=[{depth:2,value:"lib.versionCheck",id:"libversioncheck"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",a:"a",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"libversioncheck",children:"lib.versionCheck"}),"\n",(0,r.jsxs)(s.p,{children:["Compares the resource version to the latest published release on GitHub.",(0,r.jsx)(s.br,{}),"\n",(0,r.jsx)(s.a,{href:"https://docs.github.com/en/rest/reference/releases",children:"Utilises GitHub's release API"})]}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(repository)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["repository: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'overextended/ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})})})}),(0,r.jsx)(t.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/server'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".versionCheck"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'overextended/ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})})]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Version/Server.mdx",route:"/overextended/ox_lib/Modules/Version/Server",timestamp:1730940204e3,title:"Server",headings:o},pageNextRoute:"/overextended/ox_lib/Modules/Version/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3901)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-daef07b7f1ca5358.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-fbb7eb086839725b.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-daef07b7f1ca5358.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-fbb7eb086839725b.js index f4fc6facb0..a390079a33 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-daef07b7f1ca5358.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Version/Shared-fbb7eb086839725b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1903],{8144:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Version/Shared",function(){return n(7564)}])},7564:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),i=n(2140),l=n(8745),o=n(7100);let t=[{depth:2,value:"lib.checkDependency",id:"libcheckdependency"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Shared"}),"\n",(0,r.jsx)(s.h2,{id:"libcheckdependency",children:"lib.checkDependency"}),"\n",(0,r.jsx)(s.p,{children:"Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(resource, version)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["resource: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["version: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(o.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'1.5.0'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// import { checkDependency } from '@overextended/ox_lib/shared'"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'1.5.0'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Version/Shared.mdx",route:"/overextended/ox_lib/Modules/Version/Shared",timestamp:1730928152e3,title:"Shared",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Version/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8144)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1903],{8144:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Version/Shared",function(){return n(7564)}])},7564:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),i=n(2140),l=n(8745),o=n(7100);let t=[{depth:2,value:"lib.checkDependency",id:"libcheckdependency"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Shared"}),"\n",(0,r.jsx)(s.h2,{id:"libcheckdependency",children:"lib.checkDependency"}),"\n",(0,r.jsx)(s.p,{children:"Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors."}),"\n",(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(resource, version)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["resource: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n",(0,r.jsxs)(s.li,{children:["version: ",(0,r.jsx)(s.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(o.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'1.5.0'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]})})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lib "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/ox_lib/shared'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// import { checkDependency } from '@overextended/ox_lib/shared'"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"lib"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".checkDependency"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ox_lib'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'1.5.0'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})]})})})]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Version/Shared.mdx",route:"/overextended/ox_lib/Modules/Version/Shared",timestamp:1730940204e3,title:"Shared",headings:t},pageNextRoute:"/overextended/ox_lib/Modules/Version/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8144)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-265d91e49da2b580.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-d4fabc107e3aef74.js similarity index 98% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-265d91e49da2b580.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-d4fabc107e3aef74.js index 9490a93862..f78c8cb9ee 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-265d91e49da2b580.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/WaitFor/Shared-d4fabc107e3aef74.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4744],{668:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/WaitFor/Shared",function(){return s(2962)}])},2962:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return i}});var r=s(2676),l=s(2140),o=s(8745);let i=[{depth:2,value:"lib.waitFor",id:"libwaitfor"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libwaitfor",children:"lib.waitFor"}),"\n",(0,r.jsxs)(n.p,{children:["Calls a function repeatedly until it receives a non-nil value, or it times out.",(0,r.jsx)(n.br,{}),"\n","The function result is then returned."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(cb, errMessage, timeout)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["cb: ",(0,r.jsx)(n.code,{children:"function"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A function to call each frame."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["errMessage?: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The error message to display if the function times out."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["timeout?: ",(0,r.jsx)(n.code,{children:"number | false"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The duration to run the function for, defaulting to 1000ms, unless set to ",(0,r.jsx)(n.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" value "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"--[['abc']]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"math.random"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abc' "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/WaitFor/Shared.mdx",route:"/overextended/ox_lib/Modules/WaitFor/Shared",timestamp:1730928152e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/WaitFor/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=668)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4744],{668:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/WaitFor/Shared",function(){return s(2962)}])},2962:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return i}});var r=s(2676),l=s(2140),o=s(8745);let i=[{depth:2,value:"lib.waitFor",id:"libwaitfor"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",pre:"pre",code:"code",span:"span",ul:"ul",li:"li"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libwaitfor",children:"lib.waitFor"}),"\n",(0,r.jsxs)(n.p,{children:["Calls a function repeatedly until it receives a non-nil value, or it times out.",(0,r.jsx)(n.br,{}),"\n","The function result is then returned."]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(cb, errMessage, timeout)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["cb: ",(0,r.jsx)(n.code,{children:"function"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A function to call each frame."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["errMessage?: ",(0,r.jsx)(n.code,{children:"string"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The error message to display if the function times out."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["timeout?: ",(0,r.jsx)(n.code,{children:"number | false"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The duration to run the function for, defaulting to 1000ms, unless set to ",(0,r.jsx)(n.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" value "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"--[['abc']]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" lib."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"math.random"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abc' "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})]})}n.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/WaitFor/Shared.mdx",route:"/overextended/ox_lib/Modules/WaitFor/Shared",timestamp:1730940204e3,title:"Shared",headings:i},pageNextRoute:"/overextended/ox_lib/Modules/WaitFor/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=668)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-44354f1a3b2ef5d0.js b/_next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-2aa637b7c5602ca4.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-44354f1a3b2ef5d0.js rename to _next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-2aa637b7c5602ca4.js index 93be3dca8a..db4e85302d 100644 --- a/_next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-44354f1a3b2ef5d0.js +++ b/_next/static/chunks/pages/overextended/ox_lib/Modules/Zones/Shared-2aa637b7c5602ca4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[441],{4964:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Zones/Shared",function(){return l(63)}])},63:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),o=l(2140),r=l(8745),i=l(7100);let c=[{depth:2,value:"lib.zones.poly",id:"libzonespoly"},{depth:2,value:"lib.zones.box",id:"libzonesbox"},{depth:2,value:"lib.zones.sphere",id:"libzonessphere"},{depth:2,value:"Methods",id:"methods"},{depth:3,value:"remove",id:"remove"},{depth:3,value:"contains",id:"contains"},{depth:2,value:"Usage Examples",id:"usage-examples"},{depth:2,value:"Zone creation script",id:"zone-creation-script"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",h3:"h3",br:"br"},(0,r.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Shared"}),"\n",(0,n.jsxs)(e.p,{children:["Faster alternative to PolyZone utilising ",(0,n.jsx)(e.a,{href:"https://github.com/citizenfx/lua/blob/luaglm-dev/cfx/EXTENDED.md",children:"glm.polygon"}),"."]}),"\n",(0,n.jsx)(i.UW,{children:(0,n.jsxs)(e.p,{children:["Currently zones only have basic support on the server side. Some features will not work such as ",(0,n.jsx)(e.code,{children:"onEnter"}),", ",(0,n.jsx)(e.code,{children:"onExit"}),",\nand ",(0,n.jsx)(e.code,{children:"inside"}),"."]})}),"\n",(0,n.jsx)(e.h2,{id:"libzonespoly",children:"lib.zones.poly"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["points: ",(0,n.jsx)(e.code,{children:"vector3[]"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"An array of 3d points defining the polygon's shape."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["thickness?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["The height of the polygon, defaulting to ",(0,n.jsx)(e.code,{children:"4"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libzonesbox",children:"lib.zones.box"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["coords: ",(0,n.jsx)(e.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(e.li,{children:["size?: ",(0,n.jsx)(e.code,{children:"vector3"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"vec3(2, 2, 2)"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotation?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Angle in degrees, defaulting to ",(0,n.jsx)(e.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libzonessphere",children:"lib.zones.sphere"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"sphere"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["coords: ",(0,n.jsx)(e.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(e.li,{children:["radius?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"2"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"methods",children:"Methods"}),"\n",(0,n.jsx)(e.h3,{id:"remove",children:"remove"}),"\n",(0,n.jsx)(e.p,{children:"Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later."}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"zone:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetTimeout"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(zone)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(e.h3,{id:"contains",children:"contains"}),"\n",(0,n.jsxs)(e.p,{children:["Tests if a point exists inside the zone, returning a ",(0,n.jsx)(e.code,{children:"boolean"}),"."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"contains"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'point is inside zone!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'entered zone'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'exited zone'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inside"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'you are inside zone ' "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"413.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1026.1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"411.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1023.1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"412.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1018.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"417.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1016.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"422.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1020.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"426.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1015.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"431.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1013.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"437.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1018.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"432.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1027.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"424.7"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1023.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"420.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1030.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"409.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1028.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" sphere "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"sphere"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"442.5363"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1017.666"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.65637"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" radius "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" box "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"442.5363"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1017.666"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.65637"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" size "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rotation "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"45"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"zone-creation-script",children:"Zone creation script"}),"\n",(0,n.jsxs)(e.p,{children:["You can use our builtin zone-creator with ",(0,n.jsx)(e.code,{children:"/zone"})," - with ",(0,n.jsx)(e.code,{children:"poly"}),", ",(0,n.jsx)(e.code,{children:"box"})," or ",(0,n.jsx)(e.code,{children:"sphere"})," as an argument.",(0,n.jsx)(e.br,{}),"\n","Available controls will be displayed on the right side."]}),"\n",(0,n.jsxs)(e.p,{children:["Zones will be saved to ",(0,n.jsx)(e.code,{children:"ox_lib/created_zones.lua"})," with your chosen format."]}),"\n",(0,n.jsxs)(i.mQ,{items:["function","array","ox_target"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addPolyZone"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]})]})}e.default=(0,o.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Zones/Shared.mdx",route:"/overextended/ox_lib/Modules/Zones/Shared",timestamp:1730928152e3,title:"Shared",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Zones/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4964)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[441],{4964:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_lib/Modules/Zones/Shared",function(){return l(63)}])},63:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),o=l(2140),r=l(8745),i=l(7100);let c=[{depth:2,value:"lib.zones.poly",id:"libzonespoly"},{depth:2,value:"lib.zones.box",id:"libzonesbox"},{depth:2,value:"lib.zones.sphere",id:"libzonessphere"},{depth:2,value:"Methods",id:"methods"},{depth:3,value:"remove",id:"remove"},{depth:3,value:"contains",id:"contains"},{depth:2,value:"Usage Examples",id:"usage-examples"},{depth:2,value:"Zone creation script",id:"zone-creation-script"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",h3:"h3",br:"br"},(0,r.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Shared"}),"\n",(0,n.jsxs)(e.p,{children:["Faster alternative to PolyZone utilising ",(0,n.jsx)(e.a,{href:"https://github.com/citizenfx/lua/blob/luaglm-dev/cfx/EXTENDED.md",children:"glm.polygon"}),"."]}),"\n",(0,n.jsx)(i.UW,{children:(0,n.jsxs)(e.p,{children:["Currently zones only have basic support on the server side. Some features will not work such as ",(0,n.jsx)(e.code,{children:"onEnter"}),", ",(0,n.jsx)(e.code,{children:"onExit"}),",\nand ",(0,n.jsx)(e.code,{children:"inside"}),"."]})}),"\n",(0,n.jsx)(e.h2,{id:"libzonespoly",children:"lib.zones.poly"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["points: ",(0,n.jsx)(e.code,{children:"vector3[]"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"An array of 3d points defining the polygon's shape."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["thickness?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["The height of the polygon, defaulting to ",(0,n.jsx)(e.code,{children:"4"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libzonesbox",children:"lib.zones.box"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["coords: ",(0,n.jsx)(e.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(e.li,{children:["size?: ",(0,n.jsx)(e.code,{children:"vector3"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"vec3(2, 2, 2)"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["rotation?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Angle in degrees, defaulting to ",(0,n.jsx)(e.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"libzonessphere",children:"lib.zones.sphere"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsx)(e.code,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"sphere"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(data)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["data: ",(0,n.jsx)(e.code,{children:"table"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["coords: ",(0,n.jsx)(e.code,{children:"vector3"})]}),"\n",(0,n.jsxs)(e.li,{children:["radius?: ",(0,n.jsx)(e.code,{children:"number"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["Default: ",(0,n.jsx)(e.code,{children:"2"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["onEnter?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["onExit?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["inside?: ",(0,n.jsx)(e.code,{children:"function(self: table)"})]}),"\n",(0,n.jsxs)(e.li,{children:["debug?: ",(0,n.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"methods",children:"Methods"}),"\n",(0,n.jsx)(e.h3,{id:"remove",children:"remove"}),"\n",(0,n.jsx)(e.p,{children:"Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later."}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"zone:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"remove"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"SetTimeout"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"500"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(zone)"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})}),"\n",(0,n.jsx)(e.h3,{id:"contains",children:"contains"}),"\n",(0,n.jsxs)(e.p,{children:["Tests if a point exists inside the zone, returning a ",(0,n.jsx)(e.code,{children:"boolean"}),"."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"..."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" zone:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"contains"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'point is inside zone!'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'entered zone'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'exited zone'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"inside"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"self"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'you are inside zone ' "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" self.id)"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"413.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1026.1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"411.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1023.1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"412.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1018.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"417.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1016.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"422.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1020.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"426.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1015.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"431.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1013.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"437.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1018.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"432.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1027.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"424.7"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1023.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"420.0"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1030.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"409.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1028.4"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"29"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" sphere "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"sphere"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"442.5363"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1017.666"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.65637"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" radius "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" box "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"box"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" coords "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"442.5363"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1017.666"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"28.65637"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" size "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" rotation "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"45"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" debug "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" inside,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onEnter,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" onExit"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,n.jsx)(e.h2,{id:"zone-creation-script",children:"Zone creation script"}),"\n",(0,n.jsxs)(e.p,{children:["You can use our builtin zone-creator with ",(0,n.jsx)(e.code,{children:"/zone"})," - with ",(0,n.jsx)(e.code,{children:"poly"}),", ",(0,n.jsx)(e.code,{children:"box"})," or ",(0,n.jsx)(e.code,{children:"sphere"})," as an argument.",(0,n.jsx)(e.br,{}),"\n","Available controls will be displayed on the right side."]}),"\n",(0,n.jsxs)(e.p,{children:["Zones will be saved to ",(0,n.jsx)(e.code,{children:"ox_lib/created_zones.lua"})," with your chosen format."]}),"\n",(0,n.jsxs)(i.mQ,{items:["function","array","ox_target"],children:[(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lib.zones."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"poly"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"addPolyZone"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" name "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" poly,"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" points "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"450.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"998.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"449.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.5"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"447.2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"995.6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"vec"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"446.3"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"997.9"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"25.8"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" },"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" thickness "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]})]})}e.default=(0,o.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/ox_lib/Modules/Zones/Shared.mdx",route:"/overextended/ox_lib/Modules/Zones/Shared",timestamp:1730940204e3,title:"Shared",headings:c},pageNextRoute:"/overextended/ox_lib/Modules/Zones/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4964)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_target-f06c78fcda3dc160.js b/_next/static/chunks/pages/overextended/ox_target-26c7e458a2099613.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_target-f06c78fcda3dc160.js rename to _next/static/chunks/pages/overextended/ox_target-26c7e458a2099613.js index fc58fe497b..3b0dd3a72a 100644 --- a/_next/static/chunks/pages/overextended/ox_target-f06c78fcda3dc160.js +++ b/_next/static/chunks/pages/overextended/ox_target-26c7e458a2099613.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4965],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var s=t(5271),r=t(507),o=t.n(r),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))d.call(n,t)&&__defNormalProp(e,t,n[t]);if(h)for(var t of h(n))p.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>l(e,c(n)),__objRest=(e,n)=>{var t={};for(var s in e)d.call(e,s)&&0>n.indexOf(s)&&(t[s]=e[s]);if(null!=e&&h)for(var s of h(e))0>n.indexOf(s)&&p.call(e,s)&&(t[s]=e[s]);return t},createReactComponent=(e,n,t)=>{let r=(0,s.forwardRef)((n,r)=>{var{color:o="currentColor",size:a=24,stroke:l=2,children:c}=n,h=__objRest(n,["color","size","stroke","children"]);return(0,s.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},i),{width:a,height:a,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),h),[...t.map(([e,n])=>(0,s.createElement)(e,n)),...c||[]])});return r.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},r.displayName=`${n}`,r}},1569:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target",function(){return t(2392)}])},2392:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),o=t(8745),i=t(8713),a=t(7100);let l=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or clone the source code.",id:"download-a-release-or-clone-the-source-code"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Supported Frameworks",id:"supported-frameworks"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Target"}),"\n",(0,s.jsx)(i.Z,{repo:"https://github.com/overextended/ox_target"}),"\n",(0,s.jsx)(n.p,{children:'A performant and flexible standalone targeting resource or "third-eye", with additional functionality for ox_inventory, ox_core, qbx_core, and es_extended.'}),"\n",(0,s.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,s.jsx)(a.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["We ",(0,s.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,s.jsx)(n.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,s.jsxs)(a.Rg,{children:[(0,s.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,s.jsxs)(n.h3,{id:"download-a-release-or-clone-the-source-code",children:["Download a ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/releases",children:"release"})," or clone the source code."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_target.git"})]})})}),(0,s.jsx)(n.h3,{id:"config",children:"Config"}),(0,s.jsxs)(n.p,{children:["Resource configuration is handled using ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle targeting when pressing the hotkey, instead of holding it down."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:toggleHotkey"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Change the key to enable targeting (https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard)"})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:defaultHotkey"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"LMENU"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Draw a sprite (circle) at the centroid of a zone."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:drawSprite"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable built-in targeting options, e.g. toggling vehicle doors."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:defaults"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable debugging / testing options, entity outlines, and a raycast indicator."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:debug"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable / Disable leftclick to select options"})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:leftClick"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"supported-frameworks",children:"Supported Frameworks"}),"\n",(0,s.jsx)(n.p,{children:"These aren't necessary to run ox_target, but they will add additional features."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_core",children:"ox_core"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/esx-framework/esx-legacy",children:"esx"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/Qbox-project/qbx_core",children:"qbx_core"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target.mdx",route:"/overextended/ox_target",timestamp:1730928152e3,title:"Ox Target",headings:l},pageNextRoute:"/overextended/ox_target"})},3786:function(e,n,t){"use strict";t.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var s=t(2676);t(5271);var r=t(5850),o=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),i=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:t,icon:r,link:o}=e;return(0,s.jsx)("div",{className:"h-fit w-fit",children:(0,s.jsx)("a",{href:o,children:(0,s.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,s.jsx)("div",{children:r}),t,"right"===n&&(0,s.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,t){"use strict";var s=t(2676);t(5271);var r=t(3786);n.Z=e=>{let{repo:n,docs:t}=e;return(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,s.jsx)(r.eX,{link:n}),(0,s.jsx)(r.Vg,{link:"".concat(n,"/releases")}),t&&(0,s.jsx)(r.WR,{link:t})]})}},4049:function(e,n,t){"use strict";var s=t(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,t,r,o,i){if(i!==s){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,t){e.exports=t(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1569)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4965],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var s=t(5271),r=t(507),o=t.n(r),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))d.call(n,t)&&__defNormalProp(e,t,n[t]);if(h)for(var t of h(n))p.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>l(e,c(n)),__objRest=(e,n)=>{var t={};for(var s in e)d.call(e,s)&&0>n.indexOf(s)&&(t[s]=e[s]);if(null!=e&&h)for(var s of h(e))0>n.indexOf(s)&&p.call(e,s)&&(t[s]=e[s]);return t},createReactComponent=(e,n,t)=>{let r=(0,s.forwardRef)((n,r)=>{var{color:o="currentColor",size:a=24,stroke:l=2,children:c}=n,h=__objRest(n,["color","size","stroke","children"]);return(0,s.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},i),{width:a,height:a,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),h),[...t.map(([e,n])=>(0,s.createElement)(e,n)),...c||[]])});return r.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},r.displayName=`${n}`,r}},1569:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target",function(){return t(2392)}])},2392:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),o=t(8745),i=t(8713),a=t(7100);let l=[{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies",id:"install-all-resource-dependencies"},{depth:3,value:"Download a release or clone the source code.",id:"download-a-release-or-clone-the-source-code"},{depth:3,value:"Config",id:"config"},{depth:2,value:"Supported Frameworks",id:"supported-frameworks"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",strong:"strong",a:"a",h3:"h3",ul:"ul",li:"li",pre:"pre",code:"code",span:"span"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Target"}),"\n",(0,s.jsx)(i.Z,{repo:"https://github.com/overextended/ox_target"}),"\n",(0,s.jsx)(n.p,{children:'A performant and flexible standalone targeting resource or "third-eye", with additional functionality for ox_inventory, ox_core, qbx_core, and es_extended.'}),"\n",(0,s.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,s.jsx)(a.UW,{type:"info",children:(0,s.jsxs)(n.p,{children:["We ",(0,s.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,s.jsx)(n.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,s.jsxs)(a.Rg,{children:[(0,s.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,s.jsxs)(n.h3,{id:"download-a-release-or-clone-the-source-code",children:["Download a ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/releases",children:"release"})," or clone the source code."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_target.git"})]})})}),(0,s.jsx)(n.h3,{id:"config",children:"Config"}),(0,s.jsxs)(n.p,{children:["Resource configuration is handled using ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,s.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,s.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle targeting when pressing the hotkey, instead of holding it down."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:toggleHotkey"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Change the key to enable targeting (https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard)"})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:defaultHotkey"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"LMENU"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Draw a sprite (circle) at the centroid of a zone."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:drawSprite"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable built-in targeting options, e.g. toggling vehicle doors."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:defaults"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable debugging / testing options, entity outlines, and a raycast indicator."})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:debug"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"})]}),"\n",(0,s.jsx)(n.span,{className:"line",children:" "}),"\n",(0,s.jsx)(n.span,{className:"line",children:(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable / Disable leftclick to select options"})}),"\n",(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target:leftClick"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1"})]})]})})]}),"\n",(0,s.jsx)(n.h2,{id:"supported-frameworks",children:"Supported Frameworks"}),"\n",(0,s.jsx)(n.p,{children:"These aren't necessary to run ox_target, but they will add additional features."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_core",children:"ox_core"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/esx-framework/esx-legacy",children:"esx"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/Qbox-project/qbx_core",children:"qbx_core"})}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target.mdx",route:"/overextended/ox_target",timestamp:1730940204e3,title:"Ox Target",headings:l},pageNextRoute:"/overextended/ox_target"})},3786:function(e,n,t){"use strict";t.d(n,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var s=t(2676);t(5271);var r=t(5850),o=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),i=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),a=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),c=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:n="left",children:t,icon:r,link:o}=e;return(0,s.jsx)("div",{className:"h-fit w-fit",children:(0,s.jsx)("a",{href:o,children:(0,s.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===n&&(0,s.jsx)("div",{children:r}),t,"right"===n&&(0,s.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,s.jsx)(Button,{icon:(0,s.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,n,t){"use strict";var s=t(2676);t(5271);var r=t(3786);n.Z=e=>{let{repo:n,docs:t}=e;return(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,s.jsx)(r.eX,{link:n}),(0,s.jsx)(r.Vg,{link:"".concat(n,"/releases")}),t&&(0,s.jsx)(r.WR,{link:t})]})}},4049:function(e,n,t){"use strict";var s=t(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,t,r,o,i){if(i!==s){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,n,t){e.exports=t(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1569)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_target/Functions/Client-e3ac83be0c0dcbc6.js b/_next/static/chunks/pages/overextended/ox_target/Functions/Client-0fba18fcc311c757.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_target/Functions/Client-e3ac83be0c0dcbc6.js rename to _next/static/chunks/pages/overextended/ox_target/Functions/Client-0fba18fcc311c757.js index 3c830723d2..8bbf99f4d6 100644 --- a/_next/static/chunks/pages/overextended/ox_target/Functions/Client-e3ac83be0c0dcbc6.js +++ b/_next/static/chunks/pages/overextended/ox_target/Functions/Client-0fba18fcc311c757.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6616],{959:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target/Functions/Client",function(){return l(1961)}])},1961:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return t}});var s=l(2676),a=l(2140),i=l(8745);let t=[{depth:2,value:"disableTargeting",id:"disabletargeting"},{depth:2,value:"addGlobalOption",id:"addglobaloption"},{depth:2,value:"removeGlobalOption",id:"removeglobaloption"},{depth:2,value:"addGlobalObject",id:"addglobalobject"},{depth:2,value:"removeGlobalObject",id:"removeglobalobject"},{depth:2,value:"addGlobalPed",id:"addglobalped"},{depth:2,value:"removeGlobalPed",id:"removeglobalped"},{depth:2,value:"addGlobalPlayer",id:"addglobalplayer"},{depth:2,value:"removeGlobalPlayer",id:"removeglobalplayer"},{depth:2,value:"addGlobalVehicle",id:"addglobalvehicle"},{depth:2,value:"removeGlobalVehicle",id:"removeglobalvehicle"},{depth:2,value:"addModel",id:"addmodel"},{depth:2,value:"removeModel",id:"removemodel"},{depth:2,value:"addEntity",id:"addentity"},{depth:2,value:"removeEntity",id:"removeentity"},{depth:2,value:"addLocalEntity",id:"addlocalentity"},{depth:2,value:"removeLocalEntity",id:"removelocalentity"},{depth:2,value:"addSphereZone",id:"addspherezone"},{depth:2,value:"addBoxZone",id:"addboxzone"},{depth:2,value:"addPolyZone",id:"addpolyzone"},{depth:2,value:"removeZone",id:"removezone"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",code:"code",a:"a",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",br:"br",strong:"strong"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Client"}),"\n",(0,s.jsxs)(n.p,{children:["All exports with the ",(0,s.jsx)(n.code,{children:"options"})," argument expect a table with the targeting properties ",(0,s.jsx)(n.a,{href:"../TargetOptions",children:"here"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For some examples you can refer to ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/blob/main/client/defaults.lua",children:"defaults.lua"})," or ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/blob/main/client/debug.lua",children:"debug.lua"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"disabletargeting",children:"disableTargeting"}),"\n",(0,s.jsx)(n.p,{children:"Toggle the availability of the targeting menu."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disableTargeting"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["state: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Setting ",(0,s.jsx)(n.code,{children:"state"})," to ",(0,s.jsx)(n.code,{children:"true"})," will turn off the targeting eye if it is active and prevent it from reopening until ",(0,s.jsx)(n.code,{children:"state"})," is set to ",(0,s.jsx)(n.code,{children:"false"})," again."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobaloption",children:"addGlobalOption"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options which are displayed at all times."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalOption"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobaloption",children:"removeGlobalOption"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global options list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalOption"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalobject",children:"addGlobalObject"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Object entity types."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalobject",children:"removeGlobalObject"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Object list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalped",children:"addGlobalPed"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Ped entity types (excluding players)."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalPed"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalped",children:"removeGlobalPed"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Ped list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalPed"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalplayer",children:"addGlobalPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Player entities."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalplayer",children:"removeGlobalPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Player list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalvehicle",children:"addGlobalVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Vehicle entity types."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalvehicle",children:"removeGlobalVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Vehicle list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addmodel",children:"addModel"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for a specific model or list of models."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addModel"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(models, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["models: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"Array"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removemodel",children:"removeModel"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the models list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeModel"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(models, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["models: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"Array"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addentity",children:"addEntity"}),"\n",(0,s.jsxs)(n.p,{children:["Creates new targetable options for a specific network id or list of network ids (see ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x9E35DAB6",children:"NetworkGetNetworkIdFromEntity"}),")."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netIds, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netIds: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeentity",children:"removeEntity"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the networked entities list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netIds, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netIds: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addlocalentity",children:"addLocalEntity"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for a specific entity handle or list of entity handles."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addLocalEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entities, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entities: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removelocalentity",children:"removeLocalEntity"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the entities list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeLocalEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entities, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entities: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addspherezone",children:"addSphereZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonessphere",children:"sphere zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addSphereZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["radius?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addboxzone",children:"addBoxZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonesbox",children:"box zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addBoxZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["size?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["rotation?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addpolyzone",children:"addPolyZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonespoly",children:"poly zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addPolyZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["points: ",(0,s.jsx)(n.code,{children:"vector3[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An array of 3d points defining the polygon's shape."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["thickness?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The height of the polygon, defaulting to ",(0,s.jsx)(n.code,{children:"4"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removezone",children:"removeZone"}),"\n",(0,s.jsx)(n.p,{children:"Removes a targetable zone with the given id (returned by addBoxZone/addSphereZone)."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"number"})," id that is returned by ",(0,s.jsx)(n.a,{href:"#addspherezone",children:"addSphereZone"}),", ",(0,s.jsx)(n.a,{href:"#addboxzone",children:"addBoxZone"}),", or ",(0,s.jsx)(n.a,{href:"#addpolyzone",children:"addPolyZone"}),(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.strong,{children:"OR"})]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"string"})," name given to the zone."]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target/Functions/Client.mdx",route:"/overextended/ox_target/Functions/Client",timestamp:1730928152e3,title:"Client",headings:t},pageNextRoute:"/overextended/ox_target/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=959)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6616],{959:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target/Functions/Client",function(){return l(1961)}])},1961:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return t}});var s=l(2676),a=l(2140),i=l(8745);let t=[{depth:2,value:"disableTargeting",id:"disabletargeting"},{depth:2,value:"addGlobalOption",id:"addglobaloption"},{depth:2,value:"removeGlobalOption",id:"removeglobaloption"},{depth:2,value:"addGlobalObject",id:"addglobalobject"},{depth:2,value:"removeGlobalObject",id:"removeglobalobject"},{depth:2,value:"addGlobalPed",id:"addglobalped"},{depth:2,value:"removeGlobalPed",id:"removeglobalped"},{depth:2,value:"addGlobalPlayer",id:"addglobalplayer"},{depth:2,value:"removeGlobalPlayer",id:"removeglobalplayer"},{depth:2,value:"addGlobalVehicle",id:"addglobalvehicle"},{depth:2,value:"removeGlobalVehicle",id:"removeglobalvehicle"},{depth:2,value:"addModel",id:"addmodel"},{depth:2,value:"removeModel",id:"removemodel"},{depth:2,value:"addEntity",id:"addentity"},{depth:2,value:"removeEntity",id:"removeentity"},{depth:2,value:"addLocalEntity",id:"addlocalentity"},{depth:2,value:"removeLocalEntity",id:"removelocalentity"},{depth:2,value:"addSphereZone",id:"addspherezone"},{depth:2,value:"addBoxZone",id:"addboxzone"},{depth:2,value:"addPolyZone",id:"addpolyzone"},{depth:2,value:"removeZone",id:"removezone"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",code:"code",a:"a",h2:"h2",pre:"pre",span:"span",ul:"ul",li:"li",br:"br",strong:"strong"},(0,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Client"}),"\n",(0,s.jsxs)(n.p,{children:["All exports with the ",(0,s.jsx)(n.code,{children:"options"})," argument expect a table with the targeting properties ",(0,s.jsx)(n.a,{href:"../TargetOptions",children:"here"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For some examples you can refer to ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/blob/main/client/defaults.lua",children:"defaults.lua"})," or ",(0,s.jsx)(n.a,{href:"https://github.com/overextended/ox_target/blob/main/client/debug.lua",children:"debug.lua"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"disabletargeting",children:"disableTargeting"}),"\n",(0,s.jsx)(n.p,{children:"Toggle the availability of the targeting menu."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"disableTargeting"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(state)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["state: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Setting ",(0,s.jsx)(n.code,{children:"state"})," to ",(0,s.jsx)(n.code,{children:"true"})," will turn off the targeting eye if it is active and prevent it from reopening until ",(0,s.jsx)(n.code,{children:"state"})," is set to ",(0,s.jsx)(n.code,{children:"false"})," again."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobaloption",children:"addGlobalOption"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options which are displayed at all times."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalOption"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobaloption",children:"removeGlobalOption"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global options list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalOption"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalobject",children:"addGlobalObject"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Object entity types."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalobject",children:"removeGlobalObject"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Object list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalObject"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalped",children:"addGlobalPed"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Ped entity types (excluding players)."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalPed"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalped",children:"removeGlobalPed"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Ped list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalPed"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalplayer",children:"addGlobalPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Player entities."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalplayer",children:"removeGlobalPlayer"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Player list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalPlayer"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addglobalvehicle",children:"addGlobalVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for all Vehicle entity types."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addGlobalVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeglobalvehicle",children:"removeGlobalVehicle"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the global Vehicle list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeGlobalVehicle"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addmodel",children:"addModel"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for a specific model or list of models."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addModel"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(models, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["models: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"Array"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removemodel",children:"removeModel"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the models list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeModel"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(models, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["models: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"Array"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addentity",children:"addEntity"}),"\n",(0,s.jsxs)(n.p,{children:["Creates new targetable options for a specific network id or list of network ids (see ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0x9E35DAB6",children:"NetworkGetNetworkIdFromEntity"}),")."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netIds, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netIds: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removeentity",children:"removeEntity"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the networked entities list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(netIds, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["netIds: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addlocalentity",children:"addLocalEntity"}),"\n",(0,s.jsx)(n.p,{children:"Creates new targetable options for a specific entity handle or list of entity handles."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addLocalEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entities, options)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entities: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removelocalentity",children:"removeLocalEntity"}),"\n",(0,s.jsx)(n.p,{children:"Removes all options from the entities list with the option names."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeLocalEntity"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(entities, optionNames)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entities: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"number[]"})]}),"\n",(0,s.jsxs)(n.li,{children:["optionNames: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addspherezone",children:"addSphereZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonessphere",children:"sphere zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addSphereZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["radius?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addboxzone",children:"addBoxZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonesbox",children:"box zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addBoxZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["size?: ",(0,s.jsx)(n.code,{children:"vector3"})]}),"\n",(0,s.jsxs)(n.li,{children:["rotation?: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"addpolyzone",children:"addPolyZone"}),"\n",(0,s.jsxs)(n.p,{children:["Creates a new targetable ",(0,s.jsx)(n.a,{href:"../../ox_lib/Modules/Zones/Shared#libzonespoly",children:"poly zone"}),"."]}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"addPolyZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(parameters)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["parameters: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["points: ",(0,s.jsx)(n.code,{children:"vector3[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An array of 3d points defining the polygon's shape."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["An optional name to refer to the zone instead of using the ",(0,s.jsx)(n.code,{children:"id"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["thickness?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The height of the polygon, defaulting to ",(0,s.jsx)(n.code,{children:"4"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["debug?: ",(0,s.jsx)(n.code,{children:"boolean"})]}),"\n",(0,s.jsxs)(n.li,{children:["drawSprite?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Draw a sprite at the centroid of the zone. Defaults to ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["options: ",(0,s.jsx)(n.code,{children:"TargetOptions"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Return:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"removezone",children:"removeZone"}),"\n",(0,s.jsx)(n.p,{children:"Removes a targetable zone with the given id (returned by addBoxZone/addSphereZone)."}),"\n",(0,s.jsx)(n.pre,{"data-language":"lua","data-theme":"default",children:(0,s.jsx)(n.code,{"data-language":"lua","data-theme":"default",children:(0,s.jsxs)(n.span,{className:"line",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"exports.ox_target:"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"removeZone"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["id: ",(0,s.jsx)(n.code,{children:"number"})," or ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"number"})," id that is returned by ",(0,s.jsx)(n.a,{href:"#addspherezone",children:"addSphereZone"}),", ",(0,s.jsx)(n.a,{href:"#addboxzone",children:"addBoxZone"}),", or ",(0,s.jsx)(n.a,{href:"#addpolyzone",children:"addPolyZone"}),(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.strong,{children:"OR"})]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"string"})," name given to the zone."]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target/Functions/Client.mdx",route:"/overextended/ox_target/Functions/Client",timestamp:1730940204e3,title:"Client",headings:t},pageNextRoute:"/overextended/ox_target/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=959)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/ox_target/TargetOptions-95b6d10a6b71b031.js b/_next/static/chunks/pages/overextended/ox_target/TargetOptions-887871edc9a6e09f.js similarity index 99% rename from _next/static/chunks/pages/overextended/ox_target/TargetOptions-95b6d10a6b71b031.js rename to _next/static/chunks/pages/overextended/ox_target/TargetOptions-887871edc9a6e09f.js index 1a7d2f7f98..4a6187269e 100644 --- a/_next/static/chunks/pages/overextended/ox_target/TargetOptions-95b6d10a6b71b031.js +++ b/_next/static/chunks/pages/overextended/ox_target/TargetOptions-887871edc9a6e09f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8692],{8827:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target/TargetOptions",function(){return i(8389)}])},8389:function(e,n,i){"use strict";i.r(n),i.d(n,{__toc:function(){return t}});var s=i(2676),r=i(2140),l=i(8745);let t=[{depth:2,value:"TargetOption",id:"targetoption"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",ol:"ol"},(0,l.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"TargetOptions"}),"\n",(0,s.jsx)(n.p,{children:"All target actions are formated as an array containing objects with the following properties."}),"\n",(0,s.jsx)(n.h2,{id:"targetoption",children:"TargetOption"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An identifier used when removing an option."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["icon?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Name of a ",(0,s.jsx)(n.a,{href:"https://fontawesome.com/icons",children:"Font Awesome"})," icon."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["iconColor?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["distance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to display the option."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["bones?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["A bone name or array of bone names (see ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0xFB71170B7E76ACBA",children:"GetEntityBoneIndexByName"}),")."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offset?: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Offset the targetable area of an entity, relative to the model dimensions."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offsetAbsolute?: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Offset the targetable area of an entity, relative to the entity's world coords."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offsetSize?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The radius of the targetable area for an entity offset."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["groups?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})," or ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A group, array of groups, or pairs of groups-grades required to show the option."}),"\n",(0,s.jsx)(n.li,{children:"Groups are framework dependent, and may refer to jobs, gangs, etc."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["items?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})," or ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An item, array of items, or pairs of items-count required to show the option."}),"\n",(0,s.jsx)(n.li,{children:"Items are framework dependent."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["anyItem?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Only require a single item from the items table to exist."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["canInteract?: ",(0,s.jsx)(n.code,{children:"function(entity, distance, coords, name, bone)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Options will always display if this is undefined."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["menuName?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The option is only displayed when a menu has been set with openMenu."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["openMenu?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Sets the current menu name, displaying only options for the menuName."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["onSelect?: ",(0,s.jsx)(n.code,{children:"function(data)"})]}),"\n",(0,s.jsxs)(n.li,{children:["export?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["event?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["serverEvent?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["command?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"callback",children:"Callback"}),"\n",(0,s.jsx)(n.p,{children:"This is the data returned to a registered callback or event for selected option."}),"\n",(0,s.jsx)(n.p,{children:"A selected option will trigger a single action, in order of priority:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"onSelect"}),"\n",(0,s.jsx)(n.li,{children:"export"}),"\n",(0,s.jsx)(n.li,{children:"event"}),"\n",(0,s.jsx)(n.li,{children:"server event"}),"\n",(0,s.jsx)(n.li,{children:"command"}),"\n"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entity: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The id of the entity hit by the shape test. If triggering a server event, this is the network id instead."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The resulting coordinates where the shape test hit a collision."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["distance: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The player's distance from the coords."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["zone?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The id of the selected zone, if applicable."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target/TargetOptions.mdx",route:"/overextended/ox_target/TargetOptions",timestamp:1730928152e3,title:"TargetOptions",headings:t},pageNextRoute:"/overextended/ox_target/TargetOptions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8827)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8692],{8827:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/ox_target/TargetOptions",function(){return i(8389)}])},8389:function(e,n,i){"use strict";i.r(n),i.d(n,{__toc:function(){return t}});var s=i(2676),r=i(2140),l=i(8745);let t=[{depth:2,value:"TargetOption",id:"targetoption"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",code:"code",a:"a",ol:"ol"},(0,l.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"TargetOptions"}),"\n",(0,s.jsx)(n.p,{children:"All target actions are formated as an array containing objects with the following properties."}),"\n",(0,s.jsx)(n.h2,{id:"targetoption",children:"TargetOption"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["label: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["name?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An identifier used when removing an option."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["icon?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Name of a ",(0,s.jsx)(n.a,{href:"https://fontawesome.com/icons",children:"Font Awesome"})," icon."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["iconColor?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["distance?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The max distance to display the option."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["bones?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["A bone name or array of bone names (see ",(0,s.jsx)(n.a,{href:"https://docs.fivem.net/natives/?_0xFB71170B7E76ACBA",children:"GetEntityBoneIndexByName"}),")."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offset?: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Offset the targetable area of an entity, relative to the model dimensions."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offsetAbsolute?: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Offset the targetable area of an entity, relative to the entity's world coords."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["offsetSize?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The radius of the targetable area for an entity offset."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["groups?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})," or ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A group, array of groups, or pairs of groups-grades required to show the option."}),"\n",(0,s.jsx)(n.li,{children:"Groups are framework dependent, and may refer to jobs, gangs, etc."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["items?: ",(0,s.jsx)(n.code,{children:"string"})," or ",(0,s.jsx)(n.code,{children:"string[]"})," or ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"An item, array of items, or pairs of items-count required to show the option."}),"\n",(0,s.jsx)(n.li,{children:"Items are framework dependent."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["anyItem?: ",(0,s.jsx)(n.code,{children:"boolean"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Only require a single item from the items table to exist."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["canInteract?: ",(0,s.jsx)(n.code,{children:"function(entity, distance, coords, name, bone)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Options will always display if this is undefined."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["menuName?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The option is only displayed when a menu has been set with openMenu."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["openMenu?: ",(0,s.jsx)(n.code,{children:"string"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Sets the current menu name, displaying only options for the menuName."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["onSelect?: ",(0,s.jsx)(n.code,{children:"function(data)"})]}),"\n",(0,s.jsxs)(n.li,{children:["export?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["event?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["serverEvent?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n",(0,s.jsxs)(n.li,{children:["command?: ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"callback",children:"Callback"}),"\n",(0,s.jsx)(n.p,{children:"This is the data returned to a registered callback or event for selected option."}),"\n",(0,s.jsx)(n.p,{children:"A selected option will trigger a single action, in order of priority:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"onSelect"}),"\n",(0,s.jsx)(n.li,{children:"export"}),"\n",(0,s.jsx)(n.li,{children:"event"}),"\n",(0,s.jsx)(n.li,{children:"server event"}),"\n",(0,s.jsx)(n.li,{children:"command"}),"\n"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["data: ",(0,s.jsx)(n.code,{children:"table"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["entity: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The id of the entity hit by the shape test. If triggering a server event, this is the network id instead."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["coords: ",(0,s.jsx)(n.code,{children:"vector3"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The resulting coordinates where the shape test hit a collision."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["distance: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The player's distance from the coords."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["zone?: ",(0,s.jsx)(n.code,{children:"number"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The id of the selected zone, if applicable."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]})]})}n.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/ox_target/TargetOptions.mdx",route:"/overextended/ox_target/TargetOptions",timestamp:1730940204e3,title:"TargetOptions",headings:t},pageNextRoute:"/overextended/ox_target/TargetOptions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8827)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql-fab2e6f6b449990d.js b/_next/static/chunks/pages/overextended/oxmysql-c03dc16bcc478bbe.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql-fab2e6f6b449990d.js rename to _next/static/chunks/pages/overextended/oxmysql-c03dc16bcc478bbe.js index a5f3e6f290..b4b170ec84 100644 --- a/_next/static/chunks/pages/overextended/oxmysql-fab2e6f6b449990d.js +++ b/_next/static/chunks/pages/overextended/oxmysql-c03dc16bcc478bbe.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9453],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var a=n(5271),r=n(507),i=n.n(r),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,l=Object.defineProperties,d=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))h.call(s,n)&&__defNormalProp(e,n,s[n]);if(c)for(var n of c(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>l(e,d(s)),__objRest=(e,s)=>{var n={};for(var a in e)h.call(e,a)&&0>s.indexOf(a)&&(n[a]=e[a]);if(null!=e&&c)for(var a of c(e))0>s.indexOf(a)&&x.call(e,a)&&(n[a]=e[a]);return n},createReactComponent=(e,s,n)=>{let r=(0,a.forwardRef)((s,r)=>{var{color:i="currentColor",size:t=24,stroke:l=2,children:d}=s,c=__objRest(s,["color","size","stroke","children"]);return(0,a.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},o),{width:t,height:t,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),c),[...n.map(([e,s])=>(0,a.createElement)(e,s)),...d||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${s}`,r}},9192:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql",function(){return n(2878)}])},2878:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var a=n(2676),r=n(2140),i=n(8745),o=n(7100),t=n(8713);let l=[{depth:2,value:"MySQL ou MariaDB?",id:"mysql-ou-mariadb"},{depth:2,value:"Devo usar o XAMPP?",id:"devo-usar-o-xampp"},{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Baixe e instale MariaDB",id:"baixe-e-instale-mariadb"},{depth:3,value:"Baixe a \xfaltima vers\xe3o do oxmysql",id:"baixe-a-\xfaltima-vers\xe3o-do-oxmysql"},{depth:3,value:"Configure seu servidor",id:"configure-seu-servidor"},{depth:3,value:"Avisos de consulta lenta",id:"avisos-de-consulta-lenta"},{depth:3,value:"Debug",id:"debug"},{depth:2,value:"Compatibilidade",id:"compatibilidade"},{depth:2,value:"Uso",id:"uso"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Upserting",id:"upserting"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",a:"a",strong:"strong",em:"em",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h1,{children:"OxMySQL"}),"\n","\n",(0,a.jsx)(t.Z,{repo:"https://github.com/overextended/oxmysql"}),"\n",(0,a.jsx)(s.p,{children:"Uma substitui\xe7\xe3o para mysql-async e ghmattimysql com API expandida e compatibilidade aprimorada para MySQL 8."}),"\n",(0,a.jsx)(s.h2,{id:"mysql-ou-mariadb",children:"MySQL ou MariaDB?"}),"\n",(0,a.jsx)(s.p,{children:"A maioria dos recursos para FiveM foi projetada para ser usada com MySQL 5.7 e pode enfrentar problemas de compatibilidade ao usar MySQL 8, por exemplo:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Mais palavras reservadas, como 'stored' e 'group'."}),"\n",(0,a.jsx)(s.li,{children:"Campos Longtext / JSON n\xe3o suportam valores padr\xe3o."}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," \xe9 altamente recomendada por sua compatibilidade e desempenho aprimorado (em rela\xe7\xe3o a todas as vers\xf5es do MySQL)."]}),"\n",(0,a.jsx)(s.h2,{id:"devo-usar-o-xampp",children:"Devo usar o XAMPP?"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.strong,{children:"N\xe3o."})," XAMPP \xe9 uma ",(0,a.jsx)(s.em,{children:"pilha de servidor web"})," destinada a desenvolvimento, permitindo f\xe1cil desenvolvimento e teste locais.\nN\xe3o instale o XAMPP apenas para rodar seu banco de dados, e instale ",(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," diretamente."]}),"\n",(0,a.jsx)(s.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,a.jsxs)(o.Rg,{children:[(0,a.jsxs)(s.h3,{id:"baixe-e-instale-mariadb",children:["Baixe e instale ",(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})]}),(0,a.jsxs)(s.h3,{id:"baixe-a-\xfaltima-vers\xe3o-do-oxmysql",children:["Baixe a ",(0,a.jsx)(s.a,{href:"https://github.com/overextended/oxmysql/releases/latest",children:"\xfaltima vers\xe3o"})," do oxmysql"]}),(0,a.jsx)(s.h3,{id:"configure-seu-servidor",children:"Configure seu servidor"}),(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Abra o ",(0,a.jsx)(s.a,{href:"https://docs.fivem.net/docs/server-manual/setting-up-a-server-vanilla/#servercfg",children:"arquivo de configura\xe7\xe3o"})," do seu servidor."]}),"\n",(0,a.jsxs)(s.li,{children:["Adicione ",(0,a.jsx)(s.code,{children:"start oxmysql"})," ao in\xedcio da sua lista de recursos."]}),"\n",(0,a.jsx)(s.li,{children:"Configure sua string de conex\xe3o mysql e defina-a antes de iniciar quaisquer recursos."}),"\n"]}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Use seu formato preferido. Certifique-se de sempre usar set."})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_connection_string"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"mysql://root:12345@localhost:3306/fivem"'})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_connection_string"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"user=root;password=12345;host=localhost;port=3306;database=fivem"'})]})]})}),(0,a.jsx)(o.UW,{type:"info",children:(0,a.jsxs)(s.p,{children:["Certos caracteres especiais s\xe3o reservados ou n\xe3o s\xe3o suportados dependendo da sua string de conex\xe3o.\nEvite usar estes caracteres ",(0,a.jsx)(s.code,{children:"; , / ? : @ & = + $ #"})," e tente trocar o formato da string de conex\xe3o."]})}),(0,a.jsx)(s.h3,{id:"avisos-de-consulta-lenta",children:"Avisos de consulta lenta"}),(0,a.jsx)(s.p,{children:"Voc\xea receber\xe1 avisos se uma consulta demorar muito para ser conclu\xedda, configur\xe1vel com uma vari\xe1vel de ambiente."}),(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"O tempo de consulta pode n\xe3o ser totalmente preciso."}),"\n",(0,a.jsx)(s.li,{children:"Consultas lentas podem n\xe3o indicar um problema de banco de dados (ex.: travamentos do servidor)."}),"\n",(0,a.jsx)(s.li,{children:"Consultas lentas na inicializa\xe7\xe3o do servidor n\xe3o s\xe3o necessariamente problem\xe1ticas."}),"\n"]}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_slow_query_warning"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"150"})]})})}),(0,a.jsx)(s.h3,{id:"debug",children:"Debug"}),(0,a.jsx)(s.p,{children:"Habilitar a op\xe7\xe3o de debug imprimir\xe1 todas as consultas no console do servidor; voc\xea tamb\xe9m pode usar uma lista para imprimir apenas de recursos espec\xedficos."}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:'"ox_core"'}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:'"ox_inventory"'})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})})]})}),(0,a.jsx)(s.p,{children:"Voc\xea pode modificar temporariamente a lista de recursos com comandos."}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"remove"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]})]})})]}),"\n",(0,a.jsx)(s.h2,{id:"compatibilidade",children:"Compatibilidade"}),"\n",(0,a.jsx)(s.p,{children:"Voc\xea pode deletar os seguintes recursos e permitir que oxmysql forne\xe7a sua funcionalidade."}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"mysql-async"}),"\n",(0,a.jsx)(s.li,{children:"ghmattimysql"}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"uso",children:"Uso"}),"\n",(0,a.jsx)(s.p,{children:"Os recursos podem importar m\xe9todos oxmysql incluindo nossa biblioteca, fornecendo alguns recursos de verifica\xe7\xe3o de tipos e pequenas melhorias de desempenho sobre chamadas de exporta\xe7\xe3o diretas."}),"\n",(0,a.jsx)(s.h3,{id:"lua",children:"Lua"}),"\n",(0,a.jsxs)(s.p,{children:["Modifique ",(0,a.jsx)(s.code,{children:"fxmanifest.lua"})," para o seu recurso e adicione o seguinte acima de qualquer outro arquivo de script."]}),"\n",(0,a.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"server_script"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@oxmysql/lib/MySQL.lua'"})]})})}),"\n",(0,a.jsx)(s.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,a.jsxs)(s.p,{children:["Voc\xea pode usar exporta\xe7\xf5es diretas ou instalar ",(0,a.jsx)(s.a,{href:"https://www.npmjs.com/package/@overextended/oxmysql",children:"nosso pacote npm"})," para intellisense e uso semelhante ao Lua."]}),"\n",(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With pnpm"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:" "}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With Yarn"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:" "}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With npm"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]})]})}),"\n",(0,a.jsx)(s.p,{children:"Importe o objeto oxmysql para o seu recurso."}),"\n",(0,a.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"js","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { oxmysql "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL } "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/oxmysql'"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,a.jsx)(s.h2,{id:"upserting",children:"Upserting"}),"\n",(0,a.jsx)(s.p,{children:"Quando n\xe3o tiver certeza se uma linha deve ser inserida no banco de dados ou se uma linha existente deve ser atualizada, as consultas devem verificar a duplicidade de chaves."}),"\n",(0,a.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)'"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { owner, dbId, inventory })"})]})})}),"\n",(0,a.jsx)(s.p,{children:"Isso \xe9 prefer\xedvel a verificar a exist\xeancia de uma linha e, em seguida, inserir ou atualizar dependendo do resultado.\nAl\xe9m disso, ao contr\xe1rio do uso de 'REPLACE INTO', a linha n\xe3o \xe9 deletada e reinserida."})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql.mdx",route:"/overextended/oxmysql",frontMatter:{title:"OxMySQL"},timestamp:1730928152e3,title:"OxMySQL",headings:l},pageNextRoute:"/overextended/oxmysql"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var a=n(2676);n(5271);var r=n(5850),i=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),o=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:r,link:i}=e;return(0,a.jsx)("div",{className:"h-fit w-fit",children:(0,a.jsx)("a",{href:i,children:(0,a.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,a.jsx)("div",{children:r}),n,"right"===s&&(0,a.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var a=n(2676);n(5271);var r=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,a.jsx)(r.eX,{link:s}),(0,a.jsx)(r.Vg,{link:"".concat(s,"/releases")}),n&&(0,a.jsx)(r.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var a=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,r,i,o){if(o!==a){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9192)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9453],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var a=n(5271),r=n(507),i=n.n(r),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},t=Object.defineProperty,l=Object.defineProperties,d=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,__spreadValues=(e,s)=>{for(var n in s||(s={}))h.call(s,n)&&__defNormalProp(e,n,s[n]);if(c)for(var n of c(s))x.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>l(e,d(s)),__objRest=(e,s)=>{var n={};for(var a in e)h.call(e,a)&&0>s.indexOf(a)&&(n[a]=e[a]);if(null!=e&&c)for(var a of c(e))0>s.indexOf(a)&&x.call(e,a)&&(n[a]=e[a]);return n},createReactComponent=(e,s,n)=>{let r=(0,a.forwardRef)((s,r)=>{var{color:i="currentColor",size:t=24,stroke:l=2,children:d}=s,c=__objRest(s,["color","size","stroke","children"]);return(0,a.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},o),{width:t,height:t,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),c),[...n.map(([e,s])=>(0,a.createElement)(e,s)),...d||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${s}`,r}},9192:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql",function(){return n(2878)}])},2878:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var a=n(2676),r=n(2140),i=n(8745),o=n(7100),t=n(8713);let l=[{depth:2,value:"MySQL ou MariaDB?",id:"mysql-ou-mariadb"},{depth:2,value:"Devo usar o XAMPP?",id:"devo-usar-o-xampp"},{depth:2,value:"Instala\xe7\xe3o",id:"instala\xe7\xe3o"},{depth:3,value:"Baixe e instale MariaDB",id:"baixe-e-instale-mariadb"},{depth:3,value:"Baixe a \xfaltima vers\xe3o do oxmysql",id:"baixe-a-\xfaltima-vers\xe3o-do-oxmysql"},{depth:3,value:"Configure seu servidor",id:"configure-seu-servidor"},{depth:3,value:"Avisos de consulta lenta",id:"avisos-de-consulta-lenta"},{depth:3,value:"Debug",id:"debug"},{depth:2,value:"Compatibilidade",id:"compatibilidade"},{depth:2,value:"Uso",id:"uso"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Upserting",id:"upserting"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",ul:"ul",li:"li",a:"a",strong:"strong",em:"em",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h1,{children:"OxMySQL"}),"\n","\n",(0,a.jsx)(t.Z,{repo:"https://github.com/overextended/oxmysql"}),"\n",(0,a.jsx)(s.p,{children:"Uma substitui\xe7\xe3o para mysql-async e ghmattimysql com API expandida e compatibilidade aprimorada para MySQL 8."}),"\n",(0,a.jsx)(s.h2,{id:"mysql-ou-mariadb",children:"MySQL ou MariaDB?"}),"\n",(0,a.jsx)(s.p,{children:"A maioria dos recursos para FiveM foi projetada para ser usada com MySQL 5.7 e pode enfrentar problemas de compatibilidade ao usar MySQL 8, por exemplo:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"Mais palavras reservadas, como 'stored' e 'group'."}),"\n",(0,a.jsx)(s.li,{children:"Campos Longtext / JSON n\xe3o suportam valores padr\xe3o."}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," \xe9 altamente recomendada por sua compatibilidade e desempenho aprimorado (em rela\xe7\xe3o a todas as vers\xf5es do MySQL)."]}),"\n",(0,a.jsx)(s.h2,{id:"devo-usar-o-xampp",children:"Devo usar o XAMPP?"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.strong,{children:"N\xe3o."})," XAMPP \xe9 uma ",(0,a.jsx)(s.em,{children:"pilha de servidor web"})," destinada a desenvolvimento, permitindo f\xe1cil desenvolvimento e teste locais.\nN\xe3o instale o XAMPP apenas para rodar seu banco de dados, e instale ",(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," diretamente."]}),"\n",(0,a.jsx)(s.h2,{id:"instala\xe7\xe3o",children:"Instala\xe7\xe3o"}),"\n",(0,a.jsxs)(o.Rg,{children:[(0,a.jsxs)(s.h3,{id:"baixe-e-instale-mariadb",children:["Baixe e instale ",(0,a.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})]}),(0,a.jsxs)(s.h3,{id:"baixe-a-\xfaltima-vers\xe3o-do-oxmysql",children:["Baixe a ",(0,a.jsx)(s.a,{href:"https://github.com/overextended/oxmysql/releases/latest",children:"\xfaltima vers\xe3o"})," do oxmysql"]}),(0,a.jsx)(s.h3,{id:"configure-seu-servidor",children:"Configure seu servidor"}),(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["Abra o ",(0,a.jsx)(s.a,{href:"https://docs.fivem.net/docs/server-manual/setting-up-a-server-vanilla/#servercfg",children:"arquivo de configura\xe7\xe3o"})," do seu servidor."]}),"\n",(0,a.jsxs)(s.li,{children:["Adicione ",(0,a.jsx)(s.code,{children:"start oxmysql"})," ao in\xedcio da sua lista de recursos."]}),"\n",(0,a.jsx)(s.li,{children:"Configure sua string de conex\xe3o mysql e defina-a antes de iniciar quaisquer recursos."}),"\n"]}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Use seu formato preferido. Certifique-se de sempre usar set."})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_connection_string"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"mysql://root:12345@localhost:3306/fivem"'})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_connection_string"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"user=root;password=12345;host=localhost;port=3306;database=fivem"'})]})]})}),(0,a.jsx)(o.UW,{type:"info",children:(0,a.jsxs)(s.p,{children:["Certos caracteres especiais s\xe3o reservados ou n\xe3o s\xe3o suportados dependendo da sua string de conex\xe3o.\nEvite usar estes caracteres ",(0,a.jsx)(s.code,{children:"; , / ? : @ & = + $ #"})," e tente trocar o formato da string de conex\xe3o."]})}),(0,a.jsx)(s.h3,{id:"avisos-de-consulta-lenta",children:"Avisos de consulta lenta"}),(0,a.jsx)(s.p,{children:"Voc\xea receber\xe1 avisos se uma consulta demorar muito para ser conclu\xedda, configur\xe1vel com uma vari\xe1vel de ambiente."}),(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"O tempo de consulta pode n\xe3o ser totalmente preciso."}),"\n",(0,a.jsx)(s.li,{children:"Consultas lentas podem n\xe3o indicar um problema de banco de dados (ex.: travamentos do servidor)."}),"\n",(0,a.jsx)(s.li,{children:"Consultas lentas na inicializa\xe7\xe3o do servidor n\xe3o s\xe3o necessariamente problem\xe1ticas."}),"\n"]}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_slow_query_warning"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"150"})]})})}),(0,a.jsx)(s.h3,{id:"debug",children:"Debug"}),(0,a.jsx)(s.p,{children:"Habilitar a op\xe7\xe3o de debug imprimir\xe1 todas as consultas no console do servidor; voc\xea tamb\xe9m pode usar uma lista para imprimir apenas de recursos espec\xedficos."}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:'"ox_core"'}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:","})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:'"ox_inventory"'})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})})]})}),(0,a.jsx)(s.p,{children:"Voc\xea pode modificar temporariamente a lista de recursos com comandos."}),(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"remove"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_core"})]})]})})]}),"\n",(0,a.jsx)(s.h2,{id:"compatibilidade",children:"Compatibilidade"}),"\n",(0,a.jsx)(s.p,{children:"Voc\xea pode deletar os seguintes recursos e permitir que oxmysql forne\xe7a sua funcionalidade."}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:"mysql-async"}),"\n",(0,a.jsx)(s.li,{children:"ghmattimysql"}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"uso",children:"Uso"}),"\n",(0,a.jsx)(s.p,{children:"Os recursos podem importar m\xe9todos oxmysql incluindo nossa biblioteca, fornecendo alguns recursos de verifica\xe7\xe3o de tipos e pequenas melhorias de desempenho sobre chamadas de exporta\xe7\xe3o diretas."}),"\n",(0,a.jsx)(s.h3,{id:"lua",children:"Lua"}),"\n",(0,a.jsxs)(s.p,{children:["Modifique ",(0,a.jsx)(s.code,{children:"fxmanifest.lua"})," para o seu recurso e adicione o seguinte acima de qualquer outro arquivo de script."]}),"\n",(0,a.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"server_script"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@oxmysql/lib/MySQL.lua'"})]})})}),"\n",(0,a.jsx)(s.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,a.jsxs)(s.p,{children:["Voc\xea pode usar exporta\xe7\xf5es diretas ou instalar ",(0,a.jsx)(s.a,{href:"https://www.npmjs.com/package/@overextended/oxmysql",children:"nosso pacote npm"})," para intellisense e uso semelhante ao Lua."]}),"\n",(0,a.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With pnpm"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:" "}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With Yarn"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\n",(0,a.jsx)(s.span,{className:"line",children:" "}),"\n",(0,a.jsx)(s.span,{className:"line",children:(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# With npm"})}),"\n",(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]})]})}),"\n",(0,a.jsx)(s.p,{children:"Importe o objeto oxmysql para o seu recurso."}),"\n",(0,a.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"js","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { oxmysql "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL } "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@overextended/oxmysql'"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,a.jsx)(s.h2,{id:"upserting",children:"Upserting"}),"\n",(0,a.jsx)(s.p,{children:"Quando n\xe3o tiver certeza se uma linha deve ser inserida no banco de dados ou se uma linha existente deve ser atualizada, as consultas devem verificar a duplicidade de chaves."}),"\n",(0,a.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,a.jsx)(s.code,{"data-language":"lua","data-theme":"default",children:(0,a.jsxs)(s.span,{className:"line",children:[(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)'"}),(0,a.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { owner, dbId, inventory })"})]})})}),"\n",(0,a.jsx)(s.p,{children:"Isso \xe9 prefer\xedvel a verificar a exist\xeancia de uma linha e, em seguida, inserir ou atualizar dependendo do resultado.\nAl\xe9m disso, ao contr\xe1rio do uso de 'REPLACE INTO', a linha n\xe3o \xe9 deletada e reinserida."})]})}s.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql.mdx",route:"/overextended/oxmysql",frontMatter:{title:"OxMySQL"},timestamp:1730940204e3,title:"OxMySQL",headings:l},pageNextRoute:"/overextended/oxmysql"})},3786:function(e,s,n){"use strict";n.d(s,{WR:function(){return DocButton},o6:function(){return DownloadButton},eX:function(){return GhButton},aj:function(){return NpmButton},Vg:function(){return ReleaseButton}});var a=n(2676);n(5271);var r=n(5850),i=(0,r.Z)("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),o=(0,r.Z)("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),t=(0,r.Z)("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),l=(0,r.Z)("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]),d=(0,r.Z)("brand-npm","IconBrandNpm",[["path",{d:"M1 8h22v7h-12v2h-4v-2h-6z",key:"svg-0"}],["path",{d:"M7 8v7",key:"svg-1"}],["path",{d:"M14 8v7",key:"svg-2"}],["path",{d:"M17 11v4",key:"svg-3"}],["path",{d:"M4 11v4",key:"svg-4"}],["path",{d:"M11 11v1",key:"svg-5"}],["path",{d:"M20 11v4",key:"svg-6"}]]);let Button=e=>{let{side:s="left",children:n,icon:r,link:i}=e;return(0,a.jsx)("div",{className:"h-fit w-fit",children:(0,a.jsx)("a",{href:i,children:(0,a.jsxs)("div",{className:"flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2",children:["left"===s&&(0,a.jsx)("div",{children:r}),n,"right"===s&&(0,a.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(i,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Documenta\xe7\xe3o"})}function DownloadButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,a.jsx)(Button,{icon:(0,a.jsx)(d,{}),side:e.side,link:e.link,children:e.label||"Pacote"})}},8713:function(e,s,n){"use strict";var a=n(2676);n(5271);var r=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,a.jsx)(r.eX,{link:s}),(0,a.jsx)(r.Vg,{link:"".concat(s,"/releases")}),n&&(0,a.jsx)(r.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var a=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,r,i,o){if(o!==a){var t=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},507:function(e,s,n){e.exports=n(4049)()},6257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9192)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/insert-0cf5831228e3722e.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/insert-ea622be0d655ad85.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/insert-0cf5831228e3722e.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/insert-ea622be0d655ad85.js index 0220c01dd2..d32f630dfa 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/insert-0cf5831228e3722e.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/insert-ea622be0d655ad85.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7609],{6408:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/insert",function(){return n(6949)}])},6949:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),t=n(7100);let o=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Inserir"}),"\n",(0,l.jsx)(e.p,{children:"Insere uma nova entrada no banco de dados e retorna o ID da linha inserida, se v\xe1lido."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.insert."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier, firstName, lastName"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lastName"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.insert"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.executeSync"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.insert_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier, firstName, lastName"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lastName"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (id) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.insert"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.insert"})}),"\n"]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/insert.mdx",route:"/overextended/oxmysql/Functions/insert",frontMatter:{title:"insert"},timestamp:1730928152e3,title:"insert",headings:o},pageNextRoute:"/overextended/oxmysql/Functions/insert"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6408)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7609],{6408:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/insert",function(){return n(6949)}])},6949:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),t=n(7100);let o=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,r.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Inserir"}),"\n",(0,l.jsx)(e.p,{children:"Insere uma nova entrada no banco de dados e retorna o ID da linha inserida, se v\xe1lido."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.insert."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier, firstName, lastName"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lastName"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.insert"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.executeSync"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.insert_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier, firstName, lastName"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"id"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".insert"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" lastName"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (id) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(id)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.insert"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.insert"})}),"\n"]})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/insert.mdx",route:"/overextended/oxmysql/Functions/insert",frontMatter:{title:"insert"},timestamp:1730940204e3,title:"insert",headings:o},pageNextRoute:"/overextended/oxmysql/Functions/insert"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6408)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/prepare-f837a40c6b22ac9b.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/prepare-64bc624b5554d242.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/prepare-f837a40c6b22ac9b.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/prepare-64bc624b5554d242.js index dd5c454e22..73b3d70ad0 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/prepare-f837a40c6b22ac9b.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/prepare-64bc624b5554d242.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7697],{4460:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/prepare",function(){return n(9954)}])},9954:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),l=n(2140),o=n(8745),i=n(7100);let a=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Prepare"}),"\n",(0,r.jsxs)(s.p,{children:["O m\xe9todo ",(0,r.jsx)(s.code,{children:"prepare"})," pode ser usado para executar consultas chamadas com frequ\xeancia de forma mais r\xe1pida e aceita m\xfaltiplos conjuntos de par\xe2metros para serem usados com uma \xfanica consulta."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"DATE"})," n\xe3o retornar\xe1 a string de data comumente usada no FiveM."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"TINYINT 1"})," e ",(0,r.jsx)(s.code,{children:"BIT"})," n\xe3o retornar\xe3o um valor booleano."]}),"\n",(0,r.jsxs)(s.li,{children:["Voc\xea s\xf3 pode usar os marcadores de valor ",(0,r.jsx)(s.code,{children:"?"}),"; os marcadores de coluna ",(0,r.jsx)(s.code,{children:"??"})," e os marcadores nomeados ir\xe3o gerar um erro."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Ao contr\xe1rio de ",(0,r.jsx)(s.a,{href:"./rawExecute",children:"rawExecute"}),", a instru\xe7\xe3o ",(0,r.jsx)(s.code,{children:"SELECT"})," retornar\xe1 uma coluna, linha ou um array de linhas, dependendo do n\xfamero de colunas e linhas selecionadas."]}),"\n",(0,r.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.prepare."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.prepare_async"})}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.prepare"})}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/prepare.mdx",route:"/overextended/oxmysql/Functions/prepare",frontMatter:{title:"prepare"},timestamp:1730928152e3,title:"prepare",headings:a},pageNextRoute:"/overextended/oxmysql/Functions/prepare"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4460)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7697],{4460:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/prepare",function(){return n(9954)}])},9954:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),l=n(2140),o=n(8745),i=n(7100);let a=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Prepare"}),"\n",(0,r.jsxs)(s.p,{children:["O m\xe9todo ",(0,r.jsx)(s.code,{children:"prepare"})," pode ser usado para executar consultas chamadas com frequ\xeancia de forma mais r\xe1pida e aceita m\xfaltiplos conjuntos de par\xe2metros para serem usados com uma \xfanica consulta."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"DATE"})," n\xe3o retornar\xe1 a string de data comumente usada no FiveM."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"TINYINT 1"})," e ",(0,r.jsx)(s.code,{children:"BIT"})," n\xe3o retornar\xe3o um valor booleano."]}),"\n",(0,r.jsxs)(s.li,{children:["Voc\xea s\xf3 pode usar os marcadores de valor ",(0,r.jsx)(s.code,{children:"?"}),"; os marcadores de coluna ",(0,r.jsx)(s.code,{children:"??"})," e os marcadores nomeados ir\xe3o gerar um erro."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Ao contr\xe1rio de ",(0,r.jsx)(s.a,{href:"./rawExecute",children:"rawExecute"}),", a instru\xe7\xe3o ",(0,r.jsx)(s.code,{children:"SELECT"})," retornar\xe1 uma coluna, linha ou um array de linhas, dependendo do n\xfamero de colunas e linhas selecionadas."]}),"\n",(0,r.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.prepare."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.prepare_async"})}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.prepare"})}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/prepare.mdx",route:"/overextended/oxmysql/Functions/prepare",frontMatter:{title:"prepare"},timestamp:1730940204e3,title:"prepare",headings:a},pageNextRoute:"/overextended/oxmysql/Functions/prepare"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4460)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/query-8ea6205e3b00331b.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/query-56759625e5883c87.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/query-8ea6205e3b00331b.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/query-56759625e5883c87.js index 351a05d9a5..e33c2606fb 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/query-8ea6205e3b00331b.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/query-56759625e5883c87.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6442],{6145:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/query",function(){return n(76)}])},76:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),r=n(2140),o=n(8745),i=n(7100);let c=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span",strong:"strong",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Query"}),"\n",(0,l.jsxs)(e.p,{children:["Quando dados s\xe3o selecionados, retorna todas as linhas e colunas correspondentes; caso contr\xe1rio, retorna dados como ",(0,l.jsx)(e.code,{children:"insertId"}),", ",(0,l.jsx)(e.code,{children:"affectedRows"}),", etc."]}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.query."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.fetchAll"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.query_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.fetchAll"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.query"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/query.mdx",route:"/overextended/oxmysql/Functions/query",frontMatter:{title:"query"},timestamp:1730928152e3,title:"query",headings:c},pageNextRoute:"/overextended/oxmysql/Functions/query"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6145)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6442],{6145:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/query",function(){return n(76)}])},76:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),r=n(2140),o=n(8745),i=n(7100);let c=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span",strong:"strong",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Query"}),"\n",(0,l.jsxs)(e.p,{children:["Quando dados s\xe3o selecionados, retorna todas as linhas e colunas correspondentes; caso contr\xe1rio, retorna dados como ",(0,l.jsx)(e.code,{children:"insertId"}),", ",(0,l.jsx)(e.code,{children:"affectedRows"}),", etc."]}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.query."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})})]})})}),(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".identifier"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.fetchAll"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.query_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(i.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.fetchAll"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.query"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/query.mdx",route:"/overextended/oxmysql/Functions/query",frontMatter:{title:"query"},timestamp:1730940204e3,title:"query",headings:c},pageNextRoute:"/overextended/oxmysql/Functions/query"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6145)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-3e6203665e43bff7.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-d21eecc194e9e724.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-3e6203665e43bff7.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-d21eecc194e9e724.js index 5dec3dd36e..4682c07cb3 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-3e6203665e43bff7.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/rawExecute-d21eecc194e9e724.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4365],{5457:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/rawExecute",function(){return n(9944)}])},9944:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),l=n(2140),o=n(8745),i=n(7100);let a=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"RawExecute"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"rawExecute"})," pode ser usado para executar consultas frequentemente chamadas mais rapidamente e aceita m\xfaltiplos conjuntos de par\xe2metros para serem usados com uma \xfanica consulta."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A data n\xe3o retornar\xe1 a string de data normalmente usada no FiveM."}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"TINYINT 1"})," e ",(0,r.jsx)(s.code,{children:"BIT"})," n\xe3o retornar\xe3o um valor booleano."]}),"\n",(0,r.jsxs)(s.li,{children:["Voc\xea pode usar apenas ",(0,r.jsx)(s.code,{children:"?"})," como substituto de valor, os substitutos ",(0,r.jsx)(s.code,{children:"??"})," para colunas e os nomes de par\xe2metros ir\xe3o gerar um erro."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Ao contr\xe1rio do ",(0,r.jsx)(s.a,{href:"./prepare",children:"prepare"}),", a instru\xe7\xe3o ",(0,r.jsx)(s.code,{children:"SELECT"})," sempre retornar\xe1 um array de linhas.\nQuando usado com ",(0,r.jsx)(s.code,{children:"SELECT"}),", o valor de retorno corresponder\xe1 a ",(0,r.jsx)(s.code,{children:"query"}),", ",(0,r.jsx)(s.code,{children:"single"})," ou ",(0,r.jsx)(s.code,{children:"scalar"}),", dependendo do n\xfamero de colunas e linhas selecionadas."]}),"\n",(0,r.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.rawExecute."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.rawExecute_async"})}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.rawExecute"})}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/rawExecute.mdx",route:"/overextended/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"},timestamp:1730928152e3,title:"rawExecute",headings:a},pageNextRoute:"/overextended/oxmysql/Functions/rawExecute"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5457)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4365],{5457:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/rawExecute",function(){return n(9944)}])},9944:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(2676),l=n(2140),o=n(8745),i=n(7100);let a=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"RawExecute"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"rawExecute"})," pode ser usado para executar consultas frequentemente chamadas mais rapidamente e aceita m\xfaltiplos conjuntos de par\xe2metros para serem usados com uma \xfanica consulta."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A data n\xe3o retornar\xe1 a string de data normalmente usada no FiveM."}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"TINYINT 1"})," e ",(0,r.jsx)(s.code,{children:"BIT"})," n\xe3o retornar\xe3o um valor booleano."]}),"\n",(0,r.jsxs)(s.li,{children:["Voc\xea pode usar apenas ",(0,r.jsx)(s.code,{children:"?"})," como substituto de valor, os substitutos ",(0,r.jsx)(s.code,{children:"??"})," para colunas e os nomes de par\xe2metros ir\xe3o gerar um erro."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Ao contr\xe1rio do ",(0,r.jsx)(s.a,{href:"./prepare",children:"prepare"}),", a instru\xe7\xe3o ",(0,r.jsx)(s.code,{children:"SELECT"})," sempre retornar\xe1 um array de linhas.\nQuando usado com ",(0,r.jsx)(s.code,{children:"SELECT"}),", o valor de retorno corresponder\xe1 a ",(0,r.jsx)(s.code,{children:"query"}),", ",(0,r.jsx)(s.code,{children:"single"})," ou ",(0,r.jsx)(s.code,{children:"scalar"}),", dependendo do n\xfamero de colunas e linhas selecionadas."]}),"\n",(0,r.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.rawExecute."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.rawExecute_async"})}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(i.mQ,{items:["Lua","JS"],children:[(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", sort_keys "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(i.OK,{children:(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".rawExecute"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"exports.oxmysql.rawExecute"})}),"\n"]})]})}s.default=(0,l.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,o.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/rawExecute.mdx",route:"/overextended/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"},timestamp:1730940204e3,title:"rawExecute",headings:a},pageNextRoute:"/overextended/oxmysql/Functions/rawExecute"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5457)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/scalar-c72a484140933181.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/scalar-47546c02dc2a4305.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/scalar-c72a484140933181.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/scalar-47546c02dc2a4305.js index 9583cc5083..6a3a670f38 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/scalar-c72a484140933181.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/scalar-47546c02dc2a4305.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2901],{5582:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/scalar",function(){return n(4423)}])},4423:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),a=n(7100);let t=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Scalar"}),"\n",(0,l.jsx)(e.p,{children:"Retorna a primeira coluna de uma \xfanica linha."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.scalar."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.fetchScalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.scalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.scalar_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (firstName) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.fetchScalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.scalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.scalar"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/scalar.mdx",route:"/overextended/oxmysql/Functions/scalar",frontMatter:{title:"scalar"},timestamp:1730928152e3,title:"scalar",headings:t},pageNextRoute:"/overextended/oxmysql/Functions/scalar"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5582)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2901],{5582:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/scalar",function(){return n(4423)}])},4423:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),a=n(7100);let t=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Scalar"}),"\n",(0,l.jsx)(e.p,{children:"Retorna a primeira coluna de uma \xfanica linha."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" firstName "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.scalar."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.fetchScalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.scalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.scalar_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"firstName"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".scalar"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (firstName) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(firstName)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.fetchScalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.scalar"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.scalar"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/scalar.mdx",route:"/overextended/oxmysql/Functions/scalar",frontMatter:{title:"scalar"},timestamp:1730940204e3,title:"scalar",headings:t},pageNextRoute:"/overextended/oxmysql/Functions/scalar"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5582)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/single-4428d662f4d9611c.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/single-8c3c145f39dee18b.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/single-4428d662f4d9611c.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/single-8c3c145f39dee18b.js index 342f09b7fc..1d8a430369 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/single-4428d662f4d9611c.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/single-8c3c145f39dee18b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1127],{3849:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/single",function(){return n(871)}])},871:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let t=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Single"}),"\n",(0,l.jsx)(e.p,{children:"Retorna todas as colunas selecionadas para uma \xfanica linha."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.single."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.single_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.single"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/single.mdx",route:"/overextended/oxmysql/Functions/single",frontMatter:{title:"single"},timestamp:1730928152e3,title:"single",headings:t},pageNextRoute:"/overextended/oxmysql/Functions/single"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3849)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1127],{3849:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/single",function(){return n(871)}])},871:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let t=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Single"}),"\n",(0,l.jsx)(e.p,{children:"Retorna todas as colunas selecionadas para uma \xfanica linha."}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.single."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.single_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"not"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(row.firstname, row.lastname)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(o.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".single"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"row) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"row"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.single"})}),"\n"]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/single.mdx",route:"/overextended/oxmysql/Functions/single",frontMatter:{title:"single"},timestamp:1730940204e3,title:"single",headings:t},pageNextRoute:"/overextended/oxmysql/Functions/single"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3849)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/transaction-08afd0f1f3bb5647.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/transaction-ef3ea93702e5180b.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/transaction-08afd0f1f3bb5647.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/transaction-ef3ea93702e5180b.js index 3579c7c541..274ec04d42 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/transaction-08afd0f1f3bb5647.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/transaction-ef3ea93702e5180b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4285],{6050:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/transaction",function(){return n(8480)}])},8480:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return i}});var l=n(2676),r=n(2140),o=n(8745),a=n(7100);let i=[{depth:2,value:"Formato espec\xedfico",id:"formato-espec\xedfico"},{depth:2,value:"Formato compartilhado",id:"formato-compartilhado"},{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"},{depth:2,value:"N\xedvel de Isolamento da Transa\xe7\xe3o",id:"n\xedvel-de-isolamento-da-transa\xe7\xe3o"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Transaction"}),"\n",(0,l.jsx)(e.p,{children:"Uma transa\xe7\xe3o executa v\xe1rias consultas e as confirma apenas se todas tiverem sucesso.\nSe uma falhar, nenhuma das consultas ser\xe1 confirmada."}),"\n",(0,l.jsx)(e.p,{children:"O valor de retorno \xe9 um booleano, que indica o resultado da transa\xe7\xe3o."}),"\n",(0,l.jsx)(e.h2,{id:"formato-espec\xedfico",children:"Formato espec\xedfico"}),"\n",(0,l.jsx)(e.p,{children:"Ao usar este formato, voc\xea deve passar um array contendo conjuntos de consultas e par\xe2metros para o m\xe9todo da transa\xe7\xe3o.\nNeste caso, suas consultas n\xe3o precisam ser necessariamente iguais, e os valores s\xe3o exclusivos para cada consulta."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:'-- Voc\xea pode renomear "values" como "parameters" para compatibilidade com mysql-async.'})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Voc\xea tamb\xe9m pode passar um array de arrays."})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"formato-compartilhado",children:"Formato compartilhado"}),"\n",(0,l.jsx)(e.p,{children:"Ao usar este formato, voc\xea deve passar um array contendo consultas e um conjunto contendo par\xe2metros compartilhados para o m\xe9todo da transa\xe7\xe3o.\nNeste caso, suas consultas n\xe3o precisam ser necessariamente iguais, e os valores s\xe3o exclusivos para cada consulta."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:'-- Voc\xea pode renomear "values" como "parameters" para compatibilidade com mysql-async.'})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (@someid, @somename)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SET `name` = @newname IN `test` WHERE `id` = @someid'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someid "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" somename "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'John Doe'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" newname "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'John Notdoe'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.transaction."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"--[[deixe nil para formato espec\xedfico]]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"/*deixe nil para formato espec\xedfico*/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.transaction_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- espec\xedfico"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, values, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- compartilhado"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// espec\xedfico"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (success) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// compartilhado"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (success) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.transaction"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"n\xedvel-de-isolamento-da-transa\xe7\xe3o",children:"N\xedvel de Isolamento da Transa\xe7\xe3o"}),"\n",(0,l.jsxs)(e.p,{children:["Isso pode ser configurado atrav\xe9s da convar ",(0,l.jsx)(e.code,{children:"mysql_transaction_isolation_level"}),", que \xe9 um n\xfamero inteiro variando de ",(0,l.jsx)(e.code,{children:"1-4"}),".\nO valor padr\xe3o \xe9 2."]}),"\n",(0,l.jsxs)(e.table,{children:[(0,l.jsx)(e.thead,{children:(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.th,{children:"Valor da Convar"}),(0,l.jsx)(e.th,{children:"Resultado"})]})}),(0,l.jsxs)(e.tbody,{children:[(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"1"}),(0,l.jsx)(e.td,{children:"Repeatable Read"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"2"}),(0,l.jsx)(e.td,{children:"Read Committed"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"3"}),(0,l.jsx)(e.td,{children:"Read Uncommitted"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"4"}),(0,l.jsx)(e.td,{children:"Serializable"})]})]})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/transaction.mdx",route:"/overextended/oxmysql/Functions/transaction",frontMatter:{title:"transaction"},timestamp:1730928152e3,title:"transaction",headings:i},pageNextRoute:"/overextended/oxmysql/Functions/transaction"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6050)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4285],{6050:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/transaction",function(){return n(8480)}])},8480:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return i}});var l=n(2676),r=n(2140),o=n(8745),a=n(7100);let i=[{depth:2,value:"Formato espec\xedfico",id:"formato-espec\xedfico"},{depth:2,value:"Formato compartilhado",id:"formato-compartilhado"},{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"},{depth:2,value:"N\xedvel de Isolamento da Transa\xe7\xe3o",id:"n\xedvel-de-isolamento-da-transa\xe7\xe3o"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,o.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Transaction"}),"\n",(0,l.jsx)(e.p,{children:"Uma transa\xe7\xe3o executa v\xe1rias consultas e as confirma apenas se todas tiverem sucesso.\nSe uma falhar, nenhuma das consultas ser\xe1 confirmada."}),"\n",(0,l.jsx)(e.p,{children:"O valor de retorno \xe9 um booleano, que indica o resultado da transa\xe7\xe3o."}),"\n",(0,l.jsx)(e.h2,{id:"formato-espec\xedfico",children:"Formato espec\xedfico"}),"\n",(0,l.jsx)(e.p,{children:"Ao usar este formato, voc\xea deve passar um array contendo conjuntos de consultas e par\xe2metros para o m\xe9todo da transa\xe7\xe3o.\nNeste caso, suas consultas n\xe3o precisam ser necessariamente iguais, e os valores s\xe3o exclusivos para cada consulta."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:'-- Voc\xea pode renomear "values" como "parameters" para compatibilidade com mysql-async.'})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Voc\xea tamb\xe9m pode passar um array de arrays."})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"formato-compartilhado",children:"Formato compartilhado"}),"\n",(0,l.jsx)(e.p,{children:"Ao usar este formato, voc\xea deve passar um array contendo consultas e um conjunto contendo par\xe2metros compartilhados para o m\xe9todo da transa\xe7\xe3o.\nNeste caso, suas consultas n\xe3o precisam ser necessariamente iguais, e os valores s\xe3o exclusivos para cada consulta."}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:'-- Voc\xea pode renomear "values" como "parameters" para compatibilidade com mysql-async.'})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test` (id, name) VALUES (@someid, @somename)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SET `name` = @newname IN `test` WHERE `id` = @someid'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" someid "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" somename "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'John Doe'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" newname "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'John Notdoe'"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,l.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" success "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.transaction."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"--[[deixe nil para formato espec\xedfico]]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"/*deixe nil para formato espec\xedfico*/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Sync.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.transaction_async"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(a.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- espec\xedfico"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, values, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- compartilhado"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"success"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(a.OK,{children:(0,l.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// espec\xedfico"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (success) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// compartilhado"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".transaction"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(queries"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" values"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (success) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(success)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(e.p,{children:(0,l.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"MySQL.Async.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.ghmattimysql.transaction"})}),"\n",(0,l.jsx)(e.li,{children:(0,l.jsx)(e.code,{children:"exports.oxmysql.transaction"})}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"n\xedvel-de-isolamento-da-transa\xe7\xe3o",children:"N\xedvel de Isolamento da Transa\xe7\xe3o"}),"\n",(0,l.jsxs)(e.p,{children:["Isso pode ser configurado atrav\xe9s da convar ",(0,l.jsx)(e.code,{children:"mysql_transaction_isolation_level"}),", que \xe9 um n\xfamero inteiro variando de ",(0,l.jsx)(e.code,{children:"1-4"}),".\nO valor padr\xe3o \xe9 2."]}),"\n",(0,l.jsxs)(e.table,{children:[(0,l.jsx)(e.thead,{children:(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.th,{children:"Valor da Convar"}),(0,l.jsx)(e.th,{children:"Resultado"})]})}),(0,l.jsxs)(e.tbody,{children:[(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"1"}),(0,l.jsx)(e.td,{children:"Repeatable Read"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"2"}),(0,l.jsx)(e.td,{children:"Read Committed"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"3"}),(0,l.jsx)(e.td,{children:"Read Uncommitted"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{children:"4"}),(0,l.jsx)(e.td,{children:"Serializable"})]})]})]})]})}e.default=(0,r.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,o.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/transaction.mdx",route:"/overextended/oxmysql/Functions/transaction",frontMatter:{title:"transaction"},timestamp:1730940204e3,title:"transaction",headings:i},pageNextRoute:"/overextended/oxmysql/Functions/transaction"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6050)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/Functions/update-e118c127e9ab54b9.js b/_next/static/chunks/pages/overextended/oxmysql/Functions/update-198bc56f22f88c84.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/Functions/update-e118c127e9ab54b9.js rename to _next/static/chunks/pages/overextended/oxmysql/Functions/update-198bc56f22f88c84.js index 27ff27f2ec..a0c20cac8d 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/Functions/update-e118c127e9ab54b9.js +++ b/_next/static/chunks/pages/overextended/oxmysql/Functions/update-198bc56f22f88c84.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1850],{9580:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/update",function(){return n(6778)}])},6778:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),t=n(7100);let o=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Update"}),"\n",(0,l.jsx)(s.p,{children:"Retorna o n\xfamero de linhas afetadas pela consulta."}),"\n",(0,l.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" affectedRows "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.update."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName, identifier"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"affectedRows"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]})]})})})]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"MySQL.Sync.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.ghmattimysql.executeSync"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.oxmysql.update_async"})}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName, identifier"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"affectedRows"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (affectedRows) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"MySQL.Async.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.oxmysql.update"})}),"\n"]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/update.mdx",route:"/overextended/oxmysql/Functions/update",frontMatter:{title:"update"},timestamp:1730928152e3,title:"update",headings:o},pageNextRoute:"/overextended/oxmysql/Functions/update"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9580)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1850],{9580:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/Functions/update",function(){return n(6778)}])},6778:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return o}});var l=n(2676),i=n(2140),r=n(8745),t=n(7100);let o=[{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,r.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"Update"}),"\n",(0,l.jsx)(s.p,{children:"Retorna o n\xfamero de linhas afetadas pela consulta."}),"\n",(0,l.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" affectedRows "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.update."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName, identifier"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"affectedRows"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"])"})}),"\n",(0,l.jsx)(s.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]})]})})})]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"MySQL.Sync.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.ghmattimysql.executeSync"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.oxmysql.update_async"})}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(t.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName, identifier"})}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}, "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-parameter)"},children:"affectedRows"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,l.jsx)(t.OK,{children:(0,l.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,l.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".update"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE users SET firstname = ? WHERE identifier = ?'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" newName"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (affectedRows) "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(s.span,{className:"line",children:[(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(affectedRows)"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})})})]}),"\n",(0,l.jsx)(s.p,{children:(0,l.jsx)(s.strong,{children:"Aliases"})}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"MySQL.Async.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"exports.oxmysql.update"})}),"\n"]})]})}s.default=(0,i.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,r.a)(),e.components);return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/Functions/update.mdx",route:"/overextended/oxmysql/Functions/update",frontMatter:{title:"update"},timestamp:1730940204e3,title:"update",headings:o},pageNextRoute:"/overextended/oxmysql/Functions/update"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9580)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/benchmark-fd658e54e5af9caa.js b/_next/static/chunks/pages/overextended/oxmysql/benchmark-d007950e68dadaaf.js similarity index 99% rename from _next/static/chunks/pages/overextended/oxmysql/benchmark-fd658e54e5af9caa.js rename to _next/static/chunks/pages/overextended/oxmysql/benchmark-d007950e68dadaaf.js index 662a98ff43..3d47617810 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/benchmark-fd658e54e5af9caa.js +++ b/_next/static/chunks/pages/overextended/oxmysql/benchmark-d007950e68dadaaf.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2720],{9496:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/benchmark",function(){return r(9615)}])},9615:function(s,e,r){"use strict";r.r(e),r.d(e,{__toc:function(){return o}});var l=r(2676),i=r(2140),n=r(8745);let o=[{depth:2,value:"Script",id:"script"},{depth:2,value:"Resultados",id:"resultados"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,n.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Benchmark"}),"\n",(0,l.jsxs)(e.p,{children:["A medi\xe7\xe3o de desempenho \xe9 baseada no tempo gasto para receber uma resposta dos exports.\nAs velocidades reais das consultas ser\xe3o relatadas na interface de depura\xe7\xe3o e no console do servidor com ",(0,l.jsx)(e.code,{children:"mysql_debug"})," ativado."]}),"\n",(0,l.jsx)(e.p,{children:"As velocidades podem variar consideravelmente com base no hardware do sistema, configura\xe7\xf5es do banco de dados, vers\xe3o do banco de dados e a carga de trabalho atual."}),"\n",(0,l.jsx)(e.h2,{id:"script",children:"Script"}),"\n",(0,l.jsxs)(e.p,{children:["Este script testa os tempos de exporta\xe7\xe3o ao usar o runtime Lua 5.4 com a sintaxe ",(0,l.jsx)(e.code,{children:"lib/MySQL.lua"}),"."]}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"msg"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"fn"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"parameters"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" start "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" os."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nanotime"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" result "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fn"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(query, parameters)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" finish "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" os."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nanotime"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(msg)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Executou ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(query) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"query) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' consultas em ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (finish "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" start) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1e6"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ms'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" result"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" initTable "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DROP TABLE `test_table`'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"[[CREATE TABLE `test_table` ("})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `username` VARCHAR(50) NOT NULL DEFAULT '0',"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `identifier` VARCHAR(50) NOT NULL DEFAULT '0',"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" PRIMARY KEY (`id`)"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" )]]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'TRUNCATE `test_table`'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ALTER TABLE `test_table` AUTO_INCREMENT = 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Inicializando test_table'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, initTable)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef1' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob1' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'{ query: string, values: string }[] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef2' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob2' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[string, any[]][] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (\"abcdef3\")'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = \"bob3\" WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string[] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertUsers "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertUsers[i] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (username, identifier) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Testuser_' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i } }"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inserir ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"insertUsers "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' test users'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, insertUsers)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selectUserIds "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"%"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selectUserIds["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.tointeger"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i }"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'selecionar todo 4\xba userid'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.prepare.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selectUserIds)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertid "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inserir'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.insert.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" update "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'atualizar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.update.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bobby'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", insertid })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scalar "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'escala'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.scalar.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" single "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\xfanico'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.single.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT * FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'preparar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.prepare.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })))"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(insertid, update, scalar, json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(single))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'consulta'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.query.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"419"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "})]})}),"\n",(0,l.jsx)(e.h2,{id:"resultados",children:"Resultados"}),"\n",(0,l.jsx)(e.pre,{"data-language":"yaml","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"yaml","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"initialise test_table"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 4 queries in 42.7789ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"values"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }[] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 8.0145ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"any"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"[]][] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 4.0278ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"string[] transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 3.4743ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"insert 10000 test users"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 10000 queries in 2064.211ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"select every 4th userid"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2803.7134ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"insert"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2.8743ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"update"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2.8675ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"scalar"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.5387ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"single"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.3389ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"prepare"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.6577ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bobby"'})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'10004 1 bobby {"identifier":"abcdef","username":"bobby","id":10004}'})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"query"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.1588ms"})]})]})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,n.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/benchmark.mdx",route:"/overextended/oxmysql/benchmark",timestamp:1730928152e3,title:"Benchmark",headings:o},pageNextRoute:"/overextended/oxmysql/benchmark"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9496)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2720],{9496:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/benchmark",function(){return r(9615)}])},9615:function(s,e,r){"use strict";r.r(e),r.d(e,{__toc:function(){return o}});var l=r(2676),i=r(2140),n=r(8745);let o=[{depth:2,value:"Script",id:"script"},{depth:2,value:"Resultados",id:"resultados"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,n.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Benchmark"}),"\n",(0,l.jsxs)(e.p,{children:["A medi\xe7\xe3o de desempenho \xe9 baseada no tempo gasto para receber uma resposta dos exports.\nAs velocidades reais das consultas ser\xe3o relatadas na interface de depura\xe7\xe3o e no console do servidor com ",(0,l.jsx)(e.code,{children:"mysql_debug"})," ativado."]}),"\n",(0,l.jsx)(e.p,{children:"As velocidades podem variar consideravelmente com base no hardware do sistema, configura\xe7\xf5es do banco de dados, vers\xe3o do banco de dados e a carga de trabalho atual."}),"\n",(0,l.jsx)(e.h2,{id:"script",children:"Script"}),"\n",(0,l.jsxs)(e.p,{children:["Este script testa os tempos de exporta\xe7\xe3o ao usar o runtime Lua 5.4 com a sintaxe ",(0,l.jsx)(e.code,{children:"lib/MySQL.lua"}),"."]}),"\n",(0,l.jsx)(e.pre,{"data-language":"lua","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"lua","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"msg"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"fn"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-parameter)"},children:"parameters"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" start "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" os."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nanotime"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" result "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fn"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(query, parameters)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" finish "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" os."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"nanotime"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(msg)"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Executou ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"type"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(query) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"or"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"query) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' consultas em ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (finish "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"-"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" start) "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1e6"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ms'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" result"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"CreateThread"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" initTable "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'DROP TABLE `test_table`'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"[[CREATE TABLE `test_table` ("})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `username` VARCHAR(50) NOT NULL DEFAULT '0',"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" `identifier` VARCHAR(50) NOT NULL DEFAULT '0',"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" PRIMARY KEY (`id`)"})}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" )]]"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'TRUNCATE `test_table`'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ALTER TABLE `test_table` AUTO_INCREMENT = 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Inicializando test_table'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, initTable)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef1' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { query "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", values "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob1' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}},"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'{ query: string, values: string }[] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef2' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bob2' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"} },"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'[string, any[]][] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" queries "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (\"abcdef3\")'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = \"bob3\" WHERE `id` = LAST_INSERT_ID()'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'string[] transa\xe7\xe3o'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, queries)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertUsers "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertUsers[i] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (username, identifier) VALUES (?, ?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Testuser_' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i } }"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inserir ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"#"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"insertUsers "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"' test users'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.transaction.await, insertUsers)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selectUserIds "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10000"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"%"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" selectUserIds["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"math.tointeger"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(i "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i }"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'selecionar todo 4\xba userid'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.prepare.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", selectUserIds)"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" insertid "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'inserir'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.insert.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'INSERT INTO `test_table` (identifier) VALUES (?)'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'abcdef' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"})"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" update "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'atualizar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.update.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'UPDATE `test_table` SET `username` = ? WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'bobby'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", insertid })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" scalar "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'escala'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.scalar.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" single "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'\xfanico'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.single.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT * FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'preparar'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.prepare.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ?'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { insertid })))"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"print"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(insertid, update, scalar, json."}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(single))"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"execQuery"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'consulta'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", MySQL.query.await, "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"419"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,l.jsx)(e.span,{className:"line",children:" "})]})}),"\n",(0,l.jsx)(e.h2,{id:"resultados",children:"Resultados"}),"\n",(0,l.jsx)(e.pre,{"data-language":"yaml","data-theme":"default",children:(0,l.jsxs)(e.code,{"data-language":"yaml","data-theme":"default",children:[(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"initialise test_table"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 4 queries in 42.7789ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] { "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"query"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"values"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }[] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 8.0145ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] ["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"string"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"any"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"[]][] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 4.0278ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"string[] transaction"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 2 queries in 3.4743ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"insert 10000 test users"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 10000 queries in 2064.211ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"select every 4th userid"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2803.7134ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"insert"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2.8743ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"update"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 2.8675ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"scalar"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.5387ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"single"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.3389ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"prepare"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.6577ms"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"bobby"'})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'10004 1 bobby {"identifier":"abcdef","username":"bobby","id":10004}'})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"query"})]}),"\n",(0,l.jsxs)(e.span,{className:"line",children:[(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"["}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"script:test"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"Executed 1 queries in 1.1588ms"})]})]})})]})}e.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,n.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/overextended/oxmysql/benchmark.mdx",route:"/overextended/oxmysql/benchmark",timestamp:1730940204e3,title:"Benchmark",headings:o},pageNextRoute:"/overextended/oxmysql/benchmark"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9496)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/placeholders-074c245d516bff05.js b/_next/static/chunks/pages/overextended/oxmysql/placeholders-77e2c7533764c8d9.js similarity index 98% rename from _next/static/chunks/pages/overextended/oxmysql/placeholders-074c245d516bff05.js rename to _next/static/chunks/pages/overextended/oxmysql/placeholders-77e2c7533764c8d9.js index 5fe1e0544c..9b515781ee 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/placeholders-074c245d516bff05.js +++ b/_next/static/chunks/pages/overextended/oxmysql/placeholders-77e2c7533764c8d9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84],{7453:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/placeholders",function(){return r(2741)}])},2741:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return a}});var n=r(2676),o=r(2140),l=r(8745);let a=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",a:"a",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Placeholders"}),"\n",(0,n.jsxs)(s.p,{children:["Placeholders permitem que par\xe2metros de consulta sejam executados de maneira segura, prevenindo ",(0,n.jsx)(s.a,{href:"https://bobby-tables.com/",children:"m\xe9todos comuns de inje\xe7\xe3o de SQL"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Os par\xe2metros podem ser passados como um array ou objeto (referido como par\xe2metros nomeados)."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:abc123'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'admin'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { identifier, group })"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Placeholders nomeados (descontinuado)"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,n.jsxs)(s.p,{children:["Esses placeholders s\xe3o distintos de declara\xe7\xf5es preparadas, que s\xe3o gerenciadas pelo servidor MySQL; voc\xea pode usar ",(0,n.jsx)(s.code,{children:"MySQL.prepare"})," para consultas mais otimizadas e seguras."]})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/placeholders.mdx",route:"/overextended/oxmysql/placeholders",timestamp:1730928152e3,title:"Placeholders",headings:a},pageNextRoute:"/overextended/oxmysql/placeholders"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7453)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84],{7453:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/placeholders",function(){return r(2741)}])},2741:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return a}});var n=r(2676),o=r(2140),l=r(8745);let a=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",a:"a",pre:"pre",code:"code",span:"span"},(0,l.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Placeholders"}),"\n",(0,n.jsxs)(s.p,{children:["Placeholders permitem que par\xe2metros de consulta sejam executados de maneira segura, prevenindo ",(0,n.jsx)(s.a,{href:"https://bobby-tables.com/",children:"m\xe9todos comuns de inje\xe7\xe3o de SQL"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Os par\xe2metros podem ser passados como um array ou objeto (referido como par\xe2metros nomeados)."}),"\n",(0,n.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,n.jsxs)(s.code,{"data-language":"lua","data-theme":"default",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'license:abc123'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"local"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'admin'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { identifier, group })"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Placeholders nomeados (descontinuado)"})}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"scalar"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" group"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" identifier"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"})"})})]})}),"\n",(0,n.jsxs)(s.p,{children:["Esses placeholders s\xe3o distintos de declara\xe7\xf5es preparadas, que s\xe3o gerenciadas pelo servidor MySQL; voc\xea pode usar ",(0,n.jsx)(s.code,{children:"MySQL.prepare"})," para consultas mais otimizadas e seguras."]})]})}s.default=(0,o.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/placeholders.mdx",route:"/overextended/oxmysql/placeholders",timestamp:1730940204e3,title:"Placeholders",headings:a},pageNextRoute:"/overextended/oxmysql/placeholders"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7453)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/overextended/oxmysql/ui-f69f636dc4791c1d.js b/_next/static/chunks/pages/overextended/oxmysql/ui-382b57a2eee94329.js similarity index 98% rename from _next/static/chunks/pages/overextended/oxmysql/ui-f69f636dc4791c1d.js rename to _next/static/chunks/pages/overextended/oxmysql/ui-382b57a2eee94329.js index 9568ce8eb9..52519d7984 100644 --- a/_next/static/chunks/pages/overextended/oxmysql/ui-f69f636dc4791c1d.js +++ b/_next/static/chunks/pages/overextended/oxmysql/ui-382b57a2eee94329.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7037],{4663:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/ui",function(){return s(5836)}])},5836:function(e,a,s){"use strict";s.r(a),s.d(a,{__toc:function(){return c}});var o=s(2676),n=s(2140),r=s(8745),t=s(7100);let c=[];function _createMdxContent(e){let a=Object.assign({h1:"h1",p:"p",code:"code",pre:"pre",span:"span",img:"img"},(0,r.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.h1,{children:"Usando a Interface de Depura\xe7\xe3o (Debug UI)"}),"\n","\n",(0,o.jsx)(a.p,{children:"A interface de depura\xe7\xe3o permite que voc\xea veja facilmente todas as consultas que foram executadas pelos recursos, o tempo de resposta das consultas e as estat\xedsticas por recurso.\nVoc\xea deve ativar essa interface apenas durante o desenvolvimento, ou com um n\xfamero pequeno de jogadores - para servidores maiores, consulte o registro nativo de MySQL."}),"\n",(0,o.jsxs)(a.p,{children:["Antes de usar a interface, voc\xea deve garantir que tenha o convar ",(0,o.jsx)(a.code,{children:"mysql_ui"})," configurado como ",(0,o.jsx)(a.code,{children:"true"}),":"]}),"\n",(0,o.jsx)(a.pre,{"data-language":"bash","data-theme":"default",children:(0,o.jsx)(a.code,{"data-language":"bash","data-theme":"default",children:(0,o.jsxs)(a.span,{className:"line",children:[(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_ui"}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,o.jsxs)(a.p,{children:["Tamb\xe9m certifique-se de que voc\xea tenha permiss\xe3o de acesso ",(0,o.jsx)(a.code,{children:"command"})," ou ",(0,o.jsx)(a.code,{children:"command.mysql"}),", ent\xe3o voc\xea dever\xe1 ser capaz de usar o comando ",(0,o.jsx)(a.code,{children:"mysql"})," no jogo."]}),"\n",(0,o.jsx)(t.UW,{type:"info",children:(0,o.jsx)(a.p,{children:"Voc\xea n\xe3o precisa ter o mysql_debug ativado para usar a interface de depura\xe7\xe3o."})}),"\n",(0,o.jsx)(a.p,{children:"P\xe1gina principal\nA p\xe1gina principal exibe os recursos que executaram consultas, onde voc\xea pode filtr\xe1-los atrav\xe9s de uma barra de pesquisa. Al\xe9m disso, mostra seus dados gerais junto a um gr\xe1fico de pizza, que indica quais recursos consumiram mais tempo de consulta."}),"\n",(0,o.jsx)(a.p,{children:(0,o.jsx)(a.img,{src:"https://i.imgur.com/iQqWELJ.png",alt:"oxmysql_ui_main"})}),"\n",(0,o.jsx)(a.p,{children:"P\xe1gina do recurso\nA p\xe1gina do recurso mostra todas as consultas e seu tempo de execu\xe7\xe3o em uma tabela, das quais o recurso executou, juntamente com a quantidade total de consultas, tempo de execu\xe7\xe3o e consultas lentas para o recurso selecionado."}),"\n",(0,o.jsx)(a.p,{children:"As colunas podem ser ordenadas por ordem crescente ou decrescente, e ao passar o mouse sobre uma consulta, voc\xea ver\xe1 a consulta completa em uma dica de ferramenta."}),"\n",(0,o.jsx)(t.UW,{type:"info",children:(0,o.jsxs)(a.p,{children:["Consultas que excedem o valor de ",(0,o.jsx)(a.code,{children:"mysql_slow_query_warning"})," (por padr\xe3o 150ms) s\xe3o exibidas em laranja.\nPara fins de demonstra\xe7\xe3o, o convar ",(0,o.jsx)(a.code,{children:"mysql_slow_query_warning"})," foi configurado para 5ms aqui."]})}),"\n",(0,o.jsx)(a.p,{children:(0,o.jsx)(a.img,{src:"https://i.imgur.com/gZpJoIg.png",alt:"oxmysql_ui_queries"})})]})}a.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:a}=Object.assign({},(0,r.a)(),e.components);return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/ui.mdx",route:"/overextended/oxmysql/ui",timestamp:1730928152e3,title:"Usando a Interface de Depura\xe7\xe3o (Debug UI)",headings:c},pageNextRoute:"/overextended/oxmysql/ui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4663)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7037],{4663:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overextended/oxmysql/ui",function(){return s(5836)}])},5836:function(e,a,s){"use strict";s.r(a),s.d(a,{__toc:function(){return c}});var o=s(2676),n=s(2140),r=s(8745),t=s(7100);let c=[];function _createMdxContent(e){let a=Object.assign({h1:"h1",p:"p",code:"code",pre:"pre",span:"span",img:"img"},(0,r.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.h1,{children:"Usando a Interface de Depura\xe7\xe3o (Debug UI)"}),"\n","\n",(0,o.jsx)(a.p,{children:"A interface de depura\xe7\xe3o permite que voc\xea veja facilmente todas as consultas que foram executadas pelos recursos, o tempo de resposta das consultas e as estat\xedsticas por recurso.\nVoc\xea deve ativar essa interface apenas durante o desenvolvimento, ou com um n\xfamero pequeno de jogadores - para servidores maiores, consulte o registro nativo de MySQL."}),"\n",(0,o.jsxs)(a.p,{children:["Antes de usar a interface, voc\xea deve garantir que tenha o convar ",(0,o.jsx)(a.code,{children:"mysql_ui"})," configurado como ",(0,o.jsx)(a.code,{children:"true"}),":"]}),"\n",(0,o.jsx)(a.pre,{"data-language":"bash","data-theme":"default",children:(0,o.jsx)(a.code,{"data-language":"bash","data-theme":"default",children:(0,o.jsxs)(a.span,{className:"line",children:[(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_ui"}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(a.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,o.jsxs)(a.p,{children:["Tamb\xe9m certifique-se de que voc\xea tenha permiss\xe3o de acesso ",(0,o.jsx)(a.code,{children:"command"})," ou ",(0,o.jsx)(a.code,{children:"command.mysql"}),", ent\xe3o voc\xea dever\xe1 ser capaz de usar o comando ",(0,o.jsx)(a.code,{children:"mysql"})," no jogo."]}),"\n",(0,o.jsx)(t.UW,{type:"info",children:(0,o.jsx)(a.p,{children:"Voc\xea n\xe3o precisa ter o mysql_debug ativado para usar a interface de depura\xe7\xe3o."})}),"\n",(0,o.jsx)(a.p,{children:"P\xe1gina principal\nA p\xe1gina principal exibe os recursos que executaram consultas, onde voc\xea pode filtr\xe1-los atrav\xe9s de uma barra de pesquisa. Al\xe9m disso, mostra seus dados gerais junto a um gr\xe1fico de pizza, que indica quais recursos consumiram mais tempo de consulta."}),"\n",(0,o.jsx)(a.p,{children:(0,o.jsx)(a.img,{src:"https://i.imgur.com/iQqWELJ.png",alt:"oxmysql_ui_main"})}),"\n",(0,o.jsx)(a.p,{children:"P\xe1gina do recurso\nA p\xe1gina do recurso mostra todas as consultas e seu tempo de execu\xe7\xe3o em uma tabela, das quais o recurso executou, juntamente com a quantidade total de consultas, tempo de execu\xe7\xe3o e consultas lentas para o recurso selecionado."}),"\n",(0,o.jsx)(a.p,{children:"As colunas podem ser ordenadas por ordem crescente ou decrescente, e ao passar o mouse sobre uma consulta, voc\xea ver\xe1 a consulta completa em uma dica de ferramenta."}),"\n",(0,o.jsx)(t.UW,{type:"info",children:(0,o.jsxs)(a.p,{children:["Consultas que excedem o valor de ",(0,o.jsx)(a.code,{children:"mysql_slow_query_warning"})," (por padr\xe3o 150ms) s\xe3o exibidas em laranja.\nPara fins de demonstra\xe7\xe3o, o convar ",(0,o.jsx)(a.code,{children:"mysql_slow_query_warning"})," foi configurado para 5ms aqui."]})}),"\n",(0,o.jsx)(a.p,{children:(0,o.jsx)(a.img,{src:"https://i.imgur.com/gZpJoIg.png",alt:"oxmysql_ui_queries"})})]})}a.default=(0,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:a}=Object.assign({},(0,r.a)(),e.components);return a?(0,o.jsx)(a,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/overextended/oxmysql/ui.mdx",route:"/overextended/oxmysql/ui",timestamp:1730940204e3,title:"Usando a Interface de Depura\xe7\xe3o (Debug UI)",headings:c},pageNextRoute:"/overextended/oxmysql/ui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4663)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/qbox-fa4a2f7d59f140c2.js b/_next/static/chunks/pages/qbox-92f68baa7af75b8e.js similarity index 98% rename from _next/static/chunks/pages/qbox-fa4a2f7d59f140c2.js rename to _next/static/chunks/pages/qbox-92f68baa7af75b8e.js index ba7b804891..f4b34aeed1 100644 --- a/_next/static/chunks/pages/qbox-fa4a2f7d59f140c2.js +++ b/_next/static/chunks/pages/qbox-92f68baa7af75b8e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8006],{5507:function(e,o,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/qbox",function(){return r(2479)}])},2479:function(e,o,r){"use strict";r.r(o),r.d(o,{__toc:function(){return t}});var n=r(2676),a=r(2140),s=r(8745);let t=[{depth:2,value:"Suporte & Perguntas",id:"suporte--perguntas"},{depth:2,value:"Convertendo do QBCore",id:"convertendo-do-qbcore"},{depth:2,value:"Nota para Desenvolvedores",id:"nota-para-desenvolvedores"},{depth:2,value:"Contribuindo com o Qbox",id:"contribuindo-com-o-qbox"},{depth:2,value:"Perguntas Frequentes",id:"perguntas-frequentes"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2"},(0,s.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,n.jsx)(o.p,{children:"Qbox \xe9 uma framework de roleplay para FiveM criada em 27 de setembro de 2022."}),"\n",(0,n.jsxs)(o.p,{children:["Come\xe7ando como um fork do QBCore, seu objetivo era melhorar o QBCore mantendo a compatibilidade retroativa. ",(0,n.jsx)(o.br,{}),"\n","Hoje, esta framework busca ser ainda maior, utilizando os ",(0,n.jsx)(o.a,{href:"https://github.com/overextended",children:"recursos da overextended"})," para alcan\xe7ar seus objetivos."]}),"\n",(0,n.jsx)(o.h2,{id:"suporte--perguntas",children:"Suporte & Perguntas"}),"\n",(0,n.jsxs)(o.p,{children:["O suporte para o Qbox \xe9 fornecido pela comunidade nos canais de suporte do ",(0,n.jsx)(o.a,{href:"https://discord.gg/qbox",children:"Discord do Qbox"}),"."]}),"\n",(0,n.jsx)(o.p,{children:"Felizmente, o Qbox conta com uma \xf3tima comunidade com experi\xeancias variadas.\nIncentivamos todos a se ajudarem de forma amig\xe1vel e respeitosa."}),"\n",(0,n.jsx)(o.h2,{id:"convertendo-do-qbcore",children:"Convertendo do QBCore"}),"\n",(0,n.jsxs)(o.p,{children:["J\xe1 tem um servidor que usa o QBCore? Sem problemas!\nO Qbox \xe9 compat\xedvel com quase todos os scripts do QBCore, com algumas exce\xe7\xf5es (saiba mais na ",(0,n.jsx)(o.a,{href:"./faq#will-my-qbcore-scripts-work-with-qbox",children:"FAQ"}),")."]}),"\n",(0,n.jsxs)(o.p,{children:["Pretende migrar para o Qbox para poder utilizar suas novas e modernas fun\xe7\xf5es e recursos?\nAprenda como converter seus recursos para o Qbox em ",(0,n.jsx)(o.a,{href:"./converting",children:"Convertendo do QBCore"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"nota-para-desenvolvedores",children:"Nota para Desenvolvedores"}),"\n",(0,n.jsxs)(o.p,{children:["Pretende utilizar o qbx_core no seu pr\xf3ximo recurso?\nCertifique-se de ler o ",(0,n.jsx)(o.a,{href:"./developers",children:"Guia do Desenvolvedor"})," para aprender sobre os princ\xedpios que ajudam a evitar m\xe1s pr\xe1ticas e a melhorar sua experi\xeancia de desenvolvimento."]}),"\n",(0,n.jsx)(o.h2,{id:"contribuindo-com-o-qbox",children:"Contribuindo com o Qbox"}),"\n",(0,n.jsxs)(o.p,{children:["Contribui\xe7\xf5es s\xe3o sempre bem-vindas, mas preferimos qualidade \xe0 quantidade!\nPor favor, leia nossas ",(0,n.jsx)(o.a,{href:"https://qbox-project.github.io/contributors",children:"diretrizes de contribui\xe7\xe3o"})," para aprender a melhor forma de contribuir."]}),"\n",(0,n.jsx)(o.h2,{id:"perguntas-frequentes",children:"Perguntas Frequentes"}),"\n",(0,n.jsxs)(o.p,{children:["Confira a ",(0,n.jsx)(o.a,{href:"./faq",children:"FAQ"})," para aprender mais sobre o Qbox."]})]})}o.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,s.a)(),e.components);return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/qbox.mdx",route:"/qbox",timestamp:1730928152e3,title:"Introdu\xe7\xe3o",headings:t},pageNextRoute:"/qbox"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5507)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8006],{5507:function(e,o,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/qbox",function(){return r(2479)}])},2479:function(e,o,r){"use strict";r.r(o),r.d(o,{__toc:function(){return t}});var n=r(2676),a=r(2140),s=r(8745);let t=[{depth:2,value:"Suporte & Perguntas",id:"suporte--perguntas"},{depth:2,value:"Convertendo do QBCore",id:"convertendo-do-qbcore"},{depth:2,value:"Nota para Desenvolvedores",id:"nota-para-desenvolvedores"},{depth:2,value:"Contribuindo com o Qbox",id:"contribuindo-com-o-qbox"},{depth:2,value:"Perguntas Frequentes",id:"perguntas-frequentes"}];function _createMdxContent(e){let o=Object.assign({h1:"h1",p:"p",br:"br",a:"a",h2:"h2"},(0,s.a)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.h1,{children:"Introdu\xe7\xe3o"}),"\n",(0,n.jsx)(o.p,{children:"Qbox \xe9 uma framework de roleplay para FiveM criada em 27 de setembro de 2022."}),"\n",(0,n.jsxs)(o.p,{children:["Come\xe7ando como um fork do QBCore, seu objetivo era melhorar o QBCore mantendo a compatibilidade retroativa. ",(0,n.jsx)(o.br,{}),"\n","Hoje, esta framework busca ser ainda maior, utilizando os ",(0,n.jsx)(o.a,{href:"https://github.com/overextended",children:"recursos da overextended"})," para alcan\xe7ar seus objetivos."]}),"\n",(0,n.jsx)(o.h2,{id:"suporte--perguntas",children:"Suporte & Perguntas"}),"\n",(0,n.jsxs)(o.p,{children:["O suporte para o Qbox \xe9 fornecido pela comunidade nos canais de suporte do ",(0,n.jsx)(o.a,{href:"https://discord.gg/qbox",children:"Discord do Qbox"}),"."]}),"\n",(0,n.jsx)(o.p,{children:"Felizmente, o Qbox conta com uma \xf3tima comunidade com experi\xeancias variadas.\nIncentivamos todos a se ajudarem de forma amig\xe1vel e respeitosa."}),"\n",(0,n.jsx)(o.h2,{id:"convertendo-do-qbcore",children:"Convertendo do QBCore"}),"\n",(0,n.jsxs)(o.p,{children:["J\xe1 tem um servidor que usa o QBCore? Sem problemas!\nO Qbox \xe9 compat\xedvel com quase todos os scripts do QBCore, com algumas exce\xe7\xf5es (saiba mais na ",(0,n.jsx)(o.a,{href:"./faq#will-my-qbcore-scripts-work-with-qbox",children:"FAQ"}),")."]}),"\n",(0,n.jsxs)(o.p,{children:["Pretende migrar para o Qbox para poder utilizar suas novas e modernas fun\xe7\xf5es e recursos?\nAprenda como converter seus recursos para o Qbox em ",(0,n.jsx)(o.a,{href:"./converting",children:"Convertendo do QBCore"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"nota-para-desenvolvedores",children:"Nota para Desenvolvedores"}),"\n",(0,n.jsxs)(o.p,{children:["Pretende utilizar o qbx_core no seu pr\xf3ximo recurso?\nCertifique-se de ler o ",(0,n.jsx)(o.a,{href:"./developers",children:"Guia do Desenvolvedor"})," para aprender sobre os princ\xedpios que ajudam a evitar m\xe1s pr\xe1ticas e a melhorar sua experi\xeancia de desenvolvimento."]}),"\n",(0,n.jsx)(o.h2,{id:"contribuindo-com-o-qbox",children:"Contribuindo com o Qbox"}),"\n",(0,n.jsxs)(o.p,{children:["Contribui\xe7\xf5es s\xe3o sempre bem-vindas, mas preferimos qualidade \xe0 quantidade!\nPor favor, leia nossas ",(0,n.jsx)(o.a,{href:"https://qbox-project.github.io/contributors",children:"diretrizes de contribui\xe7\xe3o"})," para aprender a melhor forma de contribuir."]}),"\n",(0,n.jsx)(o.h2,{id:"perguntas-frequentes",children:"Perguntas Frequentes"}),"\n",(0,n.jsxs)(o.p,{children:["Confira a ",(0,n.jsx)(o.a,{href:"./faq",children:"FAQ"})," para aprender mais sobre o Qbox."]})]})}o.default=(0,a.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,s.a)(),e.components);return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/qbox.mdx",route:"/qbox",timestamp:1730940204e3,title:"Introdu\xe7\xe3o",headings:t},pageNextRoute:"/qbox"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5507)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/resources-23cc71bc922e15c1.js b/_next/static/chunks/pages/resources-50d75a0124f260dd.js similarity index 92% rename from _next/static/chunks/pages/resources-23cc71bc922e15c1.js rename to _next/static/chunks/pages/resources-50d75a0124f260dd.js index b0a572315a..9dc5275079 100644 --- a/_next/static/chunks/pages/resources-23cc71bc922e15c1.js +++ b/_next/static/chunks/pages/resources-50d75a0124f260dd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3584],{4062:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/resources",function(){return n(6248)}])},6248:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return c}});var s=n(2676),r=n(2140),o=n(8745);let c=[];function _createMdxContent(e){let t=Object.assign({h1:"h1"},(0,o.a)(),e.components);return(0,s.jsx)(t.h1,{children:"Resources"})}t.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/resources.mdx",route:"/resources",timestamp:1730928152e3,title:"Resources",headings:c},pageNextRoute:"/resources"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4062)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3584],{4062:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/resources",function(){return n(6248)}])},6248:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return c}});var s=n(2676),r=n(2140),o=n(8745);let c=[];function _createMdxContent(e){let t=Object.assign({h1:"h1"},(0,o.a)(),e.components);return(0,s.jsx)(t.h1,{children:"Resources"})}t.default=(0,r.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/resources.mdx",route:"/resources",timestamp:1730940204e3,title:"Resources",headings:c},pageNextRoute:"/resources"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4062)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/guides.html b/guides.html index cf0a49d16f..52d15cfb3c 100644 --- a/guides.html +++ b/guides.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Guias

Guias

+

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/guides/git.html b/guides/git.html index cc8bb8aa52..a4ba338309 100644 --- a/guides/git.html +++ b/guides/git.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Git

+

Git

Git é um sistema de controle de versão, permitindo que mudanças sejam rastreadas, mescladas e revertidas de maneira eficaz.

Como nossos recursos estão hospedados no GitHub, pode ser muito útil aprender a criar seu próprio repositório para acompanhar as alterações e se manter atualizado. Se você planeja fazer suas próprias mudanças em nossos recursos, isso permitirá que você mantenha suas alterações sem risco de perda de dados.


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/guides/nodejs.html b/guides/nodejs.html index 37136ddf18..85502c76a3 100644 --- a/guides/nodejs.html +++ b/guides/nodejs.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Node.js

Node.js

+
Node.js

Node.js

Node.js é um runtime de JavaScript utilizado para criar aplicações. No contexto do FiveM, ele é necessário para agrupar recursos em um único pacote que pode ser executado tanto no servidor quanto no cliente.

  • Baixe (opens in a new tab) e instale a versão LTS do Node.js.
  • Abra um terminal de linha de comando (ex.: Terminal, Prompt de Comando).
  • Digite node --version para confirmar a instalação com sucesso.
  • -

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/guides/pnpm.html b/guides/pnpm.html index 339163a8f9..a67f0a8ee9 100644 --- a/guides/pnpm.html +++ b/guides/pnpm.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
pnpm

pnpm

+
pnpm

pnpm

pnpm é um gerenciador de pacotes rápido e eficiente em termos de espaço em disco, sendo uma alternativa ao npm e ao yarn.

  • Certifique-se de ter instalado o Node.js.
  • @@ -27,4 +27,4 @@ "preview": "vite preview", "format": "prettier --write \"./src/**/*.{ts,tsx,css}\"" },
-

Usando o exemplo acima, pnpm build irá rodar o script de build para o pacote fornecido.


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Usando o exemplo acima, pnpm build irá rodar o script de build para o pacote fornecido.


Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/guides/types.html b/guides/types.html index 88b87350a1..7d89a8f225 100644 --- a/guides/types.html +++ b/guides/types.html @@ -11,8 +11,8 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Types

Configurar git, vscode e extensões do vscode

Baixar nossas definições de tipo Lua

git clone https://github.com/overextended/ox_types.git

Atualizar suas configurações

Você pode modificar as configurações de usuário, espaço de trabalho ou pasta no vscode. +

Types

Configurar git, vscode e extensões do vscode

Baixar nossas definições de tipo Lua

git clone https://github.com/overextended/ox_types.git

Atualizar suas configurações

Você pode modificar as configurações de usuário, espaço de trabalho ou pasta no vscode. Crie uma entrada em Lua.workspace.library apontando para o diretório clonado ou subdiretórios específicos.

"Lua.workspace.library": [
     "F:/GitHub/ox_types/types",
     "F:/GitHub/ox_lib"
-],

Copyright © 2024 - mri-Qbox
\ No newline at end of file +],

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/guides/vscode.html b/guides/vscode.html index 660434a5d4..7d288731e4 100644 --- a/guides/vscode.html +++ b/guides/vscode.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
VS Code

VS Code

+

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/index.html b/index.html index 499e19783a..0946fc225c 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Introdução

Introdução

+
Introdução

Introdução

Aqui você pode encontrar a documentação oficial para os recursos desenvolvidos ou traduzidos pela mri-Qbox.

Esta documentação foi baseada nas documentações oficiais de Overextended (opens in a new tab) e Qbox (opens in a new tab) e terá os recursos deles traduzidos para o português.

Se você acha que algo na documentação não está correto, você pode ir até aquela página, clicar em "Editar esta página" e nos enviar um Pull Request.

@@ -27,4 +27,4 @@

Os serviços incluem um plano gratuito com espaço de armazenamento de mídia limitado, além de vários planos pagos projetados para acomodar servidores maiores que precisam de mais espaço de armazenamento e recursos de registro.

Iniciar com Fivemanage (opens in a new tab) E use o código OX10 para obter 10% de desconto na sua assinatura – para sempre!

Fivemerr

-

Fivemerr (opens in a new tab) é um serviço de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM.


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Fivemerr (opens in a new tab) é um serviço de hospedagem gratuito para servidores FiveM, oferecendo uma variedade de recursos para facilitar o gerenciamento e a administração do seu servidor FiveM.


Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended.html b/overextended.html index ee9f2416cf..1bbb53fce8 100644 --- a/overextended.html +++ b/overextended.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Overextended

Introdução

+
Overextended

Introdução

Aqui você pode encontrar toda a documentação oficial dos recursos desenvolvidos pela equipe Overextended.

Apoie a equipe Overextended

Eles gostam de poder criar e compartilhar trabalhos livres e de código aberto, mas eles frequentemente exigem tempo e esforço consideráveis para manutenção e suporte.

@@ -25,4 +25,4 @@

O criador é um membro conhecido da comunidade Overextended.

Mais informações sobre esses criadores estão disponíveis no Discord Overextended (opens in a new tab).

-

Para acessar os códigos clique aqui (opens in a new tab)


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Para acessar os códigos clique aqui (opens in a new tab)


Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core.html b/overextended/ox_core.html index 99e9f7bac9..178032446b 100644 --- a/overextended/ox_core.html +++ b/overextended/ox_core.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Ox Core

+

Ox Core

Um framework moderno para FiveM, projetado para oferecer suporte adequado a recursos como OneSync, statebags e entidades no lado do servidor.

Receita txAdmin

@@ -83,4 +83,4 @@

Define o local de spawn padrão para personagens recém-criados. -


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Classes/Client/OxPlayer.html b/overextended/ox_core/Classes/Client/OxPlayer.html index 1d07197dbd..94e8539a5a 100644 --- a/overextended/ox_core/Classes/Client/OxPlayer.html +++ b/overextended/ox_core/Classes/Client/OxPlayer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Classes
Client
OxPlayer

OxPlayer

+
Classes
Client
OxPlayer

OxPlayer

  • state: StateBagInterface
  • userId: number
  • @@ -19,119 +19,119 @@
  • stateId?: string

OxPlayer.addStatus

-

Increases value of a status.

+

Aumenta o valor de um status.

player.addStatus(statusName, value)
-

Parameters

+

Parâmetros

  • statusName: string
  • value: number
-

Returns

+

Retornos

  • success: boolean

OxPlayer.get

-

Returns a value from the players metadata.

+

Retorna o valor de uma chave dos metadados do player.

player.get(key)
-

Parameters

+

Parâmetros

  • key: string
-

Returns

+

Retornos

  • unknown

OxPlayer.getCoords

-

Returns the player's current coordinates.

+

Retorna as coordenadas do player.

player.getCoords()
-

Parameters

+

Parâmetros

  • vector3

OxPlayer.getGroup

-

Returns the player's grade of a given group name, or the first matched name and grade in a filter.

+

Retorna o grau do player em um dado grupo, ou o primeiro nome e grau em um filtro.

player.getGroup(filter)
-

Parameters

+

Parâmetros

  • filter: string|string[]|{ [string]: number }
-

Returns

+

Retornos

  • unknown

OxPlayer.getGroupByType

-

Returns the player's name and grade of a group with a matching type.

+

Retorna o nome do player e o grau de um grupo com um tipo correspondente.

player.getGroupByType(type)
-

Parameters

+

Parâmetros

  • type: string
-

Returns

+

Retornos

  • string
  • number

OxPlayer.getGroups

-

Returns an object of all groups the player is currently in, using the group name as a key.

+

Retorna um objeto com todos os grupos do player, usando o nome do grupo como chave.

player.getGroups()
-

Returns

+

Retornos

  • { [string]: number }

OxPlayer.getStatus

-

Returns the value of the status.

+

Retorna o valor de um status.

player.getStatus(statusName)
-

Parameters

+

Parâmetros

  • statusName: string
-

Returns

+

Retornos

  • number

OxPlayer.getStatuses

-

Returns an object containing all statuses, using the status name as the key.

+

Retorna todos os status do player, usando o nome do status como chave.

player.getStatuses()
-

Returns

+

Retornos

  • { [string]: number }

OxPlayer.hasPermission

-

Checks if a user has been granted a permission by one of their groups.

+

Verifica se um jogador tem uma permissão através de de seus um grupos.

player.hasPermission(permission)
-

Parameters

+

Parâmetros

  • permission: string
-

Returns

+

Retornos

  • boolean

OxPlayer.removeStatus

-

Reduces the value of a status.

+

Reduz o valor de um status.

player.removeStatus(statusName, value)
-

Parameters

+

Parâmetros

  • statusName: string
  • value: number
-

Returns

+

Retornos

  • boolean

OxPlayer.on

-

Listens for changes to the players metadata, specified by a key.

+

Escuta por alterações nos metadados do player, especificando uma chave.

player.on(key, cb(data))
-

Parameters

+

Parâmetros

  • key: string
  • cb: function
-

Returns

+

Retornos

  • data: unknown
    • new value of key
  • -

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Classes/Server/OxAccount.html b/overextended/ox_core/Classes/Server/OxAccount.html index ddba862284..5ed6a55678 100644 --- a/overextended/ox_core/Classes/Server/OxAccount.html +++ b/overextended/ox_core/Classes/Server/OxAccount.html @@ -11,9 +11,9 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxAccount

OxAccount

+
Classes
Server
OxAccount

OxAccount

    -
  • accountId number
  • +
  • accountId number

OxAccountMetadata

    @@ -26,24 +26,24 @@

    type: personal | shared | group

OxAccount.get

-

Get the value of specific key(s) from the account's metadata.

+

Pega o valor de uma chave específica dos metadados da conta.

account.get(key)
-

Parameters

+

Parâmetros

  • key: string | string[]
-

Returns

+

Retornos

  • OxAccountMetadata[key] | OxAccountMetadata[key][]
      -
    • Returns an array if passing multiple keys.
    • +
    • Retorna um array se forem passadas múltiplas chaves.

OxAccount.addBalance

-

Add funds to the account.

+

Adiciona fundos a conta.

account.addBalance({ amount, message })
-

Parameters

+

Parâmetros

  • object
      @@ -52,7 +52,7 @@

      Returns

      +

      Retornos

      • object
          @@ -62,9 +62,9 @@

          OxAccount.removeBalance

          -

          Remove funds from the account.

          +

          Remove fundos da conta.

          account.removeBalance({ amount, message, overdraw })
          -

          Parameters

          +

          Parâmetros

          • object
              @@ -74,7 +74,7 @@

              Returns

              +

              Retornos

              • object
                  @@ -84,15 +84,15 @@

                  OxAccount.transferBalance

                  -

                  Transfer funds to another account.

                  +

                  Transfere fundos para outra conta.

                  account.transferBalance({ toId, amount, overdraw, message, note, actorId })
                  -

                  Parameters

                  +

                  Parâmetros

                  • object
                    • toId: number
                        -
                      • The accountId to transfer funds to.
                      • +
                      • O accountId que receberá os fundos.
                    • amount: number
                    • @@ -101,13 +101,13 @@

                      note?: string
                    • actorId? number
                        -
                      • The charId of the player initiating the transfer.
                      • +
                      • O charId do player que fez a transferência.
                  -

                  Returns

                  +

                  Retornos

                  • object
                      @@ -117,16 +117,16 @@

                      OxAccount.depositMoney

                      -

                      Deposit money into the account.

                      +

                      Deposita dinheiro na conta.

                      account.transferBalance(playerId, amount, message, note)
                      -

                      Parameters

                      +

                      Parâmetros

                      • playerId: number
                      • amount: number
                      • message?: string
                      • note?: string
                      -

                      Returns

                      +

                      Retornos

                      • object
                          @@ -136,16 +136,16 @@

                          OxAccount.withdrawMoney

                          -

                          Withdraw money from the account.

                          +

                          Retira dinheiro da conta(saque).

                          account.transferBalance(playerId, amount, message, note)
                          -

                          Parameters

                          +

                          Parâmetros

                          • playerId: number
                          • amount: number
                          • message?: string
                          • note?: string
                          -

                          Returns

                          +

                          Retornos

                          • object
                              @@ -155,9 +155,9 @@

                              OxAccount.deleteAccount

                              -

                              Mark the account as deleted. It can no longer be accessed, but remains in the database.

                              +

                              Marca a conta como excluída. Ela não pode mais ser acessada, mas permanece no banco de dados.

                              account.deleteAccount()
                              -

                              Returns

                              +

                              Retornos

                              • object
                                  @@ -167,25 +167,25 @@

                                  OxAccount.getCharacterRole

                                  -

                                  Get the account access role of a character by charId or stateId.

                                  +

                                  Pega o cargo de acesso de um personagem pelo seu charId ou stateId.

                                  account.getCharacterRole(id)
                                  -

                                  Parameters

                                  +

                                  Parâmetros

                                  • id: number | string
                                  -

                                  Returns

                                  +

                                  Retornos

                                  • string

                                  OxAccount.setCharacterRole

                                  -

                                  Set the account access role of a character by charId or stateId.

                                  +

                                  Seta o cargo de acesso de um personagem pelo seu charId ou stateId.

                                  account.setCharacterRole(id, role)
                                  -

                                  Parameters

                                  +

                                  Parâmetros

                                  • id: number | string
                                  • role?: string
                                  -

                                  Returns

                                  +

                                  Retornos

                                  • object
                                      @@ -195,21 +195,21 @@

                                      OxAccount.playerHasPermission

                                      -

                                      Checks if a player's active character has permission to perform an action on the account.

                                      +

                                      Verifica se o personagem ativo do jogadortem permissão para realizar uma ação na conta.

                                      account.playerHasPermission(playerId, permission)
                                      -

                                      Parameters

                                      +

                                      Parâmetros

                                      • playerId: number
                                      • permission: string
                                      -

                                      Returns

                                      +

                                      Retornos

                                      • boolean

                                      OxAccount.setShared

                                      -

                                      Set the account as shared, allowing permissions to be assigned to other characters.

                                      +

                                      Marca a conta como compartilhada, permitindo que permissões sejam atribuidas a outros personagens.

                                      account.setShared()
                                      -

                                      Returns

                                      +

                                      Retornos

                                      • object
                                          @@ -219,20 +219,20 @@

                                          OxAccount.createInvoice

                                          -

                                          Create an unpaid invoice on the account.

                                          +

                                          Cria uma nova cobrança na conta.

                                          account.createInvoice(invoice)
                                          -

                                          Parameters

                                          +

                                          Parâmetros

                                          • invoice: object
                                            • actorId?: number;
                                                -
                                              • The charId of the player creating the invoice.
                                              • +
                                              • O charId do player que fez a cobrança.
                                            • toAccount: number;
                                                -
                                              • The accountId of the account receiving the invoice.
                                              • +
                                              • O accountId da conta que receberá a cobrança.
                                            • amount: number;
                                            • @@ -241,7 +241,7 @@

                                              Returns

                                              +

                                              Retornos

                                              • object
                                                  @@ -249,4 +249,4 @@

                                                  message: 'no_charId' | 'no_permission' | 'no_target_account'

                                              • -


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Classes/Server/OxPlayer.html b/overextended/ox_core/Classes/Server/OxPlayer.html index 44d7426d94..2f69843098 100644 --- a/overextended/ox_core/Classes/Server/OxPlayer.html +++ b/overextended/ox_core/Classes/Server/OxPlayer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxPlayer

OxPlayer

+

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Classes/Server/OxVehicle.html b/overextended/ox_core/Classes/Server/OxVehicle.html index ab33dda4f2..ae1fc082d3 100644 --- a/overextended/ox_core/Classes/Server/OxVehicle.html +++ b/overextended/ox_core/Classes/Server/OxVehicle.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxVehicle

OxVehicle

+

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Events/client.html b/overextended/ox_core/Events/client.html index 76e59be64d..2b1f96f195 100644 --- a/overextended/ox_core/Events/client.html +++ b/overextended/ox_core/Events/client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Client Events

+
Eventos
Client

Client Events

⚠️

These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.

ox:playerLoaded

When a character is loaded

@@ -35,4 +35,4 @@

function(userId: number, characters: Character[])

ox:setActiveCharacter

When the player has chosen their character.

-
function(character: Character, groups: Record<string, number>)

Copyright © 2024 - mri-Qbox
\ No newline at end of file +
function(character: Character, groups: Record<string, number>)

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Events/server.html b/overextended/ox_core/Events/server.html index 374fc9b6a6..7dd7fb562e 100644 --- a/overextended/ox_core/Events/server.html +++ b/overextended/ox_core/Events/server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Server Events

+
Eventos
Server

Server Events

⚠️

These events are triggered by ox_core when an action occurs. You should not trigger them from other scripts.

ox:savedPlayers

When players are saved to the database.

@@ -45,4 +45,4 @@

function(vehiclesSaved: number)

ox:spawnedVehicle

When a OxVehicle has spawned.

-
function(entityId: number, id: number)

Copyright © 2024 - mri-Qbox
\ No newline at end of file +
function(entityId: number, id: number)

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Functions/common.html b/overextended/ox_core/Functions/common.html index e92a57e26f..30d4fd2db5 100644 --- a/overextended/ox_core/Functions/common.html +++ b/overextended/ox_core/Functions/common.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Functions
Common

Ox.GetTopVehicleStats

+
Funções
Common

Ox.GetTopVehicleStats

Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea).

Ox.GetTopVehicleStats(category)

Parameters

@@ -70,4 +70,4 @@

Returns

  • string
  • -


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_core/Functions/server.html b/overextended/ox_core/Functions/server.html index 577901d0f7..05cb50f8a3 100644 --- a/overextended/ox_core/Functions/server.html +++ b/overextended/ox_core/Functions/server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Functions
Server

Ox.CreateAccount

+
Funções
Server

Ox.CreateAccount

Creates a new account for a character with the given charId or stateId.

Ox.CreateAccount(ownerId, label)

Parameters

@@ -290,4 +290,4 @@

Returns

  • OxVehicle
  • -


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_doorlock.html b/overextended/ox_doorlock.html index 8fc75465bb..9713af93a5 100644 --- a/overextended/ox_doorlock.html +++ b/overextended/ox_doorlock.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
Ox Doorlock

Ox Doorlock

+
Ox Doorlock

Ox Doorlock

Um recurso de gerenciamento de portas que pode ser usado de forma independente ou junto com ox_core, qbx_core e es_extended.

Instalação

@@ -46,4 +46,4 @@

A conversão não pode ser garantida, especialmente se o arquivo de configuração não foi escrito para nui_doorlock.

Adicionando novos áudios nativos

-

Um guia pode ser encontrado aqui (opens in a new tab) para adicionar novos áudios nativos.


Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Um guia pode ser encontrado aqui (opens in a new tab) para adicionar novos áudios nativos.


Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_doorlock/Client/functions.html b/overextended/ox_doorlock/Client/functions.html index a0cfaac291..724b86ceef 100644 --- a/overextended/ox_doorlock/Client/functions.html +++ b/overextended/ox_doorlock/Client/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Funções

+

Copyright © 2024 - mri-Qbox
\ No newline at end of file +

Copyright © 2024 - mri-Qbox
\ No newline at end of file diff --git a/overextended/ox_doorlock/Server/events.html b/overextended/ox_doorlock/Server/events.html index 4e8682c616..2ddf66e8c2 100644 --- a/overextended/ox_doorlock/Server/events.html +++ b/overextended/ox_doorlock/Server/events.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

Eventos

+

Eventos

Handlers

Esses eventos não devem ser acionados por nenhum outro script.

ox_doorlock:stateChanged

@@ -22,4 +22,4 @@

doorId: number
  • state: boolean
  • usedItem: string or false or nil
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_doorlock/Server/functions.html b/overextended/ox_doorlock/Server/functions.html index f8642fd41d..78588c7449 100644 --- a/overextended/ox_doorlock/Server/functions.html +++ b/overextended/ox_doorlock/Server/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Funções

    +

    Funções

    Obtém os dados de uma porta com o ID fornecido, correspondendo ao ID da entrada no banco de dados.

    getDoor

    exports.ox_doorlock:getDoor(doorId)
    @@ -46,4 +46,4 @@

  • doorId: number
  • state: 0 or 1 or boolean
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_doorlock/settings.html b/overextended/ox_doorlock/settings.html index fdc2d5e39c..a223ec5b25 100644 --- a/overextended/ox_doorlock/settings.html +++ b/overextended/ox_doorlock/settings.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Configurações da Porta

    Configurações da Porta

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Nota: Os sons são armazenados no diretório ./web/public/sounds.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_fuel.html b/overextended/ox_fuel.html index a0b2b4a92e..277bb74941 100644 --- a/overextended/ox_fuel.html +++ b/overextended/ox_fuel.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Ox Fuel

    +

    Ox Fuel

    A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item.

    Installation

    @@ -20,4 +20,4 @@

    ox_inventory

    Download a release (opens in a new tab) or clone the source code.

    git clone https://github.com/overextended/ox_fuel.git

    Install optional dependencies.

    These resources aren't required but provide additional functionality.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_fuel/Client/functions.html b/overextended/ox_fuel/Client/functions.html index d3e79fa2b3..bc7afdbb24 100644 --- a/overextended/ox_fuel/Client/functions.html +++ b/overextended/ox_fuel/Client/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Client
    Functions

    Functions

    +
    Client
    Functions

    Functions

    setMoneyCheck

    Override the built-in money check.

    exports.ox_fuel:setMoneyCheck(method)
    @@ -30,4 +30,4 @@

    end return 0 -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_fuel/Server/functions.html b/overextended/ox_fuel/Server/functions.html index abaad79e3a..55128682f4 100644 --- a/overextended/ox_fuel/Server/functions.html +++ b/overextended/ox_fuel/Server/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Server
    Functions

    Functions

    +
    Server
    Functions

    Functions

    setPaymentMethod

    Override the built-in payment method.

    exports.ox_fuel:setPaymentMethod(method)
    @@ -33,4 +33,4 @@

    type = 'error', description = locale('not_enough_money', amount - bankAmount) }) -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_fuel/Shared.html b/overextended/ox_fuel/Shared.html index 32bc0960a5..1b2c2c2385 100644 --- a/overextended/ox_fuel/Shared.html +++ b/overextended/ox_fuel/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Get vehicle fuel amount

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    Entity(vehicleId).state.fuel = fuelAmount

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory.html b/overextended/ox_inventory.html index ec5a3b8337..4e9ae679c0 100644 --- a/overextended/ox_inventory.html +++ b/overextended/ox_inventory.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Ox Inventory

    Ox Inventory

    +
    Ox Inventory

    Ox Inventory

    A slot-based inventory with item metadata for "item uniqueness".

    ⚠️

    If you are replacing a built-in framework inventory there will be compatibility errors.
    @@ -161,4 +161,4 @@

    playerColumn = 'charid' -- primary key for identifying the character (i.e. identifier, citizenid, id) vehicleTable = 'vehicles' -- table storing owned vehicle data vehicleColumn = 'id' -- primary key for identifying the vehicle (i.e. plate, vin, id) -end


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Events/Client.html b/overextended/ox_inventory/Events/Client.html index 7ea6debf3d..dde3614bbc 100644 --- a/overextended/ox_inventory/Events/Client.html +++ b/overextended/ox_inventory/Events/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Client

    +

    Client

    This is not a comprehensive list of events and is missing events intended for internal use only.

    Event Triggers

    These events are safe to trigger and handle in other scripts.

    @@ -62,4 +62,4 @@

    name: string
  • slotId: number
  • metadata?: table
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Events/Server.html b/overextended/ox_inventory/Events/Server.html index fe530e76db..06a32ed052 100644 --- a/overextended/ox_inventory/Events/Server.html +++ b/overextended/ox_inventory/Events/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Server

    +

    Server

    This is not a comprehensive list of events and is missing events intended for internal use only.

    Handlers

    ⚠️

    These events should not be triggered by any other scripts.

    @@ -32,4 +32,4 @@

    name: string
  • slotId: number
  • metadata?: table
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Frameworks/esx.html b/overextended/ox_inventory/Frameworks/esx.html index 468a710545..8db0a79912 100644 --- a/overextended/ox_inventory/Frameworks/esx.html +++ b/overextended/ox_inventory/Frameworks/esx.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    ESX

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Frameworks/qbx.html b/overextended/ox_inventory/Frameworks/qbx.html index 78fbdaf073..a99e61ce3d 100644 --- a/overextended/ox_inventory/Frameworks/qbx.html +++ b/overextended/ox_inventory/Frameworks/qbx.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Qbox Project

    +

    Qbox Project

    Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).

    We strongly advise using Qbox as an alternative to QBCore.

      @@ -27,4 +27,4 @@

      Start ox_inventory immediately after qbx_core.

    -

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Functions/Client.html b/overextended/ox_inventory/Functions/Client.html index f7b7536988..aa330cc359 100644 --- a/overextended/ox_inventory/Functions/Client.html +++ b/overextended/ox_inventory/Functions/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Client

    +

    Client

    openInventory

    Opens an inventory using the passed data.

    exports.ox_inventory:openInventory(invType, data)
    @@ -356,4 +356,4 @@

    end

    canUseWeapons

    Allows you to enable/disable the use of weapons for a player.

    -
    LocalPlayer.state.canUseWeapons = false

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    LocalPlayer.state.canUseWeapons = false

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Functions/Server.html b/overextended/ox_inventory/Functions/Server.html index cbb8ecf781..998599705d 100644 --- a/overextended/ox_inventory/Functions/Server.html +++ b/overextended/ox_inventory/Functions/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Server

    +

    Server

    setPlayerInventory

    Creates and sets the player's inventory.

    exports.ox_inventory:setPlayerInventory(player, data)
    @@ -755,4 +755,4 @@

    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))


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +print(('modified %sx water in slot %s with new metadata'):format(water.count, water.slot))

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Functions/Server/Hooks.html b/overextended/ox_inventory/Functions/Server/Hooks.html index 01665b750b..edf1e759eb 100644 --- a/overextended/ox_inventory/Functions/Server/Hooks.html +++ b/overextended/ox_inventory/Functions/Server/Hooks.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Hooks

    +

    Hooks

    Event hooks allow 3rd party resources to define new behaviour without modifying the inventory code directly.

    registerHook

    exports.ox_inventory:registerHook(eventName, function(payload) end, options)
    @@ -201,4 +201,4 @@

    exports.ox_inventory:removeHooks(id)

    • id?: number
    • -

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Guides/crafting.html b/overextended/ox_inventory/Guides/crafting.html index 66f25d0a60..01ee003a60 100644 --- a/overextended/ox_inventory/Guides/crafting.html +++ b/overextended/ox_inventory/Guides/crafting.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Crafting

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Guides/creatingItems.html b/overextended/ox_inventory/Guides/creatingItems.html index 61c316fa95..bc3e882111 100644 --- a/overextended/ox_inventory/Guides/creatingItems.html +++ b/overextended/ox_inventory/Guides/creatingItems.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Guides
    Creating Items

    Creating Items

    +
    Guides
    Creating Items

    Creating Items

    Defining item data

    Before being able to see or use an item in game it must first be defined.

    All of the items are defined in the /data/items.lua (opens in a new tab) file with key, value pairs. @@ -261,4 +261,4 @@

    slots = 5, maxWeight = 1000, blacklist = { 'testburger' } -})


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +})

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Guides/metadata.html b/overextended/ox_inventory/Guides/metadata.html index 5345a69eb0..fb21af247f 100644 --- a/overextended/ox_inventory/Guides/metadata.html +++ b/overextended/ox_inventory/Guides/metadata.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Metadata

    +

    Metadata

    Item metadata is a very powerful tool that can be used to create multiple different items out of a single item.

    In this guide we'll use pokemon cards as an example, but you can find an already integrated example in the inventory with the garbage item.

    @@ -113,4 +113,4 @@

    hp = 'HP', attack = 'ATK', defense = 'DEF' -})


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +})

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Guides/shops.html b/overextended/ox_inventory/Guides/shops.html index d35ededbce..5af4fc911c 100644 --- a/overextended/ox_inventory/Guides/shops.html +++ b/overextended/ox_inventory/Guides/shops.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Guides
    Creating Shops

    Creating Shops

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +})

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/Guides/stashes.html b/overextended/ox_inventory/Guides/stashes.html index 2e4fda69e4..4fbf596e0a 100644 --- a/overextended/ox_inventory/Guides/stashes.html +++ b/overextended/ox_inventory/Guides/stashes.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Guides
    Custom Stashes

    Custom Stashes

    +
    Guides
    Custom Stashes

    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.

    Stash properties

    @@ -101,4 +101,4 @@

    end

    Example Resource

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

    -

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_inventory/issues.html b/overextended/ox_inventory/issues.html index 21dd412315..85bb9ad140 100644 --- a/overextended/ox_inventory/issues.html +++ b/overextended/ox_inventory/issues.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Common Issues

    +

    Common Issues

    UI has not been built

    Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js.

    We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from here (opens in a new tab).
    @@ -32,4 +32,4 @@

    txAdmin scheduled restarts and shutdowns will trigger a save.
  • The saveinv command can be used manually or triggered in the console.
  • All inventories are saved when the number of online players hits 0.
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib.html b/overextended/ox_lib.html index 144a2864f2..695f2b9cdb 100644 --- a/overextended/ox_lib.html +++ b/overextended/ox_lib.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Ox Lib

    +

    Ox Lib

    A standalone library for providing easily reusable code as importable modules and exports.

    Installation

    @@ -69,4 +69,4 @@

    When working in the browser you can run pnpm 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 pnpm start:game which writes changes to disk, so -the only thing you have to do is restart the resource for it take affect.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +the only thing you have to do is restart the resource for it take affect.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/ACL/Server.html b/overextended/ox_lib/Modules/ACL/Server.html index bc9636ba61..9a7bf3e587 100644 --- a/overextended/ox_lib/Modules/ACL/Server.html +++ b/overextended/ox_lib/Modules/ACL/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    ACL
    Server

    Server

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/AddCommand/Server.html b/overextended/ox_lib/Modules/AddCommand/Server.html index 63fa4829ab..5026e7aae5 100644 --- a/overextended/ox_lib/Modules/AddCommand/Server.html +++ b/overextended/ox_lib/Modules/AddCommand/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    AddCommand
    Server

    Server

    +
    Modules
    AddCommand
    Server

    Server

    Registers commands and simplifies argument validation, permissions, and chat suggestions.

    lib.addCommand(commandName, properties, cb)
      @@ -63,4 +63,4 @@ if item then Inventory.AddItem(args.target, item.name, args.count or 1, args.metatype) end -end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/AddKeybind/Client.html b/overextended/ox_lib/Modules/AddKeybind/Client.html index 3407a5b84e..58c72f2cc8 100644 --- a/overextended/ox_lib/Modules/AddKeybind/Client.html +++ b/overextended/ox_lib/Modules/AddKeybind/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    AddKeybind
    Client

    Client

    +
    Modules
    AddKeybind
    Client

    Client

    Registers keybinds and simplifies interactions of the keybinds.

    CKeybind Class

    A table representing a keybind with the following properties.

    @@ -121,4 +121,4 @@

    Enable / Disable Keybinds

    Keybinds can be enabled / disabled by using the disable method.

    keybind:disable(true) -- disables the keybind
    -keybind:disable(false) -- enables the keybind

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +keybind:disable(false) -- enables the keybind

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Array/Shared.html b/overextended/ox_lib/Modules/Array/Shared.html index 460612cfa9..75862baecc 100644 --- a/overextended/ox_lib/Modules/Array/Shared.html +++ b/overextended/ox_lib/Modules/Array/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Array
    Shared

    Shared

    +
    Modules
    Array
    Shared

    Shared

    lib.array

    A table used as a prototype for the Array class. Functions can be used as class methods or standard functions.

    lib.array:new

    @@ -180,4 +180,4 @@

    Returns:

    • accumulator: unknown
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Cache/Client.html b/overextended/ox_lib/Modules/Cache/Client.html index e050f2efc9..a60f4063a3 100644 --- a/overextended/ox_lib/Modules/Cache/Client.html +++ b/overextended/ox_lib/Modules/Cache/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Cache
    Client

    Client

    +
    Modules
    Cache
    Client

    Client

    Values and cache functionality available to the client, in addition to the shared values.

    Default values

      @@ -74,4 +74,4 @@

      lib.onCache('vehicle', function(value)
           print('old vehicle:', cache.vehicle)
           print('new vehicle:', value)
      -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Cache/Shared.html b/overextended/ox_lib/Modules/Cache/Shared.html index a09d93542d..6a2d5e19cb 100644 --- a/overextended/ox_lib/Modules/Cache/Shared.html +++ b/overextended/ox_lib/Modules/Cache/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Cache
    Shared

    Shared

    +
    Modules
    Cache
    Shared

    Shared

    A table containing cached function results, which may be constants or infrequently changed.

    Default values

      @@ -63,4 +63,4 @@

      > 1 > 6 > 6 -> 6


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +> 6

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Callback/JavaScript/Client.html b/overextended/ox_lib/Modules/Callback/JavaScript/Client.html index 93ac180402..cb2b9d2b93 100644 --- a/overextended/ox_lib/Modules/Callback/JavaScript/Client.html +++ b/overextended/ox_lib/Modules/Callback/JavaScript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Callback
    JavaScript
    Client

    Client

    +
    Modules
    Callback
    JavaScript
    Client

    Client

    Trigger Server Callback

    triggerServerCallback

    triggerServerCallback(eventName, delay, ...args)
    @@ -45,4 +45,4 @@

    const response = await triggerServerCallback<{ serverValue: number }>('test:server', 1, args); if (!response) return; console.log('Response from server', response); -}, 100);


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +}, 100);

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Callback/JavaScript/Server.html b/overextended/ox_lib/Modules/Callback/JavaScript/Server.html index 66a2903293..38573b6466 100644 --- a/overextended/ox_lib/Modules/Callback/JavaScript/Server.html +++ b/overextended/ox_lib/Modules/Callback/JavaScript/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Callback
    JavaScript
    Server

    Server

    +
    Modules
    Callback
    JavaScript
    Server

    Server

    Trigger Client Callback

    triggerClientCallback

    triggerClientCallback(eventName, playerId, ...args)
    @@ -41,4 +41,4 @@

    if (!response) return; console.log(response.clientValue); console.log('Response from client', response); -}, 100);


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +}, 100);

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Callback/Lua/Client.html b/overextended/ox_lib/Modules/Callback/Lua/Client.html index 2c0a525aa0..80b240eff5 100644 --- a/overextended/ox_lib/Modules/Callback/Lua/Client.html +++ b/overextended/ox_lib/Modules/Callback/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Callback
    Lua
    Client

    Client

    +
    Modules
    Callback
    Lua
    Client

    Client

    Trigger Server Callback

    lib.callback

    The response is handled in a separate coroutine.

    @@ -54,4 +54,4 @@

    lib.callback.register('ox:getNearbyVehicles', function(radius)
         local nearbyVehicles = lib.getNearbyVehicles(GetEntityCoords(cache.ped), radius, true)
         return nearbyVehicles
    -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Callback/Lua/Server.html b/overextended/ox_lib/Modules/Callback/Lua/Server.html index 48ea0bb6bc..8166a53d26 100644 --- a/overextended/ox_lib/Modules/Callback/Lua/Server.html +++ b/overextended/ox_lib/Modules/Callback/Lua/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Callback
    Lua
    Server

    Server

    +
    Modules
    Callback
    Lua
    Server

    Server

    Trigger Client Callback

    lib.callback

    The response is handled in a separate coroutine.

    @@ -51,4 +51,4 @@

    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)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Class/Shared.html b/overextended/ox_lib/Modules/Class/Shared.html index 39ce0776d3..ff1cca247e 100644 --- a/overextended/ox_lib/Modules/Class/Shared.html +++ b/overextended/ox_lib/Modules/Class/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Class
    Shared

    Shared

    +
    Modules
    Class
    Shared

    Shared

    Classes

    A class is a template for creating objects with set attributes and behaviours.

      @@ -143,4 +143,4 @@

      print(jesse.private.year) -- nil print(getmetatable(jesse.private)) -- private jesse.private.year = 4 -- error -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Cron/Server.html b/overextended/ox_lib/Modules/Cron/Server.html index 48504d9855..39923d684a 100644 --- a/overextended/ox_lib/Modules/Cron/Server.html +++ b/overextended/ox_lib/Modules/Cron/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Cron
    Server

    Server

    +
    Modules
    Cron
    Server

    Server

    A Lua implementation of cron, allowing tasks to be scheduled to run periodically at fixed times, dates, and intervals.

    Cron expression

    A string containing five values separated by white spaces, representing a set of times to execute a task.

    @@ -45,4 +45,4 @@

    Return:

    • task: OxTask
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/DisableControls/Client.html b/overextended/ox_lib/Modules/DisableControls/Client.html index 9a17b18bb0..6531e4734c 100644 --- a/overextended/ox_lib/Modules/DisableControls/Client.html +++ b/overextended/ox_lib/Modules/DisableControls/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    DisableControls
    Client

    Client

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Dui/Javascript/Client.html b/overextended/ox_lib/Modules/Dui/Javascript/Client.html index b230a7cb8a..1922a4057b 100644 --- a/overextended/ox_lib/Modules/Dui/Javascript/Client.html +++ b/overextended/ox_lib/Modules/Dui/Javascript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Dui
    Javascript
    Client

    Client

    +
    Modules
    Dui
    Javascript
    Client

    Client

    Simple and centralised dui creation, supporting sending message, change url and deletion

    Dui(data)
      @@ -61,4 +61,4 @@

      }) // Destroy -dui.remove()


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +dui.remove()

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Dui/Lua/Client.html b/overextended/ox_lib/Modules/Dui/Lua/Client.html index 2aadd880cd..d93ef810e6 100644 --- a/overextended/ox_lib/Modules/Dui/Lua/Client.html +++ b/overextended/ox_lib/Modules/Dui/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Dui
    Lua
    Client

    Client

    +
    Modules
    Dui
    Lua
    Client

    Client

    Simple and centralised dui creation, supporting sending message, change url and deletion

    lib.dui:new

    Constructs instance of Dui.

    @@ -61,4 +61,4 @@

    }) -- Destroy -dui:remove()


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +dui:remove()

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetClosestObject/Shared.html b/overextended/ox_lib/Modules/GetClosestObject/Shared.html index b091c49b3e..84d67cd590 100644 --- a/overextended/ox_lib/Modules/GetClosestObject/Shared.html +++ b/overextended/ox_lib/Modules/GetClosestObject/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetClosestObject
    Shared

    Shared

    +
    Modules
    GetClosestObject
    Shared

    Shared

    lib.getClosestObject

    Get the object handle and coords of the closest object to a set of coordinates.

    lib.getClosestObject(coords, maxDistance)
    @@ -32,4 +32,4 @@

  • object?: number
  • coords?: vector3
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetClosestPed/Shared.html b/overextended/ox_lib/Modules/GetClosestPed/Shared.html index 79c6f3a15f..aa0e460e0d 100644 --- a/overextended/ox_lib/Modules/GetClosestPed/Shared.html +++ b/overextended/ox_lib/Modules/GetClosestPed/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetClosestPed
    Shared

    Shared

    +
    Modules
    GetClosestPed
    Shared

    Shared

    lib.getClosestPed

    Get the ped handle and coords of the closest ped to a set of coordinates.

    lib.getClosestPed(coords, maxDistance)
    @@ -32,4 +32,4 @@

  • ped?: number
  • coords?: vector3
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetClosestPlayer/Shared.html b/overextended/ox_lib/Modules/GetClosestPlayer/Shared.html index 05fe6a8799..9e8daf9be0 100644 --- a/overextended/ox_lib/Modules/GetClosestPlayer/Shared.html +++ b/overextended/ox_lib/Modules/GetClosestPlayer/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetClosestPlayer
    Shared

    Shared

    +
    Modules
    GetClosestPlayer
    Shared

    Shared

    lib.getClosestPlayer

    Get the player id, ped handle, and coords of the closest player to a set of coordinates.

    lib.getClosestPlayer(coords, maxDistance, includePlayer)
    @@ -39,4 +39,4 @@

    playerId?: number
  • playerPed?: number
  • playerCoords?: vector3
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetClosestVehicle/Shared.html b/overextended/ox_lib/Modules/GetClosestVehicle/Shared.html index 81e700e952..bef9bec825 100644 --- a/overextended/ox_lib/Modules/GetClosestVehicle/Shared.html +++ b/overextended/ox_lib/Modules/GetClosestVehicle/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetClosestVehicle
    Shared

    Shared

    +
    Modules
    GetClosestVehicle
    Shared

    Shared

    lib.getClosestVehicle

    Get the vehicle handle and coords of the closest vehicle to a set of coordinates.

    lib.getClosestVehicle(coords, maxDistance, includePlayerVehicle)
    @@ -38,4 +38,4 @@

  • vehicle?: number
  • vehicleCoords?: vector3
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetNearbyObjects/Shared.html b/overextended/ox_lib/Modules/GetNearbyObjects/Shared.html index ed4cd93892..6e84b109c1 100644 --- a/overextended/ox_lib/Modules/GetNearbyObjects/Shared.html +++ b/overextended/ox_lib/Modules/GetNearbyObjects/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetNearbyObjects
    Shared

    Shared

    +
    Modules
    GetNearbyObjects
    Shared

    Shared

    lib.getNearbyObjects

    Get the object handle and coords of all objects within range of a set of coordinates.

    lib.getNearbyObjects(coords, maxDistance)
    @@ -31,4 +31,4 @@

    Return:

    • objects: { object: number, coords: vector3 }[]
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetNearbyPeds/Shared.html b/overextended/ox_lib/Modules/GetNearbyPeds/Shared.html index 2a93c2d29b..5197d88a2b 100644 --- a/overextended/ox_lib/Modules/GetNearbyPeds/Shared.html +++ b/overextended/ox_lib/Modules/GetNearbyPeds/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetNearbyPeds
    Shared

    Shared

    +
    Modules
    GetNearbyPeds
    Shared

    Shared

    lib.getNearbyPeds

    Get the ped handle and coords of all peds within range of a set of coordinates.

    lib.getNearbyPeds(coords, maxDistance)
    @@ -31,4 +31,4 @@

    Return:

    • peds: { ped: number, coords: vector3 }[]
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.html b/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.html index 4f70b7e050..6c561fd1be 100644 --- a/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.html +++ b/overextended/ox_lib/Modules/GetNearbyPlayers/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetNearbyPlayers
    Shared

    Shared

    +
    Modules
    GetNearbyPlayers
    Shared

    Shared

    lib.getNearbyPlayers

    Get the player id, ped handle, and coords of all players within range of a set of coordinates.

    lib.getNearbyPlayers(coords, maxDistance, includePlayer)
    @@ -37,4 +37,4 @@

    Return:

    • players: { id: number, ped: number, coords: vector3 }[]
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.html b/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.html index 29b9796dd3..89a6a53b87 100644 --- a/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.html +++ b/overextended/ox_lib/Modules/GetNearbyVehicles/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    GetNearbyVehicles
    Shared

    Shared

    +
    Modules
    GetNearbyVehicles
    Shared

    Shared

    lib.getNearbyVehicles

    Get the vehicle handle and coords of all vehicles within range of a set of coordinates.

    lib.getNearbyVehicles(coords, maxDistance, includePlayerVehicle)
    @@ -37,4 +37,4 @@

    Return:

    • vehicles: { vehicle: number, coords: vector3 }[]
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface.html b/overextended/ox_lib/Modules/Interface.html index c3fc1fe8e5..af24e920ae 100644 --- a/overextended/ox_lib/Modules/Interface.html +++ b/overextended/ox_lib/Modules/Interface.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Interface

    Interface

    +
    Modules
    Interface

    Interface

    If you wish to change the primary colour for the UI to better match your server's theme you can do so easily through the available convars.

    They don't require you to build the UI, just restart the resource.

    Convars:

    @@ -22,4 +22,4 @@

    You can find the full list of preset colours and shades here:

    https://v6.mantine.dev/theming/colors/#default-colors (opens in a new tab)

    If you wish to create your own pallete I suggest following the guide on that page.
    -Keep in mind doing so will require you to download the source code and build the UI.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +Keep in mind doing so will require you to download the source code and build the UI.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/alert.html b/overextended/ox_lib/Modules/Interface/Client/alert.html index 1dd589707d..fad9d812a7 100644 --- a/overextended/ox_lib/Modules/Interface/Client/alert.html +++ b/overextended/ox_lib/Modules/Interface/Client/alert.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Alert Dialog

    Alert Dialog

    +
    Modules
    Client
    Alert Dialog

    Alert Dialog

    Simple alert dialog that can display a message to the player.
    Returns whether the player pressed the confirm button or canceled the dialog.

    lib.alertDialog

    @@ -65,4 +65,4 @@

    }) print(alert)

    -

    alert_dialog


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    alert_dialog


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/clipboard.html b/overextended/ox_lib/Modules/Interface/Client/clipboard.html index 43256e1c78..a7613d7b5d 100644 --- a/overextended/ox_lib/Modules/Interface/Client/clipboard.html +++ b/overextended/ox_lib/Modules/Interface/Client/clipboard.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Clipboard

    Clipboard

    +
    Modules
    Client
    Clipboard

    Clipboard

    lib.setClipboard

    Sets the player's clipboard to the specified string value.

    💡

    Will not work if focus is already taken by some NUI component.

    @@ -19,4 +19,4 @@

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/context.html b/overextended/ox_lib/Modules/Interface/Client/context.html index e5bba34822..873e1f5ae5 100644 --- a/overextended/ox_lib/Modules/Interface/Client/context.html +++ b/overextended/ox_lib/Modules/Interface/Client/context.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Context Menu

    Context Menu

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +event_menu


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/input.html b/overextended/ox_lib/Modules/Interface/Client/input.html index fefe524509..306c701350 100644 --- a/overextended/ox_lib/Modules/Interface/Client/input.html +++ b/overextended/ox_lib/Modules/Interface/Client/input.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Input Dialog

    Input Dialog

    +
    Modules
    Client
    Input Dialog

    Input Dialog

    The input dialog window allows you to take data from the user by setting input fields.

    lib.inputDialog

    lib.inputDialog(heading, rows, options)
    @@ -260,4 +260,4 @@

    -- Transforming date timestamp to a readable format with Lua's os library (server-only) local timestamp = math.floor(input[5] / 1000) local date = os.date('%Y-%m-%d %H:%M:%S', timestamp)

    -

    Example image


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Example image


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/menu.html b/overextended/ox_lib/Modules/Interface/Client/menu.html index 870c1cf8d1..c3f175807f 100644 --- a/overextended/ox_lib/Modules/Interface/Client/menu.html +++ b/overextended/ox_lib/Modules/Interface/Client/menu.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Menu

    +

    Menu

    Keyboard navigation menu with specific event functions.

    lib.registerMenu

    Registers and caches a menu under the specified id.

    @@ -194,4 +194,4 @@

    RegisterCommand('testmenu', function() lib.showMenu('some_menu_id') end)

    -

    Example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/notify.html b/overextended/ox_lib/Modules/Interface/Client/notify.html index bec2e9469c..0d1c849112 100644 --- a/overextended/ox_lib/Modules/Interface/Client/notify.html +++ b/overextended/ox_lib/Modules/Interface/Client/notify.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Notifications

    Notifications

    +
    Modules
    Client
    Notifications

    Notifications

    lib.notify

    Custom notifications with a lot of styling options.

    lib.notify(data)
    @@ -115,4 +115,4 @@

    icon = 'ban', iconColor = '#C53030' })

    -

    custom_notification


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    custom_notification


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/progress.html b/overextended/ox_lib/Modules/Interface/Client/progress.html index 437dc41cf8..394b729e26 100644 --- a/overextended/ox_lib/Modules/Interface/Client/progress.html +++ b/overextended/ox_lib/Modules/Interface/Client/progress.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Progress

    Progress

    +
    Modules
    Client
    Progress

    Progress

    lib.progressBar

    Displays a running progress bar.

    lib.progressBar(data)
    @@ -265,4 +265,4 @@

    lib.cancelProgress

    If there is a progress bar active and the progress bar can be cancelled then it cancels it.

    -
    lib.cancelProgress()

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    lib.cancelProgress()

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/radial.html b/overextended/ox_lib/Modules/Interface/Client/radial.html index c36cb7eaa7..286457354c 100644 --- a/overextended/ox_lib/Modules/Interface/Client/radial.html +++ b/overextended/ox_lib/Modules/Interface/Client/radial.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Radial Menu

    Radial Menu

    +
    Modules
    Client
    Radial Menu

    Radial Menu

    • Radial menu has a global menu that's by default accessed with z and only displays when there is at least one item.
    • You can add and remove items from the global menu using lib.addRadialItem and lib.removeRadialItem.
    • @@ -194,4 +194,4 @@

      lib.removeRadialItem('garage_access') end

    radial1 -radial2


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +radial2


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/skillcheck.html b/overextended/ox_lib/Modules/Interface/Client/skillcheck.html index 0aee3c3312..9df2a1a52c 100644 --- a/overextended/ox_lib/Modules/Interface/Client/skillcheck.html +++ b/overextended/ox_lib/Modules/Interface/Client/skillcheck.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Skill Check

    Skill Check

    +
    Modules
    Client
    Skill Check

    Skill Check

    lib.skillCheck

    Runs a skill check with the defined difficulty.

    lib.skillCheck(difficulty, inputs)
    @@ -56,4 +56,4 @@

    Usage Example

    local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})
    -

    skillcheck_example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    skillcheck_example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Interface/Client/textui.html b/overextended/ox_lib/Modules/Interface/Client/textui.html index e4d5d99de1..95aaeba3a4 100644 --- a/overextended/ox_lib/Modules/Interface/Client/textui.html +++ b/overextended/ox_lib/Modules/Interface/Client/textui.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    TextUI

    TextUI

    +
    Modules
    Client
    TextUI

    TextUI

    lib.showTextUI

    Show the TextUI window.

    ⚠️

    DO NOT run this function every tick, it's intended to be used as a toggle.

    @@ -57,4 +57,4 @@

    color = 'white' } })

    -

    custom_example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    custom_example


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Locale/Shared.html b/overextended/ox_lib/Modules/Locale/Shared.html index 4477bd9b42..a713f2f6dc 100644 --- a/overextended/ox_lib/Modules/Locale/Shared.html +++ b/overextended/ox_lib/Modules/Locale/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Locale
    Shared

    Allows servers to set a preferred language and attempt to load locale files in any resources using the module. +

    Modules
    Locale
    Shared

    Allows servers to set a preferred language and attempt to load locale files in any resources using the module. Locale files should use the ISO Language Code (opens in a new tab) and be saved as ./locales/langcode.json

    Setup

    To change the preferred language from English, add the convar to your server.cfg and change en to the desired language code.

    @@ -64,4 +64,4 @@

  • resource: string
  • key: string
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Logger/Server.html b/overextended/ox_lib/Modules/Logger/Server.html index e60050e39c..11e2259558 100644 --- a/overextended/ox_lib/Modules/Logger/Server.html +++ b/overextended/ox_lib/Modules/Logger/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Logger
    Server

    Server

    +
    Modules
    Logger
    Server

    Server

    lib.logger

    lib.logger(source, event, message, ...)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +set fivemanage:key "YOUR_API_KEY"

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Marker/Client.html b/overextended/ox_lib/Modules/Marker/Client.html index a355748c87..42c8807770 100644 --- a/overextended/ox_lib/Modules/Marker/Client.html +++ b/overextended/ox_lib/Modules/Marker/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Marker
    Client

    Client

    +
    Modules
    Marker
    Client

    Client

    lib.marker

    Simple way to create markers

    Marker Class

    @@ -82,4 +82,4 @@

    lib.hideTextUI() end end -end


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Math/Shared.html b/overextended/ox_lib/Modules/Math/Shared.html index 08c17680e9..3a8338214e 100644 --- a/overextended/ox_lib/Modules/Math/Shared.html +++ b/overextended/ox_lib/Modules/Math/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Math
    Shared

    Shared

    +
    Modules
    Math
    Shared

    Shared

    lib.math

    Extends the standard Lua math table with extra functions.

    math = lib.math
    @@ -168,4 +168,4 @@

    Return:

    • iteratorFunction: fun(): T, number
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Points/JavaScript/Client.html b/overextended/ox_lib/Modules/Points/JavaScript/Client.html index f83107009a..1c5fc1d23d 100644 --- a/overextended/ox_lib/Modules/Points/JavaScript/Client.html +++ b/overextended/ox_lib/Modules/Points/JavaScript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Points
    JavaScript
    Client

    Client

    +
    Modules
    Points
    JavaScript
    Client

    Client

    Points

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

    Point<T>({coords, distance, onEnter, onExit, nearby, args})
    @@ -50,4 +50,4 @@

    point.onExit = () => { console.log('Left range of point', point.id) -}


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +}

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Points/Lua/Client.html b/overextended/ox_lib/Modules/Points/Lua/Client.html index 7cbe71bf87..d613b5659b 100644 --- a/overextended/ox_lib/Modules/Points/Lua/Client.html +++ b/overextended/ox_lib/Modules/Points/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Points
    Lua
    Client

    Client

    +
    Modules
    Points
    Lua
    Client

    Client

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

    CPoint Class

    A table representing a point with the following properties.

    @@ -106,4 +106,4 @@

    Return:

    • closestPoint?: CPoint
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Print/Shared.html b/overextended/ox_lib/Modules/Print/Shared.html index 63210af6ed..208e2ae81d 100644 --- a/overextended/ox_lib/Modules/Print/Shared.html +++ b/overextended/ox_lib/Modules/Print/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Print
    Shared

    Shared

    +
    Modules
    Print
    Shared

    Shared

    Prints to console conditionally based on convars set. Different level prints are colored and labeled. Resource name is always included.

    @@ -70,4 +70,4 @@

    set ox:printlevel "info"
     set ox:printlevel:ox_inventory "warn"
    -set ox:printlevel:<resourceName> "<level>"


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +set ox:printlevel:<resourceName> "<level>"

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Raycast/Client.html b/overextended/ox_lib/Modules/Raycast/Client.html index 62af3b16da..931d9fbd30 100644 --- a/overextended/ox_lib/Modules/Raycast/Client.html +++ b/overextended/ox_lib/Modules/Raycast/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Raycast
    Client

    Client

    +
    Modules
    Raycast
    Client

    Client

    lib.raycast.fromCoords

    Starts a shapetest originating from starting coordinates and ending at destination coordinates.

    lib.raycast.fromCoords(coords, destination, flags, ignore)
    @@ -110,4 +110,4 @@

    materialHash: number

    lib.raycast.cam

    -
    ⚠️
    lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    ⚠️
    lib.raycast.cam is depreciated alias for lib.raycast.fromCamera and may be removed at any time. Use lib.raycast.fromCamera instead!

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Require/Shared.html b/overextended/ox_lib/Modules/Require/Shared.html index 92f4585a04..96b875dd95 100644 --- a/overextended/ox_lib/Modules/Require/Shared.html +++ b/overextended/ox_lib/Modules/Require/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Require
    Shared

    Shared

    +
    Modules
    Require
    Shared

    Shared

    This module is always loaded by default.

    require

    Loads the given module. The function starts by indexing the loaded table to determine whether modname is already loaded. If it is, then require returns the value stored at loaded[modname].

    @@ -85,4 +85,4 @@

    print('Loaded events')

    myresource/data/events.json
    {
       "disconnect": "onPlayerDropped"
    -}

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +}

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Streaming/Client.html b/overextended/ox_lib/Modules/Streaming/Client.html index e99c2aeb69..7d13a8486c 100644 --- a/overextended/ox_lib/Modules/Streaming/Client.html +++ b/overextended/ox_lib/Modules/Streaming/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Streaming
    Client

    Client

    +
    Modules
    Streaming
    Client

    Client

    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

    @@ -122,4 +122,4 @@

    2 WEAPON_COMPONENT_SCOPE 4 WEAPON_COMPONENT_SUPP 8 WEAPON_COMPONENT_SCLIP2 -16 WEAPON_COMPONENT_GRIP


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +16 WEAPON_COMPONENT_GRIP

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/String/Shared.html b/overextended/ox_lib/Modules/String/Shared.html index e11ebfecdb..7e0f27b66a 100644 --- a/overextended/ox_lib/Modules/String/Shared.html +++ b/overextended/ox_lib/Modules/String/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    String
    Shared

    Shared

    +
    Modules
    String
    Shared

    Shared

    lib.string

    Extends the standard Lua string table with extra functions.

    string = lib.string
    @@ -35,4 +35,4 @@

    Return:

    • string: string
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Table/Shared.html b/overextended/ox_lib/Modules/Table/Shared.html index bd57b9ec16..c6bf70a575 100644 --- a/overextended/ox_lib/Modules/Table/Shared.html +++ b/overextended/ox_lib/Modules/Table/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Table
    Shared

    Shared

    +
    Modules
    Table
    Shared

    Shared

    Adds additional functions alongside the standard table library.

    lib.table.contains

    Checks if table contains the given value. Only intended for simple values and unnested tables.

    @@ -75,4 +75,4 @@

    Return:

    • isFrozen: boolean
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Timer/Shared.html b/overextended/ox_lib/Modules/Timer/Shared.html index d7e28cc862..f97ec4d015 100644 --- a/overextended/ox_lib/Modules/Timer/Shared.html +++ b/overextended/ox_lib/Modules/Timer/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Timer
    Shared

    Shared

    +
    Modules
    Timer
    Shared

    Shared

    Provides a versatile timer system with options for asynchronous operation, pause and resume functionality, and callbacks on timer completion.

    Timer

    lib.timer

    @@ -124,4 +124,4 @@

    print("timer ended") timer:restart() end, true) -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/VehicleProperties/Client.html b/overextended/ox_lib/Modules/VehicleProperties/Client.html index c1858fbc64..e9a249d568 100644 --- a/overextended/ox_lib/Modules/VehicleProperties/Client.html +++ b/overextended/ox_lib/Modules/VehicleProperties/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    VehicleProperties
    Client

    Client

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Version/Server.html b/overextended/ox_lib/Modules/Version/Server.html index 0b10485961..5d618a713d 100644 --- a/overextended/ox_lib/Modules/Version/Server.html +++ b/overextended/ox_lib/Modules/Version/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Version
    Server

    Server

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    lib.versionCheck('overextended/ox_lib')

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Version/Shared.html b/overextended/ox_lib/Modules/Version/Shared.html index b057b42dfa..f8ac4d9329 100644 --- a/overextended/ox_lib/Modules/Version/Shared.html +++ b/overextended/ox_lib/Modules/Version/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Version
    Shared

    Shared

    +
    Modules
    Version
    Shared

    Shared

    lib.checkDependency

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

    lib.checkDependency(resource, version)
    @@ -19,4 +19,4 @@

    resource: string
  • version: string
  • -
    if not lib.checkDependency('ox_lib', '1.5.0') then error() end


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    if not lib.checkDependency('ox_lib', '1.5.0') then error() end

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/WaitFor/Shared.html b/overextended/ox_lib/Modules/WaitFor/Shared.html index 1380151b97..45bd5ba765 100644 --- a/overextended/ox_lib/Modules/WaitFor/Shared.html +++ b/overextended/ox_lib/Modules/WaitFor/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    WaitFor
    Shared

    Shared

    +
    Modules
    WaitFor
    Shared

    Shared

    lib.waitFor

    Calls a function repeatedly until it receives a non-nil value, or it times out.
    The function result is then returned.

    @@ -35,4 +35,4 @@

    local value --[['abc']] = lib.waitFor(function()
         if math.random(0, 1) == 1 then return 'abc' end
    -end)


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +end)

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_lib/Modules/Zones/Shared.html b/overextended/ox_lib/Modules/Zones/Shared.html index e1c3b0cfec..1a0fbe8e43 100644 --- a/overextended/ox_lib/Modules/Zones/Shared.html +++ b/overextended/ox_lib/Modules/Zones/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Modules
    Zones
    Shared

    Shared

    +
    Modules
    Zones
    Shared

    Shared

    Faster alternative to PolyZone utilising glm.polygon (opens in a new tab).

    💡

    Currently zones only have basic support on the server side. Some features will not work such as onEnter, onExit, and inside.

    @@ -162,4 +162,4 @@

    vec(446.3, -997.9, 25.8), }, thickness = 2, -})


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +})

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_target.html b/overextended/ox_target.html index 0147dd73b1..e4014082cc 100644 --- a/overextended/ox_target.html +++ b/overextended/ox_target.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Ox Target

    Ox Target

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_target/Functions/Client.html b/overextended/ox_target/Functions/Client.html index 974a45e64f..eaf4262ca9 100644 --- a/overextended/ox_target/Functions/Client.html +++ b/overextended/ox_target/Functions/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Functions
    Client

    Client

    +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/ox_target/TargetOptions.html b/overextended/ox_target/TargetOptions.html index 9274f843f9..92bb56de9a 100644 --- a/overextended/ox_target/TargetOptions.html +++ b/overextended/ox_target/TargetOptions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    TargetOptions

    +

    TargetOptions

    All target actions are formated as an array containing objects with the following properties.

    TargetOption

      @@ -125,4 +125,4 @@


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql.html b/overextended/oxmysql.html index 46d27536dd..757d82a961 100644 --- a/overextended/oxmysql.html +++ b/overextended/oxmysql.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    OxMySQL

    +

    OxMySQL

    Uma substituição para mysql-async e ghmattimysql com API expandida e compatibilidade aprimorada para MySQL 8.

    @@ -70,4 +70,4 @@

    Quando não tiver certeza se uma linha deve ser inserida no banco de dados ou se uma linha existente deve ser atualizada, as consultas devem verificar a duplicidade de chaves.

    MySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })

    Isso é preferível a verificar a existência de uma linha e, em seguida, inserir ou atualizar dependendo do resultado. -Além disso, ao contrário do uso de 'REPLACE INTO', a linha não é deletada e reinserida.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +Além disso, ao contrário do uso de 'REPLACE INTO', a linha não é deletada e reinserida.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/insert.html b/overextended/oxmysql/Functions/insert.html index 3da1220be9..23497e83ed 100644 --- a/overextended/oxmysql/Functions/insert.html +++ b/overextended/oxmysql/Functions/insert.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    insert

    Inserir

    +
    Funções
    insert

    Inserir

    Insere uma nova entrada no banco de dados e retorna o ID da linha inserida, se válido.

    Promise

    local id = MySQL.insert.await('INSERT INTO `users` (identifier, firstname, lastname) VALUES (?, ?, ?)', {
    @@ -36,4 +36,4 @@ 

    MySQL.Async.insert
  • exports.ghmattimysql.execute
  • exports.oxmysql.insert
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/prepare.html b/overextended/oxmysql/Functions/prepare.html index aa3cc17d64..7b46a959a8 100644 --- a/overextended/oxmysql/Functions/prepare.html +++ b/overextended/oxmysql/Functions/prepare.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    prepare

    Prepare

    +
    Funções
    prepare

    Prepare

    O método prepare pode ser usado para executar consultas chamadas com frequência de forma mais rápida e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.

    • DATE não retornará a string de data comumente usada no FiveM.
    • @@ -39,4 +39,4 @@

      Aliases

      • exports.oxmysql.prepare
      • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/query.html b/overextended/oxmysql/Functions/query.html index df5258adb1..100bab74b2 100644 --- a/overextended/oxmysql/Functions/query.html +++ b/overextended/oxmysql/Functions/query.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    query

    Query

    +
    Funções
    query

    Query

    Quando dados são selecionados, retorna todas as linhas e colunas correspondentes; caso contrário, retorna dados como insertId, affectedRows, etc.

    Promise

    local response = MySQL.query.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?', {
    @@ -46,4 +46,4 @@ 

    MySQL.Async.fetchAll
  • exports.ghmattimysql.execute
  • exports.oxmysql.query
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/rawExecute.html b/overextended/oxmysql/Functions/rawExecute.html index e46a32d23a..2a4b58081e 100644 --- a/overextended/oxmysql/Functions/rawExecute.html +++ b/overextended/oxmysql/Functions/rawExecute.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    rawExecute

    RawExecute

    +
    Funções
    rawExecute

    RawExecute

    rawExecute pode ser usado para executar consultas frequentemente chamadas mais rapidamente e aceita múltiplos conjuntos de parâmetros para serem usados com uma única consulta.

    • A data não retornará a string de data normalmente usada no FiveM.
    • @@ -40,4 +40,4 @@

      Aliases

      • exports.oxmysql.rawExecute
      • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/scalar.html b/overextended/oxmysql/Functions/scalar.html index ae7538013b..b93bb88193 100644 --- a/overextended/oxmysql/Functions/scalar.html +++ b/overextended/oxmysql/Functions/scalar.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    scalar

    Scalar

    +
    Funções
    scalar

    Scalar

    Retorna a primeira coluna de uma única linha.

    Promise

    local firstName = MySQL.scalar.await('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
    @@ -36,4 +36,4 @@ 

    MySQL.Async.fetchScalar
  • exports.ghmattimysql.scalar
  • exports.oxmysql.scalar
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/single.html b/overextended/oxmysql/Functions/single.html index a8cbb6c4df..f934da4452 100644 --- a/overextended/oxmysql/Functions/single.html +++ b/overextended/oxmysql/Functions/single.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    single

    Single

    +
    Funções
    single

    Single

    Retorna todas as colunas selecionadas para uma única linha.

    Promise

    local row = MySQL.single.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
    @@ -36,4 +36,4 @@ 

    Aliases

    • exports.oxmysql.single
    • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/transaction.html b/overextended/oxmysql/Functions/transaction.html index b014e1e450..43dfb520ee 100644 --- a/overextended/oxmysql/Functions/transaction.html +++ b/overextended/oxmysql/Functions/transaction.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    transaction

    Transaction

    +
    Funções
    transaction

    Transaction

    Uma transação executa várias consultas e as confirma apenas se todas tiverem sucesso. Se uma falhar, nenhuma das consultas será confirmada.

    O valor de retorno é um booleano, que indica o resultado da transação.

    @@ -71,4 +71,4 @@

    Nível de Isolamento da Transação

    Isso pode ser configurado através da convar mysql_transaction_isolation_level, que é um número inteiro variando de 1-4. O valor padrão é 2.

    -
    Valor da ConvarResultado
    1Repeatable Read
    2Read Committed
    3Read Uncommitted
    4Serializable

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +
    Valor da ConvarResultado
    1Repeatable Read
    2Read Committed
    3Read Uncommitted
    4Serializable

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/Functions/update.html b/overextended/oxmysql/Functions/update.html index b85c8f66f5..5b254868fa 100644 --- a/overextended/oxmysql/Functions/update.html +++ b/overextended/oxmysql/Functions/update.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Funções
    update

    Update

    +
    Funções
    update

    Update

    Retorna o número de linhas afetadas pela consulta.

    Promise

    local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {
    @@ -36,4 +36,4 @@ 

    MySQL.Async.execute
  • exports.ghmattimysql.execute
  • exports.oxmysql.update
  • -


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/benchmark.html b/overextended/oxmysql/benchmark.html index 9d2b4441f5..f1c100c3e4 100644 --- a/overextended/oxmysql/benchmark.html +++ b/overextended/oxmysql/benchmark.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Benchmark

    +

    Benchmark

    A medição de desempenho é baseada no tempo gasto para receber uma resposta dos exports. As velocidades reais das consultas serão relatadas na interface de depuração e no console do servidor com mysql_debug ativado.

    As velocidades podem variar consideravelmente com base no hardware do sistema, configurações do banco de dados, versão do banco de dados e a carga de trabalho atual.

    @@ -132,4 +132,4 @@

    [script:test] 10004 1 bobby {"identifier":"abcdef","username":"bobby","id":10004} [script:test] [script:test] query -[script:test] Executed 1 queries in 1.1588ms


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +[script:test] Executed 1 queries in 1.1588ms

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/placeholders.html b/overextended/oxmysql/placeholders.html index b08118267c..760800e66a 100644 --- a/overextended/oxmysql/placeholders.html +++ b/overextended/oxmysql/placeholders.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Placeholders

    +

    Placeholders

    Placeholders permitem que parâmetros de consulta sejam executados de maneira segura, prevenindo métodos comuns de injeção de SQL (opens in a new tab).

    Os parâmetros podem ser passados como um array ou objeto (referido como parâmetros nomeados).

    local identifier = 'license:abc123'
    @@ -24,4 +24,4 @@
         group = group
         identifier = identifier
     })
    -

    Esses placeholders são distintos de declarações preparadas, que são gerenciadas pelo servidor MySQL; você pode usar MySQL.prepare para consultas mais otimizadas e seguras.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Esses placeholders são distintos de declarações preparadas, que são gerenciadas pelo servidor MySQL; você pode usar MySQL.prepare para consultas mais otimizadas e seguras.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/overextended/oxmysql/ui.html b/overextended/oxmysql/ui.html index 8a7c80db09..89b8c37314 100644 --- a/overextended/oxmysql/ui.html +++ b/overextended/oxmysql/ui.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Usando a Interface de Depuração (Debug UI)

    +

    Usando a Interface de Depuração (Debug UI)

    A interface de depuração permite que você veja facilmente todas as consultas que foram executadas pelos recursos, o tempo de resposta das consultas e as estatísticas por recurso. Você deve ativar essa interface apenas durante o desenvolvimento, ou com um número pequeno de jogadores - para servidores maiores, consulte o registro nativo de MySQL.

    @@ -27,4 +27,4 @@

    As colunas podem ser ordenadas por ordem crescente ou decrescente, e ao passar o mouse sobre uma consulta, você verá a consulta completa em uma dica de ferramenta.

    Consultas que excedem o valor de mysql_slow_query_warning (por padrão 150ms) são exibidas em laranja. Para fins de demonstração, o convar mysql_slow_query_warning foi configurado para 5ms aqui.

    -

    oxmysql_ui_queries


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    oxmysql_ui_queries


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/qbox.html b/qbox.html index 33441ee25c..7e7ecc9a26 100644 --- a/qbox.html +++ b/qbox.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -
    Qbox

    Introdução

    +
    Qbox

    Introdução

    Qbox é uma framework de roleplay para FiveM criada em 27 de setembro de 2022.

    Começando como um fork do QBCore, seu objetivo era melhorar o QBCore mantendo a compatibilidade retroativa.
    Hoje, esta framework busca ser ainda maior, utilizando os recursos da overextended (opens in a new tab) para alcançar seus objetivos.

    @@ -31,4 +31,4 @@

    Contribuições são sempre bem-vindas, mas preferimos qualidade à quantidade! Por favor, leia nossas diretrizes de contribuição (opens in a new tab) para aprender a melhor forma de contribuir.

    Perguntas Frequentes

    -

    Confira a FAQ para aprender mais sobre o Qbox.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Confira a FAQ para aprender mais sobre o Qbox.


    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/resources.html b/resources.html index e4035cfbcd..39e44b9313 100644 --- a/resources.html +++ b/resources.html @@ -11,4 +11,4 @@ --nextra-primary-hue: 103deg; --nextra-primary-saturation: 100%; } -

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file +

    Copyright © 2024 - mri-Qbox
    \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 775f49d76b..cc6edf1433 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,113 +1,113 @@ -https://docs.mriqbox.com.br2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides/git2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides/nodejs2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides/pnpm2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides/types2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/guides/vscode2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Classes/Client/OxPlayer2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxAccount2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxPlayer2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxVehicle2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Events/client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Events/server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Functions/common2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_core/Functions/server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_doorlock2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_doorlock/Client/functions2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_doorlock/Server/events2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_doorlock/Server/functions2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_doorlock/settings2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_fuel2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_fuel/Client/functions2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_fuel/Server/functions2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_fuel/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Events/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Events/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Frameworks/esx2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Frameworks/qbx2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Server/Hooks2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/crafting2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/creatingItems2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/metadata2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/shops2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/stashes2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_inventory/issues2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/ACL/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/AddCommand/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/AddKeybind/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Array/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cache/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cache/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/JavaScript/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/JavaScript/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/Lua/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/Lua/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Class/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cron/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/DisableControls/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Dui/Javascript/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Dui/Lua/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestObject/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestPed/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestPlayer/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestVehicle/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyObjects/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyPeds/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyPlayers/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyVehicles/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/alert2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/clipboard2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/context2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/input2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/menu2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/notify2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/progress2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/radial2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/skillcheck2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/textui2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Locale/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Logger/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Marker/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Math/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Points/JavaScript/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Points/Lua/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Print/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Raycast/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Require/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Streaming/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/String/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Table/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Timer/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/VehicleProperties/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Version/Server2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Version/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/WaitFor/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Zones/Shared2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_target2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_target/Functions/Client2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/ox_target/TargetOptions2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/insert2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/prepare2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/query2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/rawExecute2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/scalar2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/single2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/transaction2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/Functions/update2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/benchmark2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/placeholders2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/overextended/oxmysql/ui2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/qbox2024-11-06T21:23:47.271Zdaily0.7 -https://docs.mriqbox.com.br/resources2024-11-06T21:23:47.271Zdaily0.7 +https://docs.mriqbox.com.br2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides/git2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides/nodejs2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides/pnpm2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides/types2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/guides/vscode2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Classes/Client/OxPlayer2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxAccount2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxPlayer2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Classes/Server/OxVehicle2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Events/client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Events/server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Functions/common2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_core/Functions/server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_doorlock2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_doorlock/Client/functions2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_doorlock/Server/events2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_doorlock/Server/functions2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_doorlock/settings2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_fuel2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_fuel/Client/functions2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_fuel/Server/functions2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_fuel/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Events/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Events/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Frameworks/esx2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Frameworks/qbx2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Functions/Server/Hooks2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/crafting2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/creatingItems2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/metadata2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/shops2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/Guides/stashes2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_inventory/issues2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/ACL/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/AddCommand/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/AddKeybind/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Array/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cache/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cache/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/JavaScript/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/JavaScript/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/Lua/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Callback/Lua/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Class/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Cron/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/DisableControls/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Dui/Javascript/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Dui/Lua/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestObject/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestPed/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestPlayer/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetClosestVehicle/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyObjects/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyPeds/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyPlayers/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/GetNearbyVehicles/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/alert2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/clipboard2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/context2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/input2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/menu2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/notify2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/progress2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/radial2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/skillcheck2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Interface/Client/textui2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Locale/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Logger/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Marker/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Math/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Points/JavaScript/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Points/Lua/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Print/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Raycast/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Require/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Streaming/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/String/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Table/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Timer/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/VehicleProperties/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Version/Server2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Version/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/WaitFor/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_lib/Modules/Zones/Shared2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_target2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_target/Functions/Client2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/ox_target/TargetOptions2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/insert2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/prepare2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/query2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/rawExecute2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/scalar2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/single2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/transaction2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/Functions/update2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/benchmark2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/placeholders2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/overextended/oxmysql/ui2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/qbox2024-11-07T00:44:44.391Zdaily0.7 +https://docs.mriqbox.com.br/resources2024-11-07T00:44:44.391Zdaily0.7 \ No newline at end of file