From cd3f165fe8fd119812bef923a473bee49457b3b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:32:06 +0000 Subject: [PATCH] deploy: 9756eb76dd9fc85bb092abefe25a98bc8bf99d79 --- 404.html | 2 +- .../Eltl1YDebRayaJ_4oJXF4/_buildManifest.js | 1 - _next/static/chunks/nextra-data-en-US.json | 2 +- .../chunks/pages/_app-0d068649b5247eac.js | 23 -- .../chunks/pages/_app-832d484d2b5d7403.js | 23 ++ ...c8c0c714.js => guides-0554132321698319.js} | 2 +- ...aacf252bd40.js => git-f61cc489918d5fe9.js} | 2 +- ...1e835e3d.js => nodejs-6daa6f967033422f.js} | 2 +- ...aebd229f20.js => pnpm-d60d59534ec903fe.js} | 2 +- ...737c51140.js => types-fa5fe5d1ee308bea.js} | 2 +- ...0a7135ec.js => vscode-a6f407eb046a7fa4.js} | 2 +- ...21c8894fb.js => index-711b79d226390d26.js} | 2 +- ...85479a8.js => ox_core-87d0fc2a5c42bbe0.js} | 2 +- ...e2a4cf.js => OxPlayer-b262ef5e6401be98.js} | 2 +- ...eab4e.js => OxAccount-6e09273994e9cb78.js} | 2 +- ...106c18.js => OxPlayer-2fe4018bc4600939.js} | 2 +- ...ef1ea.js => OxVehicle-dc0b72c495905e06.js} | 2 +- ...55b27aab.js => client-74e885b2ac7d8a2b.js} | 2 +- ...678eaa77.js => server-480535e95a4df78d.js} | 2 +- ...8d468fd0.js => common-3f89be5210cfbdd7.js} | 2 +- ...5b660c1f.js => server-e3465ceb0283f840.js} | 2 +- ...7e6.js => ox_doorlock-13d0ea7f46f69ff7.js} | 2 +- ...bd666.js => functions-9de093007bdca9db.js} | 2 +- ...45f4a012.js => events-a95fe0c1308e29c4.js} | 2 +- ...c6d18.js => functions-33c97b8d95457bba.js} | 2 +- ...e8ac92.js => settings-45183d6697da2113.js} | 2 +- ...05e7d10.js => ox_fuel-e8700659d32d9a76.js} | 2 +- ...f9b4e.js => functions-1bdb435f9a39aa86.js} | 2 +- ...3db46.js => functions-1622d7c7c0653801.js} | 2 +- ...f15f011b.js => Shared-e079809618e90f17.js} | 2 +- ...7a.js => ox_inventory-b8adb6c25b32c89b.js} | 2 +- ...d5b0695d.js => Client-01c12f568d572be2.js} | 2 +- ...5742d6b3.js => Server-9d8d599687bf5ad6.js} | 2 +- ...c4b61a08f49.js => esx-a430f754ebd7ca77.js} | 2 +- ...e7334f39418.js => qbx-db81eecf233fcad1.js} | 2 +- ...a21caacd.js => Client-775b0cd78ca5f341.js} | 2 +- ...5b57ba85.js => Server-a8810716c65673f1.js} | 2 +- ...b5b7b2c65.js => Hooks-500b05172c446ce6.js} | 2 +- ...666447.js => crafting-e4072eb7c4f14ae1.js} | 2 +- ...f.js => creatingItems-9d25936877eb92e4.js} | 2 +- ...bb0c2a.js => metadata-ae8916aec3f22034.js} | 2 +- ...020f21e0c.js => shops-8a5833404bbc016d.js} | 2 +- ...5ef6808.js => stashes-ab92bec26a9cc052.js} | 2 +- ...2f77e868.js => issues-9e19185f6cb1fb6a.js} | 2 +- ...96395dae.js => ox_lib-2aa8f6b11f50a5b3.js} | 2 +- ...25c03652.js => Server-dafffbeef7f1bd76.js} | 2 +- ...21a625b4.js => Server-9e9e3936c0b4618e.js} | 2 +- ...c8d88d5f.js => Client-9cda8a73e80a6dc0.js} | 2 +- ...c924086b.js => Shared-46989929334a032c.js} | 2 +- ...523055e3.js => Client-edd76a6660c73743.js} | 2 +- ...936ec745.js => Shared-0ff60fb35dac66af.js} | 2 +- ...583d7952.js => Client-04b4da5fde84e12e.js} | 2 +- ...4412af9c.js => Server-b1b1ba0aa2dce7dd.js} | 2 +- ...18854fa4.js => Client-a9a8efd3b2c42270.js} | 2 +- ...020f2f8b.js => Server-ace556f325f19e92.js} | 2 +- ...5be7019b.js => Shared-df0b14cbf61ed323.js} | 2 +- ...a7bb82fb.js => Server-843c04f1b3e07755.js} | 2 +- ...c5843980.js => Client-c3af78c8ad7d3bf6.js} | 2 +- ...b8734f9f.js => Client-aab1cb51a6f3058c.js} | 2 +- ...d71c9f2b.js => Client-efed75f97508feab.js} | 2 +- ...ddd918bd.js => Shared-d70aa7d07fd736c4.js} | 2 +- ...5e7a167e.js => Shared-e1d5e0468fb6d1e7.js} | 2 +- ...42210baa.js => Shared-7c4e8a8ac1dad1ab.js} | 2 +- ...e3606dda.js => Shared-0c9d39ba098e6576.js} | 2 +- ...a8edf68f.js => Shared-a4069cf31d2b9407.js} | 2 +- ...bc337722.js => Shared-b14af4a9197451e5.js} | 2 +- ...6bcfe56d.js => Shared-a18073bf2185123f.js} | 2 +- ...48217575.js => Shared-dd70d17ae5bf8017.js} | 2 +- ...c1cfd.js => Interface-45cca23f1617ebd9.js} | 2 +- ...1ed68e5a4.js => alert-a23809f4eb39c2fc.js} | 2 +- ...1316c.js => clipboard-6178a317e100e8df.js} | 2 +- ...3dcc9d7.js => context-5b0bb1887f6a3dfd.js} | 2 +- ...55ff7e149.js => input-e4a973edff4bc121.js} | 2 +- ...89e7713b0f.js => menu-17f5923483c99241.js} | 2 +- ...cc1febbb.js => notify-8474c3648fba790e.js} | 2 +- ...a9f4a2.js => progress-82b0faf107c936ce.js} | 2 +- ...7f91346e.js => radial-e3ced883e64d7800.js} | 2 +- ...4c60.js => skillcheck-19eea89a1006338d.js} | 2 +- ...11716f5d.js => textui-4707a2e915ef84ba.js} | 2 +- ...7ebb6c5c.js => Shared-9ab66c2dc0acc516.js} | 2 +- ...73e245e9.js => Server-d053df161a2fceee.js} | 2 +- ...947471c3.js => Client-5c7da1401ef85208.js} | 2 +- ...093c7d64.js => Shared-95fd6d58ed9c4b08.js} | 2 +- ...60e1a6f4.js => Client-554183eb0ec80783.js} | 2 +- ...ca3c61ba.js => Client-864c82af26aa22c5.js} | 2 +- ...a1d7b68f.js => Shared-451f227690360adc.js} | 2 +- ...72e5dd7c.js => Client-b940a4ee574cc4e0.js} | 2 +- ...a77ec55b.js => Shared-c45851c3368ab813.js} | 2 +- ...0b811475.js => Client-46f1398917dc59fd.js} | 2 +- ...1376b385.js => Shared-4d2cf6ff6bcd9392.js} | 2 +- ...b41ebc8f.js => Shared-055d8f70811b6ced.js} | 2 +- ...7506f805.js => Shared-216b6e5016c7ccff.js} | 2 +- ...b4f28264.js => Client-b1ba91ed7e331200.js} | 2 +- ...0a365112.js => Server-0c2541409379c601.js} | 2 +- ...b3aeaf8f.js => Shared-5ae5ea0c9b40e27c.js} | 2 +- ...c8037bb1.js => Shared-b94f7770803fdbd3.js} | 2 +- ...6699b7a7.js => Shared-a4b6c21d153dbe05.js} | 2 +- ...69924.js => ox_target-fc8f48ceae6e22df.js} | 2 +- ...27c80543.js => Client-b07ea9f5607f2a9d.js} | 2 +- ...3.js => TargetOptions-c8d7f28475b6b91f.js} | 2 +- ...a1070e2.js => oxmysql-675d990728d616e7.js} | 2 +- ...70b20321.js => insert-d7416eb5acb2ce44.js} | 2 +- ...583968b.js => prepare-0c67598fd38072cb.js} | 2 +- ...d65fa34d2.js => query-dd6be384c9a87851.js} | 2 +- ...565d.js => rawExecute-5d2c65791cb88ca7.js} | 2 +- ...05fcfe3e.js => scalar-0a86b75e937efa0c.js} | 2 +- ...f69c3f92.js => single-74f3cf11212b27a0.js} | 2 +- ...453.js => transaction-26fee29a6b762090.js} | 2 +- ...f2a6e62a.js => update-951df841729e0a60.js} | 2 +- ...3180c.js => benchmark-3f6fa6a22e39baa7.js} | 2 +- ...85.js => placeholders-e4edfd6dba9e3655.js} | 2 +- ...988fae518f38.js => ui-fc82894a1d782e0a.js} | 2 +- _next/static/css/685730f9fa8dc1ed.css | 1 - _next/static/css/f4dd0062b25be451.css | 4 + .../p-066_Cc34uP4vLflYhOc/_buildManifest.js | 1 + .../_ssgManifest.js | 0 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 +- ox_core.html | 4 +- ox_core/Classes/Client/OxPlayer.html | 4 +- ox_core/Classes/Server/OxAccount.html | 4 +- ox_core/Classes/Server/OxPlayer.html | 4 +- ox_core/Classes/Server/OxVehicle.html | 4 +- ox_core/Events/client.html | 4 +- ox_core/Events/server.html | 4 +- ox_core/Functions/common.html | 4 +- ox_core/Functions/server.html | 4 +- ox_doorlock.html | 4 +- ox_doorlock/Client/functions.html | 4 +- ox_doorlock/Server/events.html | 4 +- ox_doorlock/Server/functions.html | 4 +- ox_doorlock/settings.html | 4 +- ox_fuel.html | 4 +- ox_fuel/Client/functions.html | 4 +- ox_fuel/Server/functions.html | 4 +- ox_fuel/Shared.html | 4 +- ox_inventory.html | 4 +- ox_inventory/Events/Client.html | 4 +- ox_inventory/Events/Server.html | 4 +- ox_inventory/Frameworks/esx.html | 4 +- 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 +- ox_inventory/Guides/shops.html | 4 +- ox_inventory/Guides/stashes.html | 4 +- ox_inventory/issues.html | 4 +- ox_lib.html | 4 +- ox_lib/Modules/ACL/Server.html | 4 +- ox_lib/Modules/AddCommand/Server.html | 4 +- ox_lib/Modules/AddKeybind/Client.html | 4 +- ox_lib/Modules/Array/Shared.html | 4 +- ox_lib/Modules/Cache/Client.html | 4 +- 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 +- ox_lib/Modules/Class/Shared.html | 4 +- ox_lib/Modules/Cron/Server.html | 4 +- ox_lib/Modules/DisableControls/Client.html | 4 +- ox_lib/Modules/Dui/Javascript/Client.html | 4 +- ox_lib/Modules/Dui/Lua/Client.html | 4 +- ox_lib/Modules/GetClosestObject/Shared.html | 4 +- ox_lib/Modules/GetClosestPed/Shared.html | 4 +- ox_lib/Modules/GetClosestPlayer/Shared.html | 4 +- ox_lib/Modules/GetClosestVehicle/Shared.html | 4 +- ox_lib/Modules/GetNearbyObjects/Shared.html | 4 +- ox_lib/Modules/GetNearbyPeds/Shared.html | 4 +- ox_lib/Modules/GetNearbyPlayers/Shared.html | 4 +- ox_lib/Modules/GetNearbyVehicles/Shared.html | 4 +- ox_lib/Modules/Interface.html | 4 +- ox_lib/Modules/Interface/Client/alert.html | 4 +- .../Modules/Interface/Client/clipboard.html | 4 +- ox_lib/Modules/Interface/Client/context.html | 4 +- ox_lib/Modules/Interface/Client/input.html | 4 +- ox_lib/Modules/Interface/Client/menu.html | 4 +- ox_lib/Modules/Interface/Client/notify.html | 4 +- ox_lib/Modules/Interface/Client/progress.html | 4 +- ox_lib/Modules/Interface/Client/radial.html | 4 +- .../Modules/Interface/Client/skillcheck.html | 4 +- ox_lib/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 +- ox_lib/Modules/Math/Shared.html | 4 +- ox_lib/Modules/Points/JavaScript/Client.html | 4 +- ox_lib/Modules/Points/Lua/Client.html | 4 +- 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 +- ox_lib/Modules/Table/Shared.html | 4 +- ox_lib/Modules/Timer/Shared.html | 4 +- ox_lib/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 +- ox_lib/Modules/Zones/Shared.html | 4 +- ox_target.html | 4 +- ox_target/Functions/Client.html | 4 +- ox_target/TargetOptions.html | 4 +- oxmysql.html | 4 +- oxmysql/Functions/insert.html | 4 +- oxmysql/Functions/prepare.html | 4 +- oxmysql/Functions/query.html | 4 +- oxmysql/Functions/rawExecute.html | 4 +- oxmysql/Functions/scalar.html | 4 +- oxmysql/Functions/single.html | 4 +- oxmysql/Functions/transaction.html | 4 +- oxmysql/Functions/update.html | 4 +- oxmysql/benchmark.html | 4 +- oxmysql/placeholders.html | 4 +- oxmysql/ui.html | 4 +- sitemap.xml | 214 +++++++++--------- 224 files changed, 458 insertions(+), 455 deletions(-) delete mode 100644 _next/static/Eltl1YDebRayaJ_4oJXF4/_buildManifest.js delete mode 100644 _next/static/chunks/pages/_app-0d068649b5247eac.js create mode 100644 _next/static/chunks/pages/_app-832d484d2b5d7403.js rename _next/static/chunks/pages/{guides-329c9779c8c0c714.js => guides-0554132321698319.js} (95%) rename _next/static/chunks/pages/guides/{git-94ad0aacf252bd40.js => git-f61cc489918d5fe9.js} (96%) rename _next/static/chunks/pages/guides/{nodejs-8ca8d2e91e835e3d.js => nodejs-6daa6f967033422f.js} (96%) rename _next/static/chunks/pages/guides/{pnpm-fd5598aebd229f20.js => pnpm-d60d59534ec903fe.js} (98%) rename _next/static/chunks/pages/guides/{types-36f67a0737c51140.js => types-fa5fe5d1ee308bea.js} (96%) rename _next/static/chunks/pages/guides/{vscode-3831aa770a7135ec.js => vscode-a6f407eb046a7fa4.js} (99%) rename _next/static/chunks/pages/{index-3c9cd1221c8894fb.js => index-711b79d226390d26.js} (99%) rename _next/static/chunks/pages/{ox_core-108ba824185479a8.js => ox_core-87d0fc2a5c42bbe0.js} (99%) rename _next/static/chunks/pages/ox_core/Classes/Client/{OxPlayer-f3116e3ad7e2a4cf.js => OxPlayer-b262ef5e6401be98.js} (99%) rename _next/static/chunks/pages/ox_core/Classes/Server/{OxAccount-4898f2d8cabeab4e.js => OxAccount-6e09273994e9cb78.js} (99%) rename _next/static/chunks/pages/ox_core/Classes/Server/{OxPlayer-82dedcc8e1106c18.js => OxPlayer-2fe4018bc4600939.js} (99%) rename _next/static/chunks/pages/ox_core/Classes/Server/{OxVehicle-295fa2ed98fef1ea.js => OxVehicle-dc0b72c495905e06.js} (99%) rename _next/static/chunks/pages/ox_core/Events/{client-035c638855b27aab.js => client-74e885b2ac7d8a2b.js} (99%) rename _next/static/chunks/pages/ox_core/Events/{server-b0faf628678eaa77.js => server-480535e95a4df78d.js} (99%) rename _next/static/chunks/pages/ox_core/Functions/{common-d075b00e8d468fd0.js => common-3f89be5210cfbdd7.js} (98%) rename _next/static/chunks/pages/ox_core/Functions/{server-43269bb25b660c1f.js => server-e3465ceb0283f840.js} (99%) rename _next/static/chunks/pages/{ox_doorlock-df84c8b5dcd807e6.js => ox_doorlock-13d0ea7f46f69ff7.js} (99%) rename _next/static/chunks/pages/ox_doorlock/Client/{functions-6e25337d179bd666.js => functions-9de093007bdca9db.js} (98%) rename _next/static/chunks/pages/ox_doorlock/Server/{events-439e298e45f4a012.js => events-a95fe0c1308e29c4.js} (98%) rename _next/static/chunks/pages/ox_doorlock/Server/{functions-8a7b52fdd24c6d18.js => functions-33c97b8d95457bba.js} (98%) rename _next/static/chunks/pages/ox_doorlock/{settings-9ada40a55ae8ac92.js => settings-45183d6697da2113.js} (98%) rename _next/static/chunks/pages/{ox_fuel-15b1bdac605e7d10.js => ox_fuel-e8700659d32d9a76.js} (99%) rename _next/static/chunks/pages/ox_fuel/Client/{functions-8fe513c1a7af9b4e.js => functions-1bdb435f9a39aa86.js} (98%) rename _next/static/chunks/pages/ox_fuel/Server/{functions-74208eacf2d3db46.js => functions-1622d7c7c0653801.js} (98%) rename _next/static/chunks/pages/ox_fuel/{Shared-4b14711ef15f011b.js => Shared-e079809618e90f17.js} (97%) rename _next/static/chunks/pages/{ox_inventory-7242e58270de617a.js => ox_inventory-b8adb6c25b32c89b.js} (99%) rename _next/static/chunks/pages/ox_inventory/Events/{Client-6d191f4fd5b0695d.js => Client-01c12f568d572be2.js} (99%) rename _next/static/chunks/pages/ox_inventory/Events/{Server-39c569855742d6b3.js => Server-9d8d599687bf5ad6.js} (99%) rename _next/static/chunks/pages/ox_inventory/Frameworks/{esx-547e5c4b61a08f49.js => esx-a430f754ebd7ca77.js} (99%) rename _next/static/chunks/pages/ox_inventory/Frameworks/{qbx-735fee7334f39418.js => qbx-db81eecf233fcad1.js} (97%) rename _next/static/chunks/pages/ox_inventory/Functions/{Client-5825a1aaa21caacd.js => Client-775b0cd78ca5f341.js} (99%) rename _next/static/chunks/pages/ox_inventory/Functions/{Server-3ef642b15b57ba85.js => Server-a8810716c65673f1.js} (99%) rename _next/static/chunks/pages/ox_inventory/Functions/Server/{Hooks-e33828bb5b7b2c65.js => Hooks-500b05172c446ce6.js} (99%) rename _next/static/chunks/pages/ox_inventory/Guides/{crafting-91bc2efc48666447.js => crafting-e4072eb7c4f14ae1.js} (99%) rename _next/static/chunks/pages/ox_inventory/Guides/{creatingItems-40343832770dcfcf.js => creatingItems-9d25936877eb92e4.js} (99%) rename _next/static/chunks/pages/ox_inventory/Guides/{metadata-cb764dca16bb0c2a.js => metadata-ae8916aec3f22034.js} (99%) rename _next/static/chunks/pages/ox_inventory/Guides/{shops-8b15351020f21e0c.js => shops-8a5833404bbc016d.js} (99%) rename _next/static/chunks/pages/ox_inventory/Guides/{stashes-a690c23545ef6808.js => stashes-ab92bec26a9cc052.js} (99%) rename _next/static/chunks/pages/ox_inventory/{issues-a5bacbc42f77e868.js => issues-9e19185f6cb1fb6a.js} (98%) rename _next/static/chunks/pages/{ox_lib-ba30b2f596395dae.js => ox_lib-2aa8f6b11f50a5b3.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/ACL/{Server-d311492c25c03652.js => Server-dafffbeef7f1bd76.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/AddCommand/{Server-3b4a9d1921a625b4.js => Server-9e9e3936c0b4618e.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/AddKeybind/{Client-dc1c4938c8d88d5f.js => Client-9cda8a73e80a6dc0.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Array/{Shared-3aa1996ac924086b.js => Shared-46989929334a032c.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Cache/{Client-f169e74f523055e3.js => Client-edd76a6660c73743.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Cache/{Shared-cbb86bfe936ec745.js => Shared-0ff60fb35dac66af.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/{Client-80bbb5ea583d7952.js => Client-04b4da5fde84e12e.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/{Server-8afb49ef4412af9c.js => Server-b1b1ba0aa2dce7dd.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/{Client-460b145918854fa4.js => Client-a9a8efd3b2c42270.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/{Server-7a5d815a020f2f8b.js => Server-ace556f325f19e92.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Class/{Shared-ae69bcea5be7019b.js => Shared-df0b14cbf61ed323.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Cron/{Server-c50d5670a7bb82fb.js => Server-843c04f1b3e07755.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/DisableControls/{Client-d80e6782c5843980.js => Client-c3af78c8ad7d3bf6.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/{Client-ac574f7fb8734f9f.js => Client-aab1cb51a6f3058c.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Dui/Lua/{Client-73d3ed4dd71c9f2b.js => Client-efed75f97508feab.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/GetClosestObject/{Shared-f5839256ddd918bd.js => Shared-d70aa7d07fd736c4.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetClosestPed/{Shared-832f7d975e7a167e.js => Shared-e1d5e0468fb6d1e7.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/{Shared-d5c47eb142210baa.js => Shared-7c4e8a8ac1dad1ab.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/{Shared-5e73b0f2e3606dda.js => Shared-0c9d39ba098e6576.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/{Shared-fa2fbb81a8edf68f.js => Shared-a4069cf31d2b9407.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/{Shared-99aa7025bc337722.js => Shared-b14af4a9197451e5.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/{Shared-5ba68fa66bcfe56d.js => Shared-a18073bf2185123f.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/{Shared-22e4892748217575.js => Shared-dd70d17ae5bf8017.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/{Interface-e80684bd007c1cfd.js => Interface-45cca23f1617ebd9.js} (97%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{alert-0736acb1ed68e5a4.js => alert-a23809f4eb39c2fc.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{clipboard-49a677233f41316c.js => clipboard-6178a317e100e8df.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{context-061d724d33dcc9d7.js => context-5b0bb1887f6a3dfd.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{input-4a74e0e55ff7e149.js => input-e4a973edff4bc121.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{menu-05b42d89e7713b0f.js => menu-17f5923483c99241.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{notify-67807ffecc1febbb.js => notify-8474c3648fba790e.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{progress-e8e5a4385aa9f4a2.js => progress-82b0faf107c936ce.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{radial-02d871e17f91346e.js => radial-e3ced883e64d7800.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{skillcheck-0682e5376a104c60.js => skillcheck-19eea89a1006338d.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Interface/Client/{textui-2823bf7011716f5d.js => textui-4707a2e915ef84ba.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Locale/{Shared-c8e3d3a57ebb6c5c.js => Shared-9ab66c2dc0acc516.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Logger/{Server-c887360a73e245e9.js => Server-d053df161a2fceee.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Marker/{Client-b26c5323947471c3.js => Client-5c7da1401ef85208.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Math/{Shared-2afe9ad4093c7d64.js => Shared-95fd6d58ed9c4b08.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/{Client-9a02741360e1a6f4.js => Client-554183eb0ec80783.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Points/Lua/{Client-5c9b26f9ca3c61ba.js => Client-864c82af26aa22c5.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Print/{Shared-d6db7452a1d7b68f.js => Shared-451f227690360adc.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Raycast/{Client-55047fbd72e5dd7c.js => Client-b940a4ee574cc4e0.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Require/{Shared-982715eaa77ec55b.js => Shared-c45851c3368ab813.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Streaming/{Client-5eb19c6c0b811475.js => Client-46f1398917dc59fd.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/String/{Shared-ea16e9201376b385.js => Shared-4d2cf6ff6bcd9392.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/Table/{Shared-97bc31e1b41ebc8f.js => Shared-055d8f70811b6ced.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Timer/{Shared-0ca259aa7506f805.js => Shared-216b6e5016c7ccff.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/VehicleProperties/{Client-9b91f57db4f28264.js => Client-b1ba91ed7e331200.js} (99%) rename _next/static/chunks/pages/ox_lib/Modules/Version/{Server-4dd5f0f50a365112.js => Server-0c2541409379c601.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/Version/{Shared-0df296cab3aeaf8f.js => Shared-5ae5ea0c9b40e27c.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/WaitFor/{Shared-f14a994ac8037bb1.js => Shared-b94f7770803fdbd3.js} (98%) rename _next/static/chunks/pages/ox_lib/Modules/Zones/{Shared-035e56cd6699b7a7.js => Shared-a4b6c21d153dbe05.js} (99%) rename _next/static/chunks/pages/{ox_target-5f6d5e7e27569924.js => ox_target-fc8f48ceae6e22df.js} (99%) rename _next/static/chunks/pages/ox_target/Functions/{Client-3a9a3f3227c80543.js => Client-b07ea9f5607f2a9d.js} (99%) rename _next/static/chunks/pages/ox_target/{TargetOptions-37c57e7c0abf5083.js => TargetOptions-c8d7f28475b6b91f.js} (99%) rename _next/static/chunks/pages/{oxmysql-98786afa1a1070e2.js => oxmysql-675d990728d616e7.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{insert-d56f7d5a70b20321.js => insert-d7416eb5acb2ce44.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{prepare-ca09475ae583968b.js => prepare-0c67598fd38072cb.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{query-db4bb5ed65fa34d2.js => query-dd6be384c9a87851.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{rawExecute-0ec1f1a7b98a565d.js => rawExecute-5d2c65791cb88ca7.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{scalar-fbe9aee005fcfe3e.js => scalar-0a86b75e937efa0c.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{single-d7ddd3f8f69c3f92.js => single-74f3cf11212b27a0.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{transaction-46722bf1ac361453.js => transaction-26fee29a6b762090.js} (99%) rename _next/static/chunks/pages/oxmysql/Functions/{update-a1a423a5f2a6e62a.js => update-951df841729e0a60.js} (98%) rename _next/static/chunks/pages/oxmysql/{benchmark-541a8ef482b3180c.js => benchmark-3f6fa6a22e39baa7.js} (99%) rename _next/static/chunks/pages/oxmysql/{placeholders-345946587ec29d85.js => placeholders-e4edfd6dba9e3655.js} (98%) rename _next/static/chunks/pages/oxmysql/{ui-f694988fae518f38.js => ui-fc82894a1d782e0a.js} (98%) delete mode 100644 _next/static/css/685730f9fa8dc1ed.css create mode 100644 _next/static/css/f4dd0062b25be451.css create mode 100644 _next/static/p-066_Cc34uP4vLflYhOc/_buildManifest.js rename _next/static/{Eltl1YDebRayaJ_4oJXF4 => p-066_Cc34uP4vLflYhOc}/_ssgManifest.js (100%) diff --git a/404.html b/404.html index db37369823..66244e8731 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -

404

Redirecting...

\ No newline at end of file +

404

Redirecting...

\ No newline at end of file diff --git a/_next/static/Eltl1YDebRayaJ_4oJXF4/_buildManifest.js b/_next/static/Eltl1YDebRayaJ_4oJXF4/_buildManifest.js deleted file mode 100644 index e3cf2d8160..0000000000 --- a/_next/static/Eltl1YDebRayaJ_4oJXF4/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-3c9cd1221c8894fb.js"],"/404":["static/chunks/pages/404-73a1ab73a8a1e327.js"],"/_error":["static/chunks/pages/_error-094bb0cfcf67c3f3.js"],"/guides":[e,"static/chunks/pages/guides-329c9779c8c0c714.js"],"/guides/git":[e,"static/chunks/pages/guides/git-94ad0aacf252bd40.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-8ca8d2e91e835e3d.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-fd5598aebd229f20.js"],"/guides/types":[e,"static/chunks/pages/guides/types-36f67a0737c51140.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-3831aa770a7135ec.js"],"/ox_core":[e,"static/chunks/pages/ox_core-108ba824185479a8.js"],"/ox_core/Classes/Client/OxPlayer":[e,"static/chunks/pages/ox_core/Classes/Client/OxPlayer-f3116e3ad7e2a4cf.js"],"/ox_core/Classes/Server/OxAccount":[e,"static/chunks/pages/ox_core/Classes/Server/OxAccount-4898f2d8cabeab4e.js"],"/ox_core/Classes/Server/OxPlayer":[e,"static/chunks/pages/ox_core/Classes/Server/OxPlayer-82dedcc8e1106c18.js"],"/ox_core/Classes/Server/OxVehicle":[e,"static/chunks/pages/ox_core/Classes/Server/OxVehicle-295fa2ed98fef1ea.js"],"/ox_core/Events/client":[e,"static/chunks/pages/ox_core/Events/client-035c638855b27aab.js"],"/ox_core/Events/server":[e,"static/chunks/pages/ox_core/Events/server-b0faf628678eaa77.js"],"/ox_core/Functions/common":[e,"static/chunks/pages/ox_core/Functions/common-d075b00e8d468fd0.js"],"/ox_core/Functions/server":[e,"static/chunks/pages/ox_core/Functions/server-43269bb25b660c1f.js"],"/ox_doorlock":[e,"static/chunks/pages/ox_doorlock-df84c8b5dcd807e6.js"],"/ox_doorlock/Client/functions":[e,"static/chunks/pages/ox_doorlock/Client/functions-6e25337d179bd666.js"],"/ox_doorlock/Server/events":[e,"static/chunks/pages/ox_doorlock/Server/events-439e298e45f4a012.js"],"/ox_doorlock/Server/functions":[e,"static/chunks/pages/ox_doorlock/Server/functions-8a7b52fdd24c6d18.js"],"/ox_doorlock/settings":[e,"static/chunks/pages/ox_doorlock/settings-9ada40a55ae8ac92.js"],"/ox_fuel":[e,"static/chunks/pages/ox_fuel-15b1bdac605e7d10.js"],"/ox_fuel/Client/functions":[e,"static/chunks/pages/ox_fuel/Client/functions-8fe513c1a7af9b4e.js"],"/ox_fuel/Server/functions":[e,"static/chunks/pages/ox_fuel/Server/functions-74208eacf2d3db46.js"],"/ox_fuel/Shared":[e,"static/chunks/pages/ox_fuel/Shared-4b14711ef15f011b.js"],"/ox_inventory":[e,"static/chunks/pages/ox_inventory-7242e58270de617a.js"],"/ox_inventory/Events/Client":[e,"static/chunks/pages/ox_inventory/Events/Client-6d191f4fd5b0695d.js"],"/ox_inventory/Events/Server":[e,"static/chunks/pages/ox_inventory/Events/Server-39c569855742d6b3.js"],"/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/ox_inventory/Frameworks/esx-547e5c4b61a08f49.js"],"/ox_inventory/Frameworks/qbx":[e,"static/chunks/pages/ox_inventory/Frameworks/qbx-735fee7334f39418.js"],"/ox_inventory/Functions/Client":[e,"static/chunks/pages/ox_inventory/Functions/Client-5825a1aaa21caacd.js"],"/ox_inventory/Functions/Server":[e,"static/chunks/pages/ox_inventory/Functions/Server-3ef642b15b57ba85.js"],"/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/ox_inventory/Functions/Server/Hooks-e33828bb5b7b2c65.js"],"/ox_inventory/Guides/crafting":[e,"static/chunks/pages/ox_inventory/Guides/crafting-91bc2efc48666447.js"],"/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/ox_inventory/Guides/creatingItems-40343832770dcfcf.js"],"/ox_inventory/Guides/metadata":[e,"static/chunks/pages/ox_inventory/Guides/metadata-cb764dca16bb0c2a.js"],"/ox_inventory/Guides/shops":[e,"static/chunks/pages/ox_inventory/Guides/shops-8b15351020f21e0c.js"],"/ox_inventory/Guides/stashes":[e,"static/chunks/pages/ox_inventory/Guides/stashes-a690c23545ef6808.js"],"/ox_inventory/issues":[e,"static/chunks/pages/ox_inventory/issues-a5bacbc42f77e868.js"],"/ox_lib":[e,"static/chunks/pages/ox_lib-ba30b2f596395dae.js"],"/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/ox_lib/Modules/ACL/Server-d311492c25c03652.js"],"/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/ox_lib/Modules/AddCommand/Server-3b4a9d1921a625b4.js"],"/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/ox_lib/Modules/AddKeybind/Client-dc1c4938c8d88d5f.js"],"/ox_lib/Modules/Array/Shared":[e,"static/chunks/pages/ox_lib/Modules/Array/Shared-3aa1996ac924086b.js"],"/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/ox_lib/Modules/Cache/Client-f169e74f523055e3.js"],"/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/ox_lib/Modules/Cache/Shared-cbb86bfe936ec745.js"],"/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-80bbb5ea583d7952.js"],"/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-8afb49ef4412af9c.js"],"/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-460b145918854fa4.js"],"/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-7a5d815a020f2f8b.js"],"/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/ox_lib/Modules/Class/Shared-ae69bcea5be7019b.js"],"/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/ox_lib/Modules/Cron/Server-c50d5670a7bb82fb.js"],"/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/ox_lib/Modules/DisableControls/Client-d80e6782c5843980.js"],"/ox_lib/Modules/Dui/Javascript/Client":[e,"static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-ac574f7fb8734f9f.js"],"/ox_lib/Modules/Dui/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-73d3ed4dd71c9f2b.js"],"/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-f5839256ddd918bd.js"],"/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-832f7d975e7a167e.js"],"/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d5c47eb142210baa.js"],"/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-5e73b0f2e3606dda.js"],"/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-fa2fbb81a8edf68f.js"],"/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-99aa7025bc337722.js"],"/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-5ba68fa66bcfe56d.js"],"/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-22e4892748217575.js"],"/ox_lib/Modules/Interface":[e,"static/chunks/pages/ox_lib/Modules/Interface-e80684bd007c1cfd.js"],"/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/alert-0736acb1ed68e5a4.js"],"/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-49a677233f41316c.js"],"/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/context-061d724d33dcc9d7.js"],"/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/input-4a74e0e55ff7e149.js"],"/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/menu-05b42d89e7713b0f.js"],"/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/notify-67807ffecc1febbb.js"],"/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/progress-e8e5a4385aa9f4a2.js"],"/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/radial-02d871e17f91346e.js"],"/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-0682e5376a104c60.js"],"/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/textui-2823bf7011716f5d.js"],"/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/ox_lib/Modules/Locale/Shared-c8e3d3a57ebb6c5c.js"],"/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/ox_lib/Modules/Logger/Server-c887360a73e245e9.js"],"/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/ox_lib/Modules/Marker/Client-b26c5323947471c3.js"],"/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/ox_lib/Modules/Math/Shared-2afe9ad4093c7d64.js"],"/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-9a02741360e1a6f4.js"],"/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/Lua/Client-5c9b26f9ca3c61ba.js"],"/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/ox_lib/Modules/Print/Shared-d6db7452a1d7b68f.js"],"/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/ox_lib/Modules/Raycast/Client-55047fbd72e5dd7c.js"],"/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/ox_lib/Modules/Require/Shared-982715eaa77ec55b.js"],"/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/ox_lib/Modules/Streaming/Client-5eb19c6c0b811475.js"],"/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/ox_lib/Modules/String/Shared-ea16e9201376b385.js"],"/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/ox_lib/Modules/Table/Shared-97bc31e1b41ebc8f.js"],"/ox_lib/Modules/Timer/Shared":[e,"static/chunks/pages/ox_lib/Modules/Timer/Shared-0ca259aa7506f805.js"],"/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-9b91f57db4f28264.js"],"/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/ox_lib/Modules/Version/Server-4dd5f0f50a365112.js"],"/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/ox_lib/Modules/Version/Shared-0df296cab3aeaf8f.js"],"/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/ox_lib/Modules/WaitFor/Shared-f14a994ac8037bb1.js"],"/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/ox_lib/Modules/Zones/Shared-035e56cd6699b7a7.js"],"/ox_target":[e,"static/chunks/pages/ox_target-5f6d5e7e27569924.js"],"/ox_target/Functions/Client":[e,"static/chunks/pages/ox_target/Functions/Client-3a9a3f3227c80543.js"],"/ox_target/TargetOptions":[e,"static/chunks/pages/ox_target/TargetOptions-37c57e7c0abf5083.js"],"/oxmysql":[e,"static/chunks/pages/oxmysql-98786afa1a1070e2.js"],"/oxmysql/Functions/insert":[e,"static/chunks/pages/oxmysql/Functions/insert-d56f7d5a70b20321.js"],"/oxmysql/Functions/prepare":[e,"static/chunks/pages/oxmysql/Functions/prepare-ca09475ae583968b.js"],"/oxmysql/Functions/query":[e,"static/chunks/pages/oxmysql/Functions/query-db4bb5ed65fa34d2.js"],"/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/oxmysql/Functions/rawExecute-0ec1f1a7b98a565d.js"],"/oxmysql/Functions/scalar":[e,"static/chunks/pages/oxmysql/Functions/scalar-fbe9aee005fcfe3e.js"],"/oxmysql/Functions/single":[e,"static/chunks/pages/oxmysql/Functions/single-d7ddd3f8f69c3f92.js"],"/oxmysql/Functions/transaction":[e,"static/chunks/pages/oxmysql/Functions/transaction-46722bf1ac361453.js"],"/oxmysql/Functions/update":[e,"static/chunks/pages/oxmysql/Functions/update-a1a423a5f2a6e62a.js"],"/oxmysql/benchmark":[e,"static/chunks/pages/oxmysql/benchmark-541a8ef482b3180c.js"],"/oxmysql/placeholders":[e,"static/chunks/pages/oxmysql/placeholders-345946587ec29d85.js"],"/oxmysql/ui":[e,"static/chunks/pages/oxmysql/ui-f694988fae518f38.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/ox_core","/ox_core/Classes/Client/OxPlayer","/ox_core/Classes/Server/OxAccount","/ox_core/Classes/Server/OxPlayer","/ox_core/Classes/Server/OxVehicle","/ox_core/Events/client","/ox_core/Events/server","/ox_core/Functions/common","/ox_core/Functions/server","/ox_doorlock","/ox_doorlock/Client/functions","/ox_doorlock/Server/events","/ox_doorlock/Server/functions","/ox_doorlock/settings","/ox_fuel","/ox_fuel/Client/functions","/ox_fuel/Server/functions","/ox_fuel/Shared","/ox_inventory","/ox_inventory/Events/Client","/ox_inventory/Events/Server","/ox_inventory/Frameworks/esx","/ox_inventory/Frameworks/qbx","/ox_inventory/Functions/Client","/ox_inventory/Functions/Server","/ox_inventory/Functions/Server/Hooks","/ox_inventory/Guides/crafting","/ox_inventory/Guides/creatingItems","/ox_inventory/Guides/metadata","/ox_inventory/Guides/shops","/ox_inventory/Guides/stashes","/ox_inventory/issues","/ox_lib","/ox_lib/Modules/ACL/Server","/ox_lib/Modules/AddCommand/Server","/ox_lib/Modules/AddKeybind/Client","/ox_lib/Modules/Array/Shared","/ox_lib/Modules/Cache/Client","/ox_lib/Modules/Cache/Shared","/ox_lib/Modules/Callback/JavaScript/Client","/ox_lib/Modules/Callback/JavaScript/Server","/ox_lib/Modules/Callback/Lua/Client","/ox_lib/Modules/Callback/Lua/Server","/ox_lib/Modules/Class/Shared","/ox_lib/Modules/Cron/Server","/ox_lib/Modules/DisableControls/Client","/ox_lib/Modules/Dui/Javascript/Client","/ox_lib/Modules/Dui/Lua/Client","/ox_lib/Modules/GetClosestObject/Shared","/ox_lib/Modules/GetClosestPed/Shared","/ox_lib/Modules/GetClosestPlayer/Shared","/ox_lib/Modules/GetClosestVehicle/Shared","/ox_lib/Modules/GetNearbyObjects/Shared","/ox_lib/Modules/GetNearbyPeds/Shared","/ox_lib/Modules/GetNearbyPlayers/Shared","/ox_lib/Modules/GetNearbyVehicles/Shared","/ox_lib/Modules/Interface","/ox_lib/Modules/Interface/Client/alert","/ox_lib/Modules/Interface/Client/clipboard","/ox_lib/Modules/Interface/Client/context","/ox_lib/Modules/Interface/Client/input","/ox_lib/Modules/Interface/Client/menu","/ox_lib/Modules/Interface/Client/notify","/ox_lib/Modules/Interface/Client/progress","/ox_lib/Modules/Interface/Client/radial","/ox_lib/Modules/Interface/Client/skillcheck","/ox_lib/Modules/Interface/Client/textui","/ox_lib/Modules/Locale/Shared","/ox_lib/Modules/Logger/Server","/ox_lib/Modules/Marker/Client","/ox_lib/Modules/Math/Shared","/ox_lib/Modules/Points/JavaScript/Client","/ox_lib/Modules/Points/Lua/Client","/ox_lib/Modules/Print/Shared","/ox_lib/Modules/Raycast/Client","/ox_lib/Modules/Require/Shared","/ox_lib/Modules/Streaming/Client","/ox_lib/Modules/String/Shared","/ox_lib/Modules/Table/Shared","/ox_lib/Modules/Timer/Shared","/ox_lib/Modules/VehicleProperties/Client","/ox_lib/Modules/Version/Server","/ox_lib/Modules/Version/Shared","/ox_lib/Modules/WaitFor/Shared","/ox_lib/Modules/Zones/Shared","/ox_target","/ox_target/Functions/Client","/ox_target/TargetOptions","/oxmysql","/oxmysql/Functions/insert","/oxmysql/Functions/prepare","/oxmysql/Functions/query","/oxmysql/Functions/rawExecute","/oxmysql/Functions/scalar","/oxmysql/Functions/single","/oxmysql/Functions/transaction","/oxmysql/Functions/update","/oxmysql/benchmark","/oxmysql/placeholders","/oxmysql/ui"]}}("static/chunks/2601-a643f2bef9ecb8af.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index b3b227045f..c3f26bae0e 100644 --- a/_next/static/chunks/nextra-data-en-US.json +++ b/_next/static/chunks/nextra-data-en-US.json @@ -1 +1 @@ -{"/guides":{"title":"Guides","data":{"":"General guides for working with Overextended resources.\nGit\nNodeJS\nPNPM\nOx Types\nVisual Studio Code"}},"/guides/git":{"title":"Git","data":{"":"Git is a version control system, allowing changes to be effectively tracked, merged, and reverted.As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data.\nRefer to GitHub's guide to setting up Git.\nYou can use a Git GUI client like GitKraken to improve your workflow and more easily maintain changes."}},"/guides/pnpm":{"title":"pnpm","data":{"":"pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn.\nEnsure you have installed Node.js.\nOpen a command-line terminal (e.g. Terminal, Command Prompt).\nEnter npm install -g pnpm to globally install the package.\nYou can install dependencies with pnpm using pnpm i.\nYou can reference package.json files for available scripts, i.e.\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},\nUsing the example above pnpm build will run the build script for the given package."}},"/guides/types":{"title":"Types","data":{"setup-git-vscode-and-vscode-extensions#Setup git, vscode, and vscode extensions":"","download-our-lua-type-definitions#Download our Lua type definitions":"git clone https://github.com/overextended/ox_types.git`","update-your-settings#Update your settings":"You can modify the user, workspace, or folder settings for vscode.\nCreate an entry in Lua.workspace.library pointing to the cloned directory, or specific subdirectories.\n\"Lua.workspace.library\": [\n \"F:/GitHub/ox_types/types\",\n \"F:/GitHub/ox_lib\"\n],"}},"/":{"title":"Introduction","data":{"":"Here you can find all of the official documentation for resources developed by the Overextended team.If you feel like the documentation is lacking in some department then feel free to go onto that page and click the \"Edit this page\" at the bottom and submit a Pull Request.","support-our-team#Support our team":"We enjoy being able to create and share free and open-source work, but they often require considerable time and effort to maintain and support.If you frequently use our resources and love what we do, consider supporting us so we can continue our work.","fivemanage#Fivemanage":"Fivemanage is a cloud management service tailored for game servers, offering a range of features to facilitate easier management and administration of your FiveM server.Their services includes a free plan with limited media storage space, along with several paid plans designed to accommodate larger servers requiring more extensive storage and logging capabilities.Get started with Fivemanage and use code OX10 for 10% off your subscription - forever!","creator-codes#Creator codes":"Creator codes allow Tebex stores to share a percentage of a purchase with us, while giving a discount to the customer. We make these deals to advertise trusted creators who meet our criteria.\nResources are highly configurable or, preferably, source-available.\nWe trust that customers will be given assistance.\nThe creator is a known member of our community.\nMore information about these creators is available in our Discord.You can apply a creator code at checkout under \"Support A Creator\"."}},"/ox_core":{"title":"Ox Core","data":{"":"A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities.","txadmin-recipe#txAdmin recipe":"If you're looking to quickly install and setup ox_core, try using our recipe.","installation#Installation":"We strongly recommend referring to Guides to setup necessary development tools.","install-all-resource-dependencies#Install all resource dependencies.":"oxmysql\nox_lib","download-the-latest-release-or-build-the-source-code#Download the latest release or build the source code.":"Setup Git, Node.js, and pnpm.\nDownload and setup MariaDB 11.4+.\nRun the following commands in your CLI (e.g. Terminal, Command Prompt).\ngit clone https://github.com/overextended/ox_core.git\ncd ox_core\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't strictly required, but they are strongly recommended.\nox_inventory\nnpwd\nillenium-appearance","using-ox_core-in-your-resources#Using ox_core in your resources":"","lua#Lua":"You can import ox_core definitions by loading @ox_core/lib/init.lua into your resource.\nThis can be a client_script or server_script, if preferred.\nshared_script '@ox_core/lib/init.lua'\nIf you prefer, you can use our require function from ox_lib.\nlocal Ox = require '@ox_core/lib/init'","javascript#JavaScript":"To use ox_core with your JavaScript resources you'll need to use our npm package, providing full support for TypeScript and Intellisense.\nTo get started, try our fivem-typescript-boilerplate and install the ox_core package.\npnpm i @overextended/ox_core","config#Config":"Resource configuration is handled using convars.","replicated#Replicated":"These convars should use the setr command to be read by clients.\nox:debug\nDefault: false\nEnables debug messages and commands. Enabled by default when using pnpm watch.\nox:characterSlots\nDefault: 1\nSets the number of character slots available for character selection resources (e.g. ox_charselect).\nox:plateFormat\nDefault: \"........\"\nSee SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN.\nox:deathSystem\nDefault: true\nEnables the built-in death and respawn system.\nox:characterSelect\nDefault: true\nEnables built-in character registration, and uses uses that character when joining.\nox:spawnLocation\nDefault: [-258.211, -293.077, 21.6132, 206.0]\nSets the default spawn location for newly created characters."}},"/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"}},"/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'"}},"/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"}},"/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)"}},"/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"}},"/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)"}},"/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"}},"/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"}},"/ox_doorlock":{"title":"Ox Doorlock","data":{"":"A door management resource that can be used standalone or alongside 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.":"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_doorlock.git\ncd ox_doorlock/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_target","opening-the-ui#Opening the UI":"If you have installed and started the resource, you can use /doorlock to open the UI.\nIf the cursor is displayed but not the UI then you have not built it.\nYou may not be authorised to use the command.\nEnter test_ace player.1 command.doorlock in the server console (replace 1 with your server id).","convert-doors#Convert doors":"Door configuration files written for nui_doorlock can be automatically added to your MySQL database.\nAny files with the .lua extension placed in the ox_doorlock/convert directory will be read on resource start.\nIf the directory doesn't exist, you can create it.\nConversion cannot be guaranteed, especially if the config was not written for nui_doorlock.","adding-new-native-audio#Adding new native audio":"A guide can be found here for adding new native audio."}},"/ox_doorlock/Server/events":{"title":"Events","data":{"handlers#Handlers":"These events should not be triggered by any other scripts.","ox_doorlockstatechanged#ox_doorlock:stateChanged":"Triggered when a doors state is updated.\nAddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)\nsource: number or nil\ndoorId: number\nstate: boolean\nusedItem: string or false or nil"}},"/ox_doorlock/Client/functions":{"title":"Functions","data":{"pickclosestdoor#pickClosestDoor":"Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail.\nexports.ox_doorlock:pickClosestDoor()","useclosestdoor#useClosestDoor":"Interact with the closest door. Dependant on server-side checks and may fail.\nexports.ox_doorlock:useClosestDoor()","getclosestdoor#getClosestDoor":"Returns the closest door.\nexports.ox_doorlock:getClosestDoor()\nReturn:\ndoor: number"}},"/ox_doorlock/settings":{"title":"Door Settings","data":{"general#General":"Door name\nUsed to easily identify the door.\nPasscode\nDoor can be unlocked by anybody by using the code or phrase.\nAutolock interval\nDoor will be locked after x seconds.\nInteract distance\nDoor can only be used when within x metres.\nDoor rate\nDoor movement speed for sliding/garage/automatic doors, or swinging doors when locked.\nLocked\nSets the door as locked by default.\nDouble\nDoor is a set of two doors, controlled together.\nAutomatic\nSliding/garage/automatic door.\nLockpick\nDoor can be lockpicked when interacting with a targeting resource.\nHide UI\nNo indicators (i.e. icon, text) will display on the door.\nHold Open\nHolds the door open while unlocked.","characters#Characters":"Character Id\nCharacter identifier used by a framework (i.e. player.charid, xPlayer.identifier, Player.CitizenId).","groups#Groups":"Group\nFramework dependent, referring to jobs, gangs, etc.\nGrade\nThe minimum grade to allow access for the group (0 to allow all).","items#Items":"Item\nName of the item.\nMetadata type\nRequires metadata support (i.e. ox_inventory) to check slot.metadata.type.\nRemove on use\nRemoves the item after interacting with the door.","lockpick#Lockpick":"Difficulty\nSets the skillcheck difficulty (see docs).\nArea size\nCustom difficulty area size in degrees.\nSpeed multiplier\nCustom difficulty idicator speed multipier.","sound#Sound":"Lock sound\nSound to play on door lock.\nUnlock sound\nSound to play on door unlock.\nNote: Sounds are stored in the ./web/public/sounds directory."}},"/ox_doorlock/Server/functions":{"title":"Functions","data":{"":"Gets data for a door with the given id, matching the id for the database entry.","getdoor#getDoor":"exports.ox_doorlock:getDoor(doorId)\nGets data for a door with the given id, matching the id for the database entry.\nid: number\nReturn:\ndoor: table","getdoorfromname#getDoorFromName":"exports.ox_doorlock:getDoorFromName(name)\nGets data for a door with the given name, matching the name for the database entry.\nname: string\nReturn:\ndoor: table","editdoor#editDoor":"exports.ox_doorlock:editDoor(doorId, data)\nEdit configuration for the given doorId.\ndoorId: number\ndata: table","setdoorstate#setDoorState":"exports.ox_doorlock:setDoorState(doorId, state)\nSets a door with the given doorId as locked if state is true or 1.\ndoorId: number\nstate: 0 or 1 or boolean"}},"/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"}},"/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)"}},"/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)"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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."}},"/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"}},"/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))"}},"/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"}},"/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"}},"/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})"}},"/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})"}},"/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:"}},"/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."}},"/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."}},"/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"}},"/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)"}},"/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"}},"/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});"}},"/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"}},"/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"}},"/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);"}},"/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)"}},"/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);"}},"/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)"}},"/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)"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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 }[]"}},"/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 }[]"}},"/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 }[]"}},"/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 }[]"}},"/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."}},"/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);"}},"/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"}},"/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."}},"/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]);"}},"/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});"}},"/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()"}},"/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);"}},"/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);"}},"/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])"}},"/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});"}},"/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"}},"/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\""}},"/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({\r\n\ttype = 1,\r\n\tcoords = GetEntityCoords(cache.ped),\r\n\tcolor = { r = 255, g = 0, b = 0, a = 200 },\r\n})\r\n\r\nCitizen.CreateThread(function()\r\n\twhile true do\r\n\t\tmarker:draw()\r\n\r\n\t\tCitizen.Wait(1)\r\n\tend\r\nend)","interactive-example#Interactive Example":"local center = vec3(430.452759, -1026.108032, 27.846140)\r\nlocal uiText = \"Press [E] to get notified\"\r\n\r\nlocal point = lib.points.new({\r\n coords = center,\r\n distance = 20,\r\n})\r\n\r\nlocal marker = lib.marker.new({\r\n coords = center,\r\n type = 1,\r\n})\r\n\r\nfunction point:nearby()\r\n marker:draw()\r\n\r\n if self.currentDistance < 1.5 then\r\n if not lib.isTextUIOpen() then\r\n lib.showTextUI(\"Press [E] to get notified\")\r\n end\r\n\r\n if IsControlJustPressed(0, 51) then\r\n lib.notify({\r\n description = \"Hello, World!\"\r\n })\r\n end\r\n else\r\n local isOpen, currentText = lib.isTextUIOpen()\r\n if isOpen and currentText == uiText then\r\n lib.hideTextUI()\r\n end\r\n end\r\nend"}},"/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"}},"/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}"}},"/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"}},"/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: \"\""}},"/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!"}},"/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}"}},"/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"}},"/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"}},"/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"}},"/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)"}},"/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"}},"/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')"}},"/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()"}},"/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)"}},"/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})"}},"/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"}},"/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."}},"/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."}},"/oxmysql":{"title":"OxMySQL","data":{"":"A replacement of mysql-async and ghmattimysql with expanded API and improved compatibility for MySQL 8.","mysql-or-mariadb#MySQL or MariaDB?":"Most resources for FiveM were designed to be used with MySQL 5.7 and may hit compatibility issues when using MySQL 8, i.e.\nMore reserved keywords, like 'stored' and 'group'.\nLongtext / JSON fields do not support default values.\nMariaDB is highly recommended for compatibility, and improved performance (over all versions of MySQL).","should-i-use-xampp#Should I use XAMPP?":"No. XAMPP is a webserver stack intended to be used for development, allowing easy local development and testing.\nDo not setup XAMPP just to run your database, and install MariaDB directly instead.","installation#Installation":"","download-and-install-mariadb#Download and install MariaDB":"","download-the-latest-release-of-oxmysql#Download the latest release of oxmysql":"","configure-your-server#Configure your server":"Open your server configuration file.\nAdd start oxmysql to the top of your resource list.\nConfigure your mysql connection string and set it before starting any resources.\n# Use your preferred format. Make sure you only ever use 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\"\nCertain special characters are reserved or unsupported depending on your connection string.\nAvoid using these characters ; , / ? : @ & = + $ #, and try swapping connection string format.","slow-query-warnings#Slow query warnings":"You will receive warnings if a query took a long time to complete, configurable with a convar.\nQuery time may not be entirely accurate.\nSlow queries may not indicate a database issue (e.g. server hitches).\nSlow queries on server startup are not necessarily problematic.\nset mysql_slow_query_warning 150","debug#Debug":"Enabling the debug option will print all queries in the server console; you can also use an array to only print from a list of resources instead.\nset mysql_debug true\nset mysql_debug [\n \"ox_core\",\n \"ox_inventory\"\n]\nYou can temporarily modify the resource list with commands.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","compatibility#Compatibility":"You can delete the following resources and allow oxmysql to provide their functionality.\nmysql-async\nghmattimysql","usage#Usage":"Resources can import oxmysql methods by including our library, granting some type-checking and minor performance improvements over raw export calls.","lua#Lua":"Modify fxmanifest.lua for your resource, and add the following above any other script files.\nserver_script '@oxmysql/lib/MySQL.lua'","javascript#JavaScript":"You can use raw exports, or install our npm package for intellisense and similar usage as Lua.\n# With pnpm\npnpm add @overextended/oxmysql\n# With Yarn\nyarn add @overextended/oxmysql\n# With npm\nnpm install @overextended/oxmysql\nImport the oxmysql object into your resource.\nimport { oxmysql as MySQL } from '@overextended/oxmysql';","upserting#Upserting":"When uncertain if a row should be inserted into the database, or an existing row should be updated, queries should check for duplicate keys.\nMySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })\nThis is preferred over checking the existence of a row, then inserting or updating depending on the result.\nFurthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted."}},"/oxmysql/Functions/insert":{"title":"insert","data":{"":"Inserts a new entry into the database and returns the insert id for the row, if valid.","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"}},"/oxmysql/Functions/prepare":{"title":"prepare","data":{"":"Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.\nDate will not return the datestring commonly used in FiveM\nTINYINT 1 and BIT will not return a boolean\nYou can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error\nUnlike rawExecute, the SELECT statement will return a column, row, or array of rows depending on the number of columns and rows selected.","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"}},"/oxmysql/Functions/query":{"title":"query","data":{"":"When selecting data, returns all matching rows and columns; otherwise, returns data like 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"}},"/oxmysql/Functions/transaction":{"title":"transaction","data":{"":"A transaction executes multiple queries and commits them only if all succeed.\nIf one fails, none of the queries are committed.The return value is a boolean, which is the result of the transaction.","specific-format#Specific format":"When using this format, you must pass an array containing sets of queries and parameters to the transaction method.\nIn this case, your queries do not necessarily match and the values are unique to each query.\n-- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\nlocal queries = {\n { query = 'INSERT INTO `test` (id) VALUES (?)', values = { 1 }},\n { query = 'INSERT INTO `test` (id, name) VALUES (?, ?)', values = { 2, 'bob' }},\n}\n-- You can also pass an array of arrays.\nlocal queries = {\n { 'INSERT INTO `test` (id) VALUES (?)', { 1 } },\n { 'INSERT INTO `test` (id, name) VALUES (?, ?)', { 2, 'bob' } },\n}","shared-format#Shared format":"When using this format, you must pass an array containing queries and a set containing shared parameters to the transaction method.\nIn this case, your queries do not necessarily match and the values are unique to each query.\n-- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\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 --[[leave nil for specific format]])\nprint(success)\nconst success = await MySQL.transaction(queries, values /*leave nil for specific format*/)\nconsole.log(success)\nAliases\nMySQL.Sync.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction_async","callback#Callback":"-- specific\nMySQL.transaction(queries, values, function(success)\n print(success)\nend)\n-- shared\nMySQL.transaction(queries, function(success)\n print(success)\nend)\n// specific\nMySQL.transaction(queries, (success) => {\n console.log(success)\n})\n// shared\nMySQL.transaction(queries, values, (success) => {\n console.log(success)\n})\nAliases\nMySQL.Async.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction","transaction-isolation-level#Transaction Isolation Level":"This can be set through the convar mysql_transaction_isolation_level, and is an integer ranging from 1-4.\nThe default value is 2.\nConvar Value\tResult\t1\tRepeatable Read\t2\tRead Committed\t3\tRead Uncommitted\t4\tSerializable"}},"/oxmysql/Functions/single":{"title":"single","data":{"":"Returns all selected columns for a single row.","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"}},"/oxmysql/Functions/update":{"title":"update","data":{"":"Returns the number of rows affected by the query.","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"}},"/oxmysql/placeholders":{"title":"Placeholders","data":{"":"Placeholders allow for query parameters to be safely executed, preventing common SQL injection methods.Parameters can be passed an an array or object (referred to as named parameters).\nlocal identifier = 'license:abc123'\nlocal group = 'admin'\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?', { identifier, group })\n-- Named placeholders (deprecated)\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group', {\n group = group\n identifier = identifier\n})\nThese are distinct from prepared statements which are handled by the MySQL server; you can use MySQL.prepare for more optimised and secure queries."}},"/oxmysql/Functions/rawExecute":{"title":"rawExecute","data":{"":"rawExecute can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.\nDate will not return the datestring commonly used in FiveM\nTINYINT 1 and BIT will not return a boolean\nYou can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error\nUnlike prepare, the SELECT statement will always return an array of rows.\nWhen using SELECT, the return value will match query, single, or scalar depending on the number of columns and rows selected.","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"}},"/oxmysql/ui":{"title":"Using the Debug UI","data":{"":"The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics.\nYou should only enable this during development, or with a small player count - for larger servers, look into builtin MySQL logging.Before using the UI first you have to make sure you have the mysql_ui convar set to true:\nset mysql_ui true\nAlso make sure that you have command or command.mysql ace permission access, then you should be able to use the mysql command in game.\nYou do not need to have the mysql_debug enabled to use the debug ui.","main-page#Main page":"The main page shows you the resources that ran queries where you can filter them through a search bar, your general data\nalong side a pie chart which shows what resources took the most query time.","resource-page#Resource page":"The resource page shows you all the queries and their execution time inside a table that the resource previously ran,\nalongside the total amount of the queries, execution time and slow queries for the selected resource.Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip.\nQueries that exceed mysql_slow_query_warning (default 150ms) are displayed in orange.\nFor demonstation purposes the mysql_slow_query_warning convar was set to 5 here."}},"/guides/nodejs":{"title":"Node.js","data":{"":"Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client.\nDownload and install the LTS version of Node.js.\nOpen a command-line terminal (e.g. Terminal, Command Prompt).\nEnter node --version to confirm successful installation."}},"/guides/vscode":{"title":"VS Code","data":{"":"Visual Studio Code is our recommended editor when working with Lua.","recommended-extensions#Recommended extensions":"Extensions let you add languages, debuggers, and other tools to VS Code - improving your developer experience.","sumnekolua#sumneko.lua":"Lua Language Server provides numerous language features to make development easier and faster, e.g.\nAnnotations\nAutocompletion\nCode formatting\nDiagnostics/warnings\nDynamic type checking\nSyntax checking","overextendedcfxlua-vscode#overextended.cfxlua-vscode":"Works alongside Lua Language Server to provide function and type declarations from Cfx's Lua runtime, Lua dialect, environment globals, and game natives."}},"/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})"}},"/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()"}},"/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()"}},"/oxmysql/Functions/scalar":{"title":"scalar","data":{"":"Returns the first column for a single row.","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"}},"/oxmysql/benchmark":{"title":"Benchmark","data":{"":"Benchmarking is based on the time spent when to receive a response from exports.\nReal query speeds will be reported in the debug UI and in the server console with mysql_debug enabled.Speeds will vary greatly based on system hardware, database settings, database version, and the current workload.","script#Script":"This script tests export times when using the Lua 5.4 runtime with lib/MySQL.lua syntax.\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('Executed ' .. (type(query) == 'string' and 1 or #query) .. ' queries in ' .. (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('initialise test_table', MySQL.transaction.await, initTable)\n -- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\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 }[] transaction', MySQL.transaction.await, queries)\n -- You can pass an array of arrays.\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[]][] transaction', MySQL.transaction.await, queries)\n -- You can pass an array of 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[] transaction', 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('insert ' .. #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('select every 4th userid', MySQL.prepare.await, 'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1', selectUserIds)\n local insertid = execQuery('insert', MySQL.insert.await, 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef' })\n local update = execQuery('update', MySQL.update.await, 'UPDATE `test_table` SET `username` = ? WHERE `id` = ?', { 'bobby', insertid })\n local scalar = execQuery('scalar', MySQL.scalar.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })\n local single = execQuery('single', MySQL.single.await, 'SELECT * FROM `test_table` WHERE `id` = ?', { insertid })\n print(json.encode(execQuery('prepare', MySQL.prepare.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })))\n print(insertid, update, scalar, json.encode(single))\n execQuery('query', MySQL.query.await, 'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1', { 419 })\nend)","results#Results":"[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":"Guides","data":{"":"General guides for working with Overextended resources.\nGit\nNodeJS\nPNPM\nOx Types\nVisual Studio Code"}},"/guides/git":{"title":"Git","data":{"":"Git is a version control system, allowing changes to be effectively tracked, merged, and reverted.As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data.\nRefer to GitHub's guide to setting up Git.\nYou can use a Git GUI client like GitKraken to improve your workflow and more easily maintain changes."}},"/guides/types":{"title":"Types","data":{"setup-git-vscode-and-vscode-extensions#Setup git, vscode, and vscode extensions":"","download-our-lua-type-definitions#Download our Lua type definitions":"git clone https://github.com/overextended/ox_types.git`","update-your-settings#Update your settings":"You can modify the user, workspace, or folder settings for vscode.\nCreate an entry in Lua.workspace.library pointing to the cloned directory, or specific subdirectories.\n\"Lua.workspace.library\": [\n \"F:/GitHub/ox_types/types\",\n \"F:/GitHub/ox_lib\"\n],"}},"/guides/pnpm":{"title":"pnpm","data":{"":"pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn.\nEnsure you have installed Node.js.\nOpen a command-line terminal (e.g. Terminal, Command Prompt).\nEnter npm install -g pnpm to globally install the package.\nYou can install dependencies with pnpm using pnpm i.\nYou can reference package.json files for available scripts, i.e.\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},\nUsing the example above pnpm build will run the build script for the given package."}},"/":{"title":"Introduction","data":{"":"Here you can find all of the official documentation for resources developed by the Overextended team.If you feel like the documentation is lacking in some department then feel free to go onto that page and click the \"Edit this page\" at the bottom and submit a Pull Request.","support-our-team#Support our team":"We enjoy being able to create and share free and open-source work, but they often require considerable time and effort to maintain and support.If you frequently use our resources and love what we do, consider supporting us so we can continue our work.","fivemanage#Fivemanage":"Fivemanage is a cloud management service tailored for game servers, offering a range of features to facilitate easier management and administration of your FiveM server.Their services includes a free plan with limited media storage space, along with several paid plans designed to accommodate larger servers requiring more extensive storage and logging capabilities.Get started with Fivemanage and use code OX10 for 10% off your subscription - forever!","creator-codes#Creator codes":"Creator codes allow Tebex stores to share a percentage of a purchase with us, while giving a discount to the customer. We make these deals to advertise trusted creators who meet our criteria.\nResources are highly configurable or, preferably, source-available.\nWe trust that customers will be given assistance.\nThe creator is a known member of our community.\nMore information about these creators is available in our Discord.You can apply a creator code at checkout under \"Support A Creator\"."}},"/ox_core":{"title":"Ox Core","data":{"":"A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities.","txadmin-recipe#txAdmin recipe":"If you're looking to quickly install and setup ox_core, try using our recipe.","installation#Installation":"We strongly recommend referring to Guides to setup necessary development tools.","install-all-resource-dependencies#Install all resource dependencies.":"oxmysql\nox_lib","download-the-latest-release-or-build-the-source-code#Download the latest release or build the source code.":"Setup Git, Node.js, and pnpm.\nDownload and setup MariaDB 11.4+.\nRun the following commands in your CLI (e.g. Terminal, Command Prompt).\ngit clone https://github.com/overextended/ox_core.git\ncd ox_core\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't strictly required, but they are strongly recommended.\nox_inventory\nnpwd\nillenium-appearance","using-ox_core-in-your-resources#Using ox_core in your resources":"","lua#Lua":"You can import ox_core definitions by loading @ox_core/lib/init.lua into your resource.\nThis can be a client_script or server_script, if preferred.\nshared_script '@ox_core/lib/init.lua'\nIf you prefer, you can use our require function from ox_lib.\nlocal Ox = require '@ox_core/lib/init'","javascript#JavaScript":"To use ox_core with your JavaScript resources you'll need to use our npm package, providing full support for TypeScript and Intellisense.\nTo get started, try our fivem-typescript-boilerplate and install the ox_core package.\npnpm i @overextended/ox_core","config#Config":"Resource configuration is handled using convars.","replicated#Replicated":"These convars should use the setr command to be read by clients.\nox:debug\nDefault: false\nEnables debug messages and commands. Enabled by default when using pnpm watch.\nox:characterSlots\nDefault: 1\nSets the number of character slots available for character selection resources (e.g. ox_charselect).\nox:plateFormat\nDefault: \"........\"\nSee SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN.\nox:deathSystem\nDefault: true\nEnables the built-in death and respawn system.\nox:characterSelect\nDefault: true\nEnables built-in character registration, and uses uses that character when joining.\nox:spawnLocation\nDefault: [-258.211, -293.077, 21.6132, 206.0]\nSets the default spawn location for newly created characters."}},"/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'"}},"/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"}},"/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"}},"/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"}},"/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)"}},"/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)"}},"/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"}},"/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"}},"/ox_doorlock/Client/functions":{"title":"Functions","data":{"pickclosestdoor#pickClosestDoor":"Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail.\nexports.ox_doorlock:pickClosestDoor()","useclosestdoor#useClosestDoor":"Interact with the closest door. Dependant on server-side checks and may fail.\nexports.ox_doorlock:useClosestDoor()","getclosestdoor#getClosestDoor":"Returns the closest door.\nexports.ox_doorlock:getClosestDoor()\nReturn:\ndoor: number"}},"/ox_doorlock":{"title":"Ox Doorlock","data":{"":"A door management resource that can be used standalone or alongside 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.":"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_doorlock.git\ncd ox_doorlock/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_target","opening-the-ui#Opening the UI":"If you have installed and started the resource, you can use /doorlock to open the UI.\nIf the cursor is displayed but not the UI then you have not built it.\nYou may not be authorised to use the command.\nEnter test_ace player.1 command.doorlock in the server console (replace 1 with your server id).","convert-doors#Convert doors":"Door configuration files written for nui_doorlock can be automatically added to your MySQL database.\nAny files with the .lua extension placed in the ox_doorlock/convert directory will be read on resource start.\nIf the directory doesn't exist, you can create it.\nConversion cannot be guaranteed, especially if the config was not written for nui_doorlock.","adding-new-native-audio#Adding new native audio":"A guide can be found here for adding new native audio."}},"/ox_doorlock/Server/events":{"title":"Events","data":{"handlers#Handlers":"These events should not be triggered by any other scripts.","ox_doorlockstatechanged#ox_doorlock:stateChanged":"Triggered when a doors state is updated.\nAddEventHandler('ox_doorlock:stateChanged', function(source, doorId, state, usedItem) end)\nsource: number or nil\ndoorId: number\nstate: boolean\nusedItem: string or false or nil"}},"/ox_doorlock/Server/functions":{"title":"Functions","data":{"":"Gets data for a door with the given id, matching the id for the database entry.","getdoor#getDoor":"exports.ox_doorlock:getDoor(doorId)\nGets data for a door with the given id, matching the id for the database entry.\nid: number\nReturn:\ndoor: table","getdoorfromname#getDoorFromName":"exports.ox_doorlock:getDoorFromName(name)\nGets data for a door with the given name, matching the name for the database entry.\nname: string\nReturn:\ndoor: table","editdoor#editDoor":"exports.ox_doorlock:editDoor(doorId, data)\nEdit configuration for the given doorId.\ndoorId: number\ndata: table","setdoorstate#setDoorState":"exports.ox_doorlock:setDoorState(doorId, state)\nSets a door with the given doorId as locked if state is true or 1.\ndoorId: number\nstate: 0 or 1 or boolean"}},"/ox_doorlock/settings":{"title":"Door Settings","data":{"general#General":"Door name\nUsed to easily identify the door.\nPasscode\nDoor can be unlocked by anybody by using the code or phrase.\nAutolock interval\nDoor will be locked after x seconds.\nInteract distance\nDoor can only be used when within x metres.\nDoor rate\nDoor movement speed for sliding/garage/automatic doors, or swinging doors when locked.\nLocked\nSets the door as locked by default.\nDouble\nDoor is a set of two doors, controlled together.\nAutomatic\nSliding/garage/automatic door.\nLockpick\nDoor can be lockpicked when interacting with a targeting resource.\nHide UI\nNo indicators (i.e. icon, text) will display on the door.\nHold Open\nHolds the door open while unlocked.","characters#Characters":"Character Id\nCharacter identifier used by a framework (i.e. player.charid, xPlayer.identifier, Player.CitizenId).","groups#Groups":"Group\nFramework dependent, referring to jobs, gangs, etc.\nGrade\nThe minimum grade to allow access for the group (0 to allow all).","items#Items":"Item\nName of the item.\nMetadata type\nRequires metadata support (i.e. ox_inventory) to check slot.metadata.type.\nRemove on use\nRemoves the item after interacting with the door.","lockpick#Lockpick":"Difficulty\nSets the skillcheck difficulty (see docs).\nArea size\nCustom difficulty area size in degrees.\nSpeed multiplier\nCustom difficulty idicator speed multipier.","sound#Sound":"Lock sound\nSound to play on door lock.\nUnlock sound\nSound to play on door unlock.\nNote: Sounds are stored in the ./web/public/sounds directory."}},"/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"}},"/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)"}},"/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)"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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."}},"/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"}},"/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"}},"/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))"}},"/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"}},"/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})"}},"/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})"}},"/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."}},"/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."}},"/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:"}},"/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"}},"/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)"}},"/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"}},"/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"}},"/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"}},"/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});"}},"/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);"}},"/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);"}},"/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)"}},"/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)"}},"/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)"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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"}},"/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 }[]"}},"/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 }[]"}},"/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 }[]"}},"/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 }[]"}},"/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."}},"/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);"}},"/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"}},"/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."}},"/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]);"}},"/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);"}},"/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});"}},"/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()"}},"/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])"}},"/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});"}},"/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"}},"/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);"}},"/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\""}},"/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({\r\n\ttype = 1,\r\n\tcoords = GetEntityCoords(cache.ped),\r\n\tcolor = { r = 255, g = 0, b = 0, a = 200 },\r\n})\r\n\r\nCitizen.CreateThread(function()\r\n\twhile true do\r\n\t\tmarker:draw()\r\n\r\n\t\tCitizen.Wait(1)\r\n\tend\r\nend)","interactive-example#Interactive Example":"local center = vec3(430.452759, -1026.108032, 27.846140)\r\nlocal uiText = \"Press [E] to get notified\"\r\n\r\nlocal point = lib.points.new({\r\n coords = center,\r\n distance = 20,\r\n})\r\n\r\nlocal marker = lib.marker.new({\r\n coords = center,\r\n type = 1,\r\n})\r\n\r\nfunction point:nearby()\r\n marker:draw()\r\n\r\n if self.currentDistance < 1.5 then\r\n if not lib.isTextUIOpen() then\r\n lib.showTextUI(\"Press [E] to get notified\")\r\n end\r\n\r\n if IsControlJustPressed(0, 51) then\r\n lib.notify({\r\n description = \"Hello, World!\"\r\n })\r\n end\r\n else\r\n local isOpen, currentText = lib.isTextUIOpen()\r\n if isOpen and currentText == uiText then\r\n lib.hideTextUI()\r\n end\r\n end\r\nend"}},"/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"}},"/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}"}},"/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"}},"/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: \"\""}},"/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!"}},"/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"}},"/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"}},"/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}"}},"/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"}},"/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)"}},"/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"}},"/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')"}},"/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()"}},"/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)"}},"/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"}},"/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})"}},"/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."}},"/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."}},"/oxmysql":{"title":"OxMySQL","data":{"":"A replacement of mysql-async and ghmattimysql with expanded API and improved compatibility for MySQL 8.","mysql-or-mariadb#MySQL or MariaDB?":"Most resources for FiveM were designed to be used with MySQL 5.7 and may hit compatibility issues when using MySQL 8, i.e.\nMore reserved keywords, like 'stored' and 'group'.\nLongtext / JSON fields do not support default values.\nMariaDB is highly recommended for compatibility, and improved performance (over all versions of MySQL).","should-i-use-xampp#Should I use XAMPP?":"No. XAMPP is a webserver stack intended to be used for development, allowing easy local development and testing.\nDo not setup XAMPP just to run your database, and install MariaDB directly instead.","installation#Installation":"","download-and-install-mariadb#Download and install MariaDB":"","download-the-latest-release-of-oxmysql#Download the latest release of oxmysql":"","configure-your-server#Configure your server":"Open your server configuration file.\nAdd start oxmysql to the top of your resource list.\nConfigure your mysql connection string and set it before starting any resources.\n# Use your preferred format. Make sure you only ever use 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\"\nCertain special characters are reserved or unsupported depending on your connection string.\nAvoid using these characters ; , / ? : @ & = + $ #, and try swapping connection string format.","slow-query-warnings#Slow query warnings":"You will receive warnings if a query took a long time to complete, configurable with a convar.\nQuery time may not be entirely accurate.\nSlow queries may not indicate a database issue (e.g. server hitches).\nSlow queries on server startup are not necessarily problematic.\nset mysql_slow_query_warning 150","debug#Debug":"Enabling the debug option will print all queries in the server console; you can also use an array to only print from a list of resources instead.\nset mysql_debug true\nset mysql_debug [\n \"ox_core\",\n \"ox_inventory\"\n]\nYou can temporarily modify the resource list with commands.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","compatibility#Compatibility":"You can delete the following resources and allow oxmysql to provide their functionality.\nmysql-async\nghmattimysql","usage#Usage":"Resources can import oxmysql methods by including our library, granting some type-checking and minor performance improvements over raw export calls.","lua#Lua":"Modify fxmanifest.lua for your resource, and add the following above any other script files.\nserver_script '@oxmysql/lib/MySQL.lua'","javascript#JavaScript":"You can use raw exports, or install our npm package for intellisense and similar usage as Lua.\n# With pnpm\npnpm add @overextended/oxmysql\n# With Yarn\nyarn add @overextended/oxmysql\n# With npm\nnpm install @overextended/oxmysql\nImport the oxmysql object into your resource.\nimport { oxmysql as MySQL } from '@overextended/oxmysql';","upserting#Upserting":"When uncertain if a row should be inserted into the database, or an existing row should be updated, queries should check for duplicate keys.\nMySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })\nThis is preferred over checking the existence of a row, then inserting or updating depending on the result.\nFurthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted."}},"/oxmysql/Functions/prepare":{"title":"prepare","data":{"":"Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.\nDate will not return the datestring commonly used in FiveM\nTINYINT 1 and BIT will not return a boolean\nYou can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error\nUnlike rawExecute, the SELECT statement will return a column, row, or array of rows depending on the number of columns and rows selected.","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"}},"/oxmysql/Functions/insert":{"title":"insert","data":{"":"Inserts a new entry into the database and returns the insert id for the row, if valid.","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"}},"/oxmysql/Functions/query":{"title":"query","data":{"":"When selecting data, returns all matching rows and columns; otherwise, returns data like 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"}},"/oxmysql/Functions/transaction":{"title":"transaction","data":{"":"A transaction executes multiple queries and commits them only if all succeed.\nIf one fails, none of the queries are committed.The return value is a boolean, which is the result of the transaction.","specific-format#Specific format":"When using this format, you must pass an array containing sets of queries and parameters to the transaction method.\nIn this case, your queries do not necessarily match and the values are unique to each query.\n-- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\nlocal queries = {\n { query = 'INSERT INTO `test` (id) VALUES (?)', values = { 1 }},\n { query = 'INSERT INTO `test` (id, name) VALUES (?, ?)', values = { 2, 'bob' }},\n}\n-- You can also pass an array of arrays.\nlocal queries = {\n { 'INSERT INTO `test` (id) VALUES (?)', { 1 } },\n { 'INSERT INTO `test` (id, name) VALUES (?, ?)', { 2, 'bob' } },\n}","shared-format#Shared format":"When using this format, you must pass an array containing queries and a set containing shared parameters to the transaction method.\nIn this case, your queries do not necessarily match and the values are unique to each query.\n-- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\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 --[[leave nil for specific format]])\nprint(success)\nconst success = await MySQL.transaction(queries, values /*leave nil for specific format*/)\nconsole.log(success)\nAliases\nMySQL.Sync.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction_async","callback#Callback":"-- specific\nMySQL.transaction(queries, values, function(success)\n print(success)\nend)\n-- shared\nMySQL.transaction(queries, function(success)\n print(success)\nend)\n// specific\nMySQL.transaction(queries, (success) => {\n console.log(success)\n})\n// shared\nMySQL.transaction(queries, values, (success) => {\n console.log(success)\n})\nAliases\nMySQL.Async.transaction\nexports.ghmattimysql.transaction\nexports.oxmysql.transaction","transaction-isolation-level#Transaction Isolation Level":"This can be set through the convar mysql_transaction_isolation_level, and is an integer ranging from 1-4.\nThe default value is 2.\nConvar Value\tResult\t1\tRepeatable Read\t2\tRead Committed\t3\tRead Uncommitted\t4\tSerializable"}},"/oxmysql/Functions/scalar":{"title":"scalar","data":{"":"Returns the first column for a single row.","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"}},"/oxmysql/Functions/update":{"title":"update","data":{"":"Returns the number of rows affected by the query.","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"}},"/oxmysql/placeholders":{"title":"Placeholders","data":{"":"Placeholders allow for query parameters to be safely executed, preventing common SQL injection methods.Parameters can be passed an an array or object (referred to as named parameters).\nlocal identifier = 'license:abc123'\nlocal group = 'admin'\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = ? AND `group` = ?', { identifier, group })\n-- Named placeholders (deprecated)\nMySQL.scalar('SELECT `username` FROM `users` WHERE `identifier` = @identifier AND `group` = @group', {\n group = group\n identifier = identifier\n})\nThese are distinct from prepared statements which are handled by the MySQL server; you can use MySQL.prepare for more optimised and secure queries."}},"/oxmysql/ui":{"title":"Using the Debug UI","data":{"":"The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics.\nYou should only enable this during development, or with a small player count - for larger servers, look into builtin MySQL logging.Before using the UI first you have to make sure you have the mysql_ui convar set to true:\nset mysql_ui true\nAlso make sure that you have command or command.mysql ace permission access, then you should be able to use the mysql command in game.\nYou do not need to have the mysql_debug enabled to use the debug ui.","main-page#Main page":"The main page shows you the resources that ran queries where you can filter them through a search bar, your general data\nalong side a pie chart which shows what resources took the most query time.","resource-page#Resource page":"The resource page shows you all the queries and their execution time inside a table that the resource previously ran,\nalongside the total amount of the queries, execution time and slow queries for the selected resource.Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip.\nQueries that exceed mysql_slow_query_warning (default 150ms) are displayed in orange.\nFor demonstation purposes the mysql_slow_query_warning convar was set to 5 here."}},"/guides/nodejs":{"title":"Node.js","data":{"":"Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client.\nDownload and install the LTS version of Node.js.\nOpen a command-line terminal (e.g. Terminal, Command Prompt).\nEnter node --version to confirm successful installation."}},"/guides/vscode":{"title":"VS Code","data":{"":"Visual Studio Code is our recommended editor when working with Lua.","recommended-extensions#Recommended extensions":"Extensions let you add languages, debuggers, and other tools to VS Code - improving your developer experience.","sumnekolua#sumneko.lua":"Lua Language Server provides numerous language features to make development easier and faster, e.g.\nAnnotations\nAutocompletion\nCode formatting\nDiagnostics/warnings\nDynamic type checking\nSyntax checking","overextendedcfxlua-vscode#overextended.cfxlua-vscode":"Works alongside Lua Language Server to provide function and type declarations from Cfx's Lua runtime, Lua dialect, environment globals, and game natives."}},"/oxmysql/Functions/single":{"title":"single","data":{"":"Returns all selected columns for a single row.","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"}},"/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})"}},"/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()"}},"/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()"}},"/oxmysql/Functions/rawExecute":{"title":"rawExecute","data":{"":"rawExecute can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.\nDate will not return the datestring commonly used in FiveM\nTINYINT 1 and BIT will not return a boolean\nYou can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error\nUnlike prepare, the SELECT statement will always return an array of rows.\nWhen using SELECT, the return value will match query, single, or scalar depending on the number of columns and rows selected.","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"}},"/oxmysql/benchmark":{"title":"Benchmark","data":{"":"Benchmarking is based on the time spent when to receive a response from exports.\nReal query speeds will be reported in the debug UI and in the server console with mysql_debug enabled.Speeds will vary greatly based on system hardware, database settings, database version, and the current workload.","script#Script":"This script tests export times when using the Lua 5.4 runtime with lib/MySQL.lua syntax.\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('Executed ' .. (type(query) == 'string' and 1 or #query) .. ' queries in ' .. (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('initialise test_table', MySQL.transaction.await, initTable)\n -- You might rename \"values\" as \"parameters\" for mysql-async compatibility.\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 }[] transaction', MySQL.transaction.await, queries)\n -- You can pass an array of arrays.\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[]][] transaction', MySQL.transaction.await, queries)\n -- You can pass an array of 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[] transaction', 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('insert ' .. #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('select every 4th userid', MySQL.prepare.await, 'SELECT `id` FROM `test_table` WHERE `identifier` = ? LIMIT 1', selectUserIds)\n local insertid = execQuery('insert', MySQL.insert.await, 'INSERT INTO `test_table` (identifier) VALUES (?)', { 'abcdef' })\n local update = execQuery('update', MySQL.update.await, 'UPDATE `test_table` SET `username` = ? WHERE `id` = ?', { 'bobby', insertid })\n local scalar = execQuery('scalar', MySQL.scalar.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })\n local single = execQuery('single', MySQL.single.await, 'SELECT * FROM `test_table` WHERE `id` = ?', { insertid })\n print(json.encode(execQuery('prepare', MySQL.prepare.await, 'SELECT `username` FROM `test_table` WHERE `id` = ?', { insertid })))\n print(insertid, update, scalar, json.encode(single))\n execQuery('query', MySQL.query.await, 'SELECT `username` FROM `test_table` WHERE `id` = ? LIMIT 1', { 419 })\nend)","results#Results":"[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-0d068649b5247eac.js b/_next/static/chunks/pages/_app-0d068649b5247eac.js deleted file mode 100644 index e6e5e55ac4..0000000000 --- a/_next/static/chunks/pages/_app-0d068649b5247eac.js +++ /dev/null @@ -1,23 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{2297:function(){!function(){"use strict";function applyFocusVisiblePolyfill(n){var a=!0,g=!1,v=null,j={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function isValidFocusTarget(n){return!!n&&n!==document&&"HTML"!==n.nodeName&&"BODY"!==n.nodeName&&"classList"in n&&"contains"in n.classList}function addFocusVisibleClass(n){n.classList.contains("focus-visible")||(n.classList.add("focus-visible"),n.setAttribute("data-focus-visible-added",""))}function onPointerDown(n){a=!1}function addInitialPointerMoveListeners(){document.addEventListener("mousemove",onInitialPointerMove),document.addEventListener("mousedown",onInitialPointerMove),document.addEventListener("mouseup",onInitialPointerMove),document.addEventListener("pointermove",onInitialPointerMove),document.addEventListener("pointerdown",onInitialPointerMove),document.addEventListener("pointerup",onInitialPointerMove),document.addEventListener("touchmove",onInitialPointerMove),document.addEventListener("touchstart",onInitialPointerMove),document.addEventListener("touchend",onInitialPointerMove)}function onInitialPointerMove(n){n.target.nodeName&&"html"===n.target.nodeName.toLowerCase()||(a=!1,document.removeEventListener("mousemove",onInitialPointerMove),document.removeEventListener("mousedown",onInitialPointerMove),document.removeEventListener("mouseup",onInitialPointerMove),document.removeEventListener("pointermove",onInitialPointerMove),document.removeEventListener("pointerdown",onInitialPointerMove),document.removeEventListener("pointerup",onInitialPointerMove),document.removeEventListener("touchmove",onInitialPointerMove),document.removeEventListener("touchstart",onInitialPointerMove),document.removeEventListener("touchend",onInitialPointerMove))}document.addEventListener("keydown",function(g){g.metaKey||g.altKey||g.ctrlKey||(isValidFocusTarget(n.activeElement)&&addFocusVisibleClass(n.activeElement),a=!0)},!0),document.addEventListener("mousedown",onPointerDown,!0),document.addEventListener("pointerdown",onPointerDown,!0),document.addEventListener("touchstart",onPointerDown,!0),document.addEventListener("visibilitychange",function(n){"hidden"===document.visibilityState&&(g&&(a=!0),addInitialPointerMoveListeners())},!0),addInitialPointerMoveListeners(),n.addEventListener("focus",function(n){var g,v,z;isValidFocusTarget(n.target)&&(a||(v=(g=n.target).type,"INPUT"===(z=g.tagName)&&j[v]&&!g.readOnly||"TEXTAREA"===z&&!g.readOnly||g.isContentEditable))&&addFocusVisibleClass(n.target)},!0),n.addEventListener("blur",function(n){if(isValidFocusTarget(n.target)){var a;(n.target.classList.contains("focus-visible")||n.target.hasAttribute("data-focus-visible-added"))&&(g=!0,window.clearTimeout(v),v=window.setTimeout(function(){g=!1},100),(a=n.target).hasAttribute("data-focus-visible-added")&&(a.classList.remove("focus-visible"),a.removeAttribute("data-focus-visible-added")))}},!0),n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n.host?n.host.setAttribute("data-js-focus-visible",""):n.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var n;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{n=new CustomEvent("focus-visible-polyfill-ready")}catch(a){(n=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(n)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document)}()},6407:function(n,a,g){"use strict";var v=g(8593),j=g(2895);n.exports=function(n){var a=v(n);return a.token="","x-oauth-basic"===a.password?a.token=a.user:"x-token-auth"===a.user&&(a.token=a.password),j(a.protocols)||0===a.protocols.length&&j(n)?a.protocol="ssh":a.protocols.length?a.protocol=a.protocols[0]:(a.protocol="file",a.protocols=["file"]),a.href=a.href.replace(/\/$/,""),a}},227:function(n,a,g){"use strict";var v=g(6407);function gitUrlParse(n){if("string"!=typeof n)throw Error("The url must be a string.");/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(n)&&(n="https://github.com/"+n);var a=v(n),g=a.resource.split("."),j=null;switch(a.toString=function(n){return gitUrlParse.stringify(this,n)},a.source=g.length>2?g.slice(1-g.length).join("."):a.source=a.resource,a.git_suffix=/\.git$/.test(a.pathname),a.name=decodeURIComponent((a.pathname||a.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),a.owner=decodeURIComponent(a.user),a.source){case"git.cloudforge.com":a.owner=a.user,a.organization=g[0],a.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===a.resource){4===(j=a.name.split("/")).length&&(a.organization=j[1],a.owner=j[2],a.name=j[3],a.full_name=j[2]+"/"+j[3]);break}2===(j=a.name.split("/")).length?(a.owner=j[1],a.name=j[1],a.full_name="_git/"+a.name):3===j.length?(a.name=j[2],"DefaultCollection"===j[0]?(a.owner=j[2],a.organization=j[0],a.full_name=a.organization+"/_git/"+a.name):(a.owner=j[0],a.full_name=a.owner+"/_git/"+a.name)):4===j.length&&(a.organization=j[0],a.owner=j[1],a.name=j[3],a.full_name=a.organization+"/"+a.owner+"/_git/"+a.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===a.resource){4===(j=a.name.split("/")).length&&(a.organization=j[1],a.owner=j[2],a.name=j[3]);break}5===(j=a.name.split("/")).length?(a.organization=j[0],a.owner=j[1],a.name=j[4],a.full_name="_git/"+a.name):3===j.length?(a.name=j[2],"DefaultCollection"===j[0]?(a.owner=j[2],a.organization=j[0],a.full_name=a.organization+"/_git/"+a.name):(a.owner=j[0],a.full_name=a.owner+"/_git/"+a.name)):4===j.length&&(a.organization=j[0],a.owner=j[1],a.name=j[3],a.full_name=a.organization+"/"+a.owner+"/_git/"+a.name),a.query&&a.query.path&&(a.filepath=a.query.path.replace(/^\/+/g,"")),a.query&&a.query.version&&(a.ref=a.query.version.replace(/^GB/,""));break;default:var z=(j=a.name.split("/")).length-1;if(j.length>=2){var W=j.indexOf("-",2),B=j.indexOf("blob",2),H=j.indexOf("tree",2),K=j.indexOf("commit",2),ee=j.indexOf("src",2),et=j.indexOf("raw",2),en=j.indexOf("edit",2);z=W>0?W-1:B>0?B-1:H>0?H-1:K>0?K-1:ee>0?ee-1:et>0?et-1:en>0?en-1:z,a.owner=j.slice(0,z).join("/"),a.name=j[z],K&&(a.commit=j[z+2])}a.ref="",a.filepathtype="",a.filepath="";var er=j.length>z&&"-"===j[z+1]?z+1:z;j.length>er+2&&["raw","src","blob","tree","edit"].indexOf(j[er+1])>=0&&(a.filepathtype=j[er+1],a.ref=j[er+2],j.length>er+3&&(a.filepath=j.slice(er+3).join("/"))),a.organization=a.owner}!a.full_name&&(a.full_name=a.owner,a.name&&(a.full_name&&(a.full_name+="/"),a.full_name+=a.name)),a.owner.startsWith("scm/")&&(a.source="bitbucket-server",a.owner=a.owner.replace("scm/",""),a.organization=a.owner,a.full_name=a.owner+"/"+a.name);var eo=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(a.pathname);return null!=eo&&(a.source="bitbucket-server","users"===eo[1]?a.owner="~"+eo[2]:a.owner=eo[2],a.organization=a.owner,a.name=eo[3],(j=eo[4].split("/")).length>1&&(["raw","browse"].indexOf(j[1])>=0?(a.filepathtype=j[1],j.length>2&&(a.filepath=j.slice(2).join("/"))):"commits"===j[1]&&j.length>2&&(a.commit=j[2])),a.full_name=a.owner+"/"+a.name,a.query.at?a.ref=a.query.at:a.ref=""),a}gitUrlParse.stringify=function(n,a){a=a||(n.protocols&&n.protocols.length?n.protocols.join("+"):n.protocol);var g=n.port?":"+n.port:"",v=n.user||"git",j=n.git_suffix?".git":"";switch(a){case"ssh":if(g)return"ssh://"+v+"@"+n.resource+g+"/"+n.full_name+j;return v+"@"+n.resource+":"+n.full_name+j;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return a+"://"+v+"@"+n.resource+g+"/"+n.full_name+j;case"http":case"https":return a+"://"+(n.token?"bitbucket.org"===n.source?"x-token-auth:"+n.token+"@":n.token+"@":n.user&&(n.protocols.includes("http")||n.protocols.includes("https"))?n.user+"@":"")+n.resource+g+"/"+("bitbucket-server"===n.source?"scm/"+n.full_name:""+n.full_name)+j;default:return n.href}},n.exports=gitUrlParse},5983:function(){!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var n=function(n){for(var a=n,g=getFrameElement(a);g;)g=getFrameElement(a=g.ownerDocument);return a}(window.document),a=[],g=null,v=null;IntersectionObserver.prototype.THROTTLE_TIMEOUT=100,IntersectionObserver.prototype.POLL_INTERVAL=null,IntersectionObserver.prototype.USE_MUTATION_OBSERVER=!0,IntersectionObserver._setupCrossOriginUpdater=function(){return g||(g=function(n,g){v=n&&g?convertFromParentRect(n,g):getEmptyRect(),a.forEach(function(n){n._checkForIntersections()})}),g},IntersectionObserver._resetCrossOriginUpdater=function(){g=null,v=null},IntersectionObserver.prototype.observe=function(n){if(!this._observationTargets.some(function(a){return a.element==n})){if(!(n&&1==n.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:n,entry:null}),this._monitorIntersections(n.ownerDocument),this._checkForIntersections()}},IntersectionObserver.prototype.unobserve=function(n){this._observationTargets=this._observationTargets.filter(function(a){return a.element!=n}),this._unmonitorIntersections(n.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},IntersectionObserver.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},IntersectionObserver.prototype.takeRecords=function(){var n=this._queuedEntries.slice();return this._queuedEntries=[],n},IntersectionObserver.prototype._initThresholds=function(n){var a=n||[0];return Array.isArray(a)||(a=[a]),a.sort().filter(function(n,a,g){if("number"!=typeof n||isNaN(n)||n<0||n>1)throw Error("threshold must be a number between 0 and 1 inclusively");return n!==g[a-1]})},IntersectionObserver.prototype._parseRootMargin=function(n){var a=(n||"0px").split(/\s+/).map(function(n){var a=/^(-?\d*\.?\d+)(px|%)$/.exec(n);if(!a)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(a[1]),unit:a[2]}});return a[1]=a[1]||a[0],a[2]=a[2]||a[0],a[3]=a[3]||a[1],a},IntersectionObserver.prototype._monitorIntersections=function(a){var g=a.defaultView;if(g&&-1==this._monitoringDocuments.indexOf(a)){var v=this._checkForIntersections,j=null,z=null;if(this.POLL_INTERVAL?j=g.setInterval(v,this.POLL_INTERVAL):(addEvent(g,"resize",v,!0),addEvent(a,"scroll",v,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in g&&(z=new g.MutationObserver(v)).observe(a,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(a),this._monitoringUnsubscribes.push(function(){var n=a.defaultView;n&&(j&&n.clearInterval(j),removeEvent(n,"resize",v,!0)),removeEvent(a,"scroll",v,!0),z&&z.disconnect()}),a!=(this.root&&(this.root.ownerDocument||this.root)||n)){var W=getFrameElement(a);W&&this._monitorIntersections(W.ownerDocument)}}},IntersectionObserver.prototype._unmonitorIntersections=function(a){var g=this._monitoringDocuments.indexOf(a);if(-1!=g){var v=this.root&&(this.root.ownerDocument||this.root)||n;if(!this._observationTargets.some(function(n){var g=n.element.ownerDocument;if(g==a)return!0;for(;g&&g!=v;){var j=getFrameElement(g);if((g=j&&j.ownerDocument)==a)return!0}return!1})){var j=this._monitoringUnsubscribes[g];if(this._monitoringDocuments.splice(g,1),this._monitoringUnsubscribes.splice(g,1),j(),a!=v){var z=getFrameElement(a);z&&this._unmonitorIntersections(z.ownerDocument)}}}},IntersectionObserver.prototype._unmonitorAllIntersections=function(){var n=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var a=0;a=0&&B>=0&&{top:g,bottom:v,left:j,right:z,width:W,height:B}||null}(K,W)),!W)break;B=B&&getParentNode(B)}return W}},IntersectionObserver.prototype._getRootRect=function(){var a;if(this.root&&!isDoc(this.root))a=getBoundingClientRect(this.root);else{var g=isDoc(this.root)?this.root:n,v=g.documentElement,j=g.body;a={top:0,left:0,right:v.clientWidth||j.clientWidth,width:v.clientWidth||j.clientWidth,bottom:v.clientHeight||j.clientHeight,height:v.clientHeight||j.clientHeight}}return this._expandRectByRootMargin(a)},IntersectionObserver.prototype._expandRectByRootMargin=function(n){var a=this._rootMarginValues.map(function(a,g){return"px"==a.unit?a.value:a.value*(g%2?n.width:n.height)/100}),g={top:n.top-a[0],right:n.right+a[1],bottom:n.bottom+a[2],left:n.left-a[3]};return g.width=g.right-g.left,g.height=g.bottom-g.top,g},IntersectionObserver.prototype._hasCrossedThreshold=function(n,a){var g=n&&n.isIntersecting?n.intersectionRatio||0:-1,v=a.isIntersecting?a.intersectionRatio||0:-1;if(g!==v)for(var j=0;ja.indexOf(this)&&a.push(this)},IntersectionObserver.prototype._unregisterInstance=function(){var n=a.indexOf(this);-1!=n&&a.splice(n,1)},window.IntersectionObserver=IntersectionObserver,window.IntersectionObserverEntry=IntersectionObserverEntry}function getFrameElement(n){try{return n.defaultView&&n.defaultView.frameElement||null}catch(n){return null}}function IntersectionObserverEntry(n){this.time=n.time,this.target=n.target,this.rootBounds=ensureDOMRect(n.rootBounds),this.boundingClientRect=ensureDOMRect(n.boundingClientRect),this.intersectionRect=ensureDOMRect(n.intersectionRect||getEmptyRect()),this.isIntersecting=!!n.intersectionRect;var a=this.boundingClientRect,g=a.width*a.height,v=this.intersectionRect,j=v.width*v.height;g?this.intersectionRatio=Number((j/g).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function IntersectionObserver(n,a){var g,v,j,z=a||{};if("function"!=typeof n)throw Error("callback must be a function");if(z.root&&1!=z.root.nodeType&&9!=z.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(g=this._checkForIntersections.bind(this),v=this.THROTTLE_TIMEOUT,j=null,function(){j||(j=setTimeout(function(){g(),j=null},v))}),this._callback=n,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(z.rootMargin),this.thresholds=this._initThresholds(z.threshold),this.root=z.root||null,this.rootMargin=this._rootMarginValues.map(function(n){return n.value+n.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function addEvent(n,a,g,v){"function"==typeof n.addEventListener?n.addEventListener(a,g,v||!1):"function"==typeof n.attachEvent&&n.attachEvent("on"+a,g)}function removeEvent(n,a,g,v){"function"==typeof n.removeEventListener?n.removeEventListener(a,g,v||!1):"function"==typeof n.detachEvent&&n.detachEvent("on"+a,g)}function getBoundingClientRect(n){var a;try{a=n.getBoundingClientRect()}catch(n){}return a?(a.width&&a.height||(a={top:a.top,right:a.right,bottom:a.bottom,left:a.left,width:a.right-a.left,height:a.bottom-a.top}),a):getEmptyRect()}function getEmptyRect(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function ensureDOMRect(n){return!n||"x"in n?n:{top:n.top,y:n.top,bottom:n.bottom,left:n.left,x:n.left,right:n.right,width:n.width,height:n.height}}function convertFromParentRect(n,a){var g=a.top-n.top,v=a.left-n.left;return{top:g,left:v,height:a.height,width:a.width,bottom:g+a.height,right:v+a.width}}function containsDeep(n,a){for(var g=a;g;){if(g==n)return!0;g=getParentNode(g)}return!1}function getParentNode(a){var g=a.parentNode;return 9==a.nodeType&&a!=n?getFrameElement(a):(g&&g.assignedSlot&&(g=g.assignedSlot.parentNode),g&&11==g.nodeType&&g.host)?g.host:g}function isDoc(n){return n&&9===n.nodeType}}()},2895:function(n,a,g){"use strict";var v=g(6097);n.exports=function isSsh(n){if(Array.isArray(n))return -1!==n.indexOf("ssh")||-1!==n.indexOf("rsync");if("string"!=typeof n)return!1;var a=v(n);if(n=n.substring(n.indexOf("://")+3),isSsh(a))return!0;var g=RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!n.match(g)&&n.indexOf("@"){a(!0)},[]),n}var eE=g(6536),useFSRoute=()=>{let{locale:n=eE.ZW,asPath:a,route:g}=(0,eC.useRouter)();return(0,eS.useMemo)(()=>{let v=eE.hV.has(g)?g:a,{pathname:j}=new URL(v,"https://nextra.vercel.app"),z=n?j.replace(RegExp(`\\.${n}(\\/|$)`),"$1"):j;return z.replace(/\.html$/,"").replace(/\/index(\/|$)/,"$1").replace(/\/$/,"")||"/"},[a,n,g])},eO=g(8745),eP=g(2766);(j=ef||(ef={})).assertEqual=n=>n,j.assertIs=function(n){},j.assertNever=function(n){throw Error()},j.arrayToEnum=n=>{let a={};for(let g of n)a[g]=g;return a},j.getValidEnumValues=n=>{let a=j.objectKeys(n).filter(a=>"number"!=typeof n[n[a]]),g={};for(let v of a)g[v]=n[v];return j.objectValues(g)},j.objectValues=n=>j.objectKeys(n).map(function(a){return n[a]}),j.objectKeys="function"==typeof Object.keys?n=>Object.keys(n):n=>{let a=[];for(let g in n)Object.prototype.hasOwnProperty.call(n,g)&&a.push(g);return a},j.find=(n,a)=>{for(let g of n)if(a(g))return g},j.isInteger="function"==typeof Number.isInteger?n=>Number.isInteger(n):n=>"number"==typeof n&&isFinite(n)&&Math.floor(n)===n,j.joinValues=function(n,a=" | "){return n.map(n=>"string"==typeof n?`'${n}'`:n).join(a)},j.jsonStringifyReplacer=(n,a)=>"bigint"==typeof a?a.toString():a,(eh||(eh={})).mergeShapes=(n,a)=>({...n,...a});let eM=ef.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=n=>{let a=typeof n;switch(a){case"undefined":return eM.undefined;case"string":return eM.string;case"number":return isNaN(n)?eM.nan:eM.number;case"boolean":return eM.boolean;case"function":return eM.function;case"bigint":return eM.bigint;case"symbol":return eM.symbol;case"object":if(Array.isArray(n))return eM.array;if(null===n)return eM.null;if(n.then&&"function"==typeof n.then&&n.catch&&"function"==typeof n.catch)return eM.promise;if("undefined"!=typeof Map&&n instanceof Map)return eM.map;if("undefined"!=typeof Set&&n instanceof Set)return eM.set;if("undefined"!=typeof Date&&n instanceof Date)return eM.date;return eM.object;default:return eM.unknown}},ej=ef.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let ZodError=class ZodError extends Error{constructor(n){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=n}get errors(){return this.issues}format(n){let a=n||function(n){return n.message},g={_errors:[]},processError=n=>{for(let v of n.issues)if("invalid_union"===v.code)v.unionErrors.map(processError);else if("invalid_return_type"===v.code)processError(v.returnTypeError);else if("invalid_arguments"===v.code)processError(v.argumentsError);else if(0===v.path.length)g._errors.push(a(v));else{let n=g,j=0;for(;jn.message){let a={},g=[];for(let v of this.issues)v.path.length>0?(a[v.path[0]]=a[v.path[0]]||[],a[v.path[0]].push(n(v))):g.push(n(v));return{formErrors:g,fieldErrors:a}}get formErrors(){return this.flatten()}};ZodError.create=n=>{let a=new ZodError(n);return a};let errorMap=(n,a)=>{let g;switch(n.code){case ej.invalid_type:g=n.received===eM.undefined?"Required":`Expected ${n.expected}, received ${n.received}`;break;case ej.invalid_literal:g=`Invalid literal value, expected ${JSON.stringify(n.expected,ef.jsonStringifyReplacer)}`;break;case ej.unrecognized_keys:g=`Unrecognized key(s) in object: ${ef.joinValues(n.keys,", ")}`;break;case ej.invalid_union:g="Invalid input";break;case ej.invalid_union_discriminator:g=`Invalid discriminator value. Expected ${ef.joinValues(n.options)}`;break;case ej.invalid_enum_value:g=`Invalid enum value. Expected ${ef.joinValues(n.options)}, received '${n.received}'`;break;case ej.invalid_arguments:g="Invalid function arguments";break;case ej.invalid_return_type:g="Invalid function return type";break;case ej.invalid_date:g="Invalid date";break;case ej.invalid_string:"object"==typeof n.validation?"includes"in n.validation?(g=`Invalid input: must include "${n.validation.includes}"`,"number"==typeof n.validation.position&&(g=`${g} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?g=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?g=`Invalid input: must end with "${n.validation.endsWith}"`:ef.assertNever(n.validation):g="regex"!==n.validation?`Invalid ${n.validation}`:"Invalid";break;case ej.too_small:g="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:"date"===n.type?`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:"Invalid input";break;case ej.too_big:g="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"bigint"===n.type?`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"date"===n.type?`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:"Invalid input";break;case ej.custom:g="Invalid input";break;case ej.invalid_intersection_types:g="Intersection results could not be merged";break;case ej.not_multiple_of:g=`Number must be a multiple of ${n.multipleOf}`;break;case ej.not_finite:g="Number must be finite";break;default:g=a.defaultError,ef.assertNever(n)}return{message:g}},eI=errorMap;function getErrorMap(){return eI}let makeIssue=n=>{let{data:a,path:g,errorMaps:v,issueData:j}=n,z=[...g,...j.path||[]],W={...j,path:z};if(void 0!==j.message)return{...j,path:z,message:j.message};let B="",H=v.filter(n=>!!n).slice().reverse();for(let n of H)B=n(W,{data:a,defaultError:B}).message;return{...j,path:z,message:B}};function addIssueToContext(n,a){let g=getErrorMap(),v=makeIssue({issueData:a,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,g,g===errorMap?void 0:errorMap].filter(n=>!!n)});n.common.issues.push(v)}let ParseStatus=class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(n,a){let g=[];for(let v of a){if("aborted"===v.status)return eN;"dirty"===v.status&&n.dirty(),g.push(v.value)}return{status:n.value,value:g}}static async mergeObjectAsync(n,a){let g=[];for(let n of a){let a=await n.key,v=await n.value;g.push({key:a,value:v})}return ParseStatus.mergeObjectSync(n,g)}static mergeObjectSync(n,a){let g={};for(let v of a){let{key:a,value:j}=v;if("aborted"===a.status||"aborted"===j.status)return eN;"dirty"===a.status&&n.dirty(),"dirty"===j.status&&n.dirty(),"__proto__"!==a.value&&(void 0!==j.value||v.alwaysSet)&&(g[a.value]=j.value)}return{status:n.value,value:g}}};let eN=Object.freeze({status:"aborted"}),DIRTY=n=>({status:"dirty",value:n}),OK=n=>({status:"valid",value:n}),isAborted=n=>"aborted"===n.status,isDirty=n=>"dirty"===n.status,isValid=n=>"valid"===n.status,isAsync=n=>"undefined"!=typeof Promise&&n instanceof Promise;function __classPrivateFieldGet(n,a,g,v){if("a"===g&&!v)throw TypeError("Private accessor was defined without a getter");if("function"==typeof a?n!==a||!v:!a.has(n))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===g?v:"a"===g?v.call(n):v?v.value:a.get(n)}function __classPrivateFieldSet(n,a,g,v,j){if("m"===v)throw TypeError("Private method is not writable");if("a"===v&&!j)throw TypeError("Private accessor was defined without a setter");if("function"==typeof a?n!==a||!j:!a.has(n))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===v?j.call(n,g):j?j.value=g:a.set(n,g),g}"function"==typeof SuppressedError&&SuppressedError,(z=em||(em={})).errToObj=n=>"string"==typeof n?{message:n}:n||{},z.toString=n=>"string"==typeof n?n:null==n?void 0:n.message;let ParseInputLazyPath=class ParseInputLazyPath{constructor(n,a,g,v){this._cachedPath=[],this.parent=n,this.data=a,this._path=g,this._key=v}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};let handleResult=(n,a)=>{if(isValid(a))return{success:!0,data:a.value};if(!n.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let a=new ZodError(n.common.issues);return this._error=a,this._error}}};function processCreateParams(n){if(!n)return{};let{errorMap:a,invalid_type_error:g,required_error:v,description:j}=n;if(a&&(g||v))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return a?{errorMap:a,description:j}:{errorMap:(a,j)=>{var z,W;let{message:B}=n;return"invalid_enum_value"===a.code?{message:null!=B?B:j.defaultError}:void 0===j.data?{message:null!==(z=null!=B?B:v)&&void 0!==z?z:j.defaultError}:"invalid_type"!==a.code?{message:j.defaultError}:{message:null!==(W=null!=B?B:g)&&void 0!==W?W:j.defaultError}},description:j}}let ZodType=class ZodType{constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(n){return getParsedType(n.data)}_getOrReturnCtx(n,a){return a||{common:n.parent.common,data:n.data,parsedType:getParsedType(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new ParseStatus,ctx:{common:n.parent.common,data:n.data,parsedType:getParsedType(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){let a=this._parse(n);if(isAsync(a))throw Error("Synchronous parse encountered promise.");return a}_parseAsync(n){let a=this._parse(n);return Promise.resolve(a)}parse(n,a){let g=this.safeParse(n,a);if(g.success)return g.data;throw g.error}safeParse(n,a){var g;let v={common:{issues:[],async:null!==(g=null==a?void 0:a.async)&&void 0!==g&&g,contextualErrorMap:null==a?void 0:a.errorMap},path:(null==a?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:getParsedType(n)},j=this._parseSync({data:n,path:v.path,parent:v});return handleResult(v,j)}async parseAsync(n,a){let g=await this.safeParseAsync(n,a);if(g.success)return g.data;throw g.error}async safeParseAsync(n,a){let g={common:{issues:[],contextualErrorMap:null==a?void 0:a.errorMap,async:!0},path:(null==a?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:getParsedType(n)},v=this._parse({data:n,path:g.path,parent:g}),j=await (isAsync(v)?v:Promise.resolve(v));return handleResult(g,j)}refine(n,a){let getIssueProperties=n=>"string"==typeof a||void 0===a?{message:a}:"function"==typeof a?a(n):a;return this._refinement((a,g)=>{let v=n(a),setError=()=>g.addIssue({code:ej.custom,...getIssueProperties(a)});return"undefined"!=typeof Promise&&v instanceof Promise?v.then(n=>!!n||(setError(),!1)):!!v||(setError(),!1)})}refinement(n,a){return this._refinement((g,v)=>!!n(g)||(v.addIssue("function"==typeof a?a(g,v):a),!1))}_refinement(n){return new ZodEffects({schema:this,typeName:ev.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(n){return ZodUnion.create([this,n],this._def)}and(n){return ZodIntersection.create(this,n,this._def)}transform(n){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ev.ZodEffects,effect:{type:"transform",transform:n}})}default(n){return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:"function"==typeof n?n:()=>n,typeName:ev.ZodDefault})}brand(){return new ZodBranded({typeName:ev.ZodBranded,type:this,...processCreateParams(this._def)})}catch(n){return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:"function"==typeof n?n:()=>n,typeName:ev.ZodCatch})}describe(n){let a=this.constructor;return new a({...this._def,description:n})}pipe(n){return ZodPipeline.create(this,n)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};let eZ=/^c[^\s-]{8,}$/i,eR=/^[0-9a-z]+$/,eA=/^[0-9A-HJKMNP-TV-Z]{26}$/,eL=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eF=/^[a-z0-9_-]{21}$/i,eD=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ez=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,eU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,e$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eW="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",eG=RegExp(`^${eW}$`);function timeRegexSource(n){let a="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?a=`${a}\\.\\d{${n.precision}}`:null==n.precision&&(a=`${a}(\\.\\d+)?`),a}function datetimeRegex(n){let a=`${eW}T${timeRegexSource(n)}`,g=[];return g.push(n.local?"Z?":"Z"),n.offset&&g.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${g.join("|")})`,RegExp(`^${a}$`)}let ZodString=class ZodString extends ZodType{_parse(n){var a,g;let j;this._def.coerce&&(n.data=String(n.data));let z=this._getType(n);if(z!==eM.string){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.string,received:a.parsedType}),eN}let W=new ParseStatus;for(let z of this._def.checks)if("min"===z.kind)n.data.lengthz.value&&(addIssueToContext(j=this._getOrReturnCtx(n,j),{code:ej.too_big,maximum:z.value,type:"string",inclusive:!0,exact:!1,message:z.message}),W.dirty());else if("length"===z.kind){let a=n.data.length>z.value,g=n.data.lengthn.test(a),{validation:a,code:ej.invalid_string,...em.errToObj(g)})}_addCheck(n){return new ZodString({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...em.errToObj(n)})}url(n){return this._addCheck({kind:"url",...em.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...em.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...em.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...em.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...em.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...em.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...em.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...em.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...em.errToObj(n)})}datetime(n){var a,g;return"string"==typeof n?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:void 0===(null==n?void 0:n.precision)?null:null==n?void 0:n.precision,offset:null!==(a=null==n?void 0:n.offset)&&void 0!==a&&a,local:null!==(g=null==n?void 0:n.local)&&void 0!==g&&g,...em.errToObj(null==n?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return"string"==typeof n?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:void 0===(null==n?void 0:n.precision)?null:null==n?void 0:n.precision,...em.errToObj(null==n?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...em.errToObj(n)})}regex(n,a){return this._addCheck({kind:"regex",regex:n,...em.errToObj(a)})}includes(n,a){return this._addCheck({kind:"includes",value:n,position:null==a?void 0:a.position,...em.errToObj(null==a?void 0:a.message)})}startsWith(n,a){return this._addCheck({kind:"startsWith",value:n,...em.errToObj(a)})}endsWith(n,a){return this._addCheck({kind:"endsWith",value:n,...em.errToObj(a)})}min(n,a){return this._addCheck({kind:"min",value:n,...em.errToObj(a)})}max(n,a){return this._addCheck({kind:"max",value:n,...em.errToObj(a)})}length(n,a){return this._addCheck({kind:"length",value:n,...em.errToObj(a)})}nonempty(n){return this.min(1,em.errToObj(n))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>"datetime"===n.kind)}get isDate(){return!!this._def.checks.find(n=>"date"===n.kind)}get isTime(){return!!this._def.checks.find(n=>"time"===n.kind)}get isDuration(){return!!this._def.checks.find(n=>"duration"===n.kind)}get isEmail(){return!!this._def.checks.find(n=>"email"===n.kind)}get isURL(){return!!this._def.checks.find(n=>"url"===n.kind)}get isEmoji(){return!!this._def.checks.find(n=>"emoji"===n.kind)}get isUUID(){return!!this._def.checks.find(n=>"uuid"===n.kind)}get isNANOID(){return!!this._def.checks.find(n=>"nanoid"===n.kind)}get isCUID(){return!!this._def.checks.find(n=>"cuid"===n.kind)}get isCUID2(){return!!this._def.checks.find(n=>"cuid2"===n.kind)}get isULID(){return!!this._def.checks.find(n=>"ulid"===n.kind)}get isIP(){return!!this._def.checks.find(n=>"ip"===n.kind)}get isBase64(){return!!this._def.checks.find(n=>"base64"===n.kind)}get minLength(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxLength(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value{var a;return new ZodString({checks:[],typeName:ev.ZodString,coerce:null!==(a=null==n?void 0:n.coerce)&&void 0!==a&&a,...processCreateParams(n)})};let ZodNumber=class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){let a;this._def.coerce&&(n.data=Number(n.data));let g=this._getType(n);if(g!==eM.number){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.number,received:a.parsedType}),eN}let v=new ParseStatus;for(let g of this._def.checks)if("int"===g.kind)ef.isInteger(n.data)||(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.invalid_type,expected:"integer",received:"float",message:g.message}),v.dirty());else if("min"===g.kind){let j=g.inclusive?n.datag.value:n.data>=g.value;j&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.too_big,maximum:g.value,type:"number",inclusive:g.inclusive,exact:!1,message:g.message}),v.dirty())}else"multipleOf"===g.kind?0!==function(n,a){let g=(n.toString().split(".")[1]||"").length,v=(a.toString().split(".")[1]||"").length,j=g>v?g:v,z=parseInt(n.toFixed(j).replace(".","")),W=parseInt(a.toFixed(j).replace(".",""));return z%W/Math.pow(10,j)}(n.data,g.value)&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.not_multiple_of,multipleOf:g.value,message:g.message}),v.dirty()):"finite"===g.kind?Number.isFinite(n.data)||(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.not_finite,message:g.message}),v.dirty()):ef.assertNever(g);return{status:v.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,em.toString(a))}gt(n,a){return this.setLimit("min",n,!1,em.toString(a))}lte(n,a){return this.setLimit("max",n,!0,em.toString(a))}lt(n,a){return this.setLimit("max",n,!1,em.toString(a))}setLimit(n,a,g,v){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:g,message:em.toString(v)}]})}_addCheck(n){return new ZodNumber({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:em.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:em.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:em.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:em.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:em.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:em.toString(a)})}finite(n){return this._addCheck({kind:"finite",message:em.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:em.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:em.toString(n)})}get minValue(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value"int"===n.kind||"multipleOf"===n.kind&&ef.isInteger(n.value))}get isFinite(){let n=null,a=null;for(let g of this._def.checks){if("finite"===g.kind||"int"===g.kind||"multipleOf"===g.kind)return!0;"min"===g.kind?(null===a||g.value>a)&&(a=g.value):"max"===g.kind&&(null===n||g.valuenew ZodNumber({checks:[],typeName:ev.ZodNumber,coerce:(null==n?void 0:n.coerce)||!1,...processCreateParams(n)});let ZodBigInt=class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){let a;this._def.coerce&&(n.data=BigInt(n.data));let g=this._getType(n);if(g!==eM.bigint){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.bigint,received:a.parsedType}),eN}let v=new ParseStatus;for(let g of this._def.checks)if("min"===g.kind){let j=g.inclusive?n.datag.value:n.data>=g.value;j&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.too_big,type:"bigint",maximum:g.value,inclusive:g.inclusive,message:g.message}),v.dirty())}else"multipleOf"===g.kind?n.data%g.value!==BigInt(0)&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.not_multiple_of,multipleOf:g.value,message:g.message}),v.dirty()):ef.assertNever(g);return{status:v.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,em.toString(a))}gt(n,a){return this.setLimit("min",n,!1,em.toString(a))}lte(n,a){return this.setLimit("max",n,!0,em.toString(a))}lt(n,a){return this.setLimit("max",n,!1,em.toString(a))}setLimit(n,a,g,v){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:g,message:em.toString(v)}]})}_addCheck(n){return new ZodBigInt({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:em.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:em.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:em.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:em.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:em.toString(a)})}get minValue(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value{var a;return new ZodBigInt({checks:[],typeName:ev.ZodBigInt,coerce:null!==(a=null==n?void 0:n.coerce)&&void 0!==a&&a,...processCreateParams(n)})};let ZodBoolean=class ZodBoolean extends ZodType{_parse(n){this._def.coerce&&(n.data=!!n.data);let a=this._getType(n);if(a!==eM.boolean){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.boolean,received:a.parsedType}),eN}return OK(n.data)}};ZodBoolean.create=n=>new ZodBoolean({typeName:ev.ZodBoolean,coerce:(null==n?void 0:n.coerce)||!1,...processCreateParams(n)});let ZodDate=class ZodDate extends ZodType{_parse(n){let a;this._def.coerce&&(n.data=new Date(n.data));let g=this._getType(n);if(g!==eM.date){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.date,received:a.parsedType}),eN}if(isNaN(n.data.getTime())){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_date}),eN}let v=new ParseStatus;for(let g of this._def.checks)"min"===g.kind?n.data.getTime()g.value&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:ej.too_big,message:g.message,inclusive:!0,exact:!1,maximum:g.value,type:"date"}),v.dirty()):ef.assertNever(g);return{status:v.value,value:new Date(n.data.getTime())}}_addCheck(n){return new ZodDate({...this._def,checks:[...this._def.checks,n]})}min(n,a){return this._addCheck({kind:"min",value:n.getTime(),message:em.toString(a)})}max(n,a){return this._addCheck({kind:"max",value:n.getTime(),message:em.toString(a)})}get minDate(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return null!=n?new Date(n):null}get maxDate(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.valuenew ZodDate({checks:[],coerce:(null==n?void 0:n.coerce)||!1,typeName:ev.ZodDate,...processCreateParams(n)});let ZodSymbol=class ZodSymbol extends ZodType{_parse(n){let a=this._getType(n);if(a!==eM.symbol){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.symbol,received:a.parsedType}),eN}return OK(n.data)}};ZodSymbol.create=n=>new ZodSymbol({typeName:ev.ZodSymbol,...processCreateParams(n)});let ZodUndefined=class ZodUndefined extends ZodType{_parse(n){let a=this._getType(n);if(a!==eM.undefined){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.undefined,received:a.parsedType}),eN}return OK(n.data)}};ZodUndefined.create=n=>new ZodUndefined({typeName:ev.ZodUndefined,...processCreateParams(n)});let ZodNull=class ZodNull extends ZodType{_parse(n){let a=this._getType(n);if(a!==eM.null){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.null,received:a.parsedType}),eN}return OK(n.data)}};ZodNull.create=n=>new ZodNull({typeName:ev.ZodNull,...processCreateParams(n)});let ZodAny=class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(n){return OK(n.data)}};ZodAny.create=n=>new ZodAny({typeName:ev.ZodAny,...processCreateParams(n)});let ZodUnknown=class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(n){return OK(n.data)}};ZodUnknown.create=n=>new ZodUnknown({typeName:ev.ZodUnknown,...processCreateParams(n)});let ZodNever=class ZodNever extends ZodType{_parse(n){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.never,received:a.parsedType}),eN}};ZodNever.create=n=>new ZodNever({typeName:ev.ZodNever,...processCreateParams(n)});let ZodVoid=class ZodVoid extends ZodType{_parse(n){let a=this._getType(n);if(a!==eM.undefined){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.void,received:a.parsedType}),eN}return OK(n.data)}};ZodVoid.create=n=>new ZodVoid({typeName:ev.ZodVoid,...processCreateParams(n)});let ZodArray=class ZodArray extends ZodType{_parse(n){let{ctx:a,status:g}=this._processInputParams(n),v=this._def;if(a.parsedType!==eM.array)return addIssueToContext(a,{code:ej.invalid_type,expected:eM.array,received:a.parsedType}),eN;if(null!==v.exactLength){let n=a.data.length>v.exactLength.value,j=a.data.lengthv.maxLength.value&&(addIssueToContext(a,{code:ej.too_big,maximum:v.maxLength.value,type:"array",inclusive:!0,exact:!1,message:v.maxLength.message}),g.dirty()),a.common.async)return Promise.all([...a.data].map((n,g)=>v.type._parseAsync(new ParseInputLazyPath(a,n,a.path,g)))).then(n=>ParseStatus.mergeArray(g,n));let j=[...a.data].map((n,g)=>v.type._parseSync(new ParseInputLazyPath(a,n,a.path,g)));return ParseStatus.mergeArray(g,j)}get element(){return this._def.type}min(n,a){return new ZodArray({...this._def,minLength:{value:n,message:em.toString(a)}})}max(n,a){return new ZodArray({...this._def,maxLength:{value:n,message:em.toString(a)}})}length(n,a){return new ZodArray({...this._def,exactLength:{value:n,message:em.toString(a)}})}nonempty(n){return this.min(1,n)}};ZodArray.create=(n,a)=>new ZodArray({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ev.ZodArray,...processCreateParams(a)});let ZodObject=class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let n=this._def.shape(),a=ef.objectKeys(n);return this._cached={shape:n,keys:a}}_parse(n){let a=this._getType(n);if(a!==eM.object){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.object,received:a.parsedType}),eN}let{status:g,ctx:v}=this._processInputParams(n),{shape:j,keys:z}=this._getCached(),W=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(let n in v.data)z.includes(n)||W.push(n);let B=[];for(let n of z){let a=j[n],g=v.data[n];B.push({key:{status:"valid",value:n},value:a._parse(new ParseInputLazyPath(v,g,v.path,n)),alwaysSet:n in v.data})}if(this._def.catchall instanceof ZodNever){let n=this._def.unknownKeys;if("passthrough"===n)for(let n of W)B.push({key:{status:"valid",value:n},value:{status:"valid",value:v.data[n]}});else if("strict"===n)W.length>0&&(addIssueToContext(v,{code:ej.unrecognized_keys,keys:W}),g.dirty());else if("strip"===n);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let n=this._def.catchall;for(let a of W){let g=v.data[a];B.push({key:{status:"valid",value:a},value:n._parse(new ParseInputLazyPath(v,g,v.path,a)),alwaysSet:a in v.data})}}return v.common.async?Promise.resolve().then(async()=>{let n=[];for(let a of B){let g=await a.key,v=await a.value;n.push({key:g,value:v,alwaysSet:a.alwaysSet})}return n}).then(n=>ParseStatus.mergeObjectSync(g,n)):ParseStatus.mergeObjectSync(g,B)}get shape(){return this._def.shape()}strict(n){return em.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==n?{errorMap:(a,g)=>{var v,j,z,W;let B=null!==(z=null===(j=(v=this._def).errorMap)||void 0===j?void 0:j.call(v,a,g).message)&&void 0!==z?z:g.defaultError;return"unrecognized_keys"===a.code?{message:null!==(W=em.errToObj(n).message)&&void 0!==W?W:B}:{message:B}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(n){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){let a=new ZodObject({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:ev.ZodObject});return a}setKey(n,a){return this.augment({[n]:a})}catchall(n){return new ZodObject({...this._def,catchall:n})}pick(n){let a={};return ef.objectKeys(n).forEach(g=>{n[g]&&this.shape[g]&&(a[g]=this.shape[g])}),new ZodObject({...this._def,shape:()=>a})}omit(n){let a={};return ef.objectKeys(this.shape).forEach(g=>{n[g]||(a[g]=this.shape[g])}),new ZodObject({...this._def,shape:()=>a})}deepPartial(){return function deepPartialify(n){if(n instanceof ZodObject){let a={};for(let g in n.shape){let v=n.shape[g];a[g]=ZodOptional.create(deepPartialify(v))}return new ZodObject({...n._def,shape:()=>a})}return n instanceof ZodArray?new ZodArray({...n._def,type:deepPartialify(n.element)}):n instanceof ZodOptional?ZodOptional.create(deepPartialify(n.unwrap())):n instanceof ZodNullable?ZodNullable.create(deepPartialify(n.unwrap())):n instanceof ZodTuple?ZodTuple.create(n.items.map(n=>deepPartialify(n))):n}(this)}partial(n){let a={};return ef.objectKeys(this.shape).forEach(g=>{let v=this.shape[g];n&&!n[g]?a[g]=v:a[g]=v.optional()}),new ZodObject({...this._def,shape:()=>a})}required(n){let a={};return ef.objectKeys(this.shape).forEach(g=>{if(n&&!n[g])a[g]=this.shape[g];else{let n=this.shape[g],v=n;for(;v instanceof ZodOptional;)v=v._def.innerType;a[g]=v}}),new ZodObject({...this._def,shape:()=>a})}keyof(){return createZodEnum(ef.objectKeys(this.shape))}};ZodObject.create=(n,a)=>new ZodObject({shape:()=>n,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ev.ZodObject,...processCreateParams(a)}),ZodObject.strictCreate=(n,a)=>new ZodObject({shape:()=>n,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ev.ZodObject,...processCreateParams(a)}),ZodObject.lazycreate=(n,a)=>new ZodObject({shape:n,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ev.ZodObject,...processCreateParams(a)});let ZodUnion=class ZodUnion extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=this._def.options;if(a.common.async)return Promise.all(g.map(async n=>{let g={...a,common:{...a.common,issues:[]},parent:null};return{result:await n._parseAsync({data:a.data,path:a.path,parent:g}),ctx:g}})).then(function(n){for(let a of n)if("valid"===a.result.status)return a.result;for(let g of n)if("dirty"===g.result.status)return a.common.issues.push(...g.ctx.common.issues),g.result;let g=n.map(n=>new ZodError(n.ctx.common.issues));return addIssueToContext(a,{code:ej.invalid_union,unionErrors:g}),eN});{let n;let v=[];for(let j of g){let g={...a,common:{...a.common,issues:[]},parent:null},z=j._parseSync({data:a.data,path:a.path,parent:g});if("valid"===z.status)return z;"dirty"!==z.status||n||(n={result:z,ctx:g}),g.common.issues.length&&v.push(g.common.issues)}if(n)return a.common.issues.push(...n.ctx.common.issues),n.result;let j=v.map(n=>new ZodError(n));return addIssueToContext(a,{code:ej.invalid_union,unionErrors:j}),eN}}get options(){return this._def.options}};ZodUnion.create=(n,a)=>new ZodUnion({options:n,typeName:ev.ZodUnion,...processCreateParams(a)});let getDiscriminator=n=>{if(n instanceof ZodLazy)return getDiscriminator(n.schema);if(n instanceof ZodEffects)return getDiscriminator(n.innerType());if(n instanceof ZodLiteral)return[n.value];if(n instanceof ZodEnum)return n.options;if(n instanceof ZodNativeEnum)return ef.objectValues(n.enum);if(n instanceof ZodDefault)return getDiscriminator(n._def.innerType);if(n instanceof ZodUndefined)return[void 0];else if(n instanceof ZodNull)return[null];else if(n instanceof ZodOptional)return[void 0,...getDiscriminator(n.unwrap())];else if(n instanceof ZodNullable)return[null,...getDiscriminator(n.unwrap())];else if(n instanceof ZodBranded)return getDiscriminator(n.unwrap());else if(n instanceof ZodReadonly)return getDiscriminator(n.unwrap());else if(n instanceof ZodCatch)return getDiscriminator(n._def.innerType);else return[]};let ZodDiscriminatedUnion=class ZodDiscriminatedUnion extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eM.object)return addIssueToContext(a,{code:ej.invalid_type,expected:eM.object,received:a.parsedType}),eN;let g=this.discriminator,v=a.data[g],j=this.optionsMap.get(v);return j?a.common.async?j._parseAsync({data:a.data,path:a.path,parent:a}):j._parseSync({data:a.data,path:a.path,parent:a}):(addIssueToContext(a,{code:ej.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[g]}),eN)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,a,g){let v=new Map;for(let g of a){let a=getDiscriminator(g.shape[n]);if(!a.length)throw Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(let j of a){if(v.has(j))throw Error(`Discriminator property ${String(n)} has duplicate value ${String(j)}`);v.set(j,g)}}return new ZodDiscriminatedUnion({typeName:ev.ZodDiscriminatedUnion,discriminator:n,options:a,optionsMap:v,...processCreateParams(g)})}};let ZodIntersection=class ZodIntersection extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n),handleParsed=(n,v)=>{if(isAborted(n)||isAborted(v))return eN;let j=function mergeValues(n,a){let g=getParsedType(n),v=getParsedType(a);if(n===a)return{valid:!0,data:n};if(g===eM.object&&v===eM.object){let g=ef.objectKeys(a),v=ef.objectKeys(n).filter(n=>-1!==g.indexOf(n)),j={...n,...a};for(let g of v){let v=mergeValues(n[g],a[g]);if(!v.valid)return{valid:!1};j[g]=v.data}return{valid:!0,data:j}}if(g===eM.array&&v===eM.array){if(n.length!==a.length)return{valid:!1};let g=[];for(let v=0;vhandleParsed(n,a)):handleParsed(this._def.left._parseSync({data:g.data,path:g.path,parent:g}),this._def.right._parseSync({data:g.data,path:g.path,parent:g}))}};ZodIntersection.create=(n,a,g)=>new ZodIntersection({left:n,right:a,typeName:ev.ZodIntersection,...processCreateParams(g)});let ZodTuple=class ZodTuple extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eM.array)return addIssueToContext(g,{code:ej.invalid_type,expected:eM.array,received:g.parsedType}),eN;if(g.data.lengththis._def.items.length&&(addIssueToContext(g,{code:ej.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());let j=[...g.data].map((n,a)=>{let v=this._def.items[a]||this._def.rest;return v?v._parse(new ParseInputLazyPath(g,n,g.path,a)):null}).filter(n=>!!n);return g.common.async?Promise.all(j).then(n=>ParseStatus.mergeArray(a,n)):ParseStatus.mergeArray(a,j)}get items(){return this._def.items}rest(n){return new ZodTuple({...this._def,rest:n})}};ZodTuple.create=(n,a)=>{if(!Array.isArray(n))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:n,typeName:ev.ZodTuple,rest:null,...processCreateParams(a)})};let ZodRecord=class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eM.object)return addIssueToContext(g,{code:ej.invalid_type,expected:eM.object,received:g.parsedType}),eN;let v=[],j=this._def.keyType,z=this._def.valueType;for(let n in g.data)v.push({key:j._parse(new ParseInputLazyPath(g,n,g.path,n)),value:z._parse(new ParseInputLazyPath(g,g.data[n],g.path,n)),alwaysSet:n in g.data});return g.common.async?ParseStatus.mergeObjectAsync(a,v):ParseStatus.mergeObjectSync(a,v)}get element(){return this._def.valueType}static create(n,a,g){return new ZodRecord(a instanceof ZodType?{keyType:n,valueType:a,typeName:ev.ZodRecord,...processCreateParams(g)}:{keyType:ZodString.create(),valueType:n,typeName:ev.ZodRecord,...processCreateParams(a)})}};let ZodMap=class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eM.map)return addIssueToContext(g,{code:ej.invalid_type,expected:eM.map,received:g.parsedType}),eN;let v=this._def.keyType,j=this._def.valueType,z=[...g.data.entries()].map(([n,a],z)=>({key:v._parse(new ParseInputLazyPath(g,n,g.path,[z,"key"])),value:j._parse(new ParseInputLazyPath(g,a,g.path,[z,"value"]))}));if(g.common.async){let n=new Map;return Promise.resolve().then(async()=>{for(let g of z){let v=await g.key,j=await g.value;if("aborted"===v.status||"aborted"===j.status)return eN;("dirty"===v.status||"dirty"===j.status)&&a.dirty(),n.set(v.value,j.value)}return{status:a.value,value:n}})}{let n=new Map;for(let g of z){let v=g.key,j=g.value;if("aborted"===v.status||"aborted"===j.status)return eN;("dirty"===v.status||"dirty"===j.status)&&a.dirty(),n.set(v.value,j.value)}return{status:a.value,value:n}}}};ZodMap.create=(n,a,g)=>new ZodMap({valueType:a,keyType:n,typeName:ev.ZodMap,...processCreateParams(g)});let ZodSet=class ZodSet extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eM.set)return addIssueToContext(g,{code:ej.invalid_type,expected:eM.set,received:g.parsedType}),eN;let v=this._def;null!==v.minSize&&g.data.sizev.maxSize.value&&(addIssueToContext(g,{code:ej.too_big,maximum:v.maxSize.value,type:"set",inclusive:!0,exact:!1,message:v.maxSize.message}),a.dirty());let j=this._def.valueType;function finalizeSet(n){let g=new Set;for(let v of n){if("aborted"===v.status)return eN;"dirty"===v.status&&a.dirty(),g.add(v.value)}return{status:a.value,value:g}}let z=[...g.data.values()].map((n,a)=>j._parse(new ParseInputLazyPath(g,n,g.path,a)));return g.common.async?Promise.all(z).then(n=>finalizeSet(n)):finalizeSet(z)}min(n,a){return new ZodSet({...this._def,minSize:{value:n,message:em.toString(a)}})}max(n,a){return new ZodSet({...this._def,maxSize:{value:n,message:em.toString(a)}})}size(n,a){return this.min(n,a).max(n,a)}nonempty(n){return this.min(1,n)}};ZodSet.create=(n,a)=>new ZodSet({valueType:n,minSize:null,maxSize:null,typeName:ev.ZodSet,...processCreateParams(a)});let ZodFunction=class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eM.function)return addIssueToContext(a,{code:ej.invalid_type,expected:eM.function,received:a.parsedType}),eN;function makeArgsIssue(n,g){return makeIssue({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,getErrorMap(),errorMap].filter(n=>!!n),issueData:{code:ej.invalid_arguments,argumentsError:g}})}function makeReturnsIssue(n,g){return makeIssue({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,getErrorMap(),errorMap].filter(n=>!!n),issueData:{code:ej.invalid_return_type,returnTypeError:g}})}let g={errorMap:a.common.contextualErrorMap},v=a.data;if(this._def.returns instanceof ZodPromise){let n=this;return OK(async function(...a){let j=new ZodError([]),z=await n._def.args.parseAsync(a,g).catch(n=>{throw j.addIssue(makeArgsIssue(a,n)),j}),W=await Reflect.apply(v,this,z),B=await n._def.returns._def.type.parseAsync(W,g).catch(n=>{throw j.addIssue(makeReturnsIssue(W,n)),j});return B})}{let n=this;return OK(function(...a){let j=n._def.args.safeParse(a,g);if(!j.success)throw new ZodError([makeArgsIssue(a,j.error)]);let z=Reflect.apply(v,this,j.data),W=n._def.returns.safeParse(z,g);if(!W.success)throw new ZodError([makeReturnsIssue(z,W.error)]);return W.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new ZodFunction({...this._def,args:ZodTuple.create(n).rest(ZodUnknown.create())})}returns(n){return new ZodFunction({...this._def,returns:n})}implement(n){let a=this.parse(n);return a}strictImplement(n){let a=this.parse(n);return a}static create(n,a,g){return new ZodFunction({args:n||ZodTuple.create([]).rest(ZodUnknown.create()),returns:a||ZodUnknown.create(),typeName:ev.ZodFunction,...processCreateParams(g)})}};let ZodLazy=class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(n){let{ctx:a}=this._processInputParams(n),g=this._def.getter();return g._parse({data:a.data,path:a.path,parent:a})}};ZodLazy.create=(n,a)=>new ZodLazy({getter:n,typeName:ev.ZodLazy,...processCreateParams(a)});let ZodLiteral=class ZodLiteral extends ZodType{_parse(n){if(n.data!==this._def.value){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{received:a.data,code:ej.invalid_literal,expected:this._def.value}),eN}return{status:"valid",value:n.data}}get value(){return this._def.value}};function createZodEnum(n,a){return new ZodEnum({values:n,typeName:ev.ZodEnum,...processCreateParams(a)})}ZodLiteral.create=(n,a)=>new ZodLiteral({value:n,typeName:ev.ZodLiteral,...processCreateParams(a)});let ZodEnum=class ZodEnum extends ZodType{constructor(){super(...arguments),ex.set(this,void 0)}_parse(n){if("string"!=typeof n.data){let a=this._getOrReturnCtx(n),g=this._def.values;return addIssueToContext(a,{expected:ef.joinValues(g),received:a.parsedType,code:ej.invalid_type}),eN}if(__classPrivateFieldGet(this,ex,"f")||__classPrivateFieldSet(this,ex,new Set(this._def.values),"f"),!__classPrivateFieldGet(this,ex,"f").has(n.data)){let a=this._getOrReturnCtx(n),g=this._def.values;return addIssueToContext(a,{received:a.data,code:ej.invalid_enum_value,options:g}),eN}return OK(n.data)}get options(){return this._def.values}get enum(){let n={};for(let a of this._def.values)n[a]=a;return n}get Values(){let n={};for(let a of this._def.values)n[a]=a;return n}get Enum(){let n={};for(let a of this._def.values)n[a]=a;return n}extract(n,a=this._def){return ZodEnum.create(n,{...this._def,...a})}exclude(n,a=this._def){return ZodEnum.create(this.options.filter(a=>!n.includes(a)),{...this._def,...a})}};ex=new WeakMap,ZodEnum.create=createZodEnum;let ZodNativeEnum=class ZodNativeEnum extends ZodType{constructor(){super(...arguments),eg.set(this,void 0)}_parse(n){let a=ef.getValidEnumValues(this._def.values),g=this._getOrReturnCtx(n);if(g.parsedType!==eM.string&&g.parsedType!==eM.number){let n=ef.objectValues(a);return addIssueToContext(g,{expected:ef.joinValues(n),received:g.parsedType,code:ej.invalid_type}),eN}if(__classPrivateFieldGet(this,eg,"f")||__classPrivateFieldSet(this,eg,new Set(ef.getValidEnumValues(this._def.values)),"f"),!__classPrivateFieldGet(this,eg,"f").has(n.data)){let n=ef.objectValues(a);return addIssueToContext(g,{received:g.data,code:ej.invalid_enum_value,options:n}),eN}return OK(n.data)}get enum(){return this._def.values}};eg=new WeakMap,ZodNativeEnum.create=(n,a)=>new ZodNativeEnum({values:n,typeName:ev.ZodNativeEnum,...processCreateParams(a)});let ZodPromise=class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eM.promise&&!1===a.common.async)return addIssueToContext(a,{code:ej.invalid_type,expected:eM.promise,received:a.parsedType}),eN;let g=a.parsedType===eM.promise?a.data:Promise.resolve(a.data);return OK(g.then(n=>this._def.type.parseAsync(n,{path:a.path,errorMap:a.common.contextualErrorMap})))}};ZodPromise.create=(n,a)=>new ZodPromise({type:n,typeName:ev.ZodPromise,...processCreateParams(a)});let ZodEffects=class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ev.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){let{status:a,ctx:g}=this._processInputParams(n),v=this._def.effect||null,j={addIssue:n=>{addIssueToContext(g,n),n.fatal?a.abort():a.dirty()},get path(){return g.path}};if(j.addIssue=j.addIssue.bind(j),"preprocess"===v.type){let n=v.transform(g.data,j);if(g.common.async)return Promise.resolve(n).then(async n=>{if("aborted"===a.value)return eN;let v=await this._def.schema._parseAsync({data:n,path:g.path,parent:g});return"aborted"===v.status?eN:"dirty"===v.status||"dirty"===a.value?DIRTY(v.value):v});{if("aborted"===a.value)return eN;let v=this._def.schema._parseSync({data:n,path:g.path,parent:g});return"aborted"===v.status?eN:"dirty"===v.status||"dirty"===a.value?DIRTY(v.value):v}}if("refinement"===v.type){let executeRefinement=n=>{let a=v.refinement(n,j);if(g.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return n};if(!1!==g.common.async)return this._def.schema._parseAsync({data:g.data,path:g.path,parent:g}).then(n=>"aborted"===n.status?eN:("dirty"===n.status&&a.dirty(),executeRefinement(n.value).then(()=>({status:a.value,value:n.value}))));{let n=this._def.schema._parseSync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eN:("dirty"===n.status&&a.dirty(),executeRefinement(n.value),{status:a.value,value:n.value})}}if("transform"===v.type){if(!1!==g.common.async)return this._def.schema._parseAsync({data:g.data,path:g.path,parent:g}).then(n=>isValid(n)?Promise.resolve(v.transform(n.value,j)).then(n=>({status:a.value,value:n})):n);{let n=this._def.schema._parseSync({data:g.data,path:g.path,parent:g});if(!isValid(n))return n;let z=v.transform(n.value,j);if(z instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:z}}}ef.assertNever(v)}};ZodEffects.create=(n,a,g)=>new ZodEffects({schema:n,typeName:ev.ZodEffects,effect:a,...processCreateParams(g)}),ZodEffects.createWithPreprocess=(n,a,g)=>new ZodEffects({schema:a,effect:{type:"preprocess",transform:n},typeName:ev.ZodEffects,...processCreateParams(g)});let ZodOptional=class ZodOptional extends ZodType{_parse(n){let a=this._getType(n);return a===eM.undefined?OK(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}};ZodOptional.create=(n,a)=>new ZodOptional({innerType:n,typeName:ev.ZodOptional,...processCreateParams(a)});let ZodNullable=class ZodNullable extends ZodType{_parse(n){let a=this._getType(n);return a===eM.null?OK(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}};ZodNullable.create=(n,a)=>new ZodNullable({innerType:n,typeName:ev.ZodNullable,...processCreateParams(a)});let ZodDefault=class ZodDefault extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=a.data;return a.parsedType===eM.undefined&&(g=this._def.defaultValue()),this._def.innerType._parse({data:g,path:a.path,parent:a})}removeDefault(){return this._def.innerType}};ZodDefault.create=(n,a)=>new ZodDefault({innerType:n,typeName:ev.ZodDefault,defaultValue:"function"==typeof a.default?a.default:()=>a.default,...processCreateParams(a)});let ZodCatch=class ZodCatch extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g={...a,common:{...a.common,issues:[]}},v=this._def.innerType._parse({data:g.data,path:g.path,parent:{...g}});return isAsync(v)?v.then(n=>({status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ZodError(g.common.issues)},input:g.data})})):{status:"valid",value:"valid"===v.status?v.value:this._def.catchValue({get error(){return new ZodError(g.common.issues)},input:g.data})}}removeCatch(){return this._def.innerType}};ZodCatch.create=(n,a)=>new ZodCatch({innerType:n,typeName:ev.ZodCatch,catchValue:"function"==typeof a.catch?a.catch:()=>a.catch,...processCreateParams(a)});let ZodNaN=class ZodNaN extends ZodType{_parse(n){let a=this._getType(n);if(a!==eM.nan){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:ej.invalid_type,expected:eM.nan,received:a.parsedType}),eN}return{status:"valid",value:n.data}}};ZodNaN.create=n=>new ZodNaN({typeName:ev.ZodNaN,...processCreateParams(n)});let eB=Symbol("zod_brand");let ZodBranded=class ZodBranded extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=a.data;return this._def.type._parse({data:g,path:a.path,parent:a})}unwrap(){return this._def.type}};let ZodPipeline=class ZodPipeline extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.common.async){let handleAsync=async()=>{let n=await this._def.in._parseAsync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eN:"dirty"===n.status?(a.dirty(),DIRTY(n.value)):this._def.out._parseAsync({data:n.value,path:g.path,parent:g})};return handleAsync()}{let n=this._def.in._parseSync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eN:"dirty"===n.status?(a.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:g.path,parent:g})}}static create(n,a){return new ZodPipeline({in:n,out:a,typeName:ev.ZodPipeline})}};let ZodReadonly=class ZodReadonly extends ZodType{_parse(n){let a=this._def.innerType._parse(n),freeze=n=>(isValid(n)&&(n.value=Object.freeze(n.value)),n);return isAsync(a)?a.then(n=>freeze(n)):freeze(a)}unwrap(){return this._def.innerType}};function custom(n,a={},g){return n?ZodAny.create().superRefine((v,j)=>{var z,W;if(!n(v)){let n="function"==typeof a?a(v):"string"==typeof a?{message:a}:a,B=null===(W=null!==(z=n.fatal)&&void 0!==z?z:g)||void 0===W||W,H="string"==typeof n?{message:n}:n;j.addIssue({code:"custom",...H,fatal:B})}}):ZodAny.create()}ZodReadonly.create=(n,a)=>new ZodReadonly({innerType:n,typeName:ev.ZodReadonly,...processCreateParams(a)});let eH={object:ZodObject.lazycreate};(W=ev||(ev={})).ZodString="ZodString",W.ZodNumber="ZodNumber",W.ZodNaN="ZodNaN",W.ZodBigInt="ZodBigInt",W.ZodBoolean="ZodBoolean",W.ZodDate="ZodDate",W.ZodSymbol="ZodSymbol",W.ZodUndefined="ZodUndefined",W.ZodNull="ZodNull",W.ZodAny="ZodAny",W.ZodUnknown="ZodUnknown",W.ZodNever="ZodNever",W.ZodVoid="ZodVoid",W.ZodArray="ZodArray",W.ZodObject="ZodObject",W.ZodUnion="ZodUnion",W.ZodDiscriminatedUnion="ZodDiscriminatedUnion",W.ZodIntersection="ZodIntersection",W.ZodTuple="ZodTuple",W.ZodRecord="ZodRecord",W.ZodMap="ZodMap",W.ZodSet="ZodSet",W.ZodFunction="ZodFunction",W.ZodLazy="ZodLazy",W.ZodLiteral="ZodLiteral",W.ZodEnum="ZodEnum",W.ZodEffects="ZodEffects",W.ZodNativeEnum="ZodNativeEnum",W.ZodOptional="ZodOptional",W.ZodNullable="ZodNullable",W.ZodDefault="ZodDefault",W.ZodCatch="ZodCatch",W.ZodPromise="ZodPromise",W.ZodBranded="ZodBranded",W.ZodPipeline="ZodPipeline",W.ZodReadonly="ZodReadonly";let eq=ZodString.create,eK=ZodNumber.create,eJ=ZodNaN.create,eY=ZodBigInt.create,eQ=ZodBoolean.create,eX=ZodDate.create,e0=ZodSymbol.create,e1=ZodUndefined.create,e2=ZodNull.create,e4=ZodAny.create,e5=ZodUnknown.create,e3=ZodNever.create,e6=ZodVoid.create,e7=ZodArray.create,e9=ZodObject.create,e8=ZodObject.strictCreate,te=ZodUnion.create,tt=ZodDiscriminatedUnion.create,tn=ZodIntersection.create,tr=ZodTuple.create,to=ZodRecord.create,ta=ZodMap.create,ti=ZodSet.create,ts=ZodFunction.create,tl=ZodLazy.create,td=ZodLiteral.create,tu=ZodEnum.create,tc=ZodNativeEnum.create,tp=ZodPromise.create,tf=ZodEffects.create,th=ZodOptional.create,tm=ZodNullable.create,tx=ZodEffects.createWithPreprocess,tg=ZodPipeline.create;var tv=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap:function(n){eI=n},getErrorMap:getErrorMap,makeIssue:makeIssue,EMPTY_PATH:[],addIssueToContext:addIssueToContext,ParseStatus:ParseStatus,INVALID:eN,DIRTY:DIRTY,OK:OK,isAborted:isAborted,isDirty:isDirty,isValid:isValid,isAsync:isAsync,get util(){return ef},get objectUtil(){return eh},ZodParsedType:eM,getParsedType:getParsedType,ZodType:ZodType,datetimeRegex:datetimeRegex,ZodString:ZodString,ZodNumber:ZodNumber,ZodBigInt:ZodBigInt,ZodBoolean:ZodBoolean,ZodDate:ZodDate,ZodSymbol:ZodSymbol,ZodUndefined:ZodUndefined,ZodNull:ZodNull,ZodAny:ZodAny,ZodUnknown:ZodUnknown,ZodNever:ZodNever,ZodVoid:ZodVoid,ZodArray:ZodArray,ZodObject:ZodObject,ZodUnion:ZodUnion,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodIntersection:ZodIntersection,ZodTuple:ZodTuple,ZodRecord:ZodRecord,ZodMap:ZodMap,ZodSet:ZodSet,ZodFunction:ZodFunction,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodEnum:ZodEnum,ZodNativeEnum:ZodNativeEnum,ZodPromise:ZodPromise,ZodEffects:ZodEffects,ZodTransformer:ZodEffects,ZodOptional:ZodOptional,ZodNullable:ZodNullable,ZodDefault:ZodDefault,ZodCatch:ZodCatch,ZodNaN:ZodNaN,BRAND:eB,ZodBranded:ZodBranded,ZodPipeline:ZodPipeline,ZodReadonly:ZodReadonly,custom:custom,Schema:ZodType,ZodSchema:ZodType,late:eH,get ZodFirstPartyTypeKind(){return ev},coerce:{string:n=>ZodString.create({...n,coerce:!0}),number:n=>ZodNumber.create({...n,coerce:!0}),boolean:n=>ZodBoolean.create({...n,coerce:!0}),bigint:n=>ZodBigInt.create({...n,coerce:!0}),date:n=>ZodDate.create({...n,coerce:!0})},any:e4,array:e7,bigint:eY,boolean:eQ,date:eX,discriminatedUnion:tt,effect:tf,enum:tu,function:ts,instanceof:(n,a={message:`Input not instance of ${n.name}`})=>custom(a=>a instanceof n,a),intersection:tn,lazy:tl,literal:td,map:ta,nan:eJ,nativeEnum:tc,never:e3,null:e2,nullable:tm,number:eK,object:e9,oboolean:()=>eQ().optional(),onumber:()=>eK().optional(),optional:th,ostring:()=>eq().optional(),pipeline:tg,preprocess:tx,promise:tp,record:to,set:ti,strictObject:e8,string:eq,symbol:e0,transformer:tf,tuple:tr,undefined:e1,union:te,unknown:e5,void:e6,NEVER:eN,ZodIssueCode:ej,quotelessJson:n=>{let a=JSON.stringify(n,null,2);return a.replace(/"([^"]+)":/g,"$1:")},ZodError:ZodError}),ty=g(9517),tb=g.n(ty);g(5983);let t_=["light","dark"],tk="(prefers-color-scheme: dark)",tw="undefined"==typeof window,tC=(0,eS.createContext)(void 0),tS={setTheme:n=>{},themes:[]},y=()=>{var n;return null!==(n=(0,eS.useContext)(tC))&&void 0!==n?n:tS},$=n=>(0,eS.useContext)(tC)?eS.createElement(eS.Fragment,null,n.children):eS.createElement(f,n),tT=["light","dark"],f=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:g=!0,enableColorScheme:v=!0,storageKey:j="theme",themes:z=tT,defaultTheme:W=g?"system":"light",attribute:B="data-theme",value:H,children:K,nonce:ee})=>{let[et,en]=(0,eS.useState)(()=>S(j,W)),[er,eo]=(0,eS.useState)(()=>S(j)),ei=H?Object.values(H):z,es=(0,eS.useCallback)(n=>{let j=n;if(!j)return;"system"===n&&g&&(j=p());let z=H?H[j]:j,K=a?b():null,ee=document.documentElement;if("class"===B?(ee.classList.remove(...ei),z&&ee.classList.add(z)):z?ee.setAttribute(B,z):ee.removeAttribute(B),v){let n=t_.includes(W)?W:null,a=t_.includes(j)?j:n;ee.style.colorScheme=a}null==K||K()},[]),el=(0,eS.useCallback)(n=>{en(n);try{localStorage.setItem(j,n)}catch(n){}},[n]),ed=(0,eS.useCallback)(a=>{let v=p(a);eo(v),"system"===et&&g&&!n&&es("system")},[et,n]);(0,eS.useEffect)(()=>{let n=window.matchMedia(tk);return n.addListener(ed),ed(n),()=>n.removeListener(ed)},[ed]),(0,eS.useEffect)(()=>{let e=n=>{n.key===j&&el(n.newValue||W)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[el]),(0,eS.useEffect)(()=>{es(null!=n?n:et)},[n,et]);let eu=(0,eS.useMemo)(()=>({theme:et,setTheme:el,forcedTheme:n,resolvedTheme:"system"===et?er:et,themes:g?[...z,"system"]:z,systemTheme:g?er:void 0}),[et,el,n,er,g,z]);return eS.createElement(tC.Provider,{value:eu},eS.createElement(tE,{forcedTheme:n,disableTransitionOnChange:a,enableSystem:g,enableColorScheme:v,storageKey:j,themes:z,defaultTheme:W,attribute:B,value:H,children:K,attrs:ei,nonce:ee}),K)},tE=(0,eS.memo)(({forcedTheme:n,storageKey:a,attribute:g,enableSystem:v,enableColorScheme:j,defaultTheme:z,value:W,attrs:B,nonce:H})=>{let K="system"===z,ee="class"===g?`var d=document.documentElement,c=d.classList;c.remove(${B.map(n=>`'${n}'`).join(",")});`:`var d=document.documentElement,n='${g}',s='setAttribute';`,et=j?t_.includes(z)&&z?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${z}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",$=(n,a=!1,v=!0)=>{let z=W?W[n]:n,B=a?n+"|| ''":`'${z}'`,H="";return j&&v&&!a&&t_.includes(n)&&(H+=`d.style.colorScheme = '${n}';`),"class"===g?H+=a||z?`c.add(${B})`:"null":z&&(H+=`d[s](n,${B})`),H},en=n?`!function(){${ee}${$(n)}}()`:v?`!function(){try{${ee}var e=localStorage.getItem('${a}');if('system'===e||(!e&&${K})){var t='${tk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${$("dark")}}else{${$("light")}}}else if(e){${W?`var x=${JSON.stringify(W)};`:""}${$(W?"x[e]":"e",!0)}}${K?"":"else{"+$(z,!1,!1)+"}"}${et}}catch(e){}}()`:`!function(){try{${ee}var e=localStorage.getItem('${a}');if(e){${W?`var x=${JSON.stringify(W)};`:""}${$(W?"x[e]":"e",!0)}}else{${$(z,!1,!1)};}${et}}catch(t){}}();`;return eS.createElement("script",{nonce:H,dangerouslySetInnerHTML:{__html:en}})},()=>!0),S=(n,a)=>{let g;if(!tw){try{g=localStorage.getItem(n)||void 0}catch(n){}return g||a}},b=()=>{let n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},p=n=>(n||(n=window.matchMedia(tk)),n.matches?"dark":"light");var tO={breadcrumb:!0,collapsed:!1,footer:!0,layout:"default",navbar:!0,pagination:!0,sidebar:!0,timestamp:!0,toc:!0,typesetting:"default"},tP=tv.strictObject({breadcrumb:tv.boolean(),collapsed:tv.boolean(),footer:tv.boolean(),layout:tv.enum(["default","full","raw"]),navbar:tv.boolean(),pagination:tv.boolean(),sidebar:tv.boolean(),timestamp:tv.boolean(),toc:tv.boolean(),typesetting:tv.enum(["default","article"])}),tM=tv.enum(["normal","hidden","children"]),tj=tv.string(),tI=tv.strictObject({href:tv.string(),newWindow:tv.boolean(),title:tj}),tN=tv.strictObject({display:tM.optional(),items:tv.record(tI.partial({href:!0,newWindow:!0})),title:tj,type:tv.literal("menu")}),tZ=tv.strictObject({title:tj.optional(),type:tv.literal("separator")}),tR=tI.extend({display:tM,theme:tP,title:tj,type:tv.enum(["page","doc"])}).deepPartial();tv.string().or(tN).or(tZ).or(tR);var tA=g(227),tL=g.n(tA);function getWindow(n){if(null==n)return window;if("[object Window]"!==n.toString()){var a=n.ownerDocument;return a&&a.defaultView||window}return n}function isElement(n){var a=getWindow(n).Element;return n instanceof a||n instanceof Element}function isHTMLElement(n){var a=getWindow(n).HTMLElement;return n instanceof a||n instanceof HTMLElement}function isShadowRoot(n){if("undefined"==typeof ShadowRoot)return!1;var a=getWindow(n).ShadowRoot;return n instanceof a||n instanceof ShadowRoot}var tF=Math.max,tD=Math.min,tV=Math.round;function getUAString(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(n,a,g){void 0===a&&(a=!1),void 0===g&&(g=!1);var v=n.getBoundingClientRect(),j=1,z=1;a&&isHTMLElement(n)&&(j=n.offsetWidth>0&&tV(v.width)/n.offsetWidth||1,z=n.offsetHeight>0&&tV(v.height)/n.offsetHeight||1);var W=(isElement(n)?getWindow(n):window).visualViewport,B=!isLayoutViewport()&&g,H=(v.left+(B&&W?W.offsetLeft:0))/j,K=(v.top+(B&&W?W.offsetTop:0))/z,ee=v.width/j,et=v.height/z;return{width:ee,height:et,top:K,right:H+ee,bottom:K+et,left:H,x:H,y:K}}function getWindowScroll(n){var a=getWindow(n);return{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function getNodeName(n){return n?(n.nodeName||"").toLowerCase():null}function getDocumentElement(n){return((isElement(n)?n.ownerDocument:n.document)||window.document).documentElement}function getWindowScrollBarX(n){return getBoundingClientRect(getDocumentElement(n)).left+getWindowScroll(n).scrollLeft}function getComputedStyle_getComputedStyle(n){return getWindow(n).getComputedStyle(n)}function isScrollParent(n){var a=getComputedStyle_getComputedStyle(n),g=a.overflow,v=a.overflowX,j=a.overflowY;return/auto|scroll|overlay|hidden/.test(g+j+v)}function getLayoutRect(n){var a=getBoundingClientRect(n),g=n.offsetWidth,v=n.offsetHeight;return 1>=Math.abs(a.width-g)&&(g=a.width),1>=Math.abs(a.height-v)&&(v=a.height),{x:n.offsetLeft,y:n.offsetTop,width:g,height:v}}function getParentNode(n){return"html"===getNodeName(n)?n:n.assignedSlot||n.parentNode||(isShadowRoot(n)?n.host:null)||getDocumentElement(n)}function listScrollParents(n,a){void 0===a&&(a=[]);var g,v=function getScrollParent(n){return["html","body","#document"].indexOf(getNodeName(n))>=0?n.ownerDocument.body:isHTMLElement(n)&&isScrollParent(n)?n:getScrollParent(getParentNode(n))}(n),j=v===(null==(g=n.ownerDocument)?void 0:g.body),z=getWindow(v),W=j?[z].concat(z.visualViewport||[],isScrollParent(v)?v:[]):v,B=a.concat(W);return j?B:B.concat(listScrollParents(getParentNode(W)))}function getTrueOffsetParent(n){return isHTMLElement(n)&&"fixed"!==getComputedStyle_getComputedStyle(n).position?n.offsetParent:null}function getOffsetParent(n){for(var a=getWindow(n),g=getTrueOffsetParent(n);g&&["table","td","th"].indexOf(getNodeName(g))>=0&&"static"===getComputedStyle_getComputedStyle(g).position;)g=getTrueOffsetParent(g);return g&&("html"===getNodeName(g)||"body"===getNodeName(g)&&"static"===getComputedStyle_getComputedStyle(g).position)?a:g||function(n){var a=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(n)&&"fixed"===getComputedStyle_getComputedStyle(n).position)return null;var g=getParentNode(n);for(isShadowRoot(g)&&(g=g.host);isHTMLElement(g)&&0>["html","body"].indexOf(getNodeName(g));){var v=getComputedStyle_getComputedStyle(g);if("none"!==v.transform||"none"!==v.perspective||"paint"===v.contain||-1!==["transform","perspective"].indexOf(v.willChange)||a&&"filter"===v.willChange||a&&v.filter&&"none"!==v.filter)return g;g=g.parentNode}return null}(n)||a}var tz="bottom",tU="right",t$="left",tW="auto",tG=["top",tz,tU,t$],tB="start",tH="viewport",tq="popper",tK=tG.reduce(function(n,a){return n.concat([a+"-"+tB,a+"-end"])},[]),tJ=[].concat(tG,[tW]).reduce(function(n,a){return n.concat([a,a+"-"+tB,a+"-end"])},[]),tY=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],tQ={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var n=arguments.length,a=Array(n),g=0;g=0?"x":"y"}function computeOffsets(n){var a,g=n.reference,v=n.element,j=n.placement,z=j?getBasePlacement(j):null,W=j?getVariation(j):null,B=g.x+g.width/2-v.width/2,H=g.y+g.height/2-v.height/2;switch(z){case"top":a={x:B,y:g.y-v.height};break;case tz:a={x:B,y:g.y+g.height};break;case tU:a={x:g.x+g.width,y:H};break;case t$:a={x:g.x-v.width,y:H};break;default:a={x:g.x,y:g.y}}var K=z?getMainAxisFromPlacement(z):null;if(null!=K){var ee="y"===K?"height":"width";switch(W){case tB:a[K]=a[K]-(g[ee]/2-v[ee]/2);break;case"end":a[K]=a[K]+(g[ee]/2-v[ee]/2)}}return a}var t0={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(n){var a,g,v,j,z,W,B,H=n.popper,K=n.popperRect,ee=n.placement,et=n.variation,en=n.offsets,er=n.position,eo=n.gpuAcceleration,ei=n.adaptive,es=n.roundOffsets,el=n.isFixed,ed=en.x,eu=void 0===ed?0:ed,ec=en.y,ep=void 0===ec?0:ec,ef="function"==typeof es?es({x:eu,y:ep}):{x:eu,y:ep};eu=ef.x,ep=ef.y;var eh=en.hasOwnProperty("x"),em=en.hasOwnProperty("y"),ex=t$,eg="top",ev=window;if(ei){var ey=getOffsetParent(H),eb="clientHeight",e_="clientWidth";ey===getWindow(H)&&"static"!==getComputedStyle_getComputedStyle(ey=getDocumentElement(H)).position&&"absolute"===er&&(eb="scrollHeight",e_="scrollWidth"),("top"===ee||(ee===t$||ee===tU)&&"end"===et)&&(eg=tz,ep-=(el&&ey===ev&&ev.visualViewport?ev.visualViewport.height:ey[eb])-K.height,ep*=eo?1:-1),(ee===t$||("top"===ee||ee===tz)&&"end"===et)&&(ex=tU,eu-=(el&&ey===ev&&ev.visualViewport?ev.visualViewport.width:ey[e_])-K.width,eu*=eo?1:-1)}var ek=Object.assign({position:er},ei&&t0),ew=!0===es?(a={x:eu,y:ep},g=getWindow(H),v=a.x,j=a.y,{x:tV(v*(z=g.devicePixelRatio||1))/z||0,y:tV(j*z)/z||0}):{x:eu,y:ep};return(eu=ew.x,ep=ew.y,eo)?Object.assign({},ek,((B={})[eg]=em?"0":"",B[ex]=eh?"0":"",B.transform=1>=(ev.devicePixelRatio||1)?"translate("+eu+"px, "+ep+"px)":"translate3d("+eu+"px, "+ep+"px, 0)",B)):Object.assign({},ek,((W={})[eg]=em?ep+"px":"",W[ex]=eh?eu+"px":"",W.transform="",W))}var t1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(n){return n.replace(/left|right|bottom|top/g,function(n){return t1[n]})}var t2={start:"end",end:"start"};function getOppositeVariationPlacement(n){return n.replace(/start|end/g,function(n){return t2[n]})}function contains(n,a){var g=a.getRootNode&&a.getRootNode();if(n.contains(a))return!0;if(g&&isShadowRoot(g)){var v=a;do{if(v&&n.isSameNode(v))return!0;v=v.parentNode||v.host}while(v)}return!1}function rectToClientRect(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function getClientRectFromMixedType(n,a,g){var v,j,z,W,B,H,K,ee,et,en;return a===tH?rectToClientRect(function(n,a){var g=getWindow(n),v=getDocumentElement(n),j=g.visualViewport,z=v.clientWidth,W=v.clientHeight,B=0,H=0;if(j){z=j.width,W=j.height;var K=isLayoutViewport();(K||!K&&"fixed"===a)&&(B=j.offsetLeft,H=j.offsetTop)}return{width:z,height:W,x:B+getWindowScrollBarX(n),y:H}}(n,g)):isElement(a)?((v=getBoundingClientRect(a,!1,"fixed"===g)).top=v.top+a.clientTop,v.left=v.left+a.clientLeft,v.bottom=v.top+a.clientHeight,v.right=v.left+a.clientWidth,v.width=a.clientWidth,v.height=a.clientHeight,v.x=v.left,v.y=v.top,v):rectToClientRect((j=getDocumentElement(n),W=getDocumentElement(j),B=getWindowScroll(j),H=null==(z=j.ownerDocument)?void 0:z.body,K=tF(W.scrollWidth,W.clientWidth,H?H.scrollWidth:0,H?H.clientWidth:0),ee=tF(W.scrollHeight,W.clientHeight,H?H.scrollHeight:0,H?H.clientHeight:0),et=-B.scrollLeft+getWindowScrollBarX(j),en=-B.scrollTop,"rtl"===getComputedStyle_getComputedStyle(H||W).direction&&(et+=tF(W.clientWidth,H?H.clientWidth:0)-K),{width:K,height:ee,x:et,y:en}))}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(n){return Object.assign({},getFreshSideObject(),n)}function expandToHashMap(n,a){return a.reduce(function(a,g){return a[g]=n,a},{})}function detectOverflow(n,a){void 0===a&&(a={});var g,v,j,z,W,B,H,K=a,ee=K.placement,et=void 0===ee?n.placement:ee,en=K.strategy,er=void 0===en?n.strategy:en,eo=K.boundary,ei=K.rootBoundary,es=K.elementContext,el=void 0===es?tq:es,ed=K.altBoundary,eu=K.padding,ec=void 0===eu?0:eu,ep=mergePaddingObject("number"!=typeof ec?ec:expandToHashMap(ec,tG)),ef=n.rects.popper,eh=n.elements[void 0!==ed&&ed?el===tq?"reference":tq:el],em=(g=isElement(eh)?eh:eh.contextElement||getDocumentElement(n.elements.popper),B=(W=[].concat("clippingParents"===(v=void 0===eo?"clippingParents":eo)?(j=listScrollParents(getParentNode(g)),isElement(z=["absolute","fixed"].indexOf(getComputedStyle_getComputedStyle(g).position)>=0&&isHTMLElement(g)?getOffsetParent(g):g)?j.filter(function(n){return isElement(n)&&contains(n,z)&&"body"!==getNodeName(n)}):[]):[].concat(v),[void 0===ei?tH:ei]))[0],(H=W.reduce(function(n,a){var v=getClientRectFromMixedType(g,a,er);return n.top=tF(v.top,n.top),n.right=tD(v.right,n.right),n.bottom=tD(v.bottom,n.bottom),n.left=tF(v.left,n.left),n},getClientRectFromMixedType(g,B,er))).width=H.right-H.left,H.height=H.bottom-H.top,H.x=H.left,H.y=H.top,H),ex=getBoundingClientRect(n.elements.reference),eg=computeOffsets({reference:ex,element:ef,strategy:"absolute",placement:et}),ev=rectToClientRect(Object.assign({},ef,eg)),ey=el===tq?ev:ex,eb={top:em.top-ey.top+ep.top,bottom:ey.bottom-em.bottom+ep.bottom,left:em.left-ey.left+ep.left,right:ey.right-em.right+ep.right},e_=n.modifiersData.offset;if(el===tq&&e_){var ek=e_[et];Object.keys(eb).forEach(function(n){var a=[tU,tz].indexOf(n)>=0?1:-1,g=["top",tz].indexOf(n)>=0?"y":"x";eb[n]+=ek[g]*a})}return eb}function within(n,a,g){return tF(n,tD(a,g))}function getSideOffsets(n,a,g){return void 0===g&&(g={x:0,y:0}),{top:n.top-a.height-g.y,right:n.right-a.width+g.x,bottom:n.bottom-a.height+g.y,left:n.left-a.width-g.x}}function isAnySideFullyClipped(n){return["top",tU,tz,t$].some(function(a){return n[a]>=0})}var t4=(K=void 0===(H=(B={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(n){var a=n.state,g=n.instance,v=n.options,j=v.scroll,z=void 0===j||j,W=v.resize,B=void 0===W||W,H=getWindow(a.elements.popper),K=[].concat(a.scrollParents.reference,a.scrollParents.popper);return z&&K.forEach(function(n){n.addEventListener("scroll",g.update,tX)}),B&&H.addEventListener("resize",g.update,tX),function(){z&&K.forEach(function(n){n.removeEventListener("scroll",g.update,tX)}),B&&H.removeEventListener("resize",g.update,tX)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(n){var a=n.state,g=n.name;a.modifiersData[g]=computeOffsets({reference:a.rects.reference,element:a.rects.popper,strategy:"absolute",placement:a.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(n){var a=n.state,g=n.options,v=g.gpuAcceleration,j=g.adaptive,z=g.roundOffsets,W=void 0===z||z,B={placement:getBasePlacement(a.placement),variation:getVariation(a.placement),popper:a.elements.popper,popperRect:a.rects.popper,gpuAcceleration:void 0===v||v,isFixed:"fixed"===a.options.strategy};null!=a.modifiersData.popperOffsets&&(a.styles.popper=Object.assign({},a.styles.popper,mapToStyles(Object.assign({},B,{offsets:a.modifiersData.popperOffsets,position:a.options.strategy,adaptive:void 0===j||j,roundOffsets:W})))),null!=a.modifiersData.arrow&&(a.styles.arrow=Object.assign({},a.styles.arrow,mapToStyles(Object.assign({},B,{offsets:a.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:W})))),a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-placement":a.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(n){var a=n.state;Object.keys(a.elements).forEach(function(n){var g=a.styles[n]||{},v=a.attributes[n]||{},j=a.elements[n];isHTMLElement(j)&&getNodeName(j)&&(Object.assign(j.style,g),Object.keys(v).forEach(function(n){var a=v[n];!1===a?j.removeAttribute(n):j.setAttribute(n,!0===a?"":a)}))})},effect:function(n){var a=n.state,g={popper:{position:a.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(a.elements.popper.style,g.popper),a.styles=g,a.elements.arrow&&Object.assign(a.elements.arrow.style,g.arrow),function(){Object.keys(a.elements).forEach(function(n){var v=a.elements[n],j=a.attributes[n]||{},z=Object.keys(a.styles.hasOwnProperty(n)?a.styles[n]:g[n]).reduce(function(n,a){return n[a]="",n},{});isHTMLElement(v)&&getNodeName(v)&&(Object.assign(v.style,z),Object.keys(j).forEach(function(n){v.removeAttribute(n)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var a=n.state,g=n.options,v=n.name,j=g.offset,z=void 0===j?[0,0]:j,W=tJ.reduce(function(n,g){var v,j,W,B,H,K;return n[g]=(v=a.rects,W=[t$,"top"].indexOf(j=getBasePlacement(g))>=0?-1:1,H=(B="function"==typeof z?z(Object.assign({},v,{placement:g})):z)[0],K=B[1],H=H||0,K=(K||0)*W,[t$,tU].indexOf(j)>=0?{x:K,y:H}:{x:H,y:K}),n},{}),B=W[a.placement],H=B.x,K=B.y;null!=a.modifiersData.popperOffsets&&(a.modifiersData.popperOffsets.x+=H,a.modifiersData.popperOffsets.y+=K),a.modifiersData[v]=W}},{name:"flip",enabled:!0,phase:"main",fn:function(n){var a=n.state,g=n.options,v=n.name;if(!a.modifiersData[v]._skip){for(var j=g.mainAxis,z=void 0===j||j,W=g.altAxis,B=void 0===W||W,H=g.fallbackPlacements,K=g.padding,ee=g.boundary,et=g.rootBoundary,en=g.altBoundary,er=g.flipVariations,eo=void 0===er||er,ei=g.allowedAutoPlacements,es=a.options.placement,el=getBasePlacement(es)===es,ed=H||(el||!eo?[getOppositePlacement(es)]:function(n){if(getBasePlacement(n)===tW)return[];var a=getOppositePlacement(n);return[getOppositeVariationPlacement(n),a,getOppositeVariationPlacement(a)]}(es)),eu=[es].concat(ed).reduce(function(n,g){var v,j,z,W,B,H,en,er,es,el,ed,eu;return n.concat(getBasePlacement(g)===tW?(j=(v={placement:g,boundary:ee,rootBoundary:et,padding:K,flipVariations:eo,allowedAutoPlacements:ei}).placement,z=v.boundary,W=v.rootBoundary,B=v.padding,H=v.flipVariations,er=void 0===(en=v.allowedAutoPlacements)?tJ:en,0===(ed=(el=(es=getVariation(j))?H?tK:tK.filter(function(n){return getVariation(n)===es}):tG).filter(function(n){return er.indexOf(n)>=0})).length&&(ed=el),Object.keys(eu=ed.reduce(function(n,g){return n[g]=detectOverflow(a,{placement:g,boundary:z,rootBoundary:W,padding:B})[getBasePlacement(g)],n},{})).sort(function(n,a){return eu[n]-eu[a]})):g)},[]),ec=a.rects.reference,ep=a.rects.popper,ef=new Map,eh=!0,em=eu[0],ex=0;ex=0,e_=eb?"width":"height",ek=detectOverflow(a,{placement:eg,boundary:ee,rootBoundary:et,altBoundary:en,padding:K}),ew=eb?ey?tU:t$:ey?tz:"top";ec[e_]>ep[e_]&&(ew=getOppositePlacement(ew));var eC=getOppositePlacement(ew),eS=[];if(z&&eS.push(ek[ev]<=0),B&&eS.push(ek[ew]<=0,ek[eC]<=0),eS.every(function(n){return n})){em=eg,eh=!1;break}ef.set(eg,eS)}if(eh)for(var eT=eo?3:1,_loop=function(n){var a=eu.find(function(a){var g=ef.get(a);if(g)return g.slice(0,n).every(function(n){return n})});if(a)return em=a,"break"},eE=eT;eE>0&&"break"!==_loop(eE);eE--);a.placement!==em&&(a.modifiersData[v]._skip=!0,a.placement=em,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(n){var a=n.state,g=n.options,v=n.name,j=g.mainAxis,z=g.altAxis,W=g.boundary,B=g.rootBoundary,H=g.altBoundary,K=g.padding,ee=g.tether,et=void 0===ee||ee,en=g.tetherOffset,er=void 0===en?0:en,eo=detectOverflow(a,{boundary:W,rootBoundary:B,padding:K,altBoundary:H}),ei=getBasePlacement(a.placement),es=getVariation(a.placement),el=!es,ed=getMainAxisFromPlacement(ei),eu="x"===ed?"y":"x",ec=a.modifiersData.popperOffsets,ep=a.rects.reference,ef=a.rects.popper,eh="function"==typeof er?er(Object.assign({},a.rects,{placement:a.placement})):er,em="number"==typeof eh?{mainAxis:eh,altAxis:eh}:Object.assign({mainAxis:0,altAxis:0},eh),ex=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,eg={x:0,y:0};if(ec){if(void 0===j||j){var ev,ey="y"===ed?"top":t$,eb="y"===ed?tz:tU,e_="y"===ed?"height":"width",ek=ec[ed],ew=ek+eo[ey],eC=ek-eo[eb],eS=et?-ef[e_]/2:0,eT=es===tB?ep[e_]:ef[e_],eE=es===tB?-ef[e_]:-ep[e_],eO=a.elements.arrow,eP=et&&eO?getLayoutRect(eO):{width:0,height:0},eM=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:getFreshSideObject(),ej=eM[ey],eI=eM[eb],eN=within(0,ep[e_],eP[e_]),eZ=el?ep[e_]/2-eS-eN-ej-em.mainAxis:eT-eN-ej-em.mainAxis,eR=el?-ep[e_]/2+eS+eN+eI+em.mainAxis:eE+eN+eI+em.mainAxis,eA=a.elements.arrow&&getOffsetParent(a.elements.arrow),eL=eA?"y"===ed?eA.clientTop||0:eA.clientLeft||0:0,eF=null!=(ev=null==ex?void 0:ex[ed])?ev:0,eD=ek+eZ-eF-eL,eV=ek+eR-eF,ez=within(et?tD(ew,eD):ew,ek,et?tF(eC,eV):eC);ec[ed]=ez,eg[ed]=ez-ek}if(void 0!==z&&z){var eU,e$,eW="x"===ed?"top":t$,eG="x"===ed?tz:tU,eB=ec[eu],eH="y"===eu?"height":"width",eq=eB+eo[eW],eK=eB-eo[eG],eJ=-1!==["top",t$].indexOf(ei),eY=null!=(e$=null==ex?void 0:ex[eu])?e$:0,eQ=eJ?eq:eB-ep[eH]-ef[eH]-eY+em.altAxis,eX=eJ?eB+ep[eH]+ef[eH]-eY-em.altAxis:eK,e0=et&&eJ?(eU=within(eQ,eB,eX))>eX?eX:eU:within(et?eQ:eq,eB,et?eX:eK);ec[eu]=e0,eg[eu]=e0-eB}a.modifiersData[v]=eg}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(n){var a,g,v=n.state,j=n.name,z=n.options,W=v.elements.arrow,B=v.modifiersData.popperOffsets,H=getBasePlacement(v.placement),K=getMainAxisFromPlacement(H),ee=[t$,tU].indexOf(H)>=0?"height":"width";if(W&&B){var et=mergePaddingObject("number"!=typeof(a="function"==typeof(a=z.padding)?a(Object.assign({},v.rects,{placement:v.placement})):a)?a:expandToHashMap(a,tG)),en=getLayoutRect(W),er="y"===K?"top":t$,eo="y"===K?tz:tU,ei=v.rects.reference[ee]+v.rects.reference[K]-B[K]-v.rects.popper[ee],es=B[K]-v.rects.reference[K],el=getOffsetParent(W),ed=el?"y"===K?el.clientHeight||0:el.clientWidth||0:0,eu=et[er],ec=ed-en[ee]-et[eo],ep=ed/2-en[ee]/2+(ei/2-es/2),ef=within(eu,ep,ec);v.modifiersData[j]=((g={})[K]=ef,g.centerOffset=ef-ep,g)}},effect:function(n){var a=n.state,g=n.options.element,v=void 0===g?"[data-popper-arrow]":g;null!=v&&("string"!=typeof v||(v=a.elements.popper.querySelector(v)))&&contains(a.elements.popper,v)&&(a.elements.arrow=v)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(n){var a=n.state,g=n.name,v=a.rects.reference,j=a.rects.popper,z=a.modifiersData.preventOverflow,W=detectOverflow(a,{elementContext:"reference"}),B=detectOverflow(a,{altBoundary:!0}),H=getSideOffsets(W,v),K=getSideOffsets(B,j,z),ee=isAnySideFullyClipped(H),et=isAnySideFullyClipped(K);a.modifiersData[g]={referenceClippingOffsets:H,popperEscapeOffsets:K,isReferenceHidden:ee,hasPopperEscaped:et},a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-reference-hidden":ee,"data-popper-escaped":et})}}]}).defaultModifiers)?[]:H,et=void 0===(ee=B.defaultOptions)?tQ:ee,function(n,a,g){void 0===g&&(g=et);var v,j={placement:"bottom",orderedModifiers:[],options:Object.assign({},tQ,et),modifiersData:{},elements:{reference:n,popper:a},attributes:{},styles:{}},z=[],W=!1,B={state:j,setOptions:function(g){var v,W,H,ee,en,er="function"==typeof g?g(j.options):g;cleanupModifierEffects(),j.options=Object.assign({},et,j.options,er),j.scrollParents={reference:isElement(n)?listScrollParents(n):n.contextElement?listScrollParents(n.contextElement):[],popper:listScrollParents(a)};var eo=(W=Object.keys(v=[].concat(K,j.options.modifiers).reduce(function(n,a){var g=n[a.name];return n[a.name]=g?Object.assign({},g,a,{options:Object.assign({},g.options,a.options),data:Object.assign({},g.data,a.data)}):a,n},{})).map(function(n){return v[n]}),H=new Map,ee=new Set,en=[],W.forEach(function(n){H.set(n.name,n)}),W.forEach(function(n){ee.has(n.name)||function sort(n){ee.add(n.name),[].concat(n.requires||[],n.requiresIfExists||[]).forEach(function(n){if(!ee.has(n)){var a=H.get(n);a&&sort(a)}}),en.push(n)}(n)}),tY.reduce(function(n,a){return n.concat(en.filter(function(n){return n.phase===a}))},[]));return j.orderedModifiers=eo.filter(function(n){return n.enabled}),j.orderedModifiers.forEach(function(n){var a=n.name,g=n.options,v=n.effect;if("function"==typeof v){var W=v({state:j,name:a,instance:B,options:void 0===g?{}:g});z.push(W||function(){})}}),B.update()},forceUpdate:function(){if(!W){var n,a,g,v,z,H,K,ee,et,en,er,eo,ei=j.elements,es=ei.reference,el=ei.popper;if(areValidElements(es,el)){j.rects={reference:(a=getOffsetParent(el),g="fixed"===j.options.strategy,v=isHTMLElement(a),ee=isHTMLElement(a)&&(H=tV((z=a.getBoundingClientRect()).width)/a.offsetWidth||1,K=tV(z.height)/a.offsetHeight||1,1!==H||1!==K),et=getDocumentElement(a),en=getBoundingClientRect(es,ee,g),er={scrollLeft:0,scrollTop:0},eo={x:0,y:0},(v||!v&&!g)&&(("body"!==getNodeName(a)||isScrollParent(et))&&(er=(n=a)!==getWindow(n)&&isHTMLElement(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:getWindowScroll(n)),isHTMLElement(a)?(eo=getBoundingClientRect(a,!0),eo.x+=a.clientLeft,eo.y+=a.clientTop):et&&(eo.x=getWindowScrollBarX(et))),{x:en.left+er.scrollLeft-eo.x,y:en.top+er.scrollTop-eo.y,width:en.width,height:en.height}),popper:getLayoutRect(el)},j.reset=!1,j.placement=j.options.placement,j.orderedModifiers.forEach(function(n){return j.modifiersData[n.name]=Object.assign({},n.data)});for(var ed=0;ed=v))));a++);if(g)return z?qa(H,v,0):void(a[a.length]=H)}return!g&&H}function qa(n,a,g){return n=1===n.length?n[0]:[].concat.apply([],n),g||n.length>a?n.slice(g,g+a):n}function ra(n,a,g,v){return n=g?(n=n[(v=v&&a>g)?a:g])&&n[v?g:a]:n[a]}function Q(n,a,g,v,j){let z=0;if(n.constructor===Array){if(j)-1!==(a=n.indexOf(a))?1=this.B&&(et||!ee[eo])){var z=O(en,v,er),W="";switch(this.G){case"full":if(2z;B--)if(B-z>=this.B){var H=O(en,v,er,j,z);P(this,ee,W=eo.substring(z,B),H,n,g)}break}case"reverse":if(1=this.B&&P(this,ee,W,O(en,v,er,j,B),n,g);W=""}case"forward":if(1=this.B&&P(this,ee,W,z,n,g);break}default:if(this.C&&(z=Math.min(z/this.C(a,eo,er)|0,en-1)),P(this,ee,eo,z,n,g),et&&1=this.B&&!j[eo]){j[eo]=1;let a=this.l&&eo>z;P(this,K,a?z:eo,O(W+(v/2>W?0:1),v,er,B-1,H-1),n,g,a?eo:z)}}}}}this.m||(this.register[n]=1)}}return this},ey.search=function(n,a,g){let v,j,z;g||(!a&&D(n)?n=(g=n).query:D(a)&&(g=a));let W=[],B,H,K=0;if(g){n=g.query||n,a=g.limit,K=g.offset||0;var ee=g.context;H=g.suggest}if(n&&1<(B=(n=this.encode(""+n)).length)){g=x();var et=[];for(let a=0,v=0,j;a=this.B&&!g[j]){if(!this.s&&!H&&!this.map[j])return W;et[v++]=j,g[j]=1}B=(n=et).length}if(!B)return W;for(a||(a=100),ee=this.depth&&1{z=n})),j||(j=0)){case 0:if(W="reg",this.m)for(let n in B=x(),this.register)B[n]=1;else B=this.register;break;case 1:W="cfg",B={doc:0,opt:this.s?1:0};break;case 2:W="map",B=this.map;break;case 3:W="ctx",B=this.h;break;default:void 0===g&&z&&z();return}return oa(n,a||this,g,W,v,j,B,z),H},ey.import=function(n,a){if(a)switch(C(a)&&(a=JSON.parse(a)),n){case"cfg":this.s=!!a.opt;break;case"reg":this.m=!1,this.register=a;break;case"map":this.map=a;break;case"ctx":this.h=a}},ia(N.prototype);let t8=0;function flexsearch_bundle_module_min_S(n){var a;if(!(this instanceof flexsearch_bundle_module_min_S))return new flexsearch_bundle_module_min_S(n);n?E(a=n.encode)&&(n.encode=a.toString()):n={},(a=(self||window)._factory)&&(a=a.toString());let v="undefined"==typeof window&&self.exports,j=this;this.o=function(n,a,v){let j;try{j=a?new(g(5184)).Worker("//node/node.js"):n?new Worker(URL.createObjectURL(new Blob(["onmessage="+sa.toString()],{type:"text/javascript"}))):new Worker(C(v)?v:"worker/worker.js",{type:"module"})}catch(n){}return j}(a,v,n.worker),this.h=x(),this.o&&(v?this.o.on("message",function(n){j.h[n.id](n.msg),delete j.h[n.id]}):this.o.onmessage=function(n){n=n.data,j.h[n.id](n.msg),delete j.h[n.id]},this.o.postMessage({task:"init",factory:a,options:n}))}function T(n){flexsearch_bundle_module_min_S.prototype[n]=flexsearch_bundle_module_min_S.prototype[n+"Async"]=function(){let a;let g=this,v=[].slice.call(arguments);var j=v[v.length-1];return E(j)&&(a=j,v.splice(v.length-1,1)),j=new Promise(function(a){setTimeout(function(){g.h[++t8]=a,g.o.postMessage({task:n,id:t8,args:v})})}),a?(j.then(a),this):j}}function U(n){if(!(this instanceof U))return new U(n);var a,g=n.document||n.doc||n;this.K=[],this.h=[],this.A=[],this.register=x(),this.key=(a=g.key||g.id)&&V(a,this.A)||"id",this.m=flexsearch_bundle_module_min_u(n.fastupdate),this.C=(a=g.store)&&!0!==a&&[],this.store=a&&x(),this.I=(a=g.tag)&&V(a,this.A),this.l=a&&x(),this.cache=(a=n.cache)&&new M(a),n.cache=!1,this.o=n.worker,this.async=!1,a=x();let v=g.index||g.field||g;C(v)&&(v=[v]);for(let g=0,j,z;ga||g)&&(j=j.slice(g,g+a)),v&&(j=wa.call(this,j)),{tag:n,result:j}}function wa(n){let a=Array(n.length);for(let g=0,v;g{z=n})),j||(j=0),v||(v=0),v()=>n.dispose(),[n]),n}var ns=g(9140),nl=g(8656),nd=g(93),nu=g(121),nc=g(1963),np=g(3142),nf=g(2549);function transition_g(n,...a){n&&a.length>0&&n.classList.add(...a)}function transition_v(n,...a){n&&a.length>0&&n.classList.remove(...a)}let nh=(0,eS.createContext)(null);nh.displayName="OpenClosedContext";var nm=((en=nm||{})[en.Open=1]="Open",en[en.Closed=2]="Closed",en[en.Closing=4]="Closing",en[en.Opening=8]="Opening",en);function open_closed_u(){return(0,eS.useContext)(nh)}function open_closed_s({value:n,children:a}){return eS.createElement(nh.Provider,{value:n},a)}var nx=g(9363),ng=g(2184);function transition_S(n=""){return n.split(/\s+/).filter(n=>n.length>1)}let nv=(0,eS.createContext)(null);nv.displayName="TransitionContext";var ny=((er=ny||{}).Visible="visible",er.Hidden="hidden",er);let nb=(0,eS.createContext)(null);function transition_U(n){return"children"in n?transition_U(n.children):n.current.filter(({el:n})=>null!==n.current).filter(({state:n})=>"visible"===n).length>0}function se(n,a){let g=(0,nu.E)(n),v=(0,eS.useRef)([]),j=(0,nl.t)(),z=use_disposables_p(),W=(0,ns.z)((n,a=ng.l4.Hidden)=>{let W=v.current.findIndex(({el:a})=>a===n);-1!==W&&((0,nf.E)(a,{[ng.l4.Unmount](){v.current.splice(W,1)},[ng.l4.Hidden](){v.current[W].state="hidden"}}),z.microTask(()=>{var n;!transition_U(v)&&j.current&&(null==(n=g.current)||n.call(g))}))}),B=(0,ns.z)(n=>{let a=v.current.find(({el:a})=>a===n);return a?"visible"!==a.state&&(a.state="visible"):v.current.push({el:n,state:"visible"}),()=>W(n,ng.l4.Unmount)}),H=(0,eS.useRef)([]),K=(0,eS.useRef)(Promise.resolve()),ee=(0,eS.useRef)({enter:[],leave:[],idle:[]}),et=(0,ns.z)((n,g,v)=>{H.current.splice(0),a&&(a.chains.current[g]=a.chains.current[g].filter(([a])=>a!==n)),null==a||a.chains.current[g].push([n,new Promise(n=>{H.current.push(n)})]),null==a||a.chains.current[g].push([n,new Promise(n=>{Promise.all(ee.current[g].map(([n,a])=>a)).then(()=>n())})]),"enter"===g?K.current=K.current.then(()=>null==a?void 0:a.wait.current).then(()=>v(g)):v(g)}),en=(0,ns.z)((n,a,g)=>{Promise.all(ee.current[a].splice(0).map(([n,a])=>a)).then(()=>{var n;null==(n=H.current.shift())||n()}).then(()=>g(a))});return(0,eS.useMemo)(()=>({children:v,register:B,unregister:W,onStart:et,onStop:en,wait:K,chains:ee}),[B,W,v,et,en,ee,K])}function Ne(){}nb.displayName="NestingContext";let n_=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ae(n){var a;let g={};for(let v of n_)g[v]=null!=(a=n[v])?a:Ne;return g}let nk=ng.AN.RenderStrategy,nw=(0,ng.yV)(function(n,a){let{show:g,appear:v=!1,unmount:j=!0,...z}=n,W=(0,eS.useRef)(null),B=(0,np.T)(W,a);(0,nc.H)();let H=open_closed_u();if(void 0===g&&null!==H&&(g=(H&nm.Open)===nm.Open),![!0,!1].includes(g))throw Error("A is used but it is missing a `show={true | false}` prop.");let[K,ee]=(0,eS.useState)(g?"visible":"hidden"),et=se(()=>{ee("hidden")}),[en,er]=(0,eS.useState)(!0),eo=(0,eS.useRef)([g]);(0,nd.e)(()=>{!1!==en&&eo.current[eo.current.length-1]!==g&&(eo.current.push(g),er(!1))},[eo,g]);let ei=(0,eS.useMemo)(()=>({show:g,appear:v,initial:en}),[g,v,en]);(0,eS.useEffect)(()=>{if(g)ee("visible");else if(transition_U(et)){let n=W.current;if(!n)return;let a=n.getBoundingClientRect();0===a.x&&0===a.y&&0===a.width&&0===a.height&&ee("hidden")}else ee("hidden")},[g,et]);let es={unmount:j},el=(0,ns.z)(()=>{var a;en&&er(!1),null==(a=n.beforeEnter)||a.call(n)}),ed=(0,ns.z)(()=>{var a;en&&er(!1),null==(a=n.beforeLeave)||a.call(n)});return eS.createElement(nb.Provider,{value:et},eS.createElement(nv.Provider,{value:ei},(0,ng.sY)({ourProps:{...es,as:eS.Fragment,children:eS.createElement(nC,{ref:B,...es,...z,beforeEnter:el,beforeLeave:ed})},theirProps:{},defaultTag:eS.Fragment,features:nk,visible:"visible"===K,name:"Transition"})))}),nC=(0,ng.yV)(function(n,a){var g,v,j;let z;let{beforeEnter:W,afterEnter:B,beforeLeave:H,afterLeave:K,enter:ee,enterFrom:et,enterTo:en,entered:er,leave:eo,leaveFrom:ei,leaveTo:es,...el}=n,ed=(0,eS.useRef)(null),eu=(0,np.T)(ed,a),ec=null==(g=el.unmount)||g?ng.l4.Unmount:ng.l4.Hidden,{show:ep,appear:ef,initial:eh}=function(){let n=(0,eS.useContext)(nv);if(null===n)throw Error("A is used but it is missing a parent or .");return n}(),[em,ex]=(0,eS.useState)(ep?"visible":"hidden"),eg=function(){let n=(0,eS.useContext)(nb);if(null===n)throw Error("A is used but it is missing a parent or .");return n}(),{register:ev,unregister:ey}=eg;(0,eS.useEffect)(()=>ev(ed),[ev,ed]),(0,eS.useEffect)(()=>{if(ec===ng.l4.Hidden&&ed.current){if(ep&&"visible"!==em){ex("visible");return}return(0,nf.E)(em,{hidden:()=>ey(ed),visible:()=>ev(ed)})}},[em,ed,ev,ey,ep,ec]);let eb=(0,nu.E)({base:transition_S(el.className),enter:transition_S(ee),enterFrom:transition_S(et),enterTo:transition_S(en),entered:transition_S(er),leave:transition_S(eo),leaveFrom:transition_S(ei),leaveTo:transition_S(es)}),e_=(j={beforeEnter:W,afterEnter:B,beforeLeave:H,afterLeave:K},z=(0,eS.useRef)(ae(j)),(0,eS.useEffect)(()=>{z.current=ae(j)},[j]),z),ek=(0,nc.H)();(0,eS.useEffect)(()=>{if(ek&&"visible"===em&&null===ed.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[ed,em,ek]);let ew=ef&&ep&&eh,eC=ek&&(!eh||ef)?ep?"enter":"leave":"idle",eT=function(n=0){let[a,g]=(0,eS.useState)(n),v=(0,nl.t)(),j=(0,eS.useCallback)(n=>{v.current&&g(a=>a|n)},[a,v]),z=(0,eS.useCallback)(n=>!!(a&n),[a]);return{flags:a,addFlag:j,hasFlag:z,removeFlag:(0,eS.useCallback)(n=>{v.current&&g(a=>a&~n)},[g,v]),toggleFlag:(0,eS.useCallback)(n=>{v.current&&g(a=>a^n)},[g])}}(0),eE=(0,ns.z)(n=>(0,nf.E)(n,{enter:()=>{eT.addFlag(nm.Opening),e_.current.beforeEnter()},leave:()=>{eT.addFlag(nm.Closing),e_.current.beforeLeave()},idle:()=>{}})),eO=(0,ns.z)(n=>(0,nf.E)(n,{enter:()=>{eT.removeFlag(nm.Opening),e_.current.afterEnter()},leave:()=>{eT.removeFlag(nm.Closing),e_.current.afterLeave()},idle:()=>{}})),eP=se(()=>{ex("hidden"),ey(ed)},eg),eM=(0,eS.useRef)(!1);!function({immediate:n,container:a,direction:g,classes:v,onStart:j,onStop:z}){let W=(0,nl.t)(),B=use_disposables_p(),H=(0,nu.E)(g);(0,nd.e)(()=>{n&&(H.current="enter")},[n]),(0,nd.e)(()=>{let n=(0,ni.k)();B.add(n.dispose);let g=a.current;if(g&&"idle"!==H.current&&W.current){var K,ee,et;let a,W,B,en,er,eo,ei;return n.dispose(),j.current(H.current),n.add((K=v.current,ee="enter"===H.current,et=()=>{n.dispose(),z.current(H.current)},W=ee?"enter":"leave",B=(0,ni.k)(),en=void 0!==et?(a={called:!1},(...n)=>{if(!a.called)return a.called=!0,et(...n)}):()=>{},"enter"===W&&(g.removeAttribute("hidden"),g.style.display=""),er=(0,nf.E)(W,{enter:()=>K.enter,leave:()=>K.leave}),eo=(0,nf.E)(W,{enter:()=>K.enterTo,leave:()=>K.leaveTo}),ei=(0,nf.E)(W,{enter:()=>K.enterFrom,leave:()=>K.leaveFrom}),transition_v(g,...K.base,...K.enter,...K.enterTo,...K.enterFrom,...K.leave,...K.leaveFrom,...K.leaveTo,...K.entered),transition_g(g,...K.base,...er,...ei),B.nextFrame(()=>{transition_v(g,...K.base,...er,...ei),transition_g(g,...K.base,...er,...eo),function(n,a){let g=(0,ni.k)();if(!n)return g.dispose;let{transitionDuration:v,transitionDelay:j}=getComputedStyle(n),[z,W]=[v,j].map(n=>{let[a=0]=n.split(",").filter(Boolean).map(n=>n.includes("ms")?parseFloat(n):1e3*parseFloat(n)).sort((n,a)=>a-n);return a}),B=z+W;if(0!==B){g.group(g=>{g.setTimeout(()=>{a(),g.dispose()},B),g.addEventListener(n,"transitionrun",n=>{n.target===n.currentTarget&&g.dispose()})});let v=g.addEventListener(n,"transitionend",n=>{n.target===n.currentTarget&&(a(),v())})}else a();g.add(()=>a()),g.dispose}(g,()=>(transition_v(g,...K.base,...er),transition_g(g,...K.base,...K.entered),en()))}),B.dispose)),n.dispose}},[g])}({immediate:ew,container:ed,classes:eb,direction:eC,onStart:(0,nu.E)(n=>{eM.current=!0,eP.onStart(ed,n,eE)}),onStop:(0,nu.E)(n=>{eM.current=!1,eP.onStop(ed,n,eO),"leave"!==n||transition_U(eP)||(ex("hidden"),ey(ed))})});let ej=el;return ew?ej={...ej,className:(0,nx.A)(el.className,...eb.current.enter,...eb.current.enterFrom)}:eM.current&&(ej.className=(0,nx.A)(el.className,null==(v=ed.current)?void 0:v.className),""===ej.className&&delete ej.className),eS.createElement(nb.Provider,{value:eP},eS.createElement(open_closed_s,{value:(0,nf.E)(em,{visible:nm.Open,hidden:nm.Closed})|eT.flags},(0,ng.sY)({ourProps:{ref:eu},theirProps:ej,defaultTag:"div",features:nk,visible:"visible"===em,name:"Transition.Child"})))}),nS=(0,ng.yV)(function(n,a){let g=null!==(0,eS.useContext)(nv),v=null!==open_closed_u();return eS.createElement(eS.Fragment,null,!g&&v?eS.createElement(nw,{ref:a,...n}):eS.createElement(nC,{ref:a,...n}))}),nT=Object.assign(nw,{Child:nS,Root:nw});var nE=g(4407);function use_computed_i(n,a){let[g,v]=(0,eS.useState)(n),j=(0,nu.E)(n);return(0,nd.e)(()=>v(j.current),[j,v,...a]),g}var nO=g(2410),nP=g(4830);function use_document_event_d(n,a,g){let v=(0,nu.E)(a);(0,eS.useEffect)(()=>{function t(n){v.current(n)}return document.addEventListener(n,t,g),()=>document.removeEventListener(n,t,g)},[n,g])}function use_outside_click_y(n,a,g=!0){var v;let j,z=(0,eS.useRef)(!1);function c(g,v){if(!z.current||g.defaultPrevented)return;let j=v(g);if(null!==j&&j.getRootNode().contains(j)&&j.isConnected){for(let a of function u(n){return"function"==typeof n?u(n()):Array.isArray(n)||n instanceof Set?n:[n]}(n)){if(null===a)continue;let n=a instanceof HTMLElement?a:a.current;if(null!=n&&n.contains(j)||g.composed&&g.composedPath().includes(n))return}return(0,nP.sP)(j,nP.tJ.Loose)||-1===j.tabIndex||g.preventDefault(),a(g,j)}}(0,eS.useEffect)(()=>{requestAnimationFrame(()=>{z.current=g})},[g]);let W=(0,eS.useRef)(null);use_document_event_d("pointerdown",n=>{var a,g;z.current&&(W.current=(null==(g=null==(a=n.composedPath)?void 0:a.call(n))?void 0:g[0])||n.target)},!0),use_document_event_d("mousedown",n=>{var a,g;z.current&&(W.current=(null==(g=null==(a=n.composedPath)?void 0:a.call(n))?void 0:g[0])||n.target)},!0),use_document_event_d("click",n=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||W.current&&(c(n,()=>W.current),W.current=null)},!0),use_document_event_d("touchend",n=>c(n,()=>n.target instanceof HTMLElement?n.target:null),!0),v="blur",j=(0,nu.E)(n=>c(n,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null)),(0,eS.useEffect)(()=>{function t(n){j.current(n)}return window.addEventListener(v,t,!0),()=>window.removeEventListener(v,t,!0)},[v,!0])}var nM=g(2412);let nj=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(n){var a,g;let v=null!=(a=n.innerText)?a:"",j=n.cloneNode(!0);if(!(j instanceof HTMLElement))return v;let z=!1;for(let n of j.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))n.remove(),z=!0;let W=z?null!=(g=j.innerText)?g:"":v;return nj.test(W)&&(W=W.replace(nj,"")),W}function use_text_value_s(n){let a=(0,eS.useRef)(""),g=(0,eS.useRef)("");return(0,ns.z)(()=>{let v=n.current;if(!v)return"";let j=v.innerText;if(a.current===j)return g.current;let z=(function(n){let a=n.getAttribute("aria-label");if("string"==typeof a)return a.trim();let g=n.getAttribute("aria-labelledby");if(g){let n=g.split(" ").map(n=>{let a=document.getElementById(n);if(a){let n=a.getAttribute("aria-label");return"string"==typeof n?n.trim():o(a).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return o(n).trim()})(v).trim().toLowerCase();return a.current=j,g.current=z,z})}function use_tracked_pointer_t(n){return[n.screenX,n.screenY]}function use_tracked_pointer_u(){let n=(0,eS.useRef)([-1,-1]);return{wasMoved(a){let g=use_tracked_pointer_t(a);return(n.current[0]!==g[0]||n.current[1]!==g[1])&&(n.current=g,!0)},update(a){n.current=use_tracked_pointer_t(a)}}}var nI=g(4538);function bugs_r(n){let a=n.parentElement,g=null;for(;a&&!(a instanceof HTMLFieldSetElement);)a instanceof HTMLLegendElement&&(g=a),a=a.parentElement;let v=(null==a?void 0:a.getAttribute("disabled"))==="";return!(v&&function(n){if(!n)return!1;let a=n.previousElementSibling;for(;null!==a;){if(a instanceof HTMLLegendElement)return!1;a=a.previousElementSibling}return!0}(g))&&v}var nN=((eo=nN||{})[eo.First=0]="First",eo[eo.Previous=1]="Previous",eo[eo.Next=2]="Next",eo[eo.Last=3]="Last",eo[eo.Specific=4]="Specific",eo[eo.Nothing=5]="Nothing",eo);function calculate_active_index_f(n,a){let g=a.resolveItems();if(g.length<=0)return null;let v=a.resolveActiveIndex(),j=null!=v?v:-1;switch(n.focus){case 0:for(let n=0;n=0;--n)if(!a.resolveDisabled(g[n],n,g))return n;return v;case 2:for(let n=j+1;n=0;--n)if(!a.resolveDisabled(g[n],n,g))return n;return v;case 4:for(let v=0;vn){let g=null!==n.activeOptionIndex?n.options[n.activeOptionIndex]:null,v=(0,nP.z2)(a(n.options.slice()),n=>n.dataRef.current.domRef.current),j=g?v.indexOf(g):null;return -1===j&&(j=null),{options:v,activeOptionIndex:j}}let nV={1:n=>n.dataRef.current.disabled||1===n.listboxState?n:{...n,activeOptionIndex:null,listboxState:1},0(n){if(n.dataRef.current.disabled||0===n.listboxState)return n;let a=n.activeOptionIndex,{isSelected:g}=n.dataRef.current,v=n.options.findIndex(n=>g(n.dataRef.current.value));return -1!==v&&(a=v),{...n,listboxState:0,activeOptionIndex:a}},2(n,a){var g;if(n.dataRef.current.disabled||1===n.listboxState)return n;let v=listbox_z(n),j=calculate_active_index_f(a,{resolveItems:()=>v.options,resolveActiveIndex:()=>v.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...n,...v,searchQuery:"",activeOptionIndex:j,activationTrigger:null!=(g=a.trigger)?g:1}},3:(n,a)=>{if(n.dataRef.current.disabled||1===n.listboxState)return n;let g=""!==n.searchQuery?0:1,v=n.searchQuery+a.value.toLowerCase(),j=(null!==n.activeOptionIndex?n.options.slice(n.activeOptionIndex+g).concat(n.options.slice(0,n.activeOptionIndex+g)):n.options).find(n=>{var a;return!n.dataRef.current.disabled&&(null==(a=n.dataRef.current.textValue)?void 0:a.startsWith(v))}),z=j?n.options.indexOf(j):-1;return -1===z||z===n.activeOptionIndex?{...n,searchQuery:v}:{...n,searchQuery:v,activeOptionIndex:z,activationTrigger:1}},4:n=>n.dataRef.current.disabled||1===n.listboxState||""===n.searchQuery?n:{...n,searchQuery:""},5:(n,a)=>{let g={id:a.id,dataRef:a.dataRef},v=listbox_z(n,n=>[...n,g]);return null===n.activeOptionIndex&&n.dataRef.current.isSelected(a.dataRef.current.value)&&(v.activeOptionIndex=v.options.indexOf(g)),{...n,...v}},6:(n,a)=>{let g=listbox_z(n,n=>{let g=n.findIndex(n=>n.id===a.id);return -1!==g&&n.splice(g,1),n});return{...n,...g,activationTrigger:1}},7:(n,a)=>({...n,labelId:a.id})},nz=(0,eS.createContext)(null);function k(n){let a=(0,eS.useContext)(nz);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,k),a}return a}nz.displayName="ListboxActionsContext";let nU=(0,eS.createContext)(null);function w(n){let a=(0,eS.useContext)(nU);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,w),a}return a}function Ve(n,a){return(0,nf.E)(a.type,nV,n,a)}nU.displayName="ListboxDataContext";let n$=eS.Fragment,nW=ng.AN.RenderStrategy|ng.AN.Static,nG=Object.assign((0,ng.yV)(function(n,a){let{value:g,defaultValue:v,form:j,name:z,onChange:W,by:B=(n,a)=>n===a,disabled:H=!1,horizontal:K=!1,multiple:ee=!1,...et}=n,en=K?"horizontal":"vertical",er=(0,np.T)(a),[eo=ee?[]:void 0,ei]=function(n,a,g){let[v,j]=(0,eS.useState)(g),z=void 0!==n,W=(0,eS.useRef)(z),B=(0,eS.useRef)(!1),H=(0,eS.useRef)(!1);return!z||W.current||B.current?z||!W.current||H.current||(H.current=!0,W.current=z,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(B.current=!0,W.current=z,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[z?n:v,(0,ns.z)(n=>(z||j(n),null==a?void 0:a(n)))]}(g,W,v),[es,el]=(0,eS.useReducer)(Ve,{dataRef:(0,eS.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),ed=(0,eS.useRef)({static:!1,hold:!1}),eu=(0,eS.useRef)(null),ec=(0,eS.useRef)(null),ep=(0,eS.useRef)(null),ef=(0,ns.z)("string"==typeof B?(n,a)=>(null==n?void 0:n[B])===(null==a?void 0:a[B]):B),eh=(0,eS.useCallback)(n=>(0,nf.E)(em.mode,{1:()=>eo.some(a=>ef(a,n)),0:()=>ef(eo,n)}),[eo]),em=(0,eS.useMemo)(()=>({...es,value:eo,disabled:H,mode:ee?1:0,orientation:en,compare:ef,isSelected:eh,optionsPropsRef:ed,labelRef:eu,buttonRef:ec,optionsRef:ep}),[eo,H,ee,es]);(0,nd.e)(()=>{es.dataRef.current=em},[em]),use_outside_click_y([em.buttonRef,em.optionsRef],(n,a)=>{var g;el({type:1}),(0,nP.sP)(a,nP.tJ.Loose)||(n.preventDefault(),null==(g=em.buttonRef.current)||g.focus())},0===em.listboxState);let ex=(0,eS.useMemo)(()=>({open:0===em.listboxState,disabled:H,value:eo}),[em,H,eo]),eg=(0,ns.z)(n=>{let a=em.options.find(a=>a.id===n);a&&eC(a.dataRef.current.value)}),ev=(0,ns.z)(()=>{if(null!==em.activeOptionIndex){let{dataRef:n,id:a}=em.options[em.activeOptionIndex];eC(n.current.value),el({type:2,focus:nN.Specific,id:a})}}),ey=(0,ns.z)(()=>el({type:0})),eb=(0,ns.z)(()=>el({type:1})),e_=(0,ns.z)((n,a,g)=>n===nN.Specific?el({type:2,focus:nN.Specific,id:a,trigger:g}):el({type:2,focus:n,trigger:g})),ek=(0,ns.z)((n,a)=>(el({type:5,id:n,dataRef:a}),()=>el({type:6,id:n}))),ew=(0,ns.z)(n=>(el({type:7,id:n}),()=>el({type:7,id:null}))),eC=(0,ns.z)(n=>(0,nf.E)(em.mode,{0:()=>null==ei?void 0:ei(n),1(){let a=em.value.slice(),g=a.findIndex(a=>ef(a,n));return -1===g?a.push(n):a.splice(g,1),null==ei?void 0:ei(a)}})),eT=(0,ns.z)(n=>el({type:3,value:n})),eE=(0,ns.z)(()=>el({type:4})),eO=(0,eS.useMemo)(()=>({onChange:eC,registerOption:ek,registerLabel:ew,goToOption:e_,closeListbox:eb,openListbox:ey,selectActiveOption:ev,selectOption:eg,search:eT,clearSearch:eE}),[]),eP=(0,eS.useRef)(null),eM=use_disposables_p();return(0,eS.useEffect)(()=>{eP.current&&void 0!==v&&eM.addEventListener(eP.current,"reset",()=>{null==ei||ei(v)})},[eP,ei]),eS.createElement(nz.Provider,{value:eO},eS.createElement(nU.Provider,{value:em},eS.createElement(open_closed_s,{value:(0,nf.E)(em.listboxState,{0:nm.Open,1:nm.Closed})},null!=z&&null!=eo&&(function form_e(n={},a=null,g=[]){for(let[v,j]of Object.entries(n))!function form_o(n,a,g){if(Array.isArray(g))for(let[v,j]of g.entries())form_o(n,form_f(a,v.toString()),j);else g instanceof Date?n.push([a,g.toISOString()]):"boolean"==typeof g?n.push([a,g?"1":"0"]):"string"==typeof g?n.push([a,g]):"number"==typeof g?n.push([a,`${g}`]):null==g?n.push([a,""]):form_e(g,a,n)}(g,form_f(a,v),j);return g})({[z]:eo}).map(([n,a],g)=>eS.createElement(nI._,{features:nI.A.Hidden,ref:0===g?n=>{var a;eP.current=null!=(a=null==n?void 0:n.closest("form"))?a:null}:void 0,...(0,ng.oA)({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,disabled:H,name:n,value:a})})),(0,ng.sY)({ourProps:{ref:er},theirProps:et,slot:ex,defaultTag:n$,name:"Listbox"}))))}),{Button:(0,ng.yV)(function(n,a){var g;let v=(0,nO.M)(),{id:j=`headlessui-listbox-button-${v}`,...z}=n,W=w("Listbox.Button"),B=k("Listbox.Button"),H=(0,np.T)(W.buttonRef,a),K=use_disposables_p(),ee=(0,ns.z)(n=>{switch(n.key){case nR.R.Space:case nR.R.Enter:case nR.R.ArrowDown:n.preventDefault(),B.openListbox(),K.nextFrame(()=>{W.value||B.goToOption(nN.First)});break;case nR.R.ArrowUp:n.preventDefault(),B.openListbox(),K.nextFrame(()=>{W.value||B.goToOption(nN.Last)})}}),et=(0,ns.z)(n=>{n.key===nR.R.Space&&n.preventDefault()}),en=(0,ns.z)(n=>{if(bugs_r(n.currentTarget))return n.preventDefault();0===W.listboxState?(B.closeListbox(),K.nextFrame(()=>{var n;return null==(n=W.buttonRef.current)?void 0:n.focus({preventScroll:!0})})):(n.preventDefault(),B.openListbox())}),er=use_computed_i(()=>{if(W.labelId)return[W.labelId,j].join(" ")},[W.labelId,j]),eo=(0,eS.useMemo)(()=>({open:0===W.listboxState,disabled:W.disabled,value:W.value}),[W]),ei={ref:H,id:j,type:(0,nM.f)(n,W.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(g=W.optionsRef.current)?void 0:g.id,"aria-expanded":0===W.listboxState,"aria-labelledby":er,disabled:W.disabled,onKeyDown:ee,onKeyUp:et,onClick:en};return(0,ng.sY)({ourProps:ei,theirProps:z,slot:eo,defaultTag:"button",name:"Listbox.Button"})}),Label:(0,ng.yV)(function(n,a){let g=(0,nO.M)(),{id:v=`headlessui-listbox-label-${g}`,...j}=n,z=w("Listbox.Label"),W=k("Listbox.Label"),B=(0,np.T)(z.labelRef,a);(0,nd.e)(()=>W.registerLabel(v),[v]);let H=(0,ns.z)(()=>{var n;return null==(n=z.buttonRef.current)?void 0:n.focus({preventScroll:!0})}),K=(0,eS.useMemo)(()=>({open:0===z.listboxState,disabled:z.disabled}),[z]);return(0,ng.sY)({ourProps:{ref:B,id:v,onClick:H},theirProps:j,slot:K,defaultTag:"label",name:"Listbox.Label"})}),Options:(0,ng.yV)(function(n,a){var g;let v=(0,nO.M)(),{id:j=`headlessui-listbox-options-${v}`,...z}=n,W=w("Listbox.Options"),B=k("Listbox.Options"),H=(0,np.T)(W.optionsRef,a),K=use_disposables_p(),ee=use_disposables_p(),et=open_closed_u(),en=null!==et?(et&nm.Open)===nm.Open:0===W.listboxState;(0,eS.useEffect)(()=>{var n;let a=W.optionsRef.current;a&&0===W.listboxState&&a!==(null==(n=(0,nZ.r)(a))?void 0:n.activeElement)&&a.focus({preventScroll:!0})},[W.listboxState,W.optionsRef]);let er=(0,ns.z)(n=>{switch(ee.dispose(),n.key){case nR.R.Space:if(""!==W.searchQuery)return n.preventDefault(),n.stopPropagation(),B.search(n.key);case nR.R.Enter:if(n.preventDefault(),n.stopPropagation(),null!==W.activeOptionIndex){let{dataRef:n}=W.options[W.activeOptionIndex];B.onChange(n.current.value)}0===W.mode&&(B.closeListbox(),(0,ni.k)().nextFrame(()=>{var n;return null==(n=W.buttonRef.current)?void 0:n.focus({preventScroll:!0})}));break;case(0,nf.E)(W.orientation,{vertical:nR.R.ArrowDown,horizontal:nR.R.ArrowRight}):return n.preventDefault(),n.stopPropagation(),B.goToOption(nN.Next);case(0,nf.E)(W.orientation,{vertical:nR.R.ArrowUp,horizontal:nR.R.ArrowLeft}):return n.preventDefault(),n.stopPropagation(),B.goToOption(nN.Previous);case nR.R.Home:case nR.R.PageUp:return n.preventDefault(),n.stopPropagation(),B.goToOption(nN.First);case nR.R.End:case nR.R.PageDown:return n.preventDefault(),n.stopPropagation(),B.goToOption(nN.Last);case nR.R.Escape:return n.preventDefault(),n.stopPropagation(),B.closeListbox(),K.nextFrame(()=>{var n;return null==(n=W.buttonRef.current)?void 0:n.focus({preventScroll:!0})});case nR.R.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(B.search(n.key),ee.setTimeout(()=>B.clearSearch(),350))}}),eo=use_computed_i(()=>{var n;return null==(n=W.buttonRef.current)?void 0:n.id},[W.buttonRef.current]),ei=(0,eS.useMemo)(()=>({open:0===W.listboxState}),[W]),es={"aria-activedescendant":null===W.activeOptionIndex||null==(g=W.options[W.activeOptionIndex])?void 0:g.id,"aria-multiselectable":1===W.mode||void 0,"aria-labelledby":eo,"aria-orientation":W.orientation,id:j,onKeyDown:er,role:"listbox",tabIndex:0,ref:H};return(0,ng.sY)({ourProps:es,theirProps:z,slot:ei,defaultTag:"ul",features:nW,visible:en,name:"Listbox.Options"})}),Option:(0,ng.yV)(function(n,a){let g=(0,nO.M)(),{id:v=`headlessui-listbox-option-${g}`,disabled:j=!1,value:z,...W}=n,B=w("Listbox.Option"),H=k("Listbox.Option"),K=null!==B.activeOptionIndex&&B.options[B.activeOptionIndex].id===v,ee=B.isSelected(z),et=(0,eS.useRef)(null),en=use_text_value_s(et),er=(0,nu.E)({disabled:j,value:z,domRef:et,get textValue(){return en()}}),eo=(0,np.T)(a,et);(0,nd.e)(()=>{if(0!==B.listboxState||!K||0===B.activationTrigger)return;let n=(0,ni.k)();return n.requestAnimationFrame(()=>{var n,a;null==(a=null==(n=et.current)?void 0:n.scrollIntoView)||a.call(n,{block:"nearest"})}),n.dispose},[et,K,B.listboxState,B.activationTrigger,B.activeOptionIndex]),(0,nd.e)(()=>H.registerOption(v,er),[er,v]);let ei=(0,ns.z)(n=>{if(j)return n.preventDefault();H.onChange(z),0===B.mode&&(H.closeListbox(),(0,ni.k)().nextFrame(()=>{var n;return null==(n=B.buttonRef.current)?void 0:n.focus({preventScroll:!0})}))}),es=(0,ns.z)(()=>{if(j)return H.goToOption(nN.Nothing);H.goToOption(nN.Specific,v)}),el=use_tracked_pointer_u(),ed=(0,ns.z)(n=>el.update(n)),eu=(0,ns.z)(n=>{el.wasMoved(n)&&(j||K||H.goToOption(nN.Specific,v,0))}),ec=(0,ns.z)(n=>{el.wasMoved(n)&&(j||K&&H.goToOption(nN.Nothing))}),ep=(0,eS.useMemo)(()=>({active:K,selected:ee,disabled:j}),[K,ee,j]);return(0,ng.sY)({ourProps:{id:v,ref:eo,role:"option",tabIndex:!0===j?void 0:-1,"aria-disabled":!0===j||void 0,"aria-selected":ee,disabled:void 0,onClick:ei,onFocus:es,onPointerEnter:ed,onMouseEnter:ed,onPointerMove:eu,onMouseMove:eu,onPointerLeave:ec,onMouseLeave:ec},theirProps:W,slot:ep,defaultTag:"li",name:"Listbox.Option"})})});var nB=g(967),nH=g(6053),nq=g.n(nH);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(n){for(var a=1;a=0||(j[g]=n[g]);return j}var nK=["keyOverride"],nJ=["crossOrigin"],nY={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},buildOpenGraphMediaTags=function(n,a,g){void 0===a&&(a=[]);var v=void 0===g?{}:g,j=v.defaultWidth,z=v.defaultHeight;return a.reduce(function(a,g,v){return a.push(eS.createElement("meta",{key:"og:"+n+":0"+v,property:"og:"+n,content:g.url})),g.alt&&a.push(eS.createElement("meta",{key:"og:"+n+":alt0"+v,property:"og:"+n+":alt",content:g.alt})),g.secureUrl&&a.push(eS.createElement("meta",{key:"og:"+n+":secure_url0"+v,property:"og:"+n+":secure_url",content:g.secureUrl.toString()})),g.type&&a.push(eS.createElement("meta",{key:"og:"+n+":type0"+v,property:"og:"+n+":type",content:g.type.toString()})),g.width?a.push(eS.createElement("meta",{key:"og:"+n+":width0"+v,property:"og:"+n+":width",content:g.width.toString()})):j&&a.push(eS.createElement("meta",{key:"og:"+n+":width0"+v,property:"og:"+n+":width",content:j.toString()})),g.height?a.push(eS.createElement("meta",{key:"og:"+n+":height"+v,property:"og:"+n+":height",content:g.height.toString()})):z&&a.push(eS.createElement("meta",{key:"og:"+n+":height"+v,property:"og:"+n+":height",content:z.toString()})),a},[])},buildTags=function(n){var a,g,v,j,z,W=[];n.titleTemplate&&(nY.templateTitle=n.titleTemplate);var B="";n.title?(B=n.title,nY.templateTitle&&(B=nY.templateTitle.replace(/%s/g,function(){return B}))):n.defaultTitle&&(B=n.defaultTitle),B&&W.push(eS.createElement("title",{key:"title"},B));var H=void 0===n.noindex?nY.noindex||n.dangerouslySetAllPagesToNoIndex:n.noindex,K=void 0===n.nofollow?nY.nofollow||n.dangerouslySetAllPagesToNoFollow:n.nofollow,ee=n.norobots||nY.norobots,et="";if(n.robotsProps){var en=n.robotsProps,er=en.nosnippet,eo=en.maxSnippet,ei=en.maxImagePreview,es=en.maxVideoPreview,el=en.noarchive,ed=en.noimageindex,eu=en.notranslate,ec=en.unavailableAfter;et=(er?",nosnippet":"")+(eo?",max-snippet:"+eo:"")+(ei?",max-image-preview:"+ei:"")+(el?",noarchive":"")+(ec?",unavailable_after:"+ec:"")+(ed?",noimageindex":"")+(es?",max-video-preview:"+es:"")+(eu?",notranslate":"")}if(n.norobots&&(nY.norobots=!0),H||K?(n.dangerouslySetAllPagesToNoIndex&&(nY.noindex=!0),n.dangerouslySetAllPagesToNoFollow&&(nY.nofollow=!0),W.push(eS.createElement("meta",{key:"robots",name:"robots",content:(H?"noindex":"index")+","+(K?"nofollow":"follow")+et}))):(!ee||et)&&W.push(eS.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+et})),n.description&&W.push(eS.createElement("meta",{key:"description",name:"description",content:n.description})),n.themeColor&&W.push(eS.createElement("meta",{key:"theme-color",name:"theme-color",content:n.themeColor})),n.mobileAlternate&&W.push(eS.createElement("link",{rel:"alternate",key:"mobileAlternate",media:n.mobileAlternate.media,href:n.mobileAlternate.href})),n.languageAlternates&&n.languageAlternates.length>0&&n.languageAlternates.forEach(function(n){W.push(eS.createElement("link",{rel:"alternate",key:"languageAlternate-"+n.hrefLang,hrefLang:n.hrefLang,href:n.href}))}),n.twitter&&(n.twitter.cardType&&W.push(eS.createElement("meta",{key:"twitter:card",name:"twitter:card",content:n.twitter.cardType})),n.twitter.site&&W.push(eS.createElement("meta",{key:"twitter:site",name:"twitter:site",content:n.twitter.site})),n.twitter.handle&&W.push(eS.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:n.twitter.handle}))),n.facebook&&n.facebook.appId&&W.push(eS.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:n.facebook.appId})),(null!=(a=n.openGraph)&&a.title||B)&&W.push(eS.createElement("meta",{key:"og:title",property:"og:title",content:(null==(j=n.openGraph)?void 0:j.title)||B})),(null!=(g=n.openGraph)&&g.description||n.description)&&W.push(eS.createElement("meta",{key:"og:description",property:"og:description",content:(null==(z=n.openGraph)?void 0:z.description)||n.description})),n.openGraph){if((n.openGraph.url||n.canonical)&&W.push(eS.createElement("meta",{key:"og:url",property:"og:url",content:n.openGraph.url||n.canonical})),n.openGraph.type){var ep=n.openGraph.type.toLowerCase();W.push(eS.createElement("meta",{key:"og:type",property:"og:type",content:ep})),"profile"===ep&&n.openGraph.profile?(n.openGraph.profile.firstName&&W.push(eS.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:n.openGraph.profile.firstName})),n.openGraph.profile.lastName&&W.push(eS.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:n.openGraph.profile.lastName})),n.openGraph.profile.username&&W.push(eS.createElement("meta",{key:"profile:username",property:"profile:username",content:n.openGraph.profile.username})),n.openGraph.profile.gender&&W.push(eS.createElement("meta",{key:"profile:gender",property:"profile:gender",content:n.openGraph.profile.gender}))):"book"===ep&&n.openGraph.book?(n.openGraph.book.authors&&n.openGraph.book.authors.length&&n.openGraph.book.authors.forEach(function(n,a){W.push(eS.createElement("meta",{key:"book:author:0"+a,property:"book:author",content:n}))}),n.openGraph.book.isbn&&W.push(eS.createElement("meta",{key:"book:isbn",property:"book:isbn",content:n.openGraph.book.isbn})),n.openGraph.book.releaseDate&&W.push(eS.createElement("meta",{key:"book:release_date",property:"book:release_date",content:n.openGraph.book.releaseDate})),n.openGraph.book.tags&&n.openGraph.book.tags.length&&n.openGraph.book.tags.forEach(function(n,a){W.push(eS.createElement("meta",{key:"book:tag:0"+a,property:"book:tag",content:n}))})):"article"===ep&&n.openGraph.article?(n.openGraph.article.publishedTime&&W.push(eS.createElement("meta",{key:"article:published_time",property:"article:published_time",content:n.openGraph.article.publishedTime})),n.openGraph.article.modifiedTime&&W.push(eS.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:n.openGraph.article.modifiedTime})),n.openGraph.article.expirationTime&&W.push(eS.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:n.openGraph.article.expirationTime})),n.openGraph.article.authors&&n.openGraph.article.authors.length&&n.openGraph.article.authors.forEach(function(n,a){W.push(eS.createElement("meta",{key:"article:author:0"+a,property:"article:author",content:n}))}),n.openGraph.article.section&&W.push(eS.createElement("meta",{key:"article:section",property:"article:section",content:n.openGraph.article.section})),n.openGraph.article.tags&&n.openGraph.article.tags.length&&n.openGraph.article.tags.forEach(function(n,a){W.push(eS.createElement("meta",{key:"article:tag:0"+a,property:"article:tag",content:n}))})):("video.movie"===ep||"video.episode"===ep||"video.tv_show"===ep||"video.other"===ep)&&n.openGraph.video&&(n.openGraph.video.actors&&n.openGraph.video.actors.length&&n.openGraph.video.actors.forEach(function(n,a){n.profile&&W.push(eS.createElement("meta",{key:"video:actor:0"+a,property:"video:actor",content:n.profile})),n.role&&W.push(eS.createElement("meta",{key:"video:actor:role:0"+a,property:"video:actor:role",content:n.role}))}),n.openGraph.video.directors&&n.openGraph.video.directors.length&&n.openGraph.video.directors.forEach(function(n,a){W.push(eS.createElement("meta",{key:"video:director:0"+a,property:"video:director",content:n}))}),n.openGraph.video.writers&&n.openGraph.video.writers.length&&n.openGraph.video.writers.forEach(function(n,a){W.push(eS.createElement("meta",{key:"video:writer:0"+a,property:"video:writer",content:n}))}),n.openGraph.video.duration&&W.push(eS.createElement("meta",{key:"video:duration",property:"video:duration",content:n.openGraph.video.duration.toString()})),n.openGraph.video.releaseDate&&W.push(eS.createElement("meta",{key:"video:release_date",property:"video:release_date",content:n.openGraph.video.releaseDate})),n.openGraph.video.tags&&n.openGraph.video.tags.length&&n.openGraph.video.tags.forEach(function(n,a){W.push(eS.createElement("meta",{key:"video:tag:0"+a,property:"video:tag",content:n}))}),n.openGraph.video.series&&W.push(eS.createElement("meta",{key:"video:series",property:"video:series",content:n.openGraph.video.series})))}n.defaultOpenGraphImageWidth&&(nY.defaultOpenGraphImageWidth=n.defaultOpenGraphImageWidth),n.defaultOpenGraphImageHeight&&(nY.defaultOpenGraphImageHeight=n.defaultOpenGraphImageHeight),n.openGraph.images&&n.openGraph.images.length&&W.push.apply(W,buildOpenGraphMediaTags("image",n.openGraph.images,{defaultWidth:nY.defaultOpenGraphImageWidth,defaultHeight:nY.defaultOpenGraphImageHeight})),n.defaultOpenGraphVideoWidth&&(nY.defaultOpenGraphVideoWidth=n.defaultOpenGraphVideoWidth),n.defaultOpenGraphVideoHeight&&(nY.defaultOpenGraphVideoHeight=n.defaultOpenGraphVideoHeight),n.openGraph.videos&&n.openGraph.videos.length&&W.push.apply(W,buildOpenGraphMediaTags("video",n.openGraph.videos,{defaultWidth:nY.defaultOpenGraphVideoWidth,defaultHeight:nY.defaultOpenGraphVideoHeight})),n.openGraph.audio&&W.push.apply(W,buildOpenGraphMediaTags("audio",n.openGraph.audio)),n.openGraph.locale&&W.push(eS.createElement("meta",{key:"og:locale",property:"og:locale",content:n.openGraph.locale})),(n.openGraph.siteName||n.openGraph.site_name)&&W.push(eS.createElement("meta",{key:"og:site_name",property:"og:site_name",content:n.openGraph.siteName||n.openGraph.site_name}))}return n.canonical&&W.push(eS.createElement("link",{rel:"canonical",href:n.canonical,key:"canonical"})),n.additionalMetaTags&&n.additionalMetaTags.length>0&&n.additionalMetaTags.forEach(function(n){var a,g,v=n.keyOverride,j=_objectWithoutPropertiesLoose(n,nK);W.push(eS.createElement("meta",_extends({key:"meta:"+(null!=(a=null!=(g=null!=v?v:j.name)?g:j.property)?a:j.httpEquiv)},j)))}),null!=(v=n.additionalLinkTags)&&v.length&&n.additionalLinkTags.forEach(function(n){var a,g=n.crossOrigin,v=_objectWithoutPropertiesLoose(n,nJ);W.push(eS.createElement("link",_extends({key:"link"+(null!=(a=v.keyOverride)?a:v.href)+v.rel},v,{crossOrigin:"anonymous"===g||"use-credentials"===g||""===g?g:void 0})))}),W},WithHead=function(n){return eS.createElement(nq(),null,buildTags(n))},NextSeo=function(n){var a=n.title,g=n.themeColor,v=n.noindex,j=n.nofollow,z=n.robotsProps,W=n.description,B=n.canonical,H=n.openGraph,K=n.facebook,ee=n.twitter,et=n.additionalMetaTags,en=n.titleTemplate,er=n.defaultTitle,eo=n.mobileAlternate,ei=n.languageAlternates,es=n.additionalLinkTags;return eS.createElement(eS.Fragment,null,eS.createElement(WithHead,{title:a,themeColor:g,noindex:v,nofollow:j,robotsProps:z,description:W,canonical:B,facebook:K,openGraph:H,additionalMetaTags:et,twitter:ee,titleTemplate:en,defaultTitle:er,mobileAlternate:eo,languageAlternates:ei,additionalLinkTags:es}))};RegExp("["+Object.keys(Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"})).join("")+"]","g");var nQ=((eu=nQ||{})[eu.Open=0]="Open",eu[eu.Closed=1]="Closed",eu),nX=((ec=nX||{})[ec.Pointer=0]="Pointer",ec[ec.Other=1]="Other",ec),n0=((ep=n0||{})[ep.OpenMenu=0]="OpenMenu",ep[ep.CloseMenu=1]="CloseMenu",ep[ep.GoToItem=2]="GoToItem",ep[ep.Search=3]="Search",ep[ep.ClearSearch=4]="ClearSearch",ep[ep.RegisterItem=5]="RegisterItem",ep[ep.UnregisterItem=6]="UnregisterItem",ep);function menu_w(n,a=n=>n){let g=null!==n.activeItemIndex?n.items[n.activeItemIndex]:null,v=(0,nP.z2)(a(n.items.slice()),n=>n.dataRef.current.domRef.current),j=g?v.indexOf(g):null;return -1===j&&(j=null),{items:v,activeItemIndex:j}}let n1={1:n=>1===n.menuState?n:{...n,activeItemIndex:null,menuState:1},0:n=>0===n.menuState?n:{...n,__demoMode:!1,menuState:0},2:(n,a)=>{var g;let v=menu_w(n),j=calculate_active_index_f(a,{resolveItems:()=>v.items,resolveActiveIndex:()=>v.activeItemIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...n,...v,searchQuery:"",activeItemIndex:j,activationTrigger:null!=(g=a.trigger)?g:1}},3:(n,a)=>{let g=""!==n.searchQuery?0:1,v=n.searchQuery+a.value.toLowerCase(),j=(null!==n.activeItemIndex?n.items.slice(n.activeItemIndex+g).concat(n.items.slice(0,n.activeItemIndex+g)):n.items).find(n=>{var a;return(null==(a=n.dataRef.current.textValue)?void 0:a.startsWith(v))&&!n.dataRef.current.disabled}),z=j?n.items.indexOf(j):-1;return -1===z||z===n.activeItemIndex?{...n,searchQuery:v}:{...n,searchQuery:v,activeItemIndex:z,activationTrigger:1}},4:n=>""===n.searchQuery?n:{...n,searchQuery:"",searchActiveItemIndex:null},5:(n,a)=>{let g=menu_w(n,n=>[...n,{id:a.id,dataRef:a.dataRef}]);return{...n,...g}},6:(n,a)=>{let g=menu_w(n,n=>{let g=n.findIndex(n=>n.id===a.id);return -1!==g&&n.splice(g,1),n});return{...n,...g,activationTrigger:1}}},n2=(0,eS.createContext)(null);function menu_C(n){let a=(0,eS.useContext)(n2);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,menu_C),a}return a}function menu_ye(n,a){return(0,nf.E)(a.type,n1,n,a)}n2.displayName="MenuContext";let n4=eS.Fragment,n5=ng.AN.RenderStrategy|ng.AN.Static,n3=eS.Fragment,n6=Object.assign((0,ng.yV)(function(n,a){let{__demoMode:g=!1,...v}=n,j=(0,eS.useReducer)(menu_ye,{__demoMode:g,menuState:g?0:1,buttonRef:(0,eS.createRef)(),itemsRef:(0,eS.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:z,itemsRef:W,buttonRef:B},H]=j,K=(0,np.T)(a);use_outside_click_y([B,W],(n,a)=>{var g;H({type:1}),(0,nP.sP)(a,nP.tJ.Loose)||(n.preventDefault(),null==(g=B.current)||g.focus())},0===z);let ee=(0,ns.z)(()=>{H({type:1})}),et=(0,eS.useMemo)(()=>({open:0===z,close:ee}),[z,ee]);return eS.createElement(n2.Provider,{value:j},eS.createElement(open_closed_s,{value:(0,nf.E)(z,{0:nm.Open,1:nm.Closed})},(0,ng.sY)({ourProps:{ref:K},theirProps:v,slot:et,defaultTag:n4,name:"Menu"})))}),{Button:(0,ng.yV)(function(n,a){var g;let v=(0,nO.M)(),{id:j=`headlessui-menu-button-${v}`,...z}=n,[W,B]=menu_C("Menu.Button"),H=(0,np.T)(W.buttonRef,a),K=use_disposables_p(),ee=(0,ns.z)(n=>{switch(n.key){case nR.R.Space:case nR.R.Enter:case nR.R.ArrowDown:n.preventDefault(),n.stopPropagation(),B({type:0}),K.nextFrame(()=>B({type:2,focus:nN.First}));break;case nR.R.ArrowUp:n.preventDefault(),n.stopPropagation(),B({type:0}),K.nextFrame(()=>B({type:2,focus:nN.Last}))}}),et=(0,ns.z)(n=>{n.key===nR.R.Space&&n.preventDefault()}),en=(0,ns.z)(a=>{if(bugs_r(a.currentTarget))return a.preventDefault();n.disabled||(0===W.menuState?(B({type:1}),K.nextFrame(()=>{var n;return null==(n=W.buttonRef.current)?void 0:n.focus({preventScroll:!0})})):(a.preventDefault(),B({type:0})))}),er=(0,eS.useMemo)(()=>({open:0===W.menuState}),[W]),eo={ref:H,id:j,type:(0,nM.f)(n,W.buttonRef),"aria-haspopup":"menu","aria-controls":null==(g=W.itemsRef.current)?void 0:g.id,"aria-expanded":0===W.menuState,onKeyDown:ee,onKeyUp:et,onClick:en};return(0,ng.sY)({ourProps:eo,theirProps:z,slot:er,defaultTag:"button",name:"Menu.Button"})}),Items:(0,ng.yV)(function(n,a){var g,v;let j=(0,nO.M)(),{id:z=`headlessui-menu-items-${j}`,...W}=n,[B,H]=menu_C("Menu.Items"),K=(0,np.T)(B.itemsRef,a),ee=function(...n){return(0,eS.useMemo)(()=>(0,nZ.r)(...n),[...n])}(B.itemsRef),et=use_disposables_p(),en=open_closed_u(),er=null!==en?(en&nm.Open)===nm.Open:0===B.menuState;(0,eS.useEffect)(()=>{let n=B.itemsRef.current;n&&0===B.menuState&&n!==(null==ee?void 0:ee.activeElement)&&n.focus({preventScroll:!0})},[B.menuState,B.itemsRef,ee]),function({container:n,accept:a,walk:g,enabled:v=!0}){let j=(0,eS.useRef)(a),z=(0,eS.useRef)(g);(0,eS.useEffect)(()=>{j.current=a,z.current=g},[a,g]),(0,nd.e)(()=>{if(!n||!v)return;let a=(0,nZ.r)(n);if(!a)return;let g=j.current,W=z.current,B=Object.assign(n=>g(n),{acceptNode:g}),H=a.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,B,!1);for(;H.nextNode();)W(H.currentNode)},[n,v,j,z])}({container:B.itemsRef.current,enabled:0===B.menuState,accept:n=>"menuitem"===n.getAttribute("role")?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(n){n.setAttribute("role","none")}});let eo=(0,ns.z)(n=>{var a,g;switch(et.dispose(),n.key){case nR.R.Space:if(""!==B.searchQuery)return n.preventDefault(),n.stopPropagation(),H({type:3,value:n.key});case nR.R.Enter:if(n.preventDefault(),n.stopPropagation(),H({type:1}),null!==B.activeItemIndex){let{dataRef:n}=B.items[B.activeItemIndex];null==(g=null==(a=n.current)?void 0:a.domRef.current)||g.click()}(0,nP.wI)(B.buttonRef.current);break;case nR.R.ArrowDown:return n.preventDefault(),n.stopPropagation(),H({type:2,focus:nN.Next});case nR.R.ArrowUp:return n.preventDefault(),n.stopPropagation(),H({type:2,focus:nN.Previous});case nR.R.Home:case nR.R.PageUp:return n.preventDefault(),n.stopPropagation(),H({type:2,focus:nN.First});case nR.R.End:case nR.R.PageDown:return n.preventDefault(),n.stopPropagation(),H({type:2,focus:nN.Last});case nR.R.Escape:n.preventDefault(),n.stopPropagation(),H({type:1}),(0,ni.k)().nextFrame(()=>{var n;return null==(n=B.buttonRef.current)?void 0:n.focus({preventScroll:!0})});break;case nR.R.Tab:n.preventDefault(),n.stopPropagation(),H({type:1}),(0,ni.k)().nextFrame(()=>{(0,nP.EO)(B.buttonRef.current,n.shiftKey?nP.TO.Previous:nP.TO.Next)});break;default:1===n.key.length&&(H({type:3,value:n.key}),et.setTimeout(()=>H({type:4}),350))}}),ei=(0,ns.z)(n=>{n.key===nR.R.Space&&n.preventDefault()}),es=(0,eS.useMemo)(()=>({open:0===B.menuState}),[B]),el={"aria-activedescendant":null===B.activeItemIndex||null==(g=B.items[B.activeItemIndex])?void 0:g.id,"aria-labelledby":null==(v=B.buttonRef.current)?void 0:v.id,id:z,onKeyDown:eo,onKeyUp:ei,role:"menu",tabIndex:0,ref:K};return(0,ng.sY)({ourProps:el,theirProps:W,slot:es,defaultTag:"div",features:n5,visible:er,name:"Menu.Items"})}),Item:(0,ng.yV)(function(n,a){let g=(0,nO.M)(),{id:v=`headlessui-menu-item-${g}`,disabled:j=!1,...z}=n,[W,B]=menu_C("Menu.Item"),H=null!==W.activeItemIndex&&W.items[W.activeItemIndex].id===v,K=(0,eS.useRef)(null),ee=(0,np.T)(a,K);(0,nd.e)(()=>{if(W.__demoMode||0!==W.menuState||!H||0===W.activationTrigger)return;let n=(0,ni.k)();return n.requestAnimationFrame(()=>{var n,a;null==(a=null==(n=K.current)?void 0:n.scrollIntoView)||a.call(n,{block:"nearest"})}),n.dispose},[W.__demoMode,K,H,W.menuState,W.activationTrigger,W.activeItemIndex]);let et=use_text_value_s(K),en=(0,eS.useRef)({disabled:j,domRef:K,get textValue(){return et()}});(0,nd.e)(()=>{en.current.disabled=j},[en,j]),(0,nd.e)(()=>(B({type:5,id:v,dataRef:en}),()=>B({type:6,id:v})),[en,v]);let er=(0,ns.z)(()=>{B({type:1})}),eo=(0,ns.z)(n=>{if(j)return n.preventDefault();B({type:1}),(0,nP.wI)(W.buttonRef.current)}),ei=(0,ns.z)(()=>{if(j)return B({type:2,focus:nN.Nothing});B({type:2,focus:nN.Specific,id:v})}),es=use_tracked_pointer_u(),el=(0,ns.z)(n=>es.update(n)),ed=(0,ns.z)(n=>{es.wasMoved(n)&&(j||H||B({type:2,focus:nN.Specific,id:v,trigger:0}))}),eu=(0,ns.z)(n=>{es.wasMoved(n)&&(j||H&&B({type:2,focus:nN.Nothing}))}),ec=(0,eS.useMemo)(()=>({active:H,disabled:j,close:er}),[H,j,er]);return(0,ng.sY)({ourProps:{id:v,ref:ee,role:"menuitem",tabIndex:!0===j?void 0:-1,"aria-disabled":!0===j||void 0,disabled:void 0,onClick:eo,onFocus:ei,onPointerEnter:el,onMouseEnter:el,onPointerMove:ed,onMouseMove:ed,onPointerLeave:eu,onMouseLeave:eu},theirProps:z,slot:ec,defaultTag:n3,name:"Menu.Item"})})}),dist_t=n=>"object"==typeof n&&null!=n&&1===n.nodeType,e=(n,a)=>(!a||"hidden"!==n)&&"visible"!==n&&"clip"!==n,dist_n=(n,a)=>{if(n.clientHeight{let a=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch(n){return null}})(n);return!!a&&(a.clientHeightza||z>n&&W=a&&B>=g?z-n-v:W>a&&Bg?W-a+j:0,l=n=>{let a=n.parentElement;return null==a?n.getRootNode().host||null:a},dist_r=(n,a)=>{var g,v,j,z;if("undefined"==typeof document)return[];let{scrollMode:W,block:B,inline:H,boundary:K,skipOverflowHiddenElements:ee}=a,et="function"==typeof K?K:n=>n!==K;if(!dist_t(n))throw TypeError("Invalid target");let en=document.scrollingElement||document.documentElement,er=[],eo=n;for(;dist_t(eo)&&et(eo);){if((eo=l(eo))===en){er.push(eo);break}null!=eo&&eo===document.body&&dist_n(eo)&&!dist_n(document.documentElement)||null!=eo&&dist_n(eo,ee)&&er.push(eo)}let ei=null!=(v=null==(g=window.visualViewport)?void 0:g.width)?v:innerWidth,es=null!=(z=null==(j=window.visualViewport)?void 0:j.height)?z:innerHeight,{scrollX:el,scrollY:ed}=window,{height:eu,width:ec,top:ep,right:ef,bottom:eh,left:em}=n.getBoundingClientRect(),{top:ex,right:eg,bottom:ev,left:ey}=(n=>{let a=window.getComputedStyle(n);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(n),eb="start"===B||"nearest"===B?ep-ex:"end"===B?eh+ev:ep+eu/2-ex+ev,e_="center"===H?em+ec/2-ey+eg:"end"===H?ef+eg:em-ey,ek=[];for(let n=0;n=0&&em>=0&&eh<=es&&ef<=ei&&ep>=j&&eh<=K&&em>=ee&&ef<=z)break;let et=getComputedStyle(a),eo=parseInt(et.borderLeftWidth,10),ex=parseInt(et.borderTopWidth,10),eg=parseInt(et.borderRightWidth,10),ev=parseInt(et.borderBottomWidth,10),ey=0,ew=0,eC="offsetWidth"in a?a.offsetWidth-a.clientWidth-eo-eg:0,eS="offsetHeight"in a?a.offsetHeight-a.clientHeight-ex-ev:0,eT="offsetWidth"in a?0===a.offsetWidth?0:v/a.offsetWidth:0,eE="offsetHeight"in a?0===a.offsetHeight?0:g/a.offsetHeight:0;if(en===a)ey="start"===B?eb:"end"===B?eb-es:"nearest"===B?dist_o(ed,ed+es,es,ex,ev,ed+eb,ed+eb+eu,eu):eb-es/2,ew="start"===H?e_:"center"===H?e_-ei/2:"end"===H?e_-ei:dist_o(el,el+ei,ei,eo,eg,el+e_,el+e_+ec,ec),ey=Math.max(0,ey+ed),ew=Math.max(0,ew+el);else{ey="start"===B?eb-j-ex:"end"===B?eb-K+ev+eS:"nearest"===B?dist_o(j,K,g,ex,ev+eS,eb,eb+eu,eu):eb-(j+g/2)+eS/2,ew="start"===H?e_-ee-eo:"center"===H?e_-(ee+v/2)+eC/2:"end"===H?e_-z+eg+eC:dist_o(ee,z,v,eo,eg+eC,e_,e_+ec,ec);let{scrollLeft:n,scrollTop:W}=a;ey=0===eE?0:Math.max(0,Math.min(W+ey/eE,a.scrollHeight-g/eE+eS)),ew=0===eT?0:Math.max(0,Math.min(n+ew/eT,a.scrollWidth-v/eT+eC)),eb+=W-ey,e_+=n-ew}ek.push({el:a,top:ey,left:ew})}return ek},scroll_into_view_if_needed_dist_o=n=>!1===n?{block:"end",inline:"nearest"}:n===Object(n)&&0!==Object.keys(n).length?n:{block:"start",inline:"nearest"};function dist_e(n,a){if(!n.isConnected||!(n=>{let a=n;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(n))return;let g=(n=>{let a=window.getComputedStyle(n);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(n);if("object"==typeof a&&"function"==typeof a.behavior)return a.behavior(dist_r(n,a));let v="boolean"==typeof a||null==a?void 0:a.behavior;for(let{el:j,top:z,left:W}of dist_r(n,scroll_into_view_if_needed_dist_o(a))){let n=z-g.top+g.bottom,a=W-g.left+g.right;j.scroll({top:n,left:a,behavior:v})}}var n7=g(2601),n9=g.n(n7);/** - * @name match-sorter - * @license MIT license. - * @copyright (c) 2020 Kent C. Dodds - * @author Kent C. Dodds (https://kentcdodds.com) - */let n8={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},defaultBaseSortFn=(n,a)=>String(n.rankedValue).localeCompare(String(a.rankedValue));function matchSorter(n,a,g){void 0===g&&(g={});let{keys:v,threshold:j=n8.MATCHES,baseSort:z=defaultBaseSortFn,sorter:W=n=>n.sort((n,a)=>(function(n,a,g){let{rank:v,keyIndex:j}=n,{rank:z,keyIndex:W}=a;return v!==z?v>z?-1:1:j===W?g(n,a):j{let{rank:z,rankedValue:W,keyIndex:B,keyThreshold:H}=n,{itemValue:K,attributes:ee}=a,et=getMatchRanking(K,g,v),en=W,{minRanking:er,maxRanking:eo,threshold:ei}=ee;return et=n8.MATCHES?et=er:et>eo&&(et=eo),et>z&&(z=et,B=j,H=ei,en=K),{rankedValue:en,rank:z,keyIndex:B,keyThreshold:H}},{rankedValue:n,rank:n8.NO_MATCH,keyIndex:-1,keyThreshold:v.threshold})}(z,v,a,g),{rank:H,keyThreshold:K=j}=B;return H>=K&&n.push({...B,item:z,index:W}),n},[]);return W(B).map(n=>{let{item:a}=n;return a})}function getMatchRanking(n,a,g){return(n=prepareValueForComparison(n,g),(a=prepareValueForComparison(a,g)).length>n.length)?n8.NO_MATCH:n===a?n8.CASE_SENSITIVE_EQUAL:(n=n.toLowerCase())===(a=a.toLowerCase())?n8.EQUAL:n.startsWith(a)?n8.STARTS_WITH:n.includes(` ${a}`)?n8.WORD_STARTS_WITH:n.includes(a)?n8.CONTAINS:1===a.length?n8.NO_MATCH:(function(n){let a="",g=n.split(" ");return g.forEach(n=>{let g=n.split("-");g.forEach(n=>{a+=n.substr(0,1)})}),a})(n).includes(a)?n8.ACRONYM:function(n,a){let g=0,v=0;function findMatchingCharacter(n,a,v){for(let j=v,z=a.length;j-1;if(!z)return n8.NO_MATCH}let z=v-j;return function(n){let v=g/a.length,j=n8.MATCHES+v*(1/n);return j}(z)}(n,a)}function prepareValueForComparison(n,a){let{keepDiacritics:g}=a;return n=`${n}`,g||(n=n9()(n)),n}matchSorter.rankings=n8;let re={maxRanking:1/0,minRanking:-1/0};var rt=g(7100),rn=Object.defineProperty,rr=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,rs=Object.prototype.hasOwnProperty,rl=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,a,g)=>a in n?rn(n,a,{enumerable:!0,configurable:!0,writable:!0,value:g}):n[a]=g,__spreadValues=(n,a)=>{for(var g in a||(a={}))rs.call(a,g)&&__defNormalProp(n,g,a[g]);if(ri)for(var g of ri(a))rl.call(a,g)&&__defNormalProp(n,g,a[g]);return n},__spreadProps=(n,a)=>rr(n,ro(a)),__objRest=(n,a)=>{var g={};for(var v in n)rs.call(n,v)&&0>a.indexOf(v)&&(g[v]=n[v]);if(null!=n&&ri)for(var v of ri(n))0>a.indexOf(v)&&rl.call(n,v)&&(g[v]=n[v]);return g},__async=(n,a,g)=>new Promise((v,j)=>{var fulfilled=n=>{try{step(g.next(n))}catch(n){j(n)}},rejected=n=>{try{step(g.throw(n))}catch(n){j(n)}},step=n=>n.done?v(n.value):Promise.resolve(n.value).then(fulfilled,rejected);step((g=g.apply(n,a)).next())}),rd=(0,eS.createContext)({}),ru=(0,eS.createContext)(n=>n),rc=(0,eS.createContext)(null),rp=new WeakMap,rf=(0,eS.createContext)(rp),useActiveAnchor=()=>(0,eS.useContext)(rd),useSetActiveAnchor=()=>(0,eS.useContext)(ru),useIntersectionObserver=()=>(0,eS.useContext)(rc),useSlugs=()=>(0,eS.useContext)(rf),ActiveAnchorProvider=({children:n})=>{let[a,g]=(0,eS.useState)({}),v=(0,eS.useRef)(null);return rD&&!v.current&&(v.current=new IntersectionObserver(n=>{g(a=>{let g=__spreadValues({},a);for(let a of n)if((null==a?void 0:a.rootBounds)&&rp.has(a.target)){let[n,v]=rp.get(a.target),j=a.boundingClientRect.y+a.boundingClientRect.height<=a.rootBounds.y+a.rootBounds.height,z=a.intersectionRatio>0;g[n]={index:v,aboveHalfViewport:j,insideHalfViewport:z}}let v="",j=1/0,z=-1;for(let n in g)g[n].isActive=!1,g[n].insideHalfViewport&&g[n].indexz&&(z=g[n].index,v=n);return g[v]&&(g[v].isActive=!0),g})},{rootMargin:"0px 0px -50%",threshold:[0,1]})),(0,ew.jsx)(rd.Provider,{value:a,children:(0,ew.jsx)(ru.Provider,{value:g,children:(0,ew.jsx)(rf.Provider,{value:rp,children:(0,ew.jsx)(rc.Provider,{value:v.current,children:n})})})})},rh=(0,eS.createContext)({menu:!1,setMenu:()=>!1}),useMenu=()=>(0,eS.useContext)(rh),rm=rh.Provider,rx=(0,eS.createContext)(__spreadValues({title:"",frontMatter:{}},rG));function useConfig(){return(0,eS.useContext)(rx)}var ConfigProvider=({children:n,value:{themeConfig:a,pageOpts:g}})=>{let[v,j]=(0,eS.useState)(!1);eb||(eb=__spreadValues(__spreadValues({},rG),Object.fromEntries(Object.entries(a).map(([n,a])=>[n,a&&"object"==typeof a&&rB.includes(n)?__spreadValues(__spreadValues({},rG[n]),a):a]))));let z=__spreadProps(__spreadValues(__spreadProps(__spreadValues({},eb),{flexsearch:g.flexsearch}),"boolean"==typeof g.newNextLinkBehavior&&{newNextLinkBehavior:g.newNextLinkBehavior}),{title:g.title,frontMatter:g.frontMatter}),{nextThemes:W}=z;return(0,ew.jsx)($,{attribute:"class",disableTransitionOnChange:!0,defaultTheme:W.defaultTheme,storageKey:W.storageKey,forcedTheme:W.forcedTheme,children:(0,ew.jsx)(rx.Provider,{value:z,children:(0,ew.jsx)(rm,{value:{menu:v,setMenu:j},children:n})})})},rg=(0,eS.createContext)(n=>n),useDetails=()=>(0,eS.useContext)(rg),rv=rg.Provider,ry=Number("13.5.6".split(".")[0]),rb=(0,eS.forwardRef)(function(n,a){var{href:g="",children:v,newWindow:j}=n,z=__objRest(n,["href","children","newWindow"]);let W=useConfig();return j?(0,ew.jsxs)("a",__spreadProps(__spreadValues({ref:a,href:g,target:"_blank",rel:"noreferrer"},z),{children:[v,(0,ew.jsx)("span",{className:"nx-sr-only nx-select-none",children:" (opens in a new tab)"})]})):g?ry>12||W.newNextLinkBehavior?(0,ew.jsx)(tb(),__spreadProps(__spreadValues({ref:a,href:g},z),{children:v})):(0,ew.jsx)(tb(),{href:g,passHref:!0,children:(0,ew.jsx)("a",__spreadProps(__spreadValues({ref:a},z),{children:v}))}):(0,ew.jsx)("a",__spreadProps(__spreadValues({ref:a},z),{children:v}))});rb.displayName="Anchor";var getGitIssueUrl=({repository:n="",title:a,labels:g})=>{let v=tL()(n);if(!v)throw Error("Invalid `docsRepositoryBase` URL!");return v.resource.includes("gitlab")?`${v.protocol}://${v.resource}/${v.owner}/${v.name}/-/issues/new?issue[title]=${encodeURIComponent(a)}${g?`&issue[description]=/label${encodeURIComponent(` ~${g} -`)}`:""}`:v.resource.includes("github")?`${v.protocol}://${v.resource}/${v.owner}/${v.name}/issues/new?title=${encodeURIComponent(a)}&labels=${g||""}`:"#"};function renderComponent(n,a){return n?"function"!=typeof n?n:(0,ew.jsx)(n,__spreadValues({},a)):null}function renderString(n,a={}){let g="function"==typeof n?n(a):n;return g||""}function Banner(){let{banner:n}=useConfig();if(!n.text)return null;let a=`try{if(localStorage.getItem(${JSON.stringify(n.key)})==='0'){document.body.classList.add('nextra-banner-hidden')}}catch(e){}`;return(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("script",{dangerouslySetInnerHTML:{__html:a}}),(0,ew.jsxs)("div",{className:(0,eT.Z)("nextra-banner-container nx-sticky nx-top-0 nx-z-20 nx-flex nx-items-center md:nx-relative","nx-h-[var(--nextra-banner-height)] [body.nextra-banner-hidden_&]:nx-hidden","nx-text-slate-50 dark:nx-text-white nx-bg-neutral-900 dark:nx-bg-[linear-gradient(1deg,#383838,#212121)]","nx-px-2 ltr:nx-pl-10 rtl:nx-pr-10 print:nx-hidden"),children:[(0,ew.jsx)("div",{className:"nx-w-full nx-truncate nx-px-4 nx-text-center nx-font-medium nx-text-sm",children:renderComponent(n.text)}),n.dismissible&&(0,ew.jsx)("button",{type:"button","aria-label":"Dismiss banner",className:"nx-w-8 nx-h-8 nx-opacity-80 hover:nx-opacity-100",onClick:()=>{try{localStorage.setItem(n.key,"0")}catch(n){}document.body.classList.add("nextra-banner-hidden")},children:(0,ew.jsx)(eP.b0,{className:"nx-mx-auto nx-h-4 nx-w-4"})})]})]})}function Breadcrumb({activePath:n}){return(0,ew.jsx)("div",{className:"nextra-breadcrumb nx-mt-1.5 nx-flex nx-items-center nx-gap-1 nx-overflow-hidden nx-text-sm nx-text-gray-500 dark:nx-text-gray-400 contrast-more:nx-text-current",children:n.map((a,g)=>{let v=!a.children||a.withIndexPage,j=g===n.length-1;return(0,ew.jsxs)(eS.Fragment,{children:[g>0&&(0,ew.jsx)(eP.LZ,{className:"nx-w-3.5 nx-shrink-0"}),(0,ew.jsx)("div",{className:(0,eT.Z)("nx-whitespace-nowrap nx-transition-colors",j?"nx-font-medium nx-text-gray-700 contrast-more:nx-font-bold contrast-more:nx-text-current dark:nx-text-gray-100 contrast-more:dark:nx-text-current":["nx-min-w-[24px] nx-overflow-hidden nx-text-ellipsis",v&&"hover:nx-text-gray-900 dark:hover:nx-text-gray-100"]),title:a.title,children:v&&!j?(0,ew.jsx)(rb,{href:a.route,children:a.title}):a.title})]},a.route+a.name)})})}function Collapse({children:n,className:a,isOpen:g,horizontal:v=!1}){let j=(0,eS.useRef)(null),z=(0,eS.useRef)(null),W=(0,eS.useRef)(0),B=(0,eS.useRef)(g),H=(0,eS.useRef)(!0);return(0,eS.useEffect)(()=>{let n=j.current,a=z.current,B=W.current;B&&clearTimeout(B),!H.current&&n&&a&&(n.classList.toggle("nx-duration-500",!g),n.classList.toggle("nx-duration-300",g),v?(a.style.width=`${a.clientWidth}px`,n.style.width=`${a.clientWidth}px`):n.style.height=`${a.clientHeight}px`,g?W.current=window.setTimeout(()=>{n.style.removeProperty("height")},300):setTimeout(()=>{v?n.style.width="0px":n.style.height="0px"},0))},[v,g]),(0,eS.useEffect)(()=>{H.current=!1},[]),(0,ew.jsx)("div",{ref:j,className:"nx-transform-gpu nx-overflow-hidden nx-transition-all nx-ease-in-out motion-reduce:nx-transition-none",style:B.current||v?void 0:{height:0},children:(0,ew.jsx)("div",{ref:z,className:(0,eT.Z)("nx-transition-opacity nx-duration-500 nx-ease-in-out motion-reduce:nx-transition-none",g?"nx-opacity-100":"nx-opacity-0",a),children:n})})}var r_=(0,eS.memo)(function({value:n,match:a}){let g;if(!n)return null;let v=n.split(""),j=function(n){if("string"!=typeof n)throw TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(a.trim()),z=RegExp(j.replaceAll(/\s+/g,"|"),"ig"),W=0,B=[];for(;g=z.exec(n);)if(g.index===z.lastIndex)z.lastIndex++;else{let n=v.splice(0,g.index-W).join(""),a=v.splice(0,z.lastIndex-g.index).join("");B.push(n,(0,ew.jsx)("span",{className:"nx-text-primary-600",children:a},g.index)),W=z.lastIndex}return(0,ew.jsxs)(ew.Fragment,{children:[B,v.join("")]})}),rk=(0,eS.forwardRef)((n,a)=>{var{className:g,suffix:v}=n,j=__objRest(n,["className","suffix"]);return(0,ew.jsxs)("div",{className:"nx-relative nx-flex nx-items-center nx-text-gray-900 contrast-more:nx-text-gray-800 dark:nx-text-gray-300 contrast-more:dark:nx-text-gray-300",children:[(0,ew.jsx)("input",__spreadValues({ref:a,spellCheck:!1,className:(0,eT.Z)(g,"nx-block nx-w-full nx-appearance-none nx-rounded-lg nx-px-3 nx-py-2 nx-transition-colors","nx-text-base nx-leading-tight md:nx-text-sm","nx-bg-black/[.05] dark:nx-bg-gray-50/10","focus:nx-bg-white dark:focus:nx-bg-dark","placeholder:nx-text-gray-500 dark:placeholder:nx-text-gray-400","contrast-more:nx-border contrast-more:nx-border-current")},j)),v]})});rk.displayName="Input";var rw=["input","select","button","textarea"];function Search({className:n,overlayClassName:a,value:g,onChange:v,onActive:j,loading:z,error:W,results:B}){let[H,K]=(0,eS.useState)(!1),ee=useConfig(),[et,en]=(0,eS.useState)(0),er=(0,eC.useRouter)(),{setMenu:eo}=useMenu(),ei=(0,eS.useRef)(null),es=(0,eS.useRef)(null),[el,ed]=(0,eS.useState)(!1),[eu,ec]=(0,eS.useState)(!0);(0,eS.useEffect)(()=>{en(0)},[g]),(0,eS.useEffect)(()=>{let down=n=>{let a=document.activeElement,g=null==a?void 0:a.tagName.toLowerCase();!ei.current||!g||rw.includes(g)||null!=a&&a.isContentEditable||("/"===n.key||"k"===n.key&&(n.metaKey||n.ctrlKey)?(n.preventDefault(),ei.current.focus({preventScroll:!0})):"Escape"===n.key&&(K(!1),ei.current.blur()))};return window.addEventListener("keydown",down),()=>{window.removeEventListener("keydown",down)}},[]);let ep=(0,eS.useCallback)(()=>{var n;null==(n=ei.current)||n.blur(),v(""),K(!1),eo(!1)},[v,eo]),ef=(0,eS.useCallback)(n=>{let{index:a}=n.currentTarget.dataset;en(Number(a))},[]),eh=(0,eS.useCallback)(function(n){var a,g,v;switch(n.key){case"ArrowDown":if(et+1 a`);g&&(n.preventDefault(),ef({currentTarget:g}),g.focus())}break;case"ArrowUp":if(et-1>=0){let a=null==(g=es.current)?void 0:g.querySelector(`li:nth-of-type(${et}) > a`);a&&(n.preventDefault(),ef({currentTarget:a}),a.focus())}break;case"Enter":{let n=B[et];n&&eu&&(er.push(n.route),ep());break}case"Escape":K(!1),null==(v=ei.current)||v.blur()}},[et,B,er,ep,ef,eu]),em=useMounted(),ex=H&&!!g,eg=(0,ew.jsx)(nT,{show:em&&(!H||!!g),as:eS.Fragment,enter:"nx-transition-opacity",enterFrom:"nx-opacity-0",enterTo:"nx-opacity-100",leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ew.jsx)("kbd",{className:(0,eT.Z)("nx-absolute nx-my-1.5 nx-select-none ltr:nx-right-1.5 rtl:nx-left-1.5","nx-h-5 nx-rounded nx-bg-white nx-px-1.5 nx-font-mono nx-text-[10px] nx-font-medium nx-text-gray-500","nx-border dark:nx-border-gray-100/20 dark:nx-bg-dark/50","contrast-more:nx-border-current contrast-more:nx-text-current contrast-more:dark:nx-border-current","nx-items-center nx-gap-1 nx-transition-opacity",g?"nx-z-20 nx-flex nx-cursor-pointer hover:nx-opacity-70":"nx-pointer-events-none nx-hidden sm:nx-flex"),title:g?"Clear":void 0,onClick:()=>{v("")},children:g&&el?"ESC":em&&(navigator.userAgent.includes("Macintosh")?(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("span",{className:"nx-text-xs",children:"⌘"}),"K"]}):"CTRL K")})}),ev=(0,eS.useCallback)(n=>{ec("compositionend"===n.type)},[]);return(0,ew.jsxs)("div",{className:(0,eT.Z)("nextra-search nx-relative md:nx-w-64",n),children:[ex&&(0,ew.jsx)("div",{className:"nx-fixed nx-inset-0 nx-z-10",onClick:()=>K(!1)}),(0,ew.jsx)(rk,{ref:ei,value:g,onChange:n=>{let{value:a}=n.target;v(a),K(!!a)},onFocus:()=>{null==j||j(!0),ed(!0)},onBlur:()=>{ed(!1)},onCompositionStart:ev,onCompositionEnd:ev,type:"search",placeholder:renderString(ee.search.placeholder),onKeyDown:eh,suffix:eg}),(0,ew.jsx)(nT,{show:ex,as:nT.Child,leave:"nx-transition-opacity nx-duration-100",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ew.jsx)("ul",{className:(0,eT.Z)("nextra-scrollbar","nx-border nx-border-gray-200 nx-bg-white nx-text-gray-100 dark:nx-border-neutral-800 dark:nx-bg-neutral-900","nx-absolute nx-top-full nx-z-20 nx-mt-2 nx-overflow-auto nx-overscroll-contain nx-rounded-xl nx-py-2.5 nx-shadow-xl","nx-max-h-[min(calc(50vh-11rem-env(safe-area-inset-bottom)),400px)]","md:nx-max-h-[min(calc(100vh-5rem-env(safe-area-inset-bottom)),400px)]","nx-inset-x-0 ltr:md:nx-left-auto rtl:md:nx-right-auto","contrast-more:nx-border contrast-more:nx-border-gray-900 contrast-more:dark:nx-border-gray-50",a),ref:es,style:{transition:"max-height .2s ease"},children:W?(0,ew.jsxs)("span",{className:"nx-flex nx-select-none nx-justify-center nx-gap-2 nx-p-8 nx-text-center nx-text-sm nx-text-red-500",children:[(0,ew.jsx)(eP.AV,{className:"nx-h-5 nx-w-5"}),renderString(ee.search.error)]}):z?(0,ew.jsxs)("span",{className:"nx-flex nx-select-none nx-justify-center nx-gap-2 nx-p-8 nx-text-center nx-text-sm nx-text-gray-400",children:[(0,ew.jsx)(eP.L4,{className:"nx-h-5 nx-w-5 nx-animate-spin"}),renderComponent(ee.search.loading)]}):B.length>0?B.map(({route:n,prefix:a,children:g,id:v},j)=>(0,ew.jsxs)(eS.Fragment,{children:[a,(0,ew.jsx)("li",{className:(0,eT.Z)("nx-mx-2.5 nx-break-words nx-rounded-md","contrast-more:nx-border",j===et?"nx-bg-primary-500/10 nx-text-primary-600 contrast-more:nx-border-primary-500":"nx-text-gray-800 contrast-more:nx-border-transparent dark:nx-text-gray-300"),children:(0,ew.jsx)(rb,{className:"nx-block nx-scroll-m-12 nx-px-2.5 nx-py-2",href:n,"data-index":j,onFocus:ef,onMouseMove:ef,onClick:ep,onKeyDown:eh,children:g})})]},v)):renderComponent(ee.search.emptyResult)})})]})}var rC={},rS=new Map,loadIndexes=(n,a)=>{let g=n+"@"+a;if(rS.has(g))return rS.get(g);let v=loadIndexesImpl(n,a);return rS.set(g,v),v},loadIndexesImpl=(n,a)=>__async(void 0,null,function*(){let g=yield fetch(`${n}/_next/static/chunks/nextra-data-${a}.json`),v=yield g.json(),j=new na.Document({cache:100,tokenize:"full",document:{id:"id",index:"content",store:["title"]},context:{resolution:9,depth:2,bidirectional:!0}}),z=new na.Document({cache:100,tokenize:"full",document:{id:"id",index:"content",tag:"pageId",store:["title","content","url","display"]},context:{resolution:9,depth:2,bidirectional:!0}}),W=0;for(let[n,a]of Object.entries(v)){let g="";for(let[v,j]of(++W,Object.entries(a.data))){let[B,H]=v.split("#"),K=n+(B?"#"+B:""),ee=H||a.title,et=j.split("\n");z.add(__spreadValues({id:K,url:K,title:ee,pageId:`page_${W}`,content:ee},et[0]&&{display:et[0]}));for(let n=0;n{var g,v;if(!n)return;let[j,z]=rC[a],W=(null==(g=j.search(n,5,{enrich:!0,suggest:!0})[0])?void 0:g.result)||[],B=[],K={};for(let a=0;an._page_rk===a._page_rk?n._section_rk-a._section_rk:K[n._page_rk]!==K[a._page_rk]?K[a._page_rk]-K[n._page_rk]:n._page_rk-a._page_rk).map(n=>({id:`${n._page_rk}_${n._section_rk}`,route:n.route,prefix:n.prefix,children:n.children})))},et=(0,eS.useCallback)(n=>__async(this,null,function*(){if(n&&!rC[a]){j(!0);try{yield loadIndexes(g,a)}catch(n){W(!0)}j(!1)}}),[a,g]);return(0,ew.jsx)(Search,{loading:v,error:z,value:K,onChange:n=>__async(this,null,function*(){if(ee(n),!v){if(!rC[a]){j(!0);try{yield loadIndexes(g,a)}catch(n){W(!0)}j(!1)}doSearch(n)}}),onActive:et,className:n,overlayClassName:"nx-w-screen nx-min-h-[100px] nx-max-w-[min(calc(100vw-2rem),calc(100%+20rem))]",results:B})}function Select({options:n,selected:a,onChange:g,title:v,className:j}){let[z,W]=function(n){let a=(0,eS.useRef)(null),g=(0,eS.useRef)(null),v=(0,eS.useRef)(),j=(0,eS.useCallback)(()=>{var j;a.current&&g.current&&(null==(j=v.current)||j.call(v),v.current=t4(a.current,g.current,n).destroy)},[a,g,v,n]);return(0,eS.useMemo)(()=>[n=>{a.current=n,j()},n=>{g.current=n,j()}],[a,g,j])}({strategy:"fixed",placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"sameWidth",enabled:!0,fn({state:n}){n.styles.popper.minWidth=`${n.rects.reference.width}px`},phase:"beforeWrite",requires:["computeStyles"]}]});return(0,ew.jsx)(nG,{value:a,onChange:g,children:({open:g})=>(0,ew.jsxs)(nG.Button,{ref:z,title:v,className:(0,eT.Z)("nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-xs nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400",g?"nx-bg-gray-200 nx-text-gray-900 dark:nx-bg-primary-100/10 dark:nx-text-gray-50":"hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",j),children:[a.name,(0,ew.jsx)(Portal,{children:(0,ew.jsx)(nT,{ref:W,show:g,as:nG.Options,className:"nx-z-20 nx-max-h-64 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",leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:n.map(n=>(0,ew.jsxs)(nG.Option,{value:n,className:({active:n})=>(0,eT.Z)(n?"nx-bg-primary-50 nx-text-primary-600 dark:nx-bg-primary-500/10":"nx-text-gray-800 dark:nx-text-gray-100","nx-relative nx-cursor-pointer nx-whitespace-nowrap nx-py-1.5","nx-transition-colors ltr:nx-pl-3 ltr:nx-pr-9 rtl:nx-pr-3 rtl:nx-pl-9"),children:[n.name,n.key===a.key&&(0,ew.jsx)("span",{className:"nx-absolute nx-inset-y-0 nx-flex nx-items-center ltr:nx-right-3 rtl:nx-left-3",children:(0,ew.jsx)(eP.nQ,{})})]},n.key))})})]})})}function Portal(n){let a=useMounted();return a?(0,nB.createPortal)(n.children,document.body):null}function LocaleSwitch({lite:n,className:a}){let g=useConfig(),{locale:v,asPath:j}=(0,eC.useRouter)(),z=g.i18n;if(!z.length)return null;let W=z.find(n=>v===n.locale);return(0,ew.jsx)(Select,{title:"Change language",className:a,onChange:n=>{let a=new Date(Date.now()+31536e6);document.cookie=`NEXT_LOCALE=${n.key}; expires=${a.toUTCString()}; path=/`,location.href=(0,nE.addBasePath)(j)},selected:{key:(null==W?void 0:W.locale)||"",name:(0,ew.jsxs)("span",{className:"nx-flex nx-items-center nx-gap-2",children:[(0,ew.jsx)(eP.n9,{}),(0,ew.jsx)("span",{className:n?"nx-hidden":"",children:null==W?void 0:W.text})]})},options:z.map(n=>({key:n.locale,name:n.text}))})}function dist_Head(){var n;let a=useConfig(),{resolvedTheme:g}=y(),v=useMounted(),j="function"==typeof a.head?a.head({}):a.head,{primaryHue:z,primarySaturation:W}=a,{dark:B,light:H}="number"==typeof z?{dark:z,light:z}:z,{dark:K,light:ee}="number"==typeof W?{dark:W,light:W}:W,et=a.frontMatter;return(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)(NextSeo,__spreadValues({title:a.title,description:et.description,canonical:et.canonical,openGraph:et.openGraph},null==(n=a.useNextSeoProps)?void 0:n.call(a))),(0,ew.jsxs)(nq(),{children:[a.faviconGlyph?(0,ew.jsx)("link",{rel:"icon",href:`data:image/svg+xml;utf8,${a.faviconGlyph}`}):null,v?(0,ew.jsx)("meta",{name:"theme-color",content:"dark"===g?"#111":"#fff"}):(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("meta",{name:"theme-color",content:"#fff",media:"(prefers-color-scheme: light)"}),(0,ew.jsx)("meta",{name:"theme-color",content:"#111",media:"(prefers-color-scheme: dark)"})]}),(0,ew.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, viewport-fit=cover"}),(0,ew.jsx)("style",{children:` - :root { - --nextra-primary-hue: ${H}deg; - --nextra-primary-saturation: ${ee}%; - --nextra-navbar-height: 4rem; - --nextra-menu-height: 3.75rem; - --nextra-banner-height: 2.5rem; - } - - .dark { - --nextra-primary-hue: ${B}deg; - --nextra-primary-saturation: ${K}%; - } - `}),j]})]})}var rT={link:(0,eT.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,eT.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],W=j.next&&n[a+1];return(z&&!z.isUnderCurrentDocsTree&&(z=!1),W&&!W.isUnderCurrentDocsTree&&(W=!1),z||W)?(0,ew.jsxs)("div",{className:(0,eT.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,ew.jsxs)(rb,{href:z.route,title:z.title,className:(0,eT.Z)(rT.link,"ltr:nx-pr-4 rtl:nx-pl-4"),children:[(0,ew.jsx)(eP.LZ,{className:(0,eT.Z)(rT.icon,"ltr:nx-rotate-180")}),z.title]}),W&&(0,ew.jsxs)(rb,{href:W.route,title:W.title,className:(0,eT.Z)(rT.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:[W.title,(0,ew.jsx)(eP.LZ,{className:(0,eT.Z)(rT.icon,"rtl:nx-rotate-180")})]})]}):null},rE={link:(0,eT.Z)("nx-text-sm contrast-more:nx-text-gray-700 contrast-more:dark:nx-text-gray-100"),active:(0,eT.Z)("nx-font-medium nx-subpixel-antialiased"),inactive:(0,eT.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,ew.jsx)("div",{className:"nx-relative nx-inline-block",children:(0,ew.jsxs)(n6,{children:[(0,ew.jsx)(n6.Button,{className:(0,eT.Z)(n,"-nx-ml-2 nx-hidden nx-items-center nx-whitespace-nowrap nx-rounded nx-p-2 md:nx-inline-flex",rE.inactive),children:g}),(0,ew.jsx)(nT,{leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ew.jsx)(n6.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,ew.jsx)(n6.Item,{children:(0,ew.jsx)(rb,{href:g.href||(null==(v=j[n])?void 0:v.route)||a.route+"/"+n,className:(0,eT.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 rO=Object.create(null),rP=(0,eS.createContext)(null),rM=(0,eS.createContext)(null),rj=(0,eS.createContext)(0),rI=(0,eS.memo)(function(n){let a=(0,eS.useContext)(rj);return(0,ew.jsx)(rj.Provider,{value:a+1,children:(0,ew.jsx)(FolderImpl,__spreadValues({},n))})}),rN={link:(0,eT.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,eT.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,eT.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,eT.Z)("nx-flex nx-flex-col nx-gap-1"),border:(0,eT.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+"/"),W=(0,eS.useContext)(rP),B=!!(null==W?void 0:W.startsWith(n.route+"/")),H=(0,eS.useContext)(rj),{setMenu:K}=useMenu(),ee=useConfig(),{theme:et}=n,en=void 0===rO[n.route]?j||z||B||(et&&"collapsed"in et?!et.collapsed:H{ee.sidebar.autoCollapse?z&&B?rO[n.route]=!0:delete rO[n.route]:(z||B)&&(rO[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?rb:"button";return(0,ew.jsxs)("li",{className:(0,eT.Z)({open:en,active:j}),children:[(0,ew.jsxs)(ei,{href:eo?n.route:void 0,className:(0,eT.Z)("nx-items-center nx-justify-between nx-gap-2",!eo&&"nx-text-left nx-w-full",rN.link,j?rN.active:rN.inactive),onClick:a=>{let g=["svg","path"].includes(a.target.tagName.toLowerCase());if(g&&a.preventDefault(),eo){j||g?rO[n.route]=!en:(rO[n.route]=!0,K(!1)),er({});return}j||(rO[n.route]=!en,er({}))},children:[renderComponent(ee.sidebar.titleComponent,{title:n.title,type:n.type,route:n.route}),(0,ew.jsx)(eP.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,eT.Z)("nx-origin-center nx-transition-transform rtl:-nx-rotate-180",en&&"ltr:nx-rotate-90 rtl:nx-rotate-[-270deg]")})]}),(0,ew.jsx)(Collapse,{className:"ltr:nx-pr-0 rtl:nx-pl-0 nx-pt-1",isOpen:en,children:Array.isArray(n.children)?(0,ew.jsx)(Menu2,{className:(0,eT.Z)(rN.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,ew.jsx)("li",{className:(0,eT.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,ew.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,eS.useContext)(rM),j=n.route&&[g,g+"/"].includes(n.route+"/"),z=useActiveAnchor(),{setMenu:W}=useMenu(),B=useConfig();return"separator"===n.type?(0,ew.jsx)(Separator,{title:n.title}):(0,ew.jsxs)("li",{className:(0,eT.Z)(rN.list,{active:j}),children:[(0,ew.jsx)(rb,{href:n.href||n.route,newWindow:n.newWindow,className:(0,eT.Z)(rN.link,j?rN.active:rN.inactive),onClick:()=>{W(!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,ew.jsx)("ul",{className:(0,eT.Z)(rN.list,rN.border,"ltr:nx-ml-3 rtl:nx-mr-3"),children:a.map(({id:n,value:a})=>{var g;return(0,ew.jsx)("li",{children:(0,ew.jsx)("a",{href:`#${n}`,className:(0,eT.Z)(rN.link,'nx-flex nx-gap-2 before:nx-opacity-25 before:nx-content-["#"]',(null==(g=z[n])?void 0:g.isActive)?rN.active:rN.inactive),onClick:()=>{W(!1)},children:a})},n)})})]})}function Menu2({directories:n,anchors:a,className:g,onlyCurrentDocs:v}){return(0,ew.jsx)("ul",{className:(0,eT.Z)(rN.list,g),children:n.map(n=>!v||n.isUnderCurrentDocsTree?"menu"===n.type||n.children&&(n.children.length||!n.withIndexPage)?(0,ew.jsx)(rI,{item:n,anchors:a},n.name):(0,ew.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 W=useConfig(),{menu:B,setMenu:H}=useMenu(),K=(0,eC.useRouter)(),[ee,et]=(0,eS.useState)(null),[en,er]=(0,eS.useState)(!0),[eo,ei]=(0,eS.useState)(!1),es=(0,eS.useMemo)(()=>j.filter(n=>2===n.depth),[j]),el=(0,eS.useRef)(null),ed=(0,eS.useRef)(null),eu=useMounted();(0,eS.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,eS.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:ed.current})};B?setTimeout(scroll,300):scroll()}},[B]),(0,eS.useEffect)(()=>{H(!1)},[K.asPath,H]);let ec=W.i18n.length>0,ep=W.darkMode||ec||W.sidebar.toggleButton;return(0,ew.jsxs)(ew.Fragment,{children:[z&&v?(0,ew.jsx)("div",{className:"max-xl:nx-hidden nx-h-0 nx-w-64 nx-shrink-0"}):null,(0,ew.jsx)("div",{className:(0,eT.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:()=>H(!1)}),(0,ew.jsxs)("aside",{className:(0,eT.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",en?"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:ed,children:[(0,ew.jsx)("div",{className:"nx-px-4 nx-pt-4 md:nx-hidden",children:renderComponent(W.search.component,{directories:a})}),(0,ew.jsx)(rP.Provider,{value:ee,children:(0,ew.jsx)(rM.Provider,{value:n=>{et(n)},children:(0,ew.jsxs)("div",{className:(0,eT.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))]",en?"nextra-scrollbar":"no-scrollbar"),ref:el,children:[(!v||!en)&&(0,ew.jsx)(Collapse,{isOpen:en,horizontal:!0,children:(0,ew.jsx)(Menu2,{className:"nextra-menu-desktop max-md:nx-hidden",directories:n,anchors:W.toc.float?[]:es,onlyCurrentDocs:!0})}),eu&&window.innerWidth<768&&(0,ew.jsx)(Menu2,{className:"nextra-menu-mobile md:nx-hidden",directories:g,anchors:es})]})})}),ep&&(0,ew.jsxs)("div",{className:(0,eT.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",en?(0,eT.Z)(ec&&"nx-justify-end","nx-border-t"):"nx-py-4 nx-flex-wrap nx-justify-center"),"data-toggle-animation":eo?en?"show":"hide":"off",children:[(0,ew.jsx)(LocaleSwitch,{lite:!en,className:(0,eT.Z)(en?"nx-grow":"max-md:nx-grow")}),W.darkMode&&(0,ew.jsx)("div",{className:en&&!ec?"nx-grow nx-flex nx-flex-col":"",children:renderComponent(W.themeSwitch.component,{lite:!en||ec})}),W.sidebar.toggleButton&&(0,ew.jsx)("button",{title:en?"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:()=>{er(!en),ei(!0)},children:(0,ew.jsx)(eP.Qq,{isOpen:en})})]})]})]})}var rZ="reach-skip-nav";(0,eS.forwardRef)(function(n,a){var{className:g,id:v,label:j="Skip to content",styled:z}=n,W=__objRest(n,["className","id","label","styled"]);let B=void 0===g?z?(0,eT.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,ew.jsx)("a",__spreadProps(__spreadValues({},W),{ref:a,href:`#${v||rZ}`,className:B,"data-reach-skip-link":"",children:j}))}).displayName="SkipNavLink";var rR=(0,eS.forwardRef)(function(n,a){var{id:g}=n,v=__objRest(n,["id"]);return(0,ew.jsx)("div",__spreadProps(__spreadValues({},v),{ref:a,id:g||rZ}))});rR.displayName="SkipNavContent";var rA=tv.strictObject({light:tv.string(),dark:tv.string(),system:tv.string()});function scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}function BackToTop({className:n}){let a=(0,eS.useRef)(null);return(0,eS.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,ew.jsxs)("button",{ref:a,"aria-hidden":"true",onClick:scrollToTop,className:(0,eT.Z)("nx-flex nx-items-center nx-gap-1.5 nx-transition nx-opacity-0",n),children:["Scroll to top",(0,ew.jsx)(eP.LZ,{className:"-nx-rotate-90 nx-w-3.5 nx-h-3.5 nx-border nx-rounded-full nx-border-current"})]})}var rL=(0,eT.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,eS.useState)(""),j=(0,eS.useMemo)(()=>g?matchSorter(a,g,{keys:["title"]}).map(({route:n,title:a})=>({id:n+a,route:n,children:(0,ew.jsx)(r_,{value:a,match:g})})):[],[g,a]);return(0,ew.jsx)(Search,{value:g,onChange:v,className:n,overlayClassName:"nx-w-full",results:j})}var rF="en-US",rD="undefined"!=typeof window;function isFunction(n){return"function"==typeof n}var rV=tv.array(tv.strictObject({direction:tv.enum(["ltr","rtl"]).optional(),locale:tv.string(),text:tv.string()})),rz=[function(n){return null==n||"string"==typeof n||isFunction(n)||(0,eS.isValidElement)(n)},{message:"Must be React.ReactNode or React.FC"}],rU=[isFunction,{message:"Must be React.FC"}];tv.strictObject({banner:tv.strictObject({dismissible:tv.boolean(),key:tv.string(),text:tv.custom(...rz).optional()}),chat:tv.strictObject({icon:tv.custom(...rz),link:tv.string().startsWith("https://").optional()}),components:tv.record(tv.custom(...rU)).optional(),darkMode:tv.boolean(),direction:tv.enum(["ltr","rtl"]),docsRepositoryBase:tv.string().startsWith("https://"),editLink:tv.strictObject({component:tv.custom(...rU).or(tv.null()),text:tv.custom(...rz)}),faviconGlyph:tv.string().optional(),feedback:tv.strictObject({content:tv.custom(...rz),labels:tv.string(),useLink:tv.function().returns(tv.string())}),footer:tv.strictObject({component:tv.custom(...rz),text:tv.custom(...rz)}),gitTimestamp:tv.custom(...rz),head:tv.custom(...rz),i18n:rV,logo:tv.custom(...rz),logoLink:tv.boolean().or(tv.string()),main:tv.custom(...rU).optional(),navbar:tv.strictObject({component:tv.custom(...rz),extraContent:tv.custom(...rz).optional()}),navigation:tv.boolean().or(tv.strictObject({next:tv.boolean(),prev:tv.boolean()})),nextThemes:tv.strictObject({defaultTheme:tv.string(),forcedTheme:tv.string().optional(),storageKey:tv.string()}),notFound:tv.strictObject({content:tv.custom(...rz),labels:tv.string()}),primaryHue:tv.number().or(tv.strictObject({dark:tv.number(),light:tv.number()})),primarySaturation:tv.number().or(tv.strictObject({dark:tv.number(),light:tv.number()})),project:tv.strictObject({icon:tv.custom(...rz),link:tv.string().startsWith("https://").optional()}),search:tv.strictObject({component:tv.custom(...rz),emptyResult:tv.custom(...rz),error:tv.string().or(tv.function().returns(tv.string())),loading:tv.custom(...rz),placeholder:tv.string().or(tv.function().returns(tv.string()))}),serverSideError:tv.strictObject({content:tv.custom(...rz),labels:tv.string()}),sidebar:tv.strictObject({autoCollapse:tv.boolean().optional(),defaultMenuCollapseLevel:tv.number().min(1).int(),titleComponent:tv.custom(...rz),toggleButton:tv.boolean()}),themeSwitch:tv.strictObject({component:tv.custom(...rz),useOptions:rA.or(tv.function().returns(rA))}),toc:tv.strictObject({backToTop:tv.boolean(),component:tv.custom(...rz),extraContent:tv.custom(...rz),float:tv.boolean(),headingComponent:tv.custom(...rU).optional(),title:tv.custom(...rz)}),useNextSeoProps:tv.custom(isFunction)}).deepPartial().extend({i18n:rV.optional()});var r$={"en-US":"Loading",fr:"Сhargement",ru:"Загрузка","zh-CN":"正在加载"},rW={"en-US":"Search documentation",fr:"Rechercher documents",ru:"Поиск документации","zh-CN":"搜索文档"},rG={banner:{dismissible:!0,key:"nextra-banner"},chat:{icon:(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)(eP.D7,{}),(0,ew.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=tL()(a.docsRepositoryBase||"");if(!g)throw Error("Invalid `docsRepositoryBase` URL!");return`${g.href}/${n}`}(a);return v?(0,ew.jsx)(rb,{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,ew.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,ew.jsxs)("div",{className:(0,eT.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,ew.jsx)(LocaleSwitch,{}),a.darkMode&&renderComponent(a.themeSwitch.component)]}),(0,ew.jsx)("hr",{className:"dark:nx-border-neutral-800"}),(0,ew.jsx)("div",{className:(0,eT.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=rF}=(0,eC.useRouter)();return(0,ew.jsxs)(ew.Fragment,{children:["Last updated on"," ",(0,ew.jsx)("time",{dateTime:n.toISOString(),children:n.toLocaleDateString(a,{day:"numeric",month:"long",year:"numeric"})})]})},head:(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("meta",{name:"msapplication-TileColor",content:"#fff"}),(0,ew.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ew.jsx)("meta",{name:"description",content:"Nextra: the next docs builder"}),(0,ew.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,ew.jsx)("meta",{name:"twitter:site",content:"@shuding_"}),(0,ew.jsx)("meta",{property:"og:title",content:"Nextra: the next docs builder"}),(0,ew.jsx)("meta",{property:"og:description",content:"Nextra: the next docs builder"}),(0,ew.jsx)("meta",{name:"apple-mobile-web-app-title",content:"Nextra"})]}),i18n:[],logo:(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("span",{className:"nx-font-extrabold",children:"Nextra"}),(0,ew.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,ew.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,ew.jsx)("div",{className:(0,eT.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,ew.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,ew.jsx)(rb,{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,ew.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,ew.jsxs)(NavbarMenu,{className:(0,eT.Z)(rE.link,"nx-flex nx-gap-1",rE.inactive),menu:n,children:[n.title,(0,ew.jsx)(eP.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,ew.jsxs)(rb,{href:a,className:(0,eT.Z)(rE.link,"nx-relative -nx-ml-2 nx-hidden nx-whitespace-nowrap nx-p-2 md:nx-inline-block",!g||n.newWindow?rE.inactive:rE.active),newWindow:n.newWindow,"aria-current":!n.newWindow&&g,children:[(0,ew.jsx)("span",{className:"nx-absolute nx-inset-x-0 nx-text-center",children:n.title}),(0,ew.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,ew.jsx)(rb,{className:"nx-p-2 nx-text-current",href:g.project.link,newWindow:!0,children:renderComponent(g.project.icon)}):null,g.chat.link?(0,ew.jsx)(rb,{className:"nx-p-2 nx-text-current",href:g.chat.link,newWindow:!0,children:renderComponent(g.chat.icon)}):null,renderComponent(g.navbar.extraContent),(0,ew.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,ew.jsx)(eP.Oq,{className:(0,eT.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,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)(eP.fy,{}),(0,ew.jsx)("span",{className:"nx-sr-only",children:"GitHub"})]})},search:{component:function({className:n,directories:a}){let g=useConfig();return g.flexsearch?(0,ew.jsx)(Flexsearch,{className:n}):(0,ew.jsx)(MatchSorterSearch,{className:n,directories:a})},emptyResult:(0,ew.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=rF}=(0,eC.useRouter)(),g=n&&r$[n]||r$[a];return(0,ew.jsxs)(ew.Fragment,{children:[g,"…"]})},placeholder:function(){let{locale:n,defaultLocale:a=rF}=(0,eC.useRouter)(),g=n&&rW[n]||rW[a];return`${g}\u2026`}},serverSideError:{content:"Submit an issue about error in url →",labels:"bug"},sidebar:{defaultMenuCollapseLevel:2,titleComponent:({title:n})=>(0,ew.jsx)(ew.Fragment,{children:n}),toggleButton:!1},themeSwitch:{component:function({lite:n,className:a}){let{setTheme:g,resolvedTheme:v,theme:j=""}=y(),z=useMounted(),W=useConfig().themeSwitch,B=z&&"dark"===v?eP.kL:eP.NW,H="function"==typeof W.useOptions?W.useOptions():W.useOptions;return(0,ew.jsx)(Select,{className:a,title:"Change theme",options:[{key:"light",name:H.light},{key:"dark",name:H.dark},{key:"system",name:H.system}],onChange:n=>{g(n.key)},selected:{key:j,name:(0,ew.jsxs)("div",{className:"nx-flex nx-items-center nx-gap-2 nx-capitalize",children:[(0,ew.jsx)(B,{}),(0,ew.jsx)("span",{className:n?"md:nx-hidden":"",children:z?H[j]:H.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,eS.useRef)(null),W=(0,eS.useMemo)(()=>n.filter(n=>n.depth>1),[n]),B=W.length>0,H=!!(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,eS.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,ew.jsxs)("div",{ref:z,className:(0,eT.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,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("p",{className:"nx-mb-4 nx-font-semibold nx-tracking-tight",children:renderComponent(j.toc.title)}),(0,ew.jsx)("ul",{children:W.map(({id:n,value:a,depth:g})=>{var z,W,B,H;return(0,ew.jsx)("li",{className:"nx-my-2 nx-scroll-my-6 nx-scroll-py-6",children:(0,ew.jsx)("a",{href:`#${n}`,className:(0,eT.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!=(H=null==(B=(W=j.toc).headingComponent)?void 0:B.call(W,{id:n,children:a}))?H:a})},n)})})]}),H&&(0,ew.jsxs)("div",{className:(0,eT.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,ew.jsx)(rb,{className:rL,href:j.feedback.useLink(),newWindow:!0,children:renderComponent(j.feedback.content)}):null,renderComponent(j.editLink.component,{filePath:a,className:rL,children:renderComponent(j.editLink.text)}),renderComponent(j.toc.extraContent),j.toc.backToTop&&(0,ew.jsx)(BackToTop,{className:rL})]})]})},float:!0,title:"On This Page"},useNextSeoProps:()=>({titleTemplate:"%s – Nextra"})},rB=Object.entries(rG).map(([n,a])=>{let g=a&&"object"==typeof a&&!Array.isArray(a)&&!(0,eS.isValidElement)(a);if(g)return n}).filter(Boolean);if(rD){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,W=__objRest(n,["tag","context","children","id","className"]);let B=useSetActiveAnchor(),H=useSlugs(),K=useIntersectionObserver(),ee=(0,eS.useRef)(null);return(0,eS.useEffect)(()=>{if(!j)return;let n=ee.current;if(n)return H.set(n,[j,g.index+=1]),null==K||K.observe(n),()=>{null==K||K.disconnect(),H.delete(n),B(n=>{let a=__spreadValues({},n);return delete a[j],a})}},[j,g,H,K,B]),(0,ew.jsxs)(a,__spreadProps(__spreadValues({className:"sr-only"===z?"nx-sr-only":(0,eT.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])},W),{children:[v,j&&(0,ew.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 eS.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,eS.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,eS.useState)(!!g),[W,B]=findSummary(a),[H,K]=(0,eS.useState)(j);return(0,eS.useEffect)(()=>{if(j)K(!0);else{let n=setTimeout(()=>K(j),500);return()=>clearTimeout(n)}},[j]),(0,ew.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:H}),j&&{"data-expanded":!0}),{children:[(0,ew.jsx)(rv,{value:z,children:W}),(0,ew.jsx)(Collapse,{isOpen:j,children:B})]}))},Summary=n=>{let a=useDetails();return(0,ew.jsx)("summary",__spreadProps(__spreadValues({className:(0,eT.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)}}))},rH=/https?:\/\//,Link=n=>{var{href:a="",className:g}=n,v=__objRest(n,["href","className"]);return(0,ew.jsx)(rb,__spreadValues({href:a,newWindow:rH.test(a),className:(0,eT.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,ew.jsx)(rb,__spreadValues({href:a,newWindow:rH.test(a)},g))},getComponents=({isRawLayout:n,components:a})=>{if(n)return{a:A};let g={index:0};return __spreadValues({h1:n=>(0,ew.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,ew.jsx)(HeadingLink,__spreadValues({tag:"h2",context:g},n)),h3:n=>(0,ew.jsx)(HeadingLink,__spreadValues({tag:"h3",context:g},n)),h4:n=>(0,ew.jsx)(HeadingLink,__spreadValues({tag:"h4",context:g},n)),h5:n=>(0,ew.jsx)(HeadingLink,__spreadValues({tag:"h5",context:g},n)),h6:n=>(0,ew.jsx)(HeadingLink,__spreadValues({tag:"h6",context:g},n)),ul:n=>(0,ew.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,ew.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,ew.jsx)("li",__spreadValues({className:"nx-my-2"},n)),blockquote:n=>(0,ew.jsx)("blockquote",__spreadValues({className:(0,eT.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,ew.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,ew.jsx)(rt.iA,__spreadValues({className:"nextra-scrollbar nx-mt-6 nx-p-0 first:nx-mt-0"},n)),p:n=>(0,ew.jsx)("p",__spreadValues({className:"nx-mt-6 nx-leading-7 first:nx-mt-0"},n)),tr:rt.Tr,th:rt.Th,td:rt.Td,details:Details,summary:Summary,pre:rt.SU,code:rt.EK},a)},rq={toc:(0,eT.Z)("nextra-toc nx-order-last nx-hidden nx-w-64 nx-shrink-0 xl:nx-block print:nx-hidden"),main:(0,eT.Z)("nx-w-full nx-break-words")},Body=({themeContext:n,breadcrumb:a,timestamp:g,navigation:v,children:j})=>{var z;let W=useConfig(),B=useMounted();if("raw"===n.layout)return(0,ew.jsx)("div",{className:rq.main,children:j});let H=n.timestamp&&W.gitTimestamp&&g?new Date(g):null,K=B&&H?(0,ew.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(W.gitTimestamp,{timestamp:H})}):(0,ew.jsx)("div",{className:"nx-mt-16"}),ee=(0,ew.jsxs)(ew.Fragment,{children:[j,K,v]}),et=(null==(z=W.main)?void 0:z.call(W,{children:ee}))||ee;return"full"===n.layout?(0,ew.jsx)("article",{className:(0,eT.Z)(rq.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,ew.jsx)("article",{className:(0,eT.Z)(rq.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,ew.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 W=useConfig(),{locale:B=rF,defaultLocale:H}=(0,eC.useRouter)(),K=useFSRoute(),{activeType:ee,activeIndex:et,activeThemeContext:en,activePath:er,topLevelNavbarItems:eo,docsDirectories:ei,flatDirectories:es,flatDocsDirectories:el,directories:ed}=(0,eS.useMemo)(()=>(function normalizePages({list:n,locale:a,defaultLocale:g,route:v,docsRoot:j="",underCurrentDocsRoot:z=!1,pageThemeContext:W=tO}){let B,H;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=[],en=[],er=[],eo=[],ei=[],es=0,el=W,ed=[],eu=-1,ec=K["*"]||{};delete ec.title,delete ec.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,...eg&&{title:eg},...eu&&{display:eu},...ex&&{children:[]}}),ev=getItem(),ey=getItem(),eb=getItem();if(ey.isUnderCurrentDocsTree=em,"separator"===ef&&(ev.isUnderCurrentDocsTree=em),B.route===v)switch(ed=[ev],H=ef,el={...el,...eh},ef){case"page":case"menu":es=ei.length;break;case"doc":es=eo.length}if(!("hidden"===eu&&"Folder"!==ev.kind||eE.hV.has(B.route))){if(ex){if(void 0!==ex.activeIndex&&void 0!==ex.activeType){switch(el=ex.activeThemeContext,H=ex.activeType,ed=[ev,...ex.activePath],H){case"page":case"menu":es=ei.length+ex.activeIndex;break;case"doc":es=eo.length+ex.activeIndex}B.withIndexPage&&"doc"===ef&&es++}switch(ef){case"page":case"menu":eb.children.push(...ex.directories),er.push(...ex.docsDirectories),ex.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}}}(ex.flatDirectories),ei.push(eb)):eb.withIndexPage&&ei.push(eb);break;case"doc":Array.isArray(ey.children)&&ey.children.push(...ex.docsDirectories),ev.withIndexPage&&"children"!==eu&&eo.push(ey)}en.push(...ex.flatDirectories),eo.push(...ex.flatDocsDirectories),Array.isArray(ev.children)&&ev.children.push(...ex.directories)}else switch(en.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),er.push(...ey.children)):et.push(ev),ef){case"page":case"menu":er.push(eb);break;case"doc":"children"!==eu&&er.push(ey);break;case"separator":er.push(ev)}}}return{activeType:H,activeIndex:es,activeThemeContext:el,activePath:ed,directories:et,flatDirectories:en,docsDirectories:er,flatDocsDirectories:eo,topLevelNavbarItems:ei}})({list:a,locale:B,defaultLocale:H,route:K}),[a,B,H,K]),eu=__spreadValues(__spreadValues({},en),g),ec=!eu.sidebar||"raw"===eu.layout||"page"===ee,ep="page"!==ee&&eu.toc&&"default"===eu.layout?(0,ew.jsx)("nav",{className:(0,eT.Z)(rq.toc,"nx-px-4"),"aria-label":"table of contents",children:renderComponent(W.toc.component,{headings:W.toc.float?v:[],filePath:n})}):"full"!==eu.layout&&"raw"!==eu.layout&&(0,ew.jsx)("nav",{className:rq.toc,"aria-label":"table of contents"}),ef=W.i18n.find(n=>n.locale===B),eh=ef?"rtl"===ef.direction:"rtl"===W.direction,em=eh?"rtl":"ltr";return(0,ew.jsxs)("div",{dir:em,children:[(0,ew.jsx)("script",{dangerouslySetInnerHTML:{__html:`document.documentElement.setAttribute('dir','${em}')`}}),(0,ew.jsx)(dist_Head,{}),(0,ew.jsx)(Banner,{}),eu.navbar&&renderComponent(W.navbar.component,{flatDirectories:es,items:eo}),(0,ew.jsx)("div",{className:(0,eT.Z)("nx-mx-auto nx-flex","raw"!==eu.layout&&"nx-max-w-[90rem]"),children:(0,ew.jsxs)(ActiveAnchorProvider,{children:[(0,ew.jsx)(Sidebar,{docsDirectories:ei,flatDirectories:es,fullDirectories:ed,headings:v,asPopover:ec,includePlaceholder:"default"===eu.layout}),ep,(0,ew.jsx)(rR,{}),(0,ew.jsx)(Body,{themeContext:eu,breadcrumb:"page"!==ee&&eu.breadcrumb?(0,ew.jsx)(Breadcrumb,{activePath:er}):null,timestamp:j,navigation:"page"!==ee&&eu.pagination?(0,ew.jsx)(NavLinks,{flatDirectories:el,currentIndex:et}):null,children:(0,ew.jsx)(eO.Z,{components:getComponents({isRawLayout:"raw"===eu.layout,components:W.components}),children:z})})]})}),eu.footer&&renderComponent(W.footer.component,{menu:ec})]})};let rK={logo:(0,ew.jsx)("div",{style:{paddingLeft:"50px",lineHeight:"38px",background:"url('https://avatars.githubusercontent.com/u/88127058?s=38') no-repeat left",backgroundSize:"38px",fontWeight:550},children:"Overextended"}),project:{link:"https://github.com/overextended/overextended.github.io"},chat:{link:"https://discord.overextended.dev"},docsRepositoryBase:"https://github.com/overextended/overextended.github.io/blob/main",footer:{text:"Overextended"},head:function(){let{asPath:n}=(0,eC.useRouter)(),{frontMatter:a,title:g}=useConfig(),v=a.description||"Documentation for Overextended's resources for FiveM/RedM";return(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,ew.jsx)("link",{rel:"icon",type:"image/x-icon",href:"/static/ox.ico"}),(0,ew.jsx)("meta",{httpEquiv:"Content-Language",content:"en"}),(0,ew.jsx)("meta",{name:"description",content:v}),(0,ew.jsx)("meta",{name:"og:title",content:g}),(0,ew.jsx)("meta",{name:"og:description",content:v}),(0,ew.jsx)("meta",{name:"og:url",content:"https://overextended.dev".concat(n)})]})},primaryHue:{dark:200,light:200},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]||"Overextended",v=a[a.length-1],j=/[a-z]/.test(v)&&/[A-Z]/.test(v)?v:"%s";return{titleTemplate:"".concat(j," - ").concat(v===g?"Documentation":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,ew.jsx)(a,{...g})},rJ=[];function _createMdxContent(n){return(0,ew.jsx)(ew.Fragment,{})}var _app=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ew.jsx)(MDXLayout,{...n,children:(0,ew.jsx)(_createMdxContent,{...n})})};let rY=(e_=globalThis)[ek=Symbol.for("__nextra_internal__")]||(e_[ek]=Object.create(null));rY.Layout=function(n){var{children:a}=n,g=__objRest(n,["children"]);return(0,ew.jsx)(ConfigProvider,{value:g,children:(0,ew.jsx)(InnerLayout,__spreadProps(__spreadValues({},g.pageOpts),{children:a}))})},rY.pageMap=[{kind:"Meta",data:{index:"Introduction",guides:"Guides",oxmysql:"OxMySQL",ox_lib:"Ox Lib",fivemanage:{title:"Fivemanage",type:"page",href:"https://fivemanage.com/?ref=overextended"},creator_codes:{title:"Creator codes",type:"page",href:"https://overextended.dev/#creator-codes"},support:{title:"Support us",type:"page",href:"https://overextended.dev/#support-our-team"},ox_core:"Ox Core",ox_doorlock:"Ox Doorlock",ox_fuel:"Ox Fuel",ox_inventory:"Ox Inventory",ox_target:"Ox Target"}},{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:"Introduction"}},{kind:"Folder",name:"ox_core",route:"/ox_core",children:[{kind:"Folder",name:"Classes",route:"/ox_core/Classes",children:[{kind:"Folder",name:"Client",route:"/ox_core/Classes/Client",children:[{kind:"MdxPage",name:"OxPlayer",route:"/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"Meta",data:{OxPlayer:"OxPlayer"}}]},{kind:"Folder",name:"Server",route:"/ox_core/Classes/Server",children:[{kind:"MdxPage",name:"OxAccount",route:"/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"}},{kind:"MdxPage",name:"OxPlayer",route:"/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"MdxPage",name:"OxVehicle",route:"/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"}},{kind:"Meta",data:{OxAccount:"OxAccount",OxPlayer:"OxPlayer",OxVehicle:"OxVehicle"}}]}]},{kind:"Folder",name:"Events",route:"/ox_core/Events",children:[{kind:"MdxPage",name:"client",route:"/ox_core/Events/client"},{kind:"MdxPage",name:"server",route:"/ox_core/Events/server"},{kind:"Meta",data:{client:"Client",server:"Server"}}]},{kind:"Folder",name:"Functions",route:"/ox_core/Functions",children:[{kind:"MdxPage",name:"common",route:"/ox_core/Functions/common"},{kind:"MdxPage",name:"server",route:"/ox_core/Functions/server"},{kind:"Meta",data:{common:"Common",server:"Server"}}]}]},{kind:"MdxPage",name:"ox_core",route:"/ox_core"},{kind:"Folder",name:"ox_doorlock",route:"/ox_doorlock",children:[{kind:"Folder",name:"Client",route:"/ox_doorlock/Client",children:[{kind:"MdxPage",name:"functions",route:"/ox_doorlock/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/ox_doorlock/Server",children:[{kind:"MdxPage",name:"events",route:"/ox_doorlock/Server/events"},{kind:"MdxPage",name:"functions",route:"/ox_doorlock/Server/functions"},{kind:"Meta",data:{events:"Events",functions:"Functions"}}]},{kind:"MdxPage",name:"settings",route:"/ox_doorlock/settings",frontMatter:{title:"Door Settings"}},{kind:"Meta",data:{settings:"Door Settings"}}]},{kind:"MdxPage",name:"ox_doorlock",route:"/ox_doorlock"},{kind:"Folder",name:"ox_fuel",route:"/ox_fuel",children:[{kind:"Folder",name:"Client",route:"/ox_fuel/Client",children:[{kind:"MdxPage",name:"functions",route:"/ox_fuel/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/ox_fuel/Server",children:[{kind:"MdxPage",name:"functions",route:"/ox_fuel/Server/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"MdxPage",name:"Shared",route:"/ox_fuel/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"MdxPage",name:"ox_fuel",route:"/ox_fuel"},{kind:"Folder",name:"ox_inventory",route:"/ox_inventory",children:[{kind:"Folder",name:"Events",route:"/ox_inventory/Events",children:[{kind:"MdxPage",name:"Client",route:"/ox_inventory/Events/Client"},{kind:"MdxPage",name:"Server",route:"/ox_inventory/Events/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Frameworks",route:"/ox_inventory/Frameworks",children:[{kind:"MdxPage",name:"esx",route:"/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"}},{kind:"MdxPage",name:"qbx",route:"/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"}},{kind:"Meta",data:{esx:"ESX",qbx:"Qbox"}}]},{kind:"Folder",name:"Functions",route:"/ox_inventory/Functions",children:[{kind:"MdxPage",name:"Client",route:"/ox_inventory/Functions/Client"},{kind:"Folder",name:"Server",route:"/ox_inventory/Functions/Server",children:[{kind:"MdxPage",name:"Hooks",route:"/ox_inventory/Functions/Server/Hooks"},{kind:"Meta",data:{Hooks:"Hooks"}}]},{kind:"MdxPage",name:"Server",route:"/ox_inventory/Functions/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Guides",route:"/ox_inventory/Guides",children:[{kind:"MdxPage",name:"crafting",route:"/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"}},{kind:"MdxPage",name:"creatingItems",route:"/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"}},{kind:"MdxPage",name:"metadata",route:"/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"shops",route:"/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"}},{kind:"MdxPage",name:"stashes",route:"/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:"/ox_inventory/issues",frontMatter:{title:"Common Issues"}},{kind:"Meta",data:{issues:"Common Issues"}}]},{kind:"MdxPage",name:"ox_inventory",route:"/ox_inventory"},{kind:"Folder",name:"ox_lib",route:"/ox_lib",children:[{kind:"Folder",name:"Modules",route:"/ox_lib/Modules",children:[{kind:"Folder",name:"ACL",route:"/ox_lib/Modules/ACL",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/ACL/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddCommand",route:"/ox_lib/Modules/AddCommand",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/AddCommand/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddKeybind",route:"/ox_lib/Modules/AddKeybind",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/AddKeybind/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Array",route:"/ox_lib/Modules/Array",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Array/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cache",route:"/ox_lib/Modules/Cache",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Cache/Client"},{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Cache/Shared"},{kind:"Meta",data:{Client:"Client",Shared:"Shared"}}]},{kind:"Folder",name:"Callback",route:"/ox_lib/Modules/Callback",children:[{kind:"Folder",name:"JavaScript",route:"/ox_lib/Modules/Callback/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Callback/JavaScript/Client"},{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Callback/JavaScript/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Callback/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Callback/Lua/Client"},{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Callback/Lua/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]}]},{kind:"Folder",name:"Class",route:"/ox_lib/Modules/Class",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Class/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cron",route:"/ox_lib/Modules/Cron",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Cron/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"DisableControls",route:"/ox_lib/Modules/DisableControls",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/DisableControls/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Dui",route:"/ox_lib/Modules/Dui",children:[{kind:"Folder",name:"Javascript",route:"/ox_lib/Modules/Dui/Javascript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Dui/Javascript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Dui/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Dui/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"GetClosestObject",route:"/ox_lib/Modules/GetClosestObject",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestObject/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPed",route:"/ox_lib/Modules/GetClosestPed",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestPed/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPlayer",route:"/ox_lib/Modules/GetClosestPlayer",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestPlayer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestVehicle",route:"/ox_lib/Modules/GetClosestVehicle",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestVehicle/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyObjects",route:"/ox_lib/Modules/GetNearbyObjects",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyObjects/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPeds",route:"/ox_lib/Modules/GetNearbyPeds",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyPeds/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPlayers",route:"/ox_lib/Modules/GetNearbyPlayers",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyPlayers/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyVehicles",route:"/ox_lib/Modules/GetNearbyVehicles",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyVehicles/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Interface",route:"/ox_lib/Modules/Interface",children:[{kind:"Folder",name:"Client",route:"/ox_lib/Modules/Interface/Client",children:[{kind:"MdxPage",name:"alert",route:"/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"}},{kind:"MdxPage",name:"clipboard",route:"/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"}},{kind:"MdxPage",name:"context",route:"/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"}},{kind:"MdxPage",name:"input",route:"/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"}},{kind:"MdxPage",name:"menu",route:"/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"}},{kind:"MdxPage",name:"notify",route:"/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"}},{kind:"MdxPage",name:"progress",route:"/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"}},{kind:"MdxPage",name:"radial",route:"/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"}},{kind:"MdxPage",name:"skillcheck",route:"/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"}},{kind:"MdxPage",name:"textui",route:"/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:"/ox_lib/Modules/Interface",frontMatter:{title:"Interface"}},{kind:"Folder",name:"Locale",route:"/ox_lib/Modules/Locale",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Locale/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Logger",route:"/ox_lib/Modules/Logger",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Logger/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"Marker",route:"/ox_lib/Modules/Marker",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Marker/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Math",route:"/ox_lib/Modules/Math",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Math/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Points",route:"/ox_lib/Modules/Points",children:[{kind:"Folder",name:"JavaScript",route:"/ox_lib/Modules/Points/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Points/JavaScript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Points/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Points/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"Print",route:"/ox_lib/Modules/Print",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Print/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Raycast",route:"/ox_lib/Modules/Raycast",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Raycast/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Require",route:"/ox_lib/Modules/Require",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Require/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Streaming",route:"/ox_lib/Modules/Streaming",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Streaming/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"String",route:"/ox_lib/Modules/String",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/String/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Table",route:"/ox_lib/Modules/Table",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Table/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Timer",route:"/ox_lib/Modules/Timer",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Timer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"VehicleProperties",route:"/ox_lib/Modules/VehicleProperties",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/VehicleProperties/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Version",route:"/ox_lib/Modules/Version",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Version/Server"},{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Version/Shared"},{kind:"Meta",data:{Server:"Server",Shared:"Shared"}}]},{kind:"Folder",name:"WaitFor",route:"/ox_lib/Modules/WaitFor",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/WaitFor/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Zones",route:"/ox_lib/Modules/Zones",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Zones/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Meta",data:{Interface:"Interface"}}]}]},{kind:"MdxPage",name:"ox_lib",route:"/ox_lib"},{kind:"Folder",name:"ox_target",route:"/ox_target",children:[{kind:"Folder",name:"Functions",route:"/ox_target/Functions",children:[{kind:"MdxPage",name:"Client",route:"/ox_target/Functions/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"MdxPage",name:"TargetOptions",route:"/ox_target/TargetOptions"},{kind:"Meta",data:{TargetOptions:"TargetOptions"}}]},{kind:"MdxPage",name:"ox_target",route:"/ox_target"},{kind:"Folder",name:"oxmysql",route:"/oxmysql",children:[{kind:"Folder",name:"Functions",route:"/oxmysql/Functions",children:[{kind:"MdxPage",name:"insert",route:"/oxmysql/Functions/insert",frontMatter:{title:"insert"}},{kind:"MdxPage",name:"prepare",route:"/oxmysql/Functions/prepare",frontMatter:{title:"prepare"}},{kind:"MdxPage",name:"query",route:"/oxmysql/Functions/query",frontMatter:{title:"query"}},{kind:"MdxPage",name:"rawExecute",route:"/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"}},{kind:"MdxPage",name:"scalar",route:"/oxmysql/Functions/scalar",frontMatter:{title:"scalar"}},{kind:"MdxPage",name:"single",route:"/oxmysql/Functions/single",frontMatter:{title:"single"}},{kind:"MdxPage",name:"transaction",route:"/oxmysql/Functions/transaction",frontMatter:{title:"transaction"}},{kind:"MdxPage",name:"update",route:"/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:"MdxPage",name:"benchmark",route:"/oxmysql/benchmark"},{kind:"MdxPage",name:"placeholders",route:"/oxmysql/placeholders"},{kind:"MdxPage",name:"ui",route:"/oxmysql/ui",frontMatter:{title:"Using the Debug UI"}},{kind:"Meta",data:{benchmark:"Benchmark",placeholders:"Placeholders",ui:"Using the Debug UI"}}]},{kind:"MdxPage",name:"oxmysql",route:"/oxmysql",frontMatter:{title:"OxMySQL"}}],rY.flexsearch={codeblocks:!0},rY.themeConfig=rK},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 W},ACTION_SERVER_PATCH:function(){return B},ACTION_PREFETCH:function(){return H},ACTION_FAST_REFRESH:function(){return K},ACTION_SERVER_ACTION:function(){return ee}});let j="refresh",z="navigate",W="restore",B="server-patch",H="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)),W=v._(g(967)),B=v._(g(4507)),H=g(4853),K=g(2156),ee=g(8244);g(1226);let et=g(2195),en=v._(g(5118)),er={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 W=null==n?void 0:n.src;if(!n||n["data-loaded-src"]===W)return;n["data-loaded-src"]=W;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:W,width:B,decoding:H,className:K,style:ee,fetchPriority:et,placeholder:en,loading:er,unoptimized:eo,fill:ei,onLoadRef:es,onLoadingCompleteRef:el,setBlurComplete:ed,setShowAltText:eu,onLoad:ec,onError:ep,...ef}=n;return z.default.createElement("img",{...ef,...getDynamicProps(et),loading:er,width:B,height:W,decoding:H,"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,en,es,el,ed,eo))},[g,en,es,el,ed,ep,eo,a]),onLoad:n=>{let a=n.currentTarget;handleLoading(a,en,es,el,ed,eo)},onError:n=>{eu(!0),"empty"!==en&&ed(!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&&W.default.preload?(W.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=er||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:W,onLoadingComplete:B}=n,ei=(0,z.useRef)(W);(0,z.useEffect)(()=>{ei.current=W},[W]);let es=(0,z.useRef)(B);(0,z.useEffect)(()=>{es.current=B},[B]);let[el,ed]=(0,z.useState)(!1),[eu,ec]=(0,z.useState)(!1),{props:ep,meta:ef}=(0,H.getImgProps)(n,{defaultLoader:en.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:ed,setShowAltText:ec,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 ed}});let v=g(1351),j=v._(g(5271)),z=g(475),W=g(8436),B=g(9616),H=g(6525),K=g(4059),ee=g(2195),et=g(374),en=g(6683),er=g(4038),eo=g(4407),ei=g(528),es=new Set;function prefetch(n,a,g,v,j,z){if(!z&&!(0,W.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:ed=null,passHref:eu,replace:ec,shallow:ep,scroll:ef,locale:eh,onClick:em,onMouseEnter:ex,onTouchStart:eg,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),ek=null!=eb?eb:e_,ew=!eb,eC=!1!==ed,eS=null===ed?ei.PrefetchKind.AUTO:ei.PrefetchKind.FULL,{href:eT,as:eE}=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]),eO=j.default.useRef(eT),eP=j.default.useRef(eE);ev&&(v=j.default.Children.only(g));let eM=ev?v&&"object"==typeof v&&v.ref:a,[ej,eI,eN]=(0,en.useIntersection)({rootMargin:"200px"}),eZ=j.default.useCallback(n=>{(eP.current!==eE||eO.current!==eT)&&(eN(),eP.current=eE,eO.current=eT),ej(n),eM&&("function"==typeof eM?eM(n):"object"==typeof eM&&(eM.current=n))},[eE,eM,eT,eN,ej]);j.default.useEffect(()=>{ek&&eI&&eC&&prefetch(ek,eT,eE,{locale:eh},{kind:eS},ew)},[eE,eT,eI,eh,eC,null==eb?void 0:eb.locale,ek,ew,eS]);let eR={ref:eZ,onClick(n){ev||"function"!=typeof em||em(n),ev&&v.props&&"function"==typeof v.props.onClick&&v.props.onClick(n),ek&&!n.defaultPrevented&&function(n,a,g,v,z,B,H,K,ee,et){let{nodeName:en}=n.currentTarget,er="A"===en.toUpperCase();if(er&&(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,W.isLocalURL)(g)))return;n.preventDefault();let navigate=()=>{let n=null==H||H;"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,ek,eT,eE,ec,ep,ef,eh,ew,eC)},onMouseEnter(n){ev||"function"!=typeof ex||ex(n),ev&&v.props&&"function"==typeof v.props.onMouseEnter&&v.props.onMouseEnter(n),ek&&(eC||!ew)&&prefetch(ek,eT,eE,{locale:eh,priority:!0,bypassPrefetchedCheck:!0},{kind:eS},ew)},onTouchStart(n){ev||"function"!=typeof eg||eg(n),ev&&v.props&&"function"==typeof v.props.onTouchStart&&v.props.onTouchStart(n),ek&&(eC||!ew)&&prefetch(ek,eT,eE,{locale:eh,priority:!0,bypassPrefetchedCheck:!0},{kind:eS},ew)}};if((0,H.isAbsoluteUrl)(eE))eR.href=eE;else if(!ev||eu||"a"===v.type&&!("href"in v.props)){let n=void 0!==eh?eh:null==eb?void 0:eb.locale,a=(null==eb?void 0:eb.isLocaleDomain)&&(0,er.getDomainLocale)(eE,n,null==eb?void 0:eb.locales,null==eb?void 0:eb.domainLocales);eR.href=a||(0,eo.addBasePath)((0,K.addLocale)(eE,n,null==eb?void 0:eb.defaultLocale))}return ev?j.default.cloneElement(v,eR):j.default.createElement("a",{...ey,...eR},g)}),ed=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,W=new Map,B=[];function useIntersection(n){let{rootRef:a,rootMargin:g,disabled:H}=n,K=H||!z,[ee,et]=(0,v.useState)(!1),en=(0,v.useRef)(null),er=(0,v.useCallback)(n=>{en.current=n},[]);(0,v.useEffect)(()=>{if(z){if(K||ee)return;let n=en.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=W.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),W.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(),W.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,en.current]);let eo=(0,v.useCallback)(()=>{et(!1)},[]);return[er,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,W,B,{src:H,sizes:K,unoptimized:ee=!1,priority:et=!1,loading:en,className:er,quality:eo,width:ei,height:es,fill:el=!1,style:ed,onLoad:eu,onLoadingComplete:ec,placeholder:ep="empty",blurDataURL:ef,fetchPriority:eh,layout:em,objectFit:ex,objectPosition:eg,lazyBoundary:ev,lazyRoot:ey,...eb}=n,{imgConf:e_,showAltText:ek,blurComplete:ew,defaultLoader:eC}=a,eS=e_||j.imageConfigDefault;if("allSizes"in eS)z=eS;else{let n=[...eS.deviceSizes,...eS.imageSizes].sort((n,a)=>n-a),a=eS.deviceSizes.sort((n,a)=>n-a);z={...eS,allSizes:n,deviceSizes:a}}let eT=eb.loader||eC;delete eb.loader,delete eb.srcSet;let eE="__next_img_default"in eT;if(eE){if("custom"===z.loader)throw Error('Image with src "'+H+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let n=eT;eT=a=>{let{config:g,...v}=a;return n(v)}}if(em){"fill"===em&&(el=!0);let n={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[em];n&&(ed={...ed,...n});let a={responsive:"100vw",fill:"100vw"}[em];a&&!K&&(K=a)}let eO="",eP=getInt(ei),eM=getInt(es);if("object"==typeof(g=H)&&(isStaticRequire(g)||void 0!==g.src)){let n=isStaticRequire(H)?H.default:H;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(W=n.blurWidth,B=n.blurHeight,ef=ef||n.blurDataURL,eO=n.src,!el){if(eP||eM){if(eP&&!eM){let a=eP/n.width;eM=Math.round(n.height*a)}else if(!eP&&eM){let a=eM/n.height;eP=Math.round(n.width*a)}}else eP=n.width,eM=n.height}}let ej=!et&&("lazy"===en||void 0===en);(!(H="string"==typeof H?H:eO)||H.startsWith("data:")||H.startsWith("blob:"))&&(ee=!0,ej=!1),z.unoptimized&&(ee=!0),eE&&H.endsWith(".svg")&&!z.dangerouslyAllowSVG&&(ee=!0),et&&(eh="high");let eI=getInt(eo),eN=Object.assign(el?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:ex,objectPosition:eg}:{},ek?{}:{color:"transparent"},ed),eZ=ew||"empty"===ep?null:"blur"===ep?'url("data:image/svg+xml;charset=utf-8,'+(0,v.getImageBlurSvg)({widthInt:eP,heightInt:eM,blurWidth:W,blurHeight:B,blurDataURL:ef||"",objectFit:eN.objectFit})+'")':'url("'+ep+'")',eR=eZ?{backgroundSize:eN.objectFit||"cover",backgroundPosition:eN.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:eZ}:{},eA=function(n){let{config:a,src:g,unoptimized:v,width:j,quality:z,sizes:W,loader:B}=n;if(v)return{src:g,srcSet:void 0,sizes:void 0};let{widths:H,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,W),ee=H.length-1;return{sizes:W||"w"!==K?W:"100vw",srcSet:H.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:H[ee]})}}({config:z,src:H,unoptimized:ee,width:eP,quality:eI,sizes:K,loader:eT}),eL={...eb,loading:ej?"lazy":en,fetchPriority:eh,width:eP,height:eM,decoding:"async",className:er,style:{...eN,...eR},sizes:eA.sizes,srcSet:eA.srcSet,src:eA.src},eF={unoptimized:ee,priority:et,placeholder:ep,fill:el};return{props:eL,meta:eF}}},9323:function(n,a){"use strict";function getImageBlurSvg(n){let{widthInt:a,heightInt:g,blurWidth:v,blurHeight:j,blurDataURL:z,objectFit:W}=n,B=v?40*v:a,H=j?40*j:g,K=B&&H?"viewBox='0 0 "+B+" "+H+"'":"";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"===W?"xMidYMid":"cover"===W?"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 H}});let v=g(1351),j=g(4853),z=g(1226),W=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}},H=W.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},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,W=0,B=0;B<=n.length;++B){if(B2){var H=v.lastIndexOf("/");if(H!==v.length-1){-1===H?(v="",j=0):j=(v=v.slice(0,H)).length-1-v.lastIndexOf("/"),z=B,W=0;continue}}else if(2===v.length||1===v.length){v="",j=0,z=B,W=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,W=0}else 46===g&&-1!==W?++W:W=-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;vH){if(47===g.charCodeAt(W+ee))return g.slice(W+ee+1);if(0===ee)return g.slice(W+ee)}else z>H&&(47===n.charCodeAt(v+ee)?K=ee:0===ee&&(K=0));break}var et=n.charCodeAt(v+ee);if(et!==g.charCodeAt(W+ee))break;47===et&&(K=ee)}var en="";for(ee=v+K+1;ee<=j;++ee)(ee===j||47===n.charCodeAt(ee))&&(0===en.length?en+="..":en+="/..");return en.length>0?en+g.slice(W+K):(W+=K,47===g.charCodeAt(W)&&++W,g.slice(W))},_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 W=a.length-1,B=-1;for(g=n.length-1;g>=0;--g){var H=n.charCodeAt(g);if(47===H){if(!z){v=g+1;break}}else -1===B&&(z=!1,B=g+1),W>=0&&(H===a.charCodeAt(W)?-1==--W&&(j=g):(W=-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,W=n.length-1;W>=0;--W){var B=n.charCodeAt(W);if(47===B){if(!j){g=W+1;break}continue}-1===v&&(j=!1,v=W+1),46===B?-1===a?a=W: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,W=0,B=-1,H=!0,K=n.length-1,ee=0;K>=a;--K){if(47===(v=n.charCodeAt(K))){if(!H){W=K+1;break}continue}-1===B&&(H=!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===W+1?-1!==B&&(0===W&&j?g.base=g.name=n.slice(1,B):g.base=g.name=n.slice(W,B)):(0===W&&j?(g.name=n.slice(1,z),g.base=n.slice(1,B)):(g.name=n.slice(W,z),g.base=n.slice(W,B)),g.ext=n.slice(z,B)),W>0?g.dir=n.slice(0,W-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=[],W=!1,B=-1;function cleanUpNextTick(){W&&v&&(W=!1,v.length?z=v.concat(z):B=-1,z.length&&drainQueue())}function drainQueue(){if(!W){var n=runTimeout(cleanUpNextTick);W=!0;for(var a=z.length;a;){for(v=z,z=[];++B1)for(var g=1;g(0,B.jsx)("button",{className:(0,W.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}),H=g(2766),K={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,B.jsx)(H.AV,{className:"nx-mt-1"}),warning:"⚠️"},ee={default:(0,W.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,W.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,W.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,W.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,W.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?H.nQ:H.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,W.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,W.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,W.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)(H.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,W.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 en=g(4327),er=g(9140),eo=g(2410),ei=g(93),es=g(121),el=g(2412),ed=g(3142),eu=g(8656),ec=g(4538);function focus_sentinel_b({onFocus:n}){let[a,g]=(0,et.useState)(!0),v=(0,eu.t)();return a?et.createElement(ec._,{as:"button",type:"button",features:ec.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),eh=g(616),em=g(4832),ex=g(2184);let eg=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(eg.Provider,{value:a},n)}function d(n){let a=et.useContext(eg);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"))}),W={...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 W;let j=(0,ef.E)(g,{0:()=>v.indexOf(z[0]),1:()=>v.indexOf(z[z.length-1])});return{...W,selectedIndex:-1===j?n.selectedIndex:j}}let B=v.slice(0,a.index),H=[...v.slice(a.index),...B].find(n=>z.includes(n));if(!H)return W;let K=null!=(g=v.indexOf(H))?g:n.selectedIndex;return -1===K&&(K=n.selectedIndex),{...W,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)})},ek=(0,et.createContext)(null);function F(n){let a=(0,et.useContext)(ek);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,F),a}return a}ek.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 eC=et.Fragment,eS=ex.AN.RenderStrategy|ex.AN.Static,eT=Object.assign((0,ex.yV)(function(n,a){var g,v;let j=(0,eo.M)(),{id:z=`headlessui-tabs-tab-${j}`,...W}=n,{orientation:B,activation:H,selectedIndex:K,tabs:ee,panels:es}=F("Tab"),eu=q("Tab"),ec=F("Tab"),eg=(0,et.useRef)(null),ev=(0,ed.T)(eg,a);(0,ei.e)(()=>eu.registerTab(eg),[eu,eg]);let ey=d("tabs"),eb=ee.indexOf(eg);-1===eb&&(eb=ey);let e_=eb===K,ek=(0,er.z)(n=>{var a;let g=n();if(g===ep.fE.Success&&"auto"===H){let n=null==(a=(0,em.r)(eg))?void 0:a.activeElement,g=ec.tabs.findIndex(a=>a.current===n);-1!==g&&eu.change(g)}return g}),ew=(0,er.z)(n=>{let a=ee.map(n=>n.current).filter(Boolean);if(n.key===en.R.Space||n.key===en.R.Enter){n.preventDefault(),n.stopPropagation(),eu.change(eb);return}switch(n.key){case en.R.Home:case en.R.PageUp:return n.preventDefault(),n.stopPropagation(),ek(()=>(0,ep.jA)(a,ep.TO.First));case en.R.End:case en.R.PageDown:return n.preventDefault(),n.stopPropagation(),ek(()=>(0,ep.jA)(a,ep.TO.Last))}if(ek(()=>(0,ef.E)(B,{vertical:()=>n.key===en.R.ArrowUp?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===en.R.ArrowDown?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error,horizontal:()=>n.key===en.R.ArrowLeft?(0,ep.jA)(a,ep.TO.Previous|ep.TO.WrapAround):n.key===en.R.ArrowRight?(0,ep.jA)(a,ep.TO.Next|ep.TO.WrapAround):ep.fE.Error}))===ep.fE.Success)return n.preventDefault()}),eC=(0,et.useRef)(!1),eS=(0,er.z)(()=>{var n;eC.current||(eC.current=!0,null==(n=eg.current)||n.focus({preventScroll:!0}),eu.change(eb),(0,eh.Y)(()=>{eC.current=!1}))}),eT=(0,er.z)(n=>{n.preventDefault()}),eE=(0,et.useMemo)(()=>{var a;return{selected:e_,disabled:null!=(a=n.disabled)&&a}},[e_,n.disabled]),eO={ref:ev,onKeyDown:ew,onMouseDown:eT,onClick:eS,id:z,role:"tab",type:(0,el.f)(n,eg),"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,ex.sY)({ourProps:eO,theirProps:W,slot:eE,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,ex.yV)(function(n,a){let{defaultIndex:g=0,vertical:v=!1,manual:j=!1,onChange:z,selectedIndex:W=null,...B}=n,H=v?"vertical":"horizontal",K=j?"manual":"auto",ee=null!==W,en=(0,es.E)({isControlled:ee}),eo=(0,ed.T)(a),[el,eu]=(0,et.useReducer)(fe,{info:en,selectedIndex:null!=W?W:g,tabs:[],panels:[]}),ec=(0,et.useMemo)(()=>({selectedIndex:el.selectedIndex}),[el.selectedIndex]),ef=(0,es.E)(z||(()=>{})),eh=(0,es.E)(el.tabs),em=(0,et.useMemo)(()=>({orientation:H,activation:K,...el}),[H,K,el]),eg=(0,er.z)(n=>(eu({type:1,tab:n}),()=>eu({type:2,tab:n}))),ev=(0,er.z)(n=>(eu({type:3,panel:n}),()=>eu({type:4,panel:n}))),ey=(0,er.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:eg,registerPanel:ev,change:ey}),[]);return(0,ei.e)(()=>{eu({type:0,index:null!=W?W:g})},[W]),(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(ek.Provider,{value:em},em.tabs.length<=0&&et.createElement(focus_sentinel_b,{onFocus:()=>{var n,a;for(let g of eh.current)if((null==(n=g.current)?void 0:n.tabIndex)===0)return null==(a=g.current)||a.focus(),!0;return!1}}),(0,ex.sY)({ourProps:{ref:eo},theirProps:B,slot:ec,defaultTag:eC,name:"Tabs"}))))}),List:(0,ex.yV)(function(n,a){let{orientation:g,selectedIndex:v}=F("Tab.List"),j=(0,ed.T)(a);return(0,ex.sY)({ourProps:{ref:j,role:"tablist","aria-orientation":g},theirProps:n,slot:{selectedIndex:v},defaultTag:"div",name:"Tabs.List"})}),Panels:(0,ex.yV)(function(n,a){let{selectedIndex:g}=F("Tab.Panels"),v=(0,ed.T)(a),j=(0,et.useMemo)(()=>({selectedIndex:g}),[g]);return(0,ex.sY)({ourProps:{ref:v},theirProps:n,slot:j,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,ex.yV)(function(n,a){var g,v,j,z;let W=(0,eo.M)(),{id:B=`headlessui-tabs-panel-${W}`,tabIndex:H=0,...K}=n,{selectedIndex:ee,tabs:en,panels:er}=F("Tab.Panel"),es=q("Tab.Panel"),el=(0,et.useRef)(null),eu=(0,ed.T)(el,a);(0,ei.e)(()=>es.registerPanel(el),[es,el,B]);let ep=d("panels"),ef=er.indexOf(el);-1===ef&&(ef=ep);let eh=ef===ee,em=(0,et.useMemo)(()=>({selected:eh}),[eh]),eg={ref:eu,id:B,role:"tabpanel","aria-labelledby":null==(v=null==(g=en[ef])?void 0:g.current)?void 0:v.id,tabIndex:eh?H:-1};return eh||null!=(j=K.unmount)&&!j||null!=(z=K.static)&&z?(0,ex.sY)({ourProps:eg,theirProps:K,slot:em,defaultTag:"div",features:eS,visible:eh,name:"Tabs.Panel"}):et.createElement(ec._,{as:"span","aria-hidden":"true",...eg})})});function isTabObjectItem(n){return!!n&&"object"==typeof n&&"label"in n}function Tab({children:n,...a}){return(0,B.jsx)(eT.Panel,{...a,className:"nx-rounded nx-pt-6",children:n})}var eE=Object.assign(function({items:n,selectedIndex:a,defaultIndex:g=0,onChange:v,children:j,storageKey:z}){let[H,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)(eT.Group,{selectedIndex:H,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)(eT.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)(eT,{disabled:g,className:({selected:n})=>(0,W.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)(eT.Panels,{children:j})]})},{displayName:"Tabs",Tab}),Td=({className:n="",...a})=>(0,B.jsx)("td",{className:(0,W.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,W.Z)("nx-block nx-overflow-x-scroll",n),...a}),Th=({className:n="",...a})=>(0,B.jsx)("th",{className:(0,W.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,W.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}),eO=g(9517),eP=g.n(eO),eM={cards:(0,W.Z)("nextra-cards nx-mt-4 nx-gap-4 nx-grid","nx-not-prose"),card:(0,W.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,W.Z)("nx-flex nx-font-semibold nx-items-start nx-gap-2 nx-p-4 nx-text-gray-700 hover:nx-text-gray-900")},ej=(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,W.Z)(eM.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,...H}){let K=j?ej:null;return v?(0,B.jsxs)(eP(),{href:z,className:(0,W.Z)(eM.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"),...H,children:[n,(0,B.jsxs)("span",{className:(0,W.Z)(eM.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)(eP(),{href:z,className:(0,W.Z)(eM.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"),...H,children:(0,B.jsxs)("span",{className:(0,W.Z)(eM.title,"dark:nx-text-neutral-200 dark:hover:nx-text-neutral-50 nx-flex nx-items-center"),children:[g,a,K]})})}});var eI=(0,et.createContext)(0);function useIndent(){return(0,et.useContext)(eI)}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 eN=(0,et.memo)(({label:n,name:a,open:g,children:v,defaultOpen:j=!1,onToggle:z})=>{let W=useIndent(),[H,K]=(0,et.useState)(j),ee=(0,et.useCallback)(()=>{z?.(!H),K(!H)},[H,z]),en=void 0===g?H: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:en?"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})]}),en&&(0,B.jsx)("ul",{children:(0,B.jsx)(eI.Provider,{value:W+1,children:v})})]})});eN.displayName="Folder";var eZ=(0,et.memo)(({label:n,name:a,active:g})=>(0,B.jsx)("li",{className:(0,W.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})]})}));eZ.displayName="File",Object.assign(function({children:n}){return(0,B.jsx)("div",{className:(0,W.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:eN,File:eZ})},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 W;return W=g?"function"==typeof n?n({}):n||z:useMDXComponents(n),v.createElement(j.Provider,{value:W},a)}var W=g(1939),B=g.n(W),H={img:n=>(0,v.createElement)("object"==typeof n.src?B():"img",n)},mdx_useMDXComponents=n=>useMDXComponents({...H,...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,W=v.split(";");z=a?"":z;let B=!1;"base64"===W[W.length-1]&&(W.pop(),B=!0);let H=(W.shift()||"").toLowerCase(),K=W.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||H&&"text/plain"!==H)&&ee.unshift(H),`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],W=v.index,B=j.pathname.slice(a,W);g+=B.replace(/\/{2,}/g,"/")+z,a=W+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 H}});var v,j=g(5271),z=g(5350),W=g(93),B=g(1963);let H=null!=(v=j.useId)?v:function(){let n=(0,B.H)(),[a,g]=j.useState(n?()=>z.O.nextId():null);return(0,W.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)),[W,B]=j.useState(z.O.isHandoffComplete);return W&&!1===z.O.isHandoffComplete&&B(!1),j.useEffect(()=>{!0!==W&&B(!0)},[W]),j.useEffect(()=>z.O.handoff(),[]),!a&&W}},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 W}});var v,j=g(2184),z=((v=z||{})[v.None=1]="None",v[v.Focusable=2]="Focusable",v[v.Hidden=4]="Hidden",v);let W=(0,j.yV)(function(n,a){var g;let{features:v=1,...z}=n,W={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:W,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 en},fE:function(){return er},jA:function(){return O},sP:function(){return h},tJ:function(){return ei},wI:function(){return D},z2:function(){return I}});var v,j,z,W,B,H=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 en=((v=en||{})[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),er=((j=er||{})[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=((W=ei||{})[W.Strict=0]="Strict",W[W.Loose=1]="Loose",W);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,H.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,W,B;let H=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:H.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")})(),en=32&a?{preventScroll:!0}:{},er=0,eo=K.length,ei;do{if(er>=eo||er+eo<=0)return 0;let n=et+er;if(16&a)n=(n+eo)%eo;else{if(n<0)return 3;if(n>=eo)return 1}null==(ei=K[n])||ei.focus(en),er+=ee}while(ei!==H.activeElement);return 6&a&&null!=(B=null==(W=null==(z=ei)?void 0:z.matches)?void 0:W.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 H},l4:function(){return K},oA:function(){return x},sY:function(){return C},yV:function(){return U}});var v,j,z=g(5271),W=g(9363),B=g(2549),H=((v=H||{})[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:W,mergeRefs:H}){H=null!=H?H:k;let K=R(a,n);if(z)return m(K,g,v,W,H);let ee=null!=j?j:0;if(2&ee){let{static:n=!1,...a}=K;if(n)return m(a,g,v,W,H)}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,W,H)})}return m(K,g,v,W,H)}function m(n,a={},g,v,j){let{as:B=g,children:H,refName:K="ref",...ee}=F(n,["unmount","static"]),et=void 0!==n.ref?{[K]:n.ref}:{},en="function"==typeof H?H(a):H;"className"in ee&&ee.className&&"function"==typeof ee.className&&(ee.className=ee.className(a));let er={};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&&(er["data-headlessui-state"]=g.join(" "))}if(B===z.Fragment&&Object.keys(x(ee)).length>0){if(!(0,z.isValidElement)(en)||Array.isArray(en)&&en.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=en.props,a="function"==typeof(null==n?void 0:n.className)?(...a)=>(0,W.A)(null==n?void 0:n.className(...a),ee.className):(0,W.A)(null==n?void 0:n.className,ee.className),g=a?{className:a}:{};return(0,z.cloneElement)(en,Object.assign({},R(en.props,x(F(ee,["ref"]))),er,et,{ref:j(en.ref,et.ref)},g))}return(0,z.createElement)(B,Object.assign({},F(ee,["ref"]),B!==z.Fragment&&et,B!==z.Fragment&&er),en)}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;g2?g.slice(1-g.length).join("."):a.source=a.resource,a.git_suffix=/\.git$/.test(a.pathname),a.name=decodeURIComponent((a.pathname||a.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),a.owner=decodeURIComponent(a.user),a.source){case"git.cloudforge.com":a.owner=a.user,a.organization=g[0],a.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===a.resource){4===(j=a.name.split("/")).length&&(a.organization=j[1],a.owner=j[2],a.name=j[3],a.full_name=j[2]+"/"+j[3]);break}2===(j=a.name.split("/")).length?(a.owner=j[1],a.name=j[1],a.full_name="_git/"+a.name):3===j.length?(a.name=j[2],"DefaultCollection"===j[0]?(a.owner=j[2],a.organization=j[0],a.full_name=a.organization+"/_git/"+a.name):(a.owner=j[0],a.full_name=a.owner+"/_git/"+a.name)):4===j.length&&(a.organization=j[0],a.owner=j[1],a.name=j[3],a.full_name=a.organization+"/"+a.owner+"/_git/"+a.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===a.resource){4===(j=a.name.split("/")).length&&(a.organization=j[1],a.owner=j[2],a.name=j[3]);break}5===(j=a.name.split("/")).length?(a.organization=j[0],a.owner=j[1],a.name=j[4],a.full_name="_git/"+a.name):3===j.length?(a.name=j[2],"DefaultCollection"===j[0]?(a.owner=j[2],a.organization=j[0],a.full_name=a.organization+"/_git/"+a.name):(a.owner=j[0],a.full_name=a.owner+"/_git/"+a.name)):4===j.length&&(a.organization=j[0],a.owner=j[1],a.name=j[3],a.full_name=a.organization+"/"+a.owner+"/_git/"+a.name),a.query&&a.query.path&&(a.filepath=a.query.path.replace(/^\/+/g,"")),a.query&&a.query.version&&(a.ref=a.query.version.replace(/^GB/,""));break;default:var z=(j=a.name.split("/")).length-1;if(j.length>=2){var H=j.indexOf("-",2),B=j.indexOf("blob",2),W=j.indexOf("tree",2),K=j.indexOf("commit",2),ee=j.indexOf("src",2),et=j.indexOf("raw",2),er=j.indexOf("edit",2);z=H>0?H-1:B>0?B-1:W>0?W-1:K>0?K-1:ee>0?ee-1:et>0?et-1:er>0?er-1:z,a.owner=j.slice(0,z).join("/"),a.name=j[z],K&&(a.commit=j[z+2])}a.ref="",a.filepathtype="",a.filepath="";var en=j.length>z&&"-"===j[z+1]?z+1:z;j.length>en+2&&["raw","src","blob","tree","edit"].indexOf(j[en+1])>=0&&(a.filepathtype=j[en+1],a.ref=j[en+2],j.length>en+3&&(a.filepath=j.slice(en+3).join("/"))),a.organization=a.owner}!a.full_name&&(a.full_name=a.owner,a.name&&(a.full_name&&(a.full_name+="/"),a.full_name+=a.name)),a.owner.startsWith("scm/")&&(a.source="bitbucket-server",a.owner=a.owner.replace("scm/",""),a.organization=a.owner,a.full_name=a.owner+"/"+a.name);var eo=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(a.pathname);return null!=eo&&(a.source="bitbucket-server","users"===eo[1]?a.owner="~"+eo[2]:a.owner=eo[2],a.organization=a.owner,a.name=eo[3],(j=eo[4].split("/")).length>1&&(["raw","browse"].indexOf(j[1])>=0?(a.filepathtype=j[1],j.length>2&&(a.filepath=j.slice(2).join("/"))):"commits"===j[1]&&j.length>2&&(a.commit=j[2])),a.full_name=a.owner+"/"+a.name,a.query.at?a.ref=a.query.at:a.ref=""),a}gitUrlParse.stringify=function(n,a){a=a||(n.protocols&&n.protocols.length?n.protocols.join("+"):n.protocol);var g=n.port?":"+n.port:"",v=n.user||"git",j=n.git_suffix?".git":"";switch(a){case"ssh":if(g)return"ssh://"+v+"@"+n.resource+g+"/"+n.full_name+j;return v+"@"+n.resource+":"+n.full_name+j;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return a+"://"+v+"@"+n.resource+g+"/"+n.full_name+j;case"http":case"https":return a+"://"+(n.token?"bitbucket.org"===n.source?"x-token-auth:"+n.token+"@":n.token+"@":n.user&&(n.protocols.includes("http")||n.protocols.includes("https"))?n.user+"@":"")+n.resource+g+"/"+("bitbucket-server"===n.source?"scm/"+n.full_name:""+n.full_name)+j;default:return n.href}},n.exports=gitUrlParse},5983:function(){!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var n=function(n){for(var a=n,g=getFrameElement(a);g;)g=getFrameElement(a=g.ownerDocument);return a}(window.document),a=[],g=null,v=null;IntersectionObserver.prototype.THROTTLE_TIMEOUT=100,IntersectionObserver.prototype.POLL_INTERVAL=null,IntersectionObserver.prototype.USE_MUTATION_OBSERVER=!0,IntersectionObserver._setupCrossOriginUpdater=function(){return g||(g=function(n,g){v=n&&g?convertFromParentRect(n,g):getEmptyRect(),a.forEach(function(n){n._checkForIntersections()})}),g},IntersectionObserver._resetCrossOriginUpdater=function(){g=null,v=null},IntersectionObserver.prototype.observe=function(n){if(!this._observationTargets.some(function(a){return a.element==n})){if(!(n&&1==n.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:n,entry:null}),this._monitorIntersections(n.ownerDocument),this._checkForIntersections()}},IntersectionObserver.prototype.unobserve=function(n){this._observationTargets=this._observationTargets.filter(function(a){return a.element!=n}),this._unmonitorIntersections(n.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},IntersectionObserver.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},IntersectionObserver.prototype.takeRecords=function(){var n=this._queuedEntries.slice();return this._queuedEntries=[],n},IntersectionObserver.prototype._initThresholds=function(n){var a=n||[0];return Array.isArray(a)||(a=[a]),a.sort().filter(function(n,a,g){if("number"!=typeof n||isNaN(n)||n<0||n>1)throw Error("threshold must be a number between 0 and 1 inclusively");return n!==g[a-1]})},IntersectionObserver.prototype._parseRootMargin=function(n){var a=(n||"0px").split(/\s+/).map(function(n){var a=/^(-?\d*\.?\d+)(px|%)$/.exec(n);if(!a)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(a[1]),unit:a[2]}});return a[1]=a[1]||a[0],a[2]=a[2]||a[0],a[3]=a[3]||a[1],a},IntersectionObserver.prototype._monitorIntersections=function(a){var g=a.defaultView;if(g&&-1==this._monitoringDocuments.indexOf(a)){var v=this._checkForIntersections,j=null,z=null;if(this.POLL_INTERVAL?j=g.setInterval(v,this.POLL_INTERVAL):(addEvent(g,"resize",v,!0),addEvent(a,"scroll",v,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in g&&(z=new g.MutationObserver(v)).observe(a,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(a),this._monitoringUnsubscribes.push(function(){var n=a.defaultView;n&&(j&&n.clearInterval(j),removeEvent(n,"resize",v,!0)),removeEvent(a,"scroll",v,!0),z&&z.disconnect()}),a!=(this.root&&(this.root.ownerDocument||this.root)||n)){var H=getFrameElement(a);H&&this._monitorIntersections(H.ownerDocument)}}},IntersectionObserver.prototype._unmonitorIntersections=function(a){var g=this._monitoringDocuments.indexOf(a);if(-1!=g){var v=this.root&&(this.root.ownerDocument||this.root)||n;if(!this._observationTargets.some(function(n){var g=n.element.ownerDocument;if(g==a)return!0;for(;g&&g!=v;){var j=getFrameElement(g);if((g=j&&j.ownerDocument)==a)return!0}return!1})){var j=this._monitoringUnsubscribes[g];if(this._monitoringDocuments.splice(g,1),this._monitoringUnsubscribes.splice(g,1),j(),a!=v){var z=getFrameElement(a);z&&this._unmonitorIntersections(z.ownerDocument)}}}},IntersectionObserver.prototype._unmonitorAllIntersections=function(){var n=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var a=0;a=0&&B>=0&&{top:g,bottom:v,left:j,right:z,width:H,height:B}||null}(K,H)),!H)break;B=B&&getParentNode(B)}return H}},IntersectionObserver.prototype._getRootRect=function(){var a;if(this.root&&!isDoc(this.root))a=getBoundingClientRect(this.root);else{var g=isDoc(this.root)?this.root:n,v=g.documentElement,j=g.body;a={top:0,left:0,right:v.clientWidth||j.clientWidth,width:v.clientWidth||j.clientWidth,bottom:v.clientHeight||j.clientHeight,height:v.clientHeight||j.clientHeight}}return this._expandRectByRootMargin(a)},IntersectionObserver.prototype._expandRectByRootMargin=function(n){var a=this._rootMarginValues.map(function(a,g){return"px"==a.unit?a.value:a.value*(g%2?n.width:n.height)/100}),g={top:n.top-a[0],right:n.right+a[1],bottom:n.bottom+a[2],left:n.left-a[3]};return g.width=g.right-g.left,g.height=g.bottom-g.top,g},IntersectionObserver.prototype._hasCrossedThreshold=function(n,a){var g=n&&n.isIntersecting?n.intersectionRatio||0:-1,v=a.isIntersecting?a.intersectionRatio||0:-1;if(g!==v)for(var j=0;ja.indexOf(this)&&a.push(this)},IntersectionObserver.prototype._unregisterInstance=function(){var n=a.indexOf(this);-1!=n&&a.splice(n,1)},window.IntersectionObserver=IntersectionObserver,window.IntersectionObserverEntry=IntersectionObserverEntry}function getFrameElement(n){try{return n.defaultView&&n.defaultView.frameElement||null}catch(n){return null}}function IntersectionObserverEntry(n){this.time=n.time,this.target=n.target,this.rootBounds=ensureDOMRect(n.rootBounds),this.boundingClientRect=ensureDOMRect(n.boundingClientRect),this.intersectionRect=ensureDOMRect(n.intersectionRect||getEmptyRect()),this.isIntersecting=!!n.intersectionRect;var a=this.boundingClientRect,g=a.width*a.height,v=this.intersectionRect,j=v.width*v.height;g?this.intersectionRatio=Number((j/g).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function IntersectionObserver(n,a){var g,v,j,z=a||{};if("function"!=typeof n)throw Error("callback must be a function");if(z.root&&1!=z.root.nodeType&&9!=z.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(g=this._checkForIntersections.bind(this),v=this.THROTTLE_TIMEOUT,j=null,function(){j||(j=setTimeout(function(){g(),j=null},v))}),this._callback=n,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(z.rootMargin),this.thresholds=this._initThresholds(z.threshold),this.root=z.root||null,this.rootMargin=this._rootMarginValues.map(function(n){return n.value+n.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function addEvent(n,a,g,v){"function"==typeof n.addEventListener?n.addEventListener(a,g,v||!1):"function"==typeof n.attachEvent&&n.attachEvent("on"+a,g)}function removeEvent(n,a,g,v){"function"==typeof n.removeEventListener?n.removeEventListener(a,g,v||!1):"function"==typeof n.detachEvent&&n.detachEvent("on"+a,g)}function getBoundingClientRect(n){var a;try{a=n.getBoundingClientRect()}catch(n){}return a?(a.width&&a.height||(a={top:a.top,right:a.right,bottom:a.bottom,left:a.left,width:a.right-a.left,height:a.bottom-a.top}),a):getEmptyRect()}function getEmptyRect(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function ensureDOMRect(n){return!n||"x"in n?n:{top:n.top,y:n.top,bottom:n.bottom,left:n.left,x:n.left,right:n.right,width:n.width,height:n.height}}function convertFromParentRect(n,a){var g=a.top-n.top,v=a.left-n.left;return{top:g,left:v,height:a.height,width:a.width,bottom:g+a.height,right:v+a.width}}function containsDeep(n,a){for(var g=a;g;){if(g==n)return!0;g=getParentNode(g)}return!1}function getParentNode(a){var g=a.parentNode;return 9==a.nodeType&&a!=n?getFrameElement(a):(g&&g.assignedSlot&&(g=g.assignedSlot.parentNode),g&&11==g.nodeType&&g.host)?g.host:g}function isDoc(n){return n&&9===n.nodeType}}()},2895:function(n,a,g){"use strict";var v=g(6097);n.exports=function isSsh(n){if(Array.isArray(n))return -1!==n.indexOf("ssh")||-1!==n.indexOf("rsync");if("string"!=typeof n)return!1;var a=v(n);if(n=n.substring(n.indexOf("://")+3),isSsh(a))return!0;var g=RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!n.match(g)&&n.indexOf("@"){a(!0)},[]),n}var eI=g(6536),useFSRoute=()=>{let{locale:n=eI.ZW,asPath:a,route:g}=(0,eC.useRouter)();return(0,eP.useMemo)(()=>{let v=eI.hV.has(g)?g:a,{pathname:j}=new URL(v,"https://nextra.vercel.app"),z=n?j.replace(RegExp(`\\.${n}(\\/|$)`),"$1"):j;return z.replace(/\.html$/,"").replace(/\/index(\/|$)/,"$1").replace(/\/$/,"")||"/"},[a,n,g])},eT=g(8745),eM=g(2766);(j=eg||(eg={})).assertEqual=n=>n,j.assertIs=function(n){},j.assertNever=function(n){throw Error()},j.arrayToEnum=n=>{let a={};for(let g of n)a[g]=g;return a},j.getValidEnumValues=n=>{let a=j.objectKeys(n).filter(a=>"number"!=typeof n[n[a]]),g={};for(let v of a)g[v]=n[v];return j.objectValues(g)},j.objectValues=n=>j.objectKeys(n).map(function(a){return n[a]}),j.objectKeys="function"==typeof Object.keys?n=>Object.keys(n):n=>{let a=[];for(let g in n)Object.prototype.hasOwnProperty.call(n,g)&&a.push(g);return a},j.find=(n,a)=>{for(let g of n)if(a(g))return g},j.isInteger="function"==typeof Number.isInteger?n=>Number.isInteger(n):n=>"number"==typeof n&&isFinite(n)&&Math.floor(n)===n,j.joinValues=function(n,a=" | "){return n.map(n=>"string"==typeof n?`'${n}'`:n).join(a)},j.jsonStringifyReplacer=(n,a)=>"bigint"==typeof a?a.toString():a,(ex||(ex={})).mergeShapes=(n,a)=>({...n,...a});let eA=eg.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=n=>{let a=typeof n;switch(a){case"undefined":return eA.undefined;case"string":return eA.string;case"number":return isNaN(n)?eA.nan:eA.number;case"boolean":return eA.boolean;case"function":return eA.function;case"bigint":return eA.bigint;case"symbol":return eA.symbol;case"object":if(Array.isArray(n))return eA.array;if(null===n)return eA.null;if(n.then&&"function"==typeof n.then&&n.catch&&"function"==typeof n.catch)return eA.promise;if("undefined"!=typeof Map&&n instanceof Map)return eA.map;if("undefined"!=typeof Set&&n instanceof Set)return eA.set;if("undefined"!=typeof Date&&n instanceof Date)return eA.date;return eA.object;default:return eA.unknown}},eN=eg.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let ZodError=class ZodError extends Error{constructor(n){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=n}get errors(){return this.issues}format(n){let a=n||function(n){return n.message},g={_errors:[]},processError=n=>{for(let v of n.issues)if("invalid_union"===v.code)v.unionErrors.map(processError);else if("invalid_return_type"===v.code)processError(v.returnTypeError);else if("invalid_arguments"===v.code)processError(v.argumentsError);else if(0===v.path.length)g._errors.push(a(v));else{let n=g,j=0;for(;jn.message){let a={},g=[];for(let v of this.issues)v.path.length>0?(a[v.path[0]]=a[v.path[0]]||[],a[v.path[0]].push(n(v))):g.push(n(v));return{formErrors:g,fieldErrors:a}}get formErrors(){return this.flatten()}};ZodError.create=n=>{let a=new ZodError(n);return a};let errorMap=(n,a)=>{let g;switch(n.code){case eN.invalid_type:g=n.received===eA.undefined?"Required":`Expected ${n.expected}, received ${n.received}`;break;case eN.invalid_literal:g=`Invalid literal value, expected ${JSON.stringify(n.expected,eg.jsonStringifyReplacer)}`;break;case eN.unrecognized_keys:g=`Unrecognized key(s) in object: ${eg.joinValues(n.keys,", ")}`;break;case eN.invalid_union:g="Invalid input";break;case eN.invalid_union_discriminator:g=`Invalid discriminator value. Expected ${eg.joinValues(n.options)}`;break;case eN.invalid_enum_value:g=`Invalid enum value. Expected ${eg.joinValues(n.options)}, received '${n.received}'`;break;case eN.invalid_arguments:g="Invalid function arguments";break;case eN.invalid_return_type:g="Invalid function return type";break;case eN.invalid_date:g="Invalid date";break;case eN.invalid_string:"object"==typeof n.validation?"includes"in n.validation?(g=`Invalid input: must include "${n.validation.includes}"`,"number"==typeof n.validation.position&&(g=`${g} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?g=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?g=`Invalid input: must end with "${n.validation.endsWith}"`:eg.assertNever(n.validation):g="regex"!==n.validation?`Invalid ${n.validation}`:"Invalid";break;case eN.too_small:g="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:"date"===n.type?`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:"Invalid input";break;case eN.too_big:g="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"bigint"===n.type?`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"date"===n.type?`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:"Invalid input";break;case eN.custom:g="Invalid input";break;case eN.invalid_intersection_types:g="Intersection results could not be merged";break;case eN.not_multiple_of:g=`Number must be a multiple of ${n.multipleOf}`;break;case eN.not_finite:g="Number must be finite";break;default:g=a.defaultError,eg.assertNever(n)}return{message:g}},eR=errorMap;function getErrorMap(){return eR}let makeIssue=n=>{let{data:a,path:g,errorMaps:v,issueData:j}=n,z=[...g,...j.path||[]],H={...j,path:z};if(void 0!==j.message)return{...j,path:z,message:j.message};let B="",W=v.filter(n=>!!n).slice().reverse();for(let n of W)B=n(H,{data:a,defaultError:B}).message;return{...j,path:z,message:B}};function addIssueToContext(n,a){let g=getErrorMap(),v=makeIssue({issueData:a,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,g,g===errorMap?void 0:errorMap].filter(n=>!!n)});n.common.issues.push(v)}let ParseStatus=class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(n,a){let g=[];for(let v of a){if("aborted"===v.status)return eD;"dirty"===v.status&&n.dirty(),g.push(v.value)}return{status:n.value,value:g}}static async mergeObjectAsync(n,a){let g=[];for(let n of a){let a=await n.key,v=await n.value;g.push({key:a,value:v})}return ParseStatus.mergeObjectSync(n,g)}static mergeObjectSync(n,a){let g={};for(let v of a){let{key:a,value:j}=v;if("aborted"===a.status||"aborted"===j.status)return eD;"dirty"===a.status&&n.dirty(),"dirty"===j.status&&n.dirty(),"__proto__"!==a.value&&(void 0!==j.value||v.alwaysSet)&&(g[a.value]=j.value)}return{status:n.value,value:g}}};let eD=Object.freeze({status:"aborted"}),DIRTY=n=>({status:"dirty",value:n}),OK=n=>({status:"valid",value:n}),isAborted=n=>"aborted"===n.status,isDirty=n=>"dirty"===n.status,isValid=n=>"valid"===n.status,isAsync=n=>"undefined"!=typeof Promise&&n instanceof Promise;function __classPrivateFieldGet(n,a,g,v){if("a"===g&&!v)throw TypeError("Private accessor was defined without a getter");if("function"==typeof a?n!==a||!v:!a.has(n))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===g?v:"a"===g?v.call(n):v?v.value:a.get(n)}function __classPrivateFieldSet(n,a,g,v,j){if("m"===v)throw TypeError("Private method is not writable");if("a"===v&&!j)throw TypeError("Private accessor was defined without a setter");if("function"==typeof a?n!==a||!j:!a.has(n))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===v?j.call(n,g):j?j.value=g:a.set(n,g),g}"function"==typeof SuppressedError&&SuppressedError,(z=ev||(ev={})).errToObj=n=>"string"==typeof n?{message:n}:n||{},z.toString=n=>"string"==typeof n?n:null==n?void 0:n.message;let ParseInputLazyPath=class ParseInputLazyPath{constructor(n,a,g,v){this._cachedPath=[],this.parent=n,this.data=a,this._path=g,this._key=v}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};let handleResult=(n,a)=>{if(isValid(a))return{success:!0,data:a.value};if(!n.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let a=new ZodError(n.common.issues);return this._error=a,this._error}}};function processCreateParams(n){if(!n)return{};let{errorMap:a,invalid_type_error:g,required_error:v,description:j}=n;if(a&&(g||v))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return a?{errorMap:a,description:j}:{errorMap:(a,j)=>{var z,H;let{message:B}=n;return"invalid_enum_value"===a.code?{message:null!=B?B:j.defaultError}:void 0===j.data?{message:null!==(z=null!=B?B:v)&&void 0!==z?z:j.defaultError}:"invalid_type"!==a.code?{message:j.defaultError}:{message:null!==(H=null!=B?B:g)&&void 0!==H?H:j.defaultError}},description:j}}let ZodType=class ZodType{constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(n){return getParsedType(n.data)}_getOrReturnCtx(n,a){return a||{common:n.parent.common,data:n.data,parsedType:getParsedType(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new ParseStatus,ctx:{common:n.parent.common,data:n.data,parsedType:getParsedType(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){let a=this._parse(n);if(isAsync(a))throw Error("Synchronous parse encountered promise.");return a}_parseAsync(n){let a=this._parse(n);return Promise.resolve(a)}parse(n,a){let g=this.safeParse(n,a);if(g.success)return g.data;throw g.error}safeParse(n,a){var g;let v={common:{issues:[],async:null!==(g=null==a?void 0:a.async)&&void 0!==g&&g,contextualErrorMap:null==a?void 0:a.errorMap},path:(null==a?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:getParsedType(n)},j=this._parseSync({data:n,path:v.path,parent:v});return handleResult(v,j)}async parseAsync(n,a){let g=await this.safeParseAsync(n,a);if(g.success)return g.data;throw g.error}async safeParseAsync(n,a){let g={common:{issues:[],contextualErrorMap:null==a?void 0:a.errorMap,async:!0},path:(null==a?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:getParsedType(n)},v=this._parse({data:n,path:g.path,parent:g}),j=await (isAsync(v)?v:Promise.resolve(v));return handleResult(g,j)}refine(n,a){let getIssueProperties=n=>"string"==typeof a||void 0===a?{message:a}:"function"==typeof a?a(n):a;return this._refinement((a,g)=>{let v=n(a),setError=()=>g.addIssue({code:eN.custom,...getIssueProperties(a)});return"undefined"!=typeof Promise&&v instanceof Promise?v.then(n=>!!n||(setError(),!1)):!!v||(setError(),!1)})}refinement(n,a){return this._refinement((g,v)=>!!n(g)||(v.addIssue("function"==typeof a?a(g,v):a),!1))}_refinement(n){return new ZodEffects({schema:this,typeName:e_.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(n){return ZodUnion.create([this,n],this._def)}and(n){return ZodIntersection.create(this,n,this._def)}transform(n){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:e_.ZodEffects,effect:{type:"transform",transform:n}})}default(n){return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:"function"==typeof n?n:()=>n,typeName:e_.ZodDefault})}brand(){return new ZodBranded({typeName:e_.ZodBranded,type:this,...processCreateParams(this._def)})}catch(n){return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:"function"==typeof n?n:()=>n,typeName:e_.ZodCatch})}describe(n){let a=this.constructor;return new a({...this._def,description:n})}pipe(n){return ZodPipeline.create(this,n)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};let eL=/^c[^\s-]{8,}$/i,eZ=/^[0-9a-z]+$/,eF=/^[0-9A-HJKMNP-TV-Z]{26}$/,eV=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eU=/^[a-z0-9_-]{21}$/i,ez=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eH=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e$=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,eG=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eq="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",eW=RegExp(`^${eq}$`);function timeRegexSource(n){let a="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?a=`${a}\\.\\d{${n.precision}}`:null==n.precision&&(a=`${a}(\\.\\d+)?`),a}function datetimeRegex(n){let a=`${eq}T${timeRegexSource(n)}`,g=[];return g.push(n.local?"Z?":"Z"),n.offset&&g.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${g.join("|")})`,RegExp(`^${a}$`)}let ZodString=class ZodString extends ZodType{_parse(n){var a,g;let j;this._def.coerce&&(n.data=String(n.data));let z=this._getType(n);if(z!==eA.string){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.string,received:a.parsedType}),eD}let H=new ParseStatus;for(let z of this._def.checks)if("min"===z.kind)n.data.lengthz.value&&(addIssueToContext(j=this._getOrReturnCtx(n,j),{code:eN.too_big,maximum:z.value,type:"string",inclusive:!0,exact:!1,message:z.message}),H.dirty());else if("length"===z.kind){let a=n.data.length>z.value,g=n.data.lengthn.test(a),{validation:a,code:eN.invalid_string,...ev.errToObj(g)})}_addCheck(n){return new ZodString({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...ev.errToObj(n)})}url(n){return this._addCheck({kind:"url",...ev.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...ev.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...ev.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...ev.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...ev.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...ev.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...ev.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...ev.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...ev.errToObj(n)})}datetime(n){var a,g;return"string"==typeof n?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:void 0===(null==n?void 0:n.precision)?null:null==n?void 0:n.precision,offset:null!==(a=null==n?void 0:n.offset)&&void 0!==a&&a,local:null!==(g=null==n?void 0:n.local)&&void 0!==g&&g,...ev.errToObj(null==n?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return"string"==typeof n?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:void 0===(null==n?void 0:n.precision)?null:null==n?void 0:n.precision,...ev.errToObj(null==n?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...ev.errToObj(n)})}regex(n,a){return this._addCheck({kind:"regex",regex:n,...ev.errToObj(a)})}includes(n,a){return this._addCheck({kind:"includes",value:n,position:null==a?void 0:a.position,...ev.errToObj(null==a?void 0:a.message)})}startsWith(n,a){return this._addCheck({kind:"startsWith",value:n,...ev.errToObj(a)})}endsWith(n,a){return this._addCheck({kind:"endsWith",value:n,...ev.errToObj(a)})}min(n,a){return this._addCheck({kind:"min",value:n,...ev.errToObj(a)})}max(n,a){return this._addCheck({kind:"max",value:n,...ev.errToObj(a)})}length(n,a){return this._addCheck({kind:"length",value:n,...ev.errToObj(a)})}nonempty(n){return this.min(1,ev.errToObj(n))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>"datetime"===n.kind)}get isDate(){return!!this._def.checks.find(n=>"date"===n.kind)}get isTime(){return!!this._def.checks.find(n=>"time"===n.kind)}get isDuration(){return!!this._def.checks.find(n=>"duration"===n.kind)}get isEmail(){return!!this._def.checks.find(n=>"email"===n.kind)}get isURL(){return!!this._def.checks.find(n=>"url"===n.kind)}get isEmoji(){return!!this._def.checks.find(n=>"emoji"===n.kind)}get isUUID(){return!!this._def.checks.find(n=>"uuid"===n.kind)}get isNANOID(){return!!this._def.checks.find(n=>"nanoid"===n.kind)}get isCUID(){return!!this._def.checks.find(n=>"cuid"===n.kind)}get isCUID2(){return!!this._def.checks.find(n=>"cuid2"===n.kind)}get isULID(){return!!this._def.checks.find(n=>"ulid"===n.kind)}get isIP(){return!!this._def.checks.find(n=>"ip"===n.kind)}get isBase64(){return!!this._def.checks.find(n=>"base64"===n.kind)}get minLength(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxLength(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value{var a;return new ZodString({checks:[],typeName:e_.ZodString,coerce:null!==(a=null==n?void 0:n.coerce)&&void 0!==a&&a,...processCreateParams(n)})};let ZodNumber=class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){let a;this._def.coerce&&(n.data=Number(n.data));let g=this._getType(n);if(g!==eA.number){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.number,received:a.parsedType}),eD}let v=new ParseStatus;for(let g of this._def.checks)if("int"===g.kind)eg.isInteger(n.data)||(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.invalid_type,expected:"integer",received:"float",message:g.message}),v.dirty());else if("min"===g.kind){let j=g.inclusive?n.datag.value:n.data>=g.value;j&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.too_big,maximum:g.value,type:"number",inclusive:g.inclusive,exact:!1,message:g.message}),v.dirty())}else"multipleOf"===g.kind?0!==function(n,a){let g=(n.toString().split(".")[1]||"").length,v=(a.toString().split(".")[1]||"").length,j=g>v?g:v,z=parseInt(n.toFixed(j).replace(".","")),H=parseInt(a.toFixed(j).replace(".",""));return z%H/Math.pow(10,j)}(n.data,g.value)&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.not_multiple_of,multipleOf:g.value,message:g.message}),v.dirty()):"finite"===g.kind?Number.isFinite(n.data)||(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.not_finite,message:g.message}),v.dirty()):eg.assertNever(g);return{status:v.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,ev.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ev.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ev.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ev.toString(a))}setLimit(n,a,g,v){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:g,message:ev.toString(v)}]})}_addCheck(n){return new ZodNumber({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:ev.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ev.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ev.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ev.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ev.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ev.toString(a)})}finite(n){return this._addCheck({kind:"finite",message:ev.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ev.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ev.toString(n)})}get minValue(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value"int"===n.kind||"multipleOf"===n.kind&&eg.isInteger(n.value))}get isFinite(){let n=null,a=null;for(let g of this._def.checks){if("finite"===g.kind||"int"===g.kind||"multipleOf"===g.kind)return!0;"min"===g.kind?(null===a||g.value>a)&&(a=g.value):"max"===g.kind&&(null===n||g.valuenew ZodNumber({checks:[],typeName:e_.ZodNumber,coerce:(null==n?void 0:n.coerce)||!1,...processCreateParams(n)});let ZodBigInt=class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){let a;this._def.coerce&&(n.data=BigInt(n.data));let g=this._getType(n);if(g!==eA.bigint){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.bigint,received:a.parsedType}),eD}let v=new ParseStatus;for(let g of this._def.checks)if("min"===g.kind){let j=g.inclusive?n.datag.value:n.data>=g.value;j&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.too_big,type:"bigint",maximum:g.value,inclusive:g.inclusive,message:g.message}),v.dirty())}else"multipleOf"===g.kind?n.data%g.value!==BigInt(0)&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.not_multiple_of,multipleOf:g.value,message:g.message}),v.dirty()):eg.assertNever(g);return{status:v.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,ev.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ev.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ev.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ev.toString(a))}setLimit(n,a,g,v){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:g,message:ev.toString(v)}]})}_addCheck(n){return new ZodBigInt({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ev.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ev.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ev.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ev.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ev.toString(a)})}get minValue(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.value{var a;return new ZodBigInt({checks:[],typeName:e_.ZodBigInt,coerce:null!==(a=null==n?void 0:n.coerce)&&void 0!==a&&a,...processCreateParams(n)})};let ZodBoolean=class ZodBoolean extends ZodType{_parse(n){this._def.coerce&&(n.data=!!n.data);let a=this._getType(n);if(a!==eA.boolean){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.boolean,received:a.parsedType}),eD}return OK(n.data)}};ZodBoolean.create=n=>new ZodBoolean({typeName:e_.ZodBoolean,coerce:(null==n?void 0:n.coerce)||!1,...processCreateParams(n)});let ZodDate=class ZodDate extends ZodType{_parse(n){let a;this._def.coerce&&(n.data=new Date(n.data));let g=this._getType(n);if(g!==eA.date){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.date,received:a.parsedType}),eD}if(isNaN(n.data.getTime())){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_date}),eD}let v=new ParseStatus;for(let g of this._def.checks)"min"===g.kind?n.data.getTime()g.value&&(addIssueToContext(a=this._getOrReturnCtx(n,a),{code:eN.too_big,message:g.message,inclusive:!0,exact:!1,maximum:g.value,type:"date"}),v.dirty()):eg.assertNever(g);return{status:v.value,value:new Date(n.data.getTime())}}_addCheck(n){return new ZodDate({...this._def,checks:[...this._def.checks,n]})}min(n,a){return this._addCheck({kind:"min",value:n.getTime(),message:ev.toString(a)})}max(n,a){return this._addCheck({kind:"max",value:n.getTime(),message:ev.toString(a)})}get minDate(){let n=null;for(let a of this._def.checks)"min"===a.kind&&(null===n||a.value>n)&&(n=a.value);return null!=n?new Date(n):null}get maxDate(){let n=null;for(let a of this._def.checks)"max"===a.kind&&(null===n||a.valuenew ZodDate({checks:[],coerce:(null==n?void 0:n.coerce)||!1,typeName:e_.ZodDate,...processCreateParams(n)});let ZodSymbol=class ZodSymbol extends ZodType{_parse(n){let a=this._getType(n);if(a!==eA.symbol){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.symbol,received:a.parsedType}),eD}return OK(n.data)}};ZodSymbol.create=n=>new ZodSymbol({typeName:e_.ZodSymbol,...processCreateParams(n)});let ZodUndefined=class ZodUndefined extends ZodType{_parse(n){let a=this._getType(n);if(a!==eA.undefined){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.undefined,received:a.parsedType}),eD}return OK(n.data)}};ZodUndefined.create=n=>new ZodUndefined({typeName:e_.ZodUndefined,...processCreateParams(n)});let ZodNull=class ZodNull extends ZodType{_parse(n){let a=this._getType(n);if(a!==eA.null){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.null,received:a.parsedType}),eD}return OK(n.data)}};ZodNull.create=n=>new ZodNull({typeName:e_.ZodNull,...processCreateParams(n)});let ZodAny=class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(n){return OK(n.data)}};ZodAny.create=n=>new ZodAny({typeName:e_.ZodAny,...processCreateParams(n)});let ZodUnknown=class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(n){return OK(n.data)}};ZodUnknown.create=n=>new ZodUnknown({typeName:e_.ZodUnknown,...processCreateParams(n)});let ZodNever=class ZodNever extends ZodType{_parse(n){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.never,received:a.parsedType}),eD}};ZodNever.create=n=>new ZodNever({typeName:e_.ZodNever,...processCreateParams(n)});let ZodVoid=class ZodVoid extends ZodType{_parse(n){let a=this._getType(n);if(a!==eA.undefined){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.void,received:a.parsedType}),eD}return OK(n.data)}};ZodVoid.create=n=>new ZodVoid({typeName:e_.ZodVoid,...processCreateParams(n)});let ZodArray=class ZodArray extends ZodType{_parse(n){let{ctx:a,status:g}=this._processInputParams(n),v=this._def;if(a.parsedType!==eA.array)return addIssueToContext(a,{code:eN.invalid_type,expected:eA.array,received:a.parsedType}),eD;if(null!==v.exactLength){let n=a.data.length>v.exactLength.value,j=a.data.lengthv.maxLength.value&&(addIssueToContext(a,{code:eN.too_big,maximum:v.maxLength.value,type:"array",inclusive:!0,exact:!1,message:v.maxLength.message}),g.dirty()),a.common.async)return Promise.all([...a.data].map((n,g)=>v.type._parseAsync(new ParseInputLazyPath(a,n,a.path,g)))).then(n=>ParseStatus.mergeArray(g,n));let j=[...a.data].map((n,g)=>v.type._parseSync(new ParseInputLazyPath(a,n,a.path,g)));return ParseStatus.mergeArray(g,j)}get element(){return this._def.type}min(n,a){return new ZodArray({...this._def,minLength:{value:n,message:ev.toString(a)}})}max(n,a){return new ZodArray({...this._def,maxLength:{value:n,message:ev.toString(a)}})}length(n,a){return new ZodArray({...this._def,exactLength:{value:n,message:ev.toString(a)}})}nonempty(n){return this.min(1,n)}};ZodArray.create=(n,a)=>new ZodArray({type:n,minLength:null,maxLength:null,exactLength:null,typeName:e_.ZodArray,...processCreateParams(a)});let ZodObject=class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let n=this._def.shape(),a=eg.objectKeys(n);return this._cached={shape:n,keys:a}}_parse(n){let a=this._getType(n);if(a!==eA.object){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.object,received:a.parsedType}),eD}let{status:g,ctx:v}=this._processInputParams(n),{shape:j,keys:z}=this._getCached(),H=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(let n in v.data)z.includes(n)||H.push(n);let B=[];for(let n of z){let a=j[n],g=v.data[n];B.push({key:{status:"valid",value:n},value:a._parse(new ParseInputLazyPath(v,g,v.path,n)),alwaysSet:n in v.data})}if(this._def.catchall instanceof ZodNever){let n=this._def.unknownKeys;if("passthrough"===n)for(let n of H)B.push({key:{status:"valid",value:n},value:{status:"valid",value:v.data[n]}});else if("strict"===n)H.length>0&&(addIssueToContext(v,{code:eN.unrecognized_keys,keys:H}),g.dirty());else if("strip"===n);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let n=this._def.catchall;for(let a of H){let g=v.data[a];B.push({key:{status:"valid",value:a},value:n._parse(new ParseInputLazyPath(v,g,v.path,a)),alwaysSet:a in v.data})}}return v.common.async?Promise.resolve().then(async()=>{let n=[];for(let a of B){let g=await a.key,v=await a.value;n.push({key:g,value:v,alwaysSet:a.alwaysSet})}return n}).then(n=>ParseStatus.mergeObjectSync(g,n)):ParseStatus.mergeObjectSync(g,B)}get shape(){return this._def.shape()}strict(n){return ev.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==n?{errorMap:(a,g)=>{var v,j,z,H;let B=null!==(z=null===(j=(v=this._def).errorMap)||void 0===j?void 0:j.call(v,a,g).message)&&void 0!==z?z:g.defaultError;return"unrecognized_keys"===a.code?{message:null!==(H=ev.errToObj(n).message)&&void 0!==H?H:B}:{message:B}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(n){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){let a=new ZodObject({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:e_.ZodObject});return a}setKey(n,a){return this.augment({[n]:a})}catchall(n){return new ZodObject({...this._def,catchall:n})}pick(n){let a={};return eg.objectKeys(n).forEach(g=>{n[g]&&this.shape[g]&&(a[g]=this.shape[g])}),new ZodObject({...this._def,shape:()=>a})}omit(n){let a={};return eg.objectKeys(this.shape).forEach(g=>{n[g]||(a[g]=this.shape[g])}),new ZodObject({...this._def,shape:()=>a})}deepPartial(){return function deepPartialify(n){if(n instanceof ZodObject){let a={};for(let g in n.shape){let v=n.shape[g];a[g]=ZodOptional.create(deepPartialify(v))}return new ZodObject({...n._def,shape:()=>a})}return n instanceof ZodArray?new ZodArray({...n._def,type:deepPartialify(n.element)}):n instanceof ZodOptional?ZodOptional.create(deepPartialify(n.unwrap())):n instanceof ZodNullable?ZodNullable.create(deepPartialify(n.unwrap())):n instanceof ZodTuple?ZodTuple.create(n.items.map(n=>deepPartialify(n))):n}(this)}partial(n){let a={};return eg.objectKeys(this.shape).forEach(g=>{let v=this.shape[g];n&&!n[g]?a[g]=v:a[g]=v.optional()}),new ZodObject({...this._def,shape:()=>a})}required(n){let a={};return eg.objectKeys(this.shape).forEach(g=>{if(n&&!n[g])a[g]=this.shape[g];else{let n=this.shape[g],v=n;for(;v instanceof ZodOptional;)v=v._def.innerType;a[g]=v}}),new ZodObject({...this._def,shape:()=>a})}keyof(){return createZodEnum(eg.objectKeys(this.shape))}};ZodObject.create=(n,a)=>new ZodObject({shape:()=>n,unknownKeys:"strip",catchall:ZodNever.create(),typeName:e_.ZodObject,...processCreateParams(a)}),ZodObject.strictCreate=(n,a)=>new ZodObject({shape:()=>n,unknownKeys:"strict",catchall:ZodNever.create(),typeName:e_.ZodObject,...processCreateParams(a)}),ZodObject.lazycreate=(n,a)=>new ZodObject({shape:n,unknownKeys:"strip",catchall:ZodNever.create(),typeName:e_.ZodObject,...processCreateParams(a)});let ZodUnion=class ZodUnion extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=this._def.options;if(a.common.async)return Promise.all(g.map(async n=>{let g={...a,common:{...a.common,issues:[]},parent:null};return{result:await n._parseAsync({data:a.data,path:a.path,parent:g}),ctx:g}})).then(function(n){for(let a of n)if("valid"===a.result.status)return a.result;for(let g of n)if("dirty"===g.result.status)return a.common.issues.push(...g.ctx.common.issues),g.result;let g=n.map(n=>new ZodError(n.ctx.common.issues));return addIssueToContext(a,{code:eN.invalid_union,unionErrors:g}),eD});{let n;let v=[];for(let j of g){let g={...a,common:{...a.common,issues:[]},parent:null},z=j._parseSync({data:a.data,path:a.path,parent:g});if("valid"===z.status)return z;"dirty"!==z.status||n||(n={result:z,ctx:g}),g.common.issues.length&&v.push(g.common.issues)}if(n)return a.common.issues.push(...n.ctx.common.issues),n.result;let j=v.map(n=>new ZodError(n));return addIssueToContext(a,{code:eN.invalid_union,unionErrors:j}),eD}}get options(){return this._def.options}};ZodUnion.create=(n,a)=>new ZodUnion({options:n,typeName:e_.ZodUnion,...processCreateParams(a)});let getDiscriminator=n=>{if(n instanceof ZodLazy)return getDiscriminator(n.schema);if(n instanceof ZodEffects)return getDiscriminator(n.innerType());if(n instanceof ZodLiteral)return[n.value];if(n instanceof ZodEnum)return n.options;if(n instanceof ZodNativeEnum)return eg.objectValues(n.enum);if(n instanceof ZodDefault)return getDiscriminator(n._def.innerType);if(n instanceof ZodUndefined)return[void 0];else if(n instanceof ZodNull)return[null];else if(n instanceof ZodOptional)return[void 0,...getDiscriminator(n.unwrap())];else if(n instanceof ZodNullable)return[null,...getDiscriminator(n.unwrap())];else if(n instanceof ZodBranded)return getDiscriminator(n.unwrap());else if(n instanceof ZodReadonly)return getDiscriminator(n.unwrap());else if(n instanceof ZodCatch)return getDiscriminator(n._def.innerType);else return[]};let ZodDiscriminatedUnion=class ZodDiscriminatedUnion extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eA.object)return addIssueToContext(a,{code:eN.invalid_type,expected:eA.object,received:a.parsedType}),eD;let g=this.discriminator,v=a.data[g],j=this.optionsMap.get(v);return j?a.common.async?j._parseAsync({data:a.data,path:a.path,parent:a}):j._parseSync({data:a.data,path:a.path,parent:a}):(addIssueToContext(a,{code:eN.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[g]}),eD)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,a,g){let v=new Map;for(let g of a){let a=getDiscriminator(g.shape[n]);if(!a.length)throw Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(let j of a){if(v.has(j))throw Error(`Discriminator property ${String(n)} has duplicate value ${String(j)}`);v.set(j,g)}}return new ZodDiscriminatedUnion({typeName:e_.ZodDiscriminatedUnion,discriminator:n,options:a,optionsMap:v,...processCreateParams(g)})}};let ZodIntersection=class ZodIntersection extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n),handleParsed=(n,v)=>{if(isAborted(n)||isAborted(v))return eD;let j=function mergeValues(n,a){let g=getParsedType(n),v=getParsedType(a);if(n===a)return{valid:!0,data:n};if(g===eA.object&&v===eA.object){let g=eg.objectKeys(a),v=eg.objectKeys(n).filter(n=>-1!==g.indexOf(n)),j={...n,...a};for(let g of v){let v=mergeValues(n[g],a[g]);if(!v.valid)return{valid:!1};j[g]=v.data}return{valid:!0,data:j}}if(g===eA.array&&v===eA.array){if(n.length!==a.length)return{valid:!1};let g=[];for(let v=0;vhandleParsed(n,a)):handleParsed(this._def.left._parseSync({data:g.data,path:g.path,parent:g}),this._def.right._parseSync({data:g.data,path:g.path,parent:g}))}};ZodIntersection.create=(n,a,g)=>new ZodIntersection({left:n,right:a,typeName:e_.ZodIntersection,...processCreateParams(g)});let ZodTuple=class ZodTuple extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eA.array)return addIssueToContext(g,{code:eN.invalid_type,expected:eA.array,received:g.parsedType}),eD;if(g.data.lengththis._def.items.length&&(addIssueToContext(g,{code:eN.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());let j=[...g.data].map((n,a)=>{let v=this._def.items[a]||this._def.rest;return v?v._parse(new ParseInputLazyPath(g,n,g.path,a)):null}).filter(n=>!!n);return g.common.async?Promise.all(j).then(n=>ParseStatus.mergeArray(a,n)):ParseStatus.mergeArray(a,j)}get items(){return this._def.items}rest(n){return new ZodTuple({...this._def,rest:n})}};ZodTuple.create=(n,a)=>{if(!Array.isArray(n))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:n,typeName:e_.ZodTuple,rest:null,...processCreateParams(a)})};let ZodRecord=class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eA.object)return addIssueToContext(g,{code:eN.invalid_type,expected:eA.object,received:g.parsedType}),eD;let v=[],j=this._def.keyType,z=this._def.valueType;for(let n in g.data)v.push({key:j._parse(new ParseInputLazyPath(g,n,g.path,n)),value:z._parse(new ParseInputLazyPath(g,g.data[n],g.path,n)),alwaysSet:n in g.data});return g.common.async?ParseStatus.mergeObjectAsync(a,v):ParseStatus.mergeObjectSync(a,v)}get element(){return this._def.valueType}static create(n,a,g){return new ZodRecord(a instanceof ZodType?{keyType:n,valueType:a,typeName:e_.ZodRecord,...processCreateParams(g)}:{keyType:ZodString.create(),valueType:n,typeName:e_.ZodRecord,...processCreateParams(a)})}};let ZodMap=class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eA.map)return addIssueToContext(g,{code:eN.invalid_type,expected:eA.map,received:g.parsedType}),eD;let v=this._def.keyType,j=this._def.valueType,z=[...g.data.entries()].map(([n,a],z)=>({key:v._parse(new ParseInputLazyPath(g,n,g.path,[z,"key"])),value:j._parse(new ParseInputLazyPath(g,a,g.path,[z,"value"]))}));if(g.common.async){let n=new Map;return Promise.resolve().then(async()=>{for(let g of z){let v=await g.key,j=await g.value;if("aborted"===v.status||"aborted"===j.status)return eD;("dirty"===v.status||"dirty"===j.status)&&a.dirty(),n.set(v.value,j.value)}return{status:a.value,value:n}})}{let n=new Map;for(let g of z){let v=g.key,j=g.value;if("aborted"===v.status||"aborted"===j.status)return eD;("dirty"===v.status||"dirty"===j.status)&&a.dirty(),n.set(v.value,j.value)}return{status:a.value,value:n}}}};ZodMap.create=(n,a,g)=>new ZodMap({valueType:a,keyType:n,typeName:e_.ZodMap,...processCreateParams(g)});let ZodSet=class ZodSet extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.parsedType!==eA.set)return addIssueToContext(g,{code:eN.invalid_type,expected:eA.set,received:g.parsedType}),eD;let v=this._def;null!==v.minSize&&g.data.sizev.maxSize.value&&(addIssueToContext(g,{code:eN.too_big,maximum:v.maxSize.value,type:"set",inclusive:!0,exact:!1,message:v.maxSize.message}),a.dirty());let j=this._def.valueType;function finalizeSet(n){let g=new Set;for(let v of n){if("aborted"===v.status)return eD;"dirty"===v.status&&a.dirty(),g.add(v.value)}return{status:a.value,value:g}}let z=[...g.data.values()].map((n,a)=>j._parse(new ParseInputLazyPath(g,n,g.path,a)));return g.common.async?Promise.all(z).then(n=>finalizeSet(n)):finalizeSet(z)}min(n,a){return new ZodSet({...this._def,minSize:{value:n,message:ev.toString(a)}})}max(n,a){return new ZodSet({...this._def,maxSize:{value:n,message:ev.toString(a)}})}size(n,a){return this.min(n,a).max(n,a)}nonempty(n){return this.min(1,n)}};ZodSet.create=(n,a)=>new ZodSet({valueType:n,minSize:null,maxSize:null,typeName:e_.ZodSet,...processCreateParams(a)});let ZodFunction=class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eA.function)return addIssueToContext(a,{code:eN.invalid_type,expected:eA.function,received:a.parsedType}),eD;function makeArgsIssue(n,g){return makeIssue({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,getErrorMap(),errorMap].filter(n=>!!n),issueData:{code:eN.invalid_arguments,argumentsError:g}})}function makeReturnsIssue(n,g){return makeIssue({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,getErrorMap(),errorMap].filter(n=>!!n),issueData:{code:eN.invalid_return_type,returnTypeError:g}})}let g={errorMap:a.common.contextualErrorMap},v=a.data;if(this._def.returns instanceof ZodPromise){let n=this;return OK(async function(...a){let j=new ZodError([]),z=await n._def.args.parseAsync(a,g).catch(n=>{throw j.addIssue(makeArgsIssue(a,n)),j}),H=await Reflect.apply(v,this,z),B=await n._def.returns._def.type.parseAsync(H,g).catch(n=>{throw j.addIssue(makeReturnsIssue(H,n)),j});return B})}{let n=this;return OK(function(...a){let j=n._def.args.safeParse(a,g);if(!j.success)throw new ZodError([makeArgsIssue(a,j.error)]);let z=Reflect.apply(v,this,j.data),H=n._def.returns.safeParse(z,g);if(!H.success)throw new ZodError([makeReturnsIssue(z,H.error)]);return H.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new ZodFunction({...this._def,args:ZodTuple.create(n).rest(ZodUnknown.create())})}returns(n){return new ZodFunction({...this._def,returns:n})}implement(n){let a=this.parse(n);return a}strictImplement(n){let a=this.parse(n);return a}static create(n,a,g){return new ZodFunction({args:n||ZodTuple.create([]).rest(ZodUnknown.create()),returns:a||ZodUnknown.create(),typeName:e_.ZodFunction,...processCreateParams(g)})}};let ZodLazy=class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(n){let{ctx:a}=this._processInputParams(n),g=this._def.getter();return g._parse({data:a.data,path:a.path,parent:a})}};ZodLazy.create=(n,a)=>new ZodLazy({getter:n,typeName:e_.ZodLazy,...processCreateParams(a)});let ZodLiteral=class ZodLiteral extends ZodType{_parse(n){if(n.data!==this._def.value){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{received:a.data,code:eN.invalid_literal,expected:this._def.value}),eD}return{status:"valid",value:n.data}}get value(){return this._def.value}};function createZodEnum(n,a){return new ZodEnum({values:n,typeName:e_.ZodEnum,...processCreateParams(a)})}ZodLiteral.create=(n,a)=>new ZodLiteral({value:n,typeName:e_.ZodLiteral,...processCreateParams(a)});let ZodEnum=class ZodEnum extends ZodType{constructor(){super(...arguments),ey.set(this,void 0)}_parse(n){if("string"!=typeof n.data){let a=this._getOrReturnCtx(n),g=this._def.values;return addIssueToContext(a,{expected:eg.joinValues(g),received:a.parsedType,code:eN.invalid_type}),eD}if(__classPrivateFieldGet(this,ey,"f")||__classPrivateFieldSet(this,ey,new Set(this._def.values),"f"),!__classPrivateFieldGet(this,ey,"f").has(n.data)){let a=this._getOrReturnCtx(n),g=this._def.values;return addIssueToContext(a,{received:a.data,code:eN.invalid_enum_value,options:g}),eD}return OK(n.data)}get options(){return this._def.values}get enum(){let n={};for(let a of this._def.values)n[a]=a;return n}get Values(){let n={};for(let a of this._def.values)n[a]=a;return n}get Enum(){let n={};for(let a of this._def.values)n[a]=a;return n}extract(n,a=this._def){return ZodEnum.create(n,{...this._def,...a})}exclude(n,a=this._def){return ZodEnum.create(this.options.filter(a=>!n.includes(a)),{...this._def,...a})}};ey=new WeakMap,ZodEnum.create=createZodEnum;let ZodNativeEnum=class ZodNativeEnum extends ZodType{constructor(){super(...arguments),eb.set(this,void 0)}_parse(n){let a=eg.getValidEnumValues(this._def.values),g=this._getOrReturnCtx(n);if(g.parsedType!==eA.string&&g.parsedType!==eA.number){let n=eg.objectValues(a);return addIssueToContext(g,{expected:eg.joinValues(n),received:g.parsedType,code:eN.invalid_type}),eD}if(__classPrivateFieldGet(this,eb,"f")||__classPrivateFieldSet(this,eb,new Set(eg.getValidEnumValues(this._def.values)),"f"),!__classPrivateFieldGet(this,eb,"f").has(n.data)){let n=eg.objectValues(a);return addIssueToContext(g,{received:g.data,code:eN.invalid_enum_value,options:n}),eD}return OK(n.data)}get enum(){return this._def.values}};eb=new WeakMap,ZodNativeEnum.create=(n,a)=>new ZodNativeEnum({values:n,typeName:e_.ZodNativeEnum,...processCreateParams(a)});let ZodPromise=class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(n){let{ctx:a}=this._processInputParams(n);if(a.parsedType!==eA.promise&&!1===a.common.async)return addIssueToContext(a,{code:eN.invalid_type,expected:eA.promise,received:a.parsedType}),eD;let g=a.parsedType===eA.promise?a.data:Promise.resolve(a.data);return OK(g.then(n=>this._def.type.parseAsync(n,{path:a.path,errorMap:a.common.contextualErrorMap})))}};ZodPromise.create=(n,a)=>new ZodPromise({type:n,typeName:e_.ZodPromise,...processCreateParams(a)});let ZodEffects=class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===e_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){let{status:a,ctx:g}=this._processInputParams(n),v=this._def.effect||null,j={addIssue:n=>{addIssueToContext(g,n),n.fatal?a.abort():a.dirty()},get path(){return g.path}};if(j.addIssue=j.addIssue.bind(j),"preprocess"===v.type){let n=v.transform(g.data,j);if(g.common.async)return Promise.resolve(n).then(async n=>{if("aborted"===a.value)return eD;let v=await this._def.schema._parseAsync({data:n,path:g.path,parent:g});return"aborted"===v.status?eD:"dirty"===v.status||"dirty"===a.value?DIRTY(v.value):v});{if("aborted"===a.value)return eD;let v=this._def.schema._parseSync({data:n,path:g.path,parent:g});return"aborted"===v.status?eD:"dirty"===v.status||"dirty"===a.value?DIRTY(v.value):v}}if("refinement"===v.type){let executeRefinement=n=>{let a=v.refinement(n,j);if(g.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return n};if(!1!==g.common.async)return this._def.schema._parseAsync({data:g.data,path:g.path,parent:g}).then(n=>"aborted"===n.status?eD:("dirty"===n.status&&a.dirty(),executeRefinement(n.value).then(()=>({status:a.value,value:n.value}))));{let n=this._def.schema._parseSync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eD:("dirty"===n.status&&a.dirty(),executeRefinement(n.value),{status:a.value,value:n.value})}}if("transform"===v.type){if(!1!==g.common.async)return this._def.schema._parseAsync({data:g.data,path:g.path,parent:g}).then(n=>isValid(n)?Promise.resolve(v.transform(n.value,j)).then(n=>({status:a.value,value:n})):n);{let n=this._def.schema._parseSync({data:g.data,path:g.path,parent:g});if(!isValid(n))return n;let z=v.transform(n.value,j);if(z instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:z}}}eg.assertNever(v)}};ZodEffects.create=(n,a,g)=>new ZodEffects({schema:n,typeName:e_.ZodEffects,effect:a,...processCreateParams(g)}),ZodEffects.createWithPreprocess=(n,a,g)=>new ZodEffects({schema:a,effect:{type:"preprocess",transform:n},typeName:e_.ZodEffects,...processCreateParams(g)});let ZodOptional=class ZodOptional extends ZodType{_parse(n){let a=this._getType(n);return a===eA.undefined?OK(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}};ZodOptional.create=(n,a)=>new ZodOptional({innerType:n,typeName:e_.ZodOptional,...processCreateParams(a)});let ZodNullable=class ZodNullable extends ZodType{_parse(n){let a=this._getType(n);return a===eA.null?OK(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}};ZodNullable.create=(n,a)=>new ZodNullable({innerType:n,typeName:e_.ZodNullable,...processCreateParams(a)});let ZodDefault=class ZodDefault extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=a.data;return a.parsedType===eA.undefined&&(g=this._def.defaultValue()),this._def.innerType._parse({data:g,path:a.path,parent:a})}removeDefault(){return this._def.innerType}};ZodDefault.create=(n,a)=>new ZodDefault({innerType:n,typeName:e_.ZodDefault,defaultValue:"function"==typeof a.default?a.default:()=>a.default,...processCreateParams(a)});let ZodCatch=class ZodCatch extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g={...a,common:{...a.common,issues:[]}},v=this._def.innerType._parse({data:g.data,path:g.path,parent:{...g}});return isAsync(v)?v.then(n=>({status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ZodError(g.common.issues)},input:g.data})})):{status:"valid",value:"valid"===v.status?v.value:this._def.catchValue({get error(){return new ZodError(g.common.issues)},input:g.data})}}removeCatch(){return this._def.innerType}};ZodCatch.create=(n,a)=>new ZodCatch({innerType:n,typeName:e_.ZodCatch,catchValue:"function"==typeof a.catch?a.catch:()=>a.catch,...processCreateParams(a)});let ZodNaN=class ZodNaN extends ZodType{_parse(n){let a=this._getType(n);if(a!==eA.nan){let a=this._getOrReturnCtx(n);return addIssueToContext(a,{code:eN.invalid_type,expected:eA.nan,received:a.parsedType}),eD}return{status:"valid",value:n.data}}};ZodNaN.create=n=>new ZodNaN({typeName:e_.ZodNaN,...processCreateParams(n)});let eK=Symbol("zod_brand");let ZodBranded=class ZodBranded extends ZodType{_parse(n){let{ctx:a}=this._processInputParams(n),g=a.data;return this._def.type._parse({data:g,path:a.path,parent:a})}unwrap(){return this._def.type}};let ZodPipeline=class ZodPipeline extends ZodType{_parse(n){let{status:a,ctx:g}=this._processInputParams(n);if(g.common.async){let handleAsync=async()=>{let n=await this._def.in._parseAsync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eD:"dirty"===n.status?(a.dirty(),DIRTY(n.value)):this._def.out._parseAsync({data:n.value,path:g.path,parent:g})};return handleAsync()}{let n=this._def.in._parseSync({data:g.data,path:g.path,parent:g});return"aborted"===n.status?eD:"dirty"===n.status?(a.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:g.path,parent:g})}}static create(n,a){return new ZodPipeline({in:n,out:a,typeName:e_.ZodPipeline})}};let ZodReadonly=class ZodReadonly extends ZodType{_parse(n){let a=this._def.innerType._parse(n),freeze=n=>(isValid(n)&&(n.value=Object.freeze(n.value)),n);return isAsync(a)?a.then(n=>freeze(n)):freeze(a)}unwrap(){return this._def.innerType}};function custom(n,a={},g){return n?ZodAny.create().superRefine((v,j)=>{var z,H;if(!n(v)){let n="function"==typeof a?a(v):"string"==typeof a?{message:a}:a,B=null===(H=null!==(z=n.fatal)&&void 0!==z?z:g)||void 0===H||H,W="string"==typeof n?{message:n}:n;j.addIssue({code:"custom",...W,fatal:B})}}):ZodAny.create()}ZodReadonly.create=(n,a)=>new ZodReadonly({innerType:n,typeName:e_.ZodReadonly,...processCreateParams(a)});let eJ={object:ZodObject.lazycreate};(H=e_||(e_={})).ZodString="ZodString",H.ZodNumber="ZodNumber",H.ZodNaN="ZodNaN",H.ZodBigInt="ZodBigInt",H.ZodBoolean="ZodBoolean",H.ZodDate="ZodDate",H.ZodSymbol="ZodSymbol",H.ZodUndefined="ZodUndefined",H.ZodNull="ZodNull",H.ZodAny="ZodAny",H.ZodUnknown="ZodUnknown",H.ZodNever="ZodNever",H.ZodVoid="ZodVoid",H.ZodArray="ZodArray",H.ZodObject="ZodObject",H.ZodUnion="ZodUnion",H.ZodDiscriminatedUnion="ZodDiscriminatedUnion",H.ZodIntersection="ZodIntersection",H.ZodTuple="ZodTuple",H.ZodRecord="ZodRecord",H.ZodMap="ZodMap",H.ZodSet="ZodSet",H.ZodFunction="ZodFunction",H.ZodLazy="ZodLazy",H.ZodLiteral="ZodLiteral",H.ZodEnum="ZodEnum",H.ZodEffects="ZodEffects",H.ZodNativeEnum="ZodNativeEnum",H.ZodOptional="ZodOptional",H.ZodNullable="ZodNullable",H.ZodDefault="ZodDefault",H.ZodCatch="ZodCatch",H.ZodPromise="ZodPromise",H.ZodBranded="ZodBranded",H.ZodPipeline="ZodPipeline",H.ZodReadonly="ZodReadonly";let eQ=ZodString.create,eY=ZodNumber.create,eX=ZodNaN.create,e0=ZodBigInt.create,e1=ZodBoolean.create,e2=ZodDate.create,e4=ZodSymbol.create,e3=ZodUndefined.create,e5=ZodNull.create,e6=ZodAny.create,e7=ZodUnknown.create,e9=ZodNever.create,e8=ZodVoid.create,te=ZodArray.create,tt=ZodObject.create,tr=ZodObject.strictCreate,tn=ZodUnion.create,to=ZodDiscriminatedUnion.create,ta=ZodIntersection.create,ti=ZodTuple.create,ts=ZodRecord.create,tl=ZodMap.create,tc=ZodSet.create,tu=ZodFunction.create,td=ZodLazy.create,tp=ZodLiteral.create,tf=ZodEnum.create,tm=ZodNativeEnum.create,th=ZodPromise.create,tg=ZodEffects.create,tx=ZodOptional.create,tv=ZodNullable.create,ty=ZodEffects.createWithPreprocess,tb=ZodPipeline.create;var t_=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap:function(n){eR=n},getErrorMap:getErrorMap,makeIssue:makeIssue,EMPTY_PATH:[],addIssueToContext:addIssueToContext,ParseStatus:ParseStatus,INVALID:eD,DIRTY:DIRTY,OK:OK,isAborted:isAborted,isDirty:isDirty,isValid:isValid,isAsync:isAsync,get util(){return eg},get objectUtil(){return ex},ZodParsedType:eA,getParsedType:getParsedType,ZodType:ZodType,datetimeRegex:datetimeRegex,ZodString:ZodString,ZodNumber:ZodNumber,ZodBigInt:ZodBigInt,ZodBoolean:ZodBoolean,ZodDate:ZodDate,ZodSymbol:ZodSymbol,ZodUndefined:ZodUndefined,ZodNull:ZodNull,ZodAny:ZodAny,ZodUnknown:ZodUnknown,ZodNever:ZodNever,ZodVoid:ZodVoid,ZodArray:ZodArray,ZodObject:ZodObject,ZodUnion:ZodUnion,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodIntersection:ZodIntersection,ZodTuple:ZodTuple,ZodRecord:ZodRecord,ZodMap:ZodMap,ZodSet:ZodSet,ZodFunction:ZodFunction,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodEnum:ZodEnum,ZodNativeEnum:ZodNativeEnum,ZodPromise:ZodPromise,ZodEffects:ZodEffects,ZodTransformer:ZodEffects,ZodOptional:ZodOptional,ZodNullable:ZodNullable,ZodDefault:ZodDefault,ZodCatch:ZodCatch,ZodNaN:ZodNaN,BRAND:eK,ZodBranded:ZodBranded,ZodPipeline:ZodPipeline,ZodReadonly:ZodReadonly,custom:custom,Schema:ZodType,ZodSchema:ZodType,late:eJ,get ZodFirstPartyTypeKind(){return e_},coerce:{string:n=>ZodString.create({...n,coerce:!0}),number:n=>ZodNumber.create({...n,coerce:!0}),boolean:n=>ZodBoolean.create({...n,coerce:!0}),bigint:n=>ZodBigInt.create({...n,coerce:!0}),date:n=>ZodDate.create({...n,coerce:!0})},any:e6,array:te,bigint:e0,boolean:e1,date:e2,discriminatedUnion:to,effect:tg,enum:tf,function:tu,instanceof:(n,a={message:`Input not instance of ${n.name}`})=>custom(a=>a instanceof n,a),intersection:ta,lazy:td,literal:tp,map:tl,nan:eX,nativeEnum:tm,never:e9,null:e5,nullable:tv,number:eY,object:tt,oboolean:()=>e1().optional(),onumber:()=>eY().optional(),optional:tx,ostring:()=>eQ().optional(),pipeline:tb,preprocess:ty,promise:th,record:ts,set:tc,strictObject:tr,string:eQ,symbol:e4,transformer:tg,tuple:ti,undefined:e3,union:tn,unknown:e7,void:e8,NEVER:eD,ZodIssueCode:eN,quotelessJson:n=>{let a=JSON.stringify(n,null,2);return a.replace(/"([^"]+)":/g,"$1:")},ZodError:ZodError}),tS=g(9517),tw=g.n(tS);g(5983);let tk=["light","dark"],tO="(prefers-color-scheme: dark)",tj="undefined"==typeof window,tC=(0,eP.createContext)(void 0),tP={setTheme:n=>{},themes:[]},y=()=>{var n;return null!==(n=(0,eP.useContext)(tC))&&void 0!==n?n:tP},$=n=>(0,eP.useContext)(tC)?eP.createElement(eP.Fragment,null,n.children):eP.createElement(f,n),tE=["light","dark"],f=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:g=!0,enableColorScheme:v=!0,storageKey:j="theme",themes:z=tE,defaultTheme:H=g?"system":"light",attribute:B="data-theme",value:W,children:K,nonce:ee})=>{let[et,er]=(0,eP.useState)(()=>S(j,H)),[en,eo]=(0,eP.useState)(()=>S(j)),ei=W?Object.values(W):z,es=(0,eP.useCallback)(n=>{let j=n;if(!j)return;"system"===n&&g&&(j=p());let z=W?W[j]:j,K=a?b():null,ee=document.documentElement;if("class"===B?(ee.classList.remove(...ei),z&&ee.classList.add(z)):z?ee.setAttribute(B,z):ee.removeAttribute(B),v){let n=tk.includes(H)?H:null,a=tk.includes(j)?j:n;ee.style.colorScheme=a}null==K||K()},[]),el=(0,eP.useCallback)(n=>{er(n);try{localStorage.setItem(j,n)}catch(n){}},[n]),ec=(0,eP.useCallback)(a=>{let v=p(a);eo(v),"system"===et&&g&&!n&&es("system")},[et,n]);(0,eP.useEffect)(()=>{let n=window.matchMedia(tO);return n.addListener(ec),ec(n),()=>n.removeListener(ec)},[ec]),(0,eP.useEffect)(()=>{let e=n=>{n.key===j&&el(n.newValue||H)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[el]),(0,eP.useEffect)(()=>{es(null!=n?n:et)},[n,et]);let eu=(0,eP.useMemo)(()=>({theme:et,setTheme:el,forcedTheme:n,resolvedTheme:"system"===et?en:et,themes:g?[...z,"system"]:z,systemTheme:g?en:void 0}),[et,el,n,en,g,z]);return eP.createElement(tC.Provider,{value:eu},eP.createElement(tI,{forcedTheme:n,disableTransitionOnChange:a,enableSystem:g,enableColorScheme:v,storageKey:j,themes:z,defaultTheme:H,attribute:B,value:W,children:K,attrs:ei,nonce:ee}),K)},tI=(0,eP.memo)(({forcedTheme:n,storageKey:a,attribute:g,enableSystem:v,enableColorScheme:j,defaultTheme:z,value:H,attrs:B,nonce:W})=>{let K="system"===z,ee="class"===g?`var d=document.documentElement,c=d.classList;c.remove(${B.map(n=>`'${n}'`).join(",")});`:`var d=document.documentElement,n='${g}',s='setAttribute';`,et=j?tk.includes(z)&&z?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${z}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",$=(n,a=!1,v=!0)=>{let z=H?H[n]:n,B=a?n+"|| ''":`'${z}'`,W="";return j&&v&&!a&&tk.includes(n)&&(W+=`d.style.colorScheme = '${n}';`),"class"===g?W+=a||z?`c.add(${B})`:"null":z&&(W+=`d[s](n,${B})`),W},er=n?`!function(){${ee}${$(n)}}()`:v?`!function(){try{${ee}var e=localStorage.getItem('${a}');if('system'===e||(!e&&${K})){var t='${tO}',m=window.matchMedia(t);if(m.media!==t||m.matches){${$("dark")}}else{${$("light")}}}else if(e){${H?`var x=${JSON.stringify(H)};`:""}${$(H?"x[e]":"e",!0)}}${K?"":"else{"+$(z,!1,!1)+"}"}${et}}catch(e){}}()`:`!function(){try{${ee}var e=localStorage.getItem('${a}');if(e){${H?`var x=${JSON.stringify(H)};`:""}${$(H?"x[e]":"e",!0)}}else{${$(z,!1,!1)};}${et}}catch(t){}}();`;return eP.createElement("script",{nonce:W,dangerouslySetInnerHTML:{__html:er}})},()=>!0),S=(n,a)=>{let g;if(!tj){try{g=localStorage.getItem(n)||void 0}catch(n){}return g||a}},b=()=>{let n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},p=n=>(n||(n=window.matchMedia(tO)),n.matches?"dark":"light");var tT={breadcrumb:!0,collapsed:!1,footer:!0,layout:"default",navbar:!0,pagination:!0,sidebar:!0,timestamp:!0,toc:!0,typesetting:"default"},tM=t_.strictObject({breadcrumb:t_.boolean(),collapsed:t_.boolean(),footer:t_.boolean(),layout:t_.enum(["default","full","raw"]),navbar:t_.boolean(),pagination:t_.boolean(),sidebar:t_.boolean(),timestamp:t_.boolean(),toc:t_.boolean(),typesetting:t_.enum(["default","article"])}),tA=t_.enum(["normal","hidden","children"]),tN=t_.string(),tR=t_.strictObject({href:t_.string(),newWindow:t_.boolean(),title:tN}),tD=t_.strictObject({display:tA.optional(),items:t_.record(tR.partial({href:!0,newWindow:!0})),title:tN,type:t_.literal("menu")}),tL=t_.strictObject({title:tN.optional(),type:t_.literal("separator")}),tZ=tR.extend({display:tA,theme:tM,title:tN,type:t_.enum(["page","doc"])}).deepPartial();t_.string().or(tD).or(tL).or(tZ);var tF=g(227),tV=g.n(tF);function getWindow(n){if(null==n)return window;if("[object Window]"!==n.toString()){var a=n.ownerDocument;return a&&a.defaultView||window}return n}function isElement(n){var a=getWindow(n).Element;return n instanceof a||n instanceof Element}function isHTMLElement(n){var a=getWindow(n).HTMLElement;return n instanceof a||n instanceof HTMLElement}function isShadowRoot(n){if("undefined"==typeof ShadowRoot)return!1;var a=getWindow(n).ShadowRoot;return n instanceof a||n instanceof ShadowRoot}var tU=Math.max,tz=Math.min,tH=Math.round;function getUAString(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(n,a,g){void 0===a&&(a=!1),void 0===g&&(g=!1);var v=n.getBoundingClientRect(),j=1,z=1;a&&isHTMLElement(n)&&(j=n.offsetWidth>0&&tH(v.width)/n.offsetWidth||1,z=n.offsetHeight>0&&tH(v.height)/n.offsetHeight||1);var H=(isElement(n)?getWindow(n):window).visualViewport,B=!isLayoutViewport()&&g,W=(v.left+(B&&H?H.offsetLeft:0))/j,K=(v.top+(B&&H?H.offsetTop:0))/z,ee=v.width/j,et=v.height/z;return{width:ee,height:et,top:K,right:W+ee,bottom:K+et,left:W,x:W,y:K}}function getWindowScroll(n){var a=getWindow(n);return{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function getNodeName(n){return n?(n.nodeName||"").toLowerCase():null}function getDocumentElement(n){return((isElement(n)?n.ownerDocument:n.document)||window.document).documentElement}function getWindowScrollBarX(n){return getBoundingClientRect(getDocumentElement(n)).left+getWindowScroll(n).scrollLeft}function getComputedStyle_getComputedStyle(n){return getWindow(n).getComputedStyle(n)}function isScrollParent(n){var a=getComputedStyle_getComputedStyle(n),g=a.overflow,v=a.overflowX,j=a.overflowY;return/auto|scroll|overlay|hidden/.test(g+j+v)}function getLayoutRect(n){var a=getBoundingClientRect(n),g=n.offsetWidth,v=n.offsetHeight;return 1>=Math.abs(a.width-g)&&(g=a.width),1>=Math.abs(a.height-v)&&(v=a.height),{x:n.offsetLeft,y:n.offsetTop,width:g,height:v}}function getParentNode(n){return"html"===getNodeName(n)?n:n.assignedSlot||n.parentNode||(isShadowRoot(n)?n.host:null)||getDocumentElement(n)}function listScrollParents(n,a){void 0===a&&(a=[]);var g,v=function getScrollParent(n){return["html","body","#document"].indexOf(getNodeName(n))>=0?n.ownerDocument.body:isHTMLElement(n)&&isScrollParent(n)?n:getScrollParent(getParentNode(n))}(n),j=v===(null==(g=n.ownerDocument)?void 0:g.body),z=getWindow(v),H=j?[z].concat(z.visualViewport||[],isScrollParent(v)?v:[]):v,B=a.concat(H);return j?B:B.concat(listScrollParents(getParentNode(H)))}function getTrueOffsetParent(n){return isHTMLElement(n)&&"fixed"!==getComputedStyle_getComputedStyle(n).position?n.offsetParent:null}function getOffsetParent(n){for(var a=getWindow(n),g=getTrueOffsetParent(n);g&&["table","td","th"].indexOf(getNodeName(g))>=0&&"static"===getComputedStyle_getComputedStyle(g).position;)g=getTrueOffsetParent(g);return g&&("html"===getNodeName(g)||"body"===getNodeName(g)&&"static"===getComputedStyle_getComputedStyle(g).position)?a:g||function(n){var a=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(n)&&"fixed"===getComputedStyle_getComputedStyle(n).position)return null;var g=getParentNode(n);for(isShadowRoot(g)&&(g=g.host);isHTMLElement(g)&&0>["html","body"].indexOf(getNodeName(g));){var v=getComputedStyle_getComputedStyle(g);if("none"!==v.transform||"none"!==v.perspective||"paint"===v.contain||-1!==["transform","perspective"].indexOf(v.willChange)||a&&"filter"===v.willChange||a&&v.filter&&"none"!==v.filter)return g;g=g.parentNode}return null}(n)||a}var tB="bottom",t$="right",tG="left",tq="auto",tW=["top",tB,t$,tG],tK="start",tJ="viewport",tQ="popper",tY=tW.reduce(function(n,a){return n.concat([a+"-"+tK,a+"-end"])},[]),tX=[].concat(tW,[tq]).reduce(function(n,a){return n.concat([a,a+"-"+tK,a+"-end"])},[]),t0=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],t1={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var n=arguments.length,a=Array(n),g=0;g=0?"x":"y"}function computeOffsets(n){var a,g=n.reference,v=n.element,j=n.placement,z=j?getBasePlacement(j):null,H=j?getVariation(j):null,B=g.x+g.width/2-v.width/2,W=g.y+g.height/2-v.height/2;switch(z){case"top":a={x:B,y:g.y-v.height};break;case tB:a={x:B,y:g.y+g.height};break;case t$:a={x:g.x+g.width,y:W};break;case tG:a={x:g.x-v.width,y:W};break;default:a={x:g.x,y:g.y}}var K=z?getMainAxisFromPlacement(z):null;if(null!=K){var ee="y"===K?"height":"width";switch(H){case tK:a[K]=a[K]-(g[ee]/2-v[ee]/2);break;case"end":a[K]=a[K]+(g[ee]/2-v[ee]/2)}}return a}var t4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(n){var a,g,v,j,z,H,B,W=n.popper,K=n.popperRect,ee=n.placement,et=n.variation,er=n.offsets,en=n.position,eo=n.gpuAcceleration,ei=n.adaptive,es=n.roundOffsets,el=n.isFixed,ec=er.x,eu=void 0===ec?0:ec,ed=er.y,ep=void 0===ed?0:ed,ef="function"==typeof es?es({x:eu,y:ep}):{x:eu,y:ep};eu=ef.x,ep=ef.y;var em=er.hasOwnProperty("x"),eh=er.hasOwnProperty("y"),eg=tG,ex="top",ev=window;if(ei){var ey=getOffsetParent(W),eb="clientHeight",e_="clientWidth";ey===getWindow(W)&&"static"!==getComputedStyle_getComputedStyle(ey=getDocumentElement(W)).position&&"absolute"===en&&(eb="scrollHeight",e_="scrollWidth"),("top"===ee||(ee===tG||ee===t$)&&"end"===et)&&(ex=tB,ep-=(el&&ey===ev&&ev.visualViewport?ev.visualViewport.height:ey[eb])-K.height,ep*=eo?1:-1),(ee===tG||("top"===ee||ee===tB)&&"end"===et)&&(eg=t$,eu-=(el&&ey===ev&&ev.visualViewport?ev.visualViewport.width:ey[e_])-K.width,eu*=eo?1:-1)}var eS=Object.assign({position:en},ei&&t4),ew=!0===es?(a={x:eu,y:ep},g=getWindow(W),v=a.x,j=a.y,{x:tH(v*(z=g.devicePixelRatio||1))/z||0,y:tH(j*z)/z||0}):{x:eu,y:ep};return(eu=ew.x,ep=ew.y,eo)?Object.assign({},eS,((B={})[ex]=eh?"0":"",B[eg]=em?"0":"",B.transform=1>=(ev.devicePixelRatio||1)?"translate("+eu+"px, "+ep+"px)":"translate3d("+eu+"px, "+ep+"px, 0)",B)):Object.assign({},eS,((H={})[ex]=eh?ep+"px":"",H[eg]=em?eu+"px":"",H.transform="",H))}var t3={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(n){return n.replace(/left|right|bottom|top/g,function(n){return t3[n]})}var t5={start:"end",end:"start"};function getOppositeVariationPlacement(n){return n.replace(/start|end/g,function(n){return t5[n]})}function contains(n,a){var g=a.getRootNode&&a.getRootNode();if(n.contains(a))return!0;if(g&&isShadowRoot(g)){var v=a;do{if(v&&n.isSameNode(v))return!0;v=v.parentNode||v.host}while(v)}return!1}function rectToClientRect(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function getClientRectFromMixedType(n,a,g){var v,j,z,H,B,W,K,ee,et,er;return a===tJ?rectToClientRect(function(n,a){var g=getWindow(n),v=getDocumentElement(n),j=g.visualViewport,z=v.clientWidth,H=v.clientHeight,B=0,W=0;if(j){z=j.width,H=j.height;var K=isLayoutViewport();(K||!K&&"fixed"===a)&&(B=j.offsetLeft,W=j.offsetTop)}return{width:z,height:H,x:B+getWindowScrollBarX(n),y:W}}(n,g)):isElement(a)?((v=getBoundingClientRect(a,!1,"fixed"===g)).top=v.top+a.clientTop,v.left=v.left+a.clientLeft,v.bottom=v.top+a.clientHeight,v.right=v.left+a.clientWidth,v.width=a.clientWidth,v.height=a.clientHeight,v.x=v.left,v.y=v.top,v):rectToClientRect((j=getDocumentElement(n),H=getDocumentElement(j),B=getWindowScroll(j),W=null==(z=j.ownerDocument)?void 0:z.body,K=tU(H.scrollWidth,H.clientWidth,W?W.scrollWidth:0,W?W.clientWidth:0),ee=tU(H.scrollHeight,H.clientHeight,W?W.scrollHeight:0,W?W.clientHeight:0),et=-B.scrollLeft+getWindowScrollBarX(j),er=-B.scrollTop,"rtl"===getComputedStyle_getComputedStyle(W||H).direction&&(et+=tU(H.clientWidth,W?W.clientWidth:0)-K),{width:K,height:ee,x:et,y:er}))}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(n){return Object.assign({},getFreshSideObject(),n)}function expandToHashMap(n,a){return a.reduce(function(a,g){return a[g]=n,a},{})}function detectOverflow(n,a){void 0===a&&(a={});var g,v,j,z,H,B,W,K=a,ee=K.placement,et=void 0===ee?n.placement:ee,er=K.strategy,en=void 0===er?n.strategy:er,eo=K.boundary,ei=K.rootBoundary,es=K.elementContext,el=void 0===es?tQ:es,ec=K.altBoundary,eu=K.padding,ed=void 0===eu?0:eu,ep=mergePaddingObject("number"!=typeof ed?ed:expandToHashMap(ed,tW)),ef=n.rects.popper,em=n.elements[void 0!==ec&&ec?el===tQ?"reference":tQ:el],eh=(g=isElement(em)?em:em.contextElement||getDocumentElement(n.elements.popper),B=(H=[].concat("clippingParents"===(v=void 0===eo?"clippingParents":eo)?(j=listScrollParents(getParentNode(g)),isElement(z=["absolute","fixed"].indexOf(getComputedStyle_getComputedStyle(g).position)>=0&&isHTMLElement(g)?getOffsetParent(g):g)?j.filter(function(n){return isElement(n)&&contains(n,z)&&"body"!==getNodeName(n)}):[]):[].concat(v),[void 0===ei?tJ:ei]))[0],(W=H.reduce(function(n,a){var v=getClientRectFromMixedType(g,a,en);return n.top=tU(v.top,n.top),n.right=tz(v.right,n.right),n.bottom=tz(v.bottom,n.bottom),n.left=tU(v.left,n.left),n},getClientRectFromMixedType(g,B,en))).width=W.right-W.left,W.height=W.bottom-W.top,W.x=W.left,W.y=W.top,W),eg=getBoundingClientRect(n.elements.reference),ex=computeOffsets({reference:eg,element:ef,strategy:"absolute",placement:et}),ev=rectToClientRect(Object.assign({},ef,ex)),ey=el===tQ?ev:eg,eb={top:eh.top-ey.top+ep.top,bottom:ey.bottom-eh.bottom+ep.bottom,left:eh.left-ey.left+ep.left,right:ey.right-eh.right+ep.right},e_=n.modifiersData.offset;if(el===tQ&&e_){var eS=e_[et];Object.keys(eb).forEach(function(n){var a=[t$,tB].indexOf(n)>=0?1:-1,g=["top",tB].indexOf(n)>=0?"y":"x";eb[n]+=eS[g]*a})}return eb}function within(n,a,g){return tU(n,tz(a,g))}function getSideOffsets(n,a,g){return void 0===g&&(g={x:0,y:0}),{top:n.top-a.height-g.y,right:n.right-a.width+g.x,bottom:n.bottom-a.height+g.y,left:n.left-a.width-g.x}}function isAnySideFullyClipped(n){return["top",t$,tB,tG].some(function(a){return n[a]>=0})}var t6=(K=void 0===(W=(B={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(n){var a=n.state,g=n.instance,v=n.options,j=v.scroll,z=void 0===j||j,H=v.resize,B=void 0===H||H,W=getWindow(a.elements.popper),K=[].concat(a.scrollParents.reference,a.scrollParents.popper);return z&&K.forEach(function(n){n.addEventListener("scroll",g.update,t2)}),B&&W.addEventListener("resize",g.update,t2),function(){z&&K.forEach(function(n){n.removeEventListener("scroll",g.update,t2)}),B&&W.removeEventListener("resize",g.update,t2)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(n){var a=n.state,g=n.name;a.modifiersData[g]=computeOffsets({reference:a.rects.reference,element:a.rects.popper,strategy:"absolute",placement:a.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(n){var a=n.state,g=n.options,v=g.gpuAcceleration,j=g.adaptive,z=g.roundOffsets,H=void 0===z||z,B={placement:getBasePlacement(a.placement),variation:getVariation(a.placement),popper:a.elements.popper,popperRect:a.rects.popper,gpuAcceleration:void 0===v||v,isFixed:"fixed"===a.options.strategy};null!=a.modifiersData.popperOffsets&&(a.styles.popper=Object.assign({},a.styles.popper,mapToStyles(Object.assign({},B,{offsets:a.modifiersData.popperOffsets,position:a.options.strategy,adaptive:void 0===j||j,roundOffsets:H})))),null!=a.modifiersData.arrow&&(a.styles.arrow=Object.assign({},a.styles.arrow,mapToStyles(Object.assign({},B,{offsets:a.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:H})))),a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-placement":a.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(n){var a=n.state;Object.keys(a.elements).forEach(function(n){var g=a.styles[n]||{},v=a.attributes[n]||{},j=a.elements[n];isHTMLElement(j)&&getNodeName(j)&&(Object.assign(j.style,g),Object.keys(v).forEach(function(n){var a=v[n];!1===a?j.removeAttribute(n):j.setAttribute(n,!0===a?"":a)}))})},effect:function(n){var a=n.state,g={popper:{position:a.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(a.elements.popper.style,g.popper),a.styles=g,a.elements.arrow&&Object.assign(a.elements.arrow.style,g.arrow),function(){Object.keys(a.elements).forEach(function(n){var v=a.elements[n],j=a.attributes[n]||{},z=Object.keys(a.styles.hasOwnProperty(n)?a.styles[n]:g[n]).reduce(function(n,a){return n[a]="",n},{});isHTMLElement(v)&&getNodeName(v)&&(Object.assign(v.style,z),Object.keys(j).forEach(function(n){v.removeAttribute(n)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var a=n.state,g=n.options,v=n.name,j=g.offset,z=void 0===j?[0,0]:j,H=tX.reduce(function(n,g){var v,j,H,B,W,K;return n[g]=(v=a.rects,H=[tG,"top"].indexOf(j=getBasePlacement(g))>=0?-1:1,W=(B="function"==typeof z?z(Object.assign({},v,{placement:g})):z)[0],K=B[1],W=W||0,K=(K||0)*H,[tG,t$].indexOf(j)>=0?{x:K,y:W}:{x:W,y:K}),n},{}),B=H[a.placement],W=B.x,K=B.y;null!=a.modifiersData.popperOffsets&&(a.modifiersData.popperOffsets.x+=W,a.modifiersData.popperOffsets.y+=K),a.modifiersData[v]=H}},{name:"flip",enabled:!0,phase:"main",fn:function(n){var a=n.state,g=n.options,v=n.name;if(!a.modifiersData[v]._skip){for(var j=g.mainAxis,z=void 0===j||j,H=g.altAxis,B=void 0===H||H,W=g.fallbackPlacements,K=g.padding,ee=g.boundary,et=g.rootBoundary,er=g.altBoundary,en=g.flipVariations,eo=void 0===en||en,ei=g.allowedAutoPlacements,es=a.options.placement,el=getBasePlacement(es)===es,ec=W||(el||!eo?[getOppositePlacement(es)]:function(n){if(getBasePlacement(n)===tq)return[];var a=getOppositePlacement(n);return[getOppositeVariationPlacement(n),a,getOppositeVariationPlacement(a)]}(es)),eu=[es].concat(ec).reduce(function(n,g){var v,j,z,H,B,W,er,en,es,el,ec,eu;return n.concat(getBasePlacement(g)===tq?(j=(v={placement:g,boundary:ee,rootBoundary:et,padding:K,flipVariations:eo,allowedAutoPlacements:ei}).placement,z=v.boundary,H=v.rootBoundary,B=v.padding,W=v.flipVariations,en=void 0===(er=v.allowedAutoPlacements)?tX:er,0===(ec=(el=(es=getVariation(j))?W?tY:tY.filter(function(n){return getVariation(n)===es}):tW).filter(function(n){return en.indexOf(n)>=0})).length&&(ec=el),Object.keys(eu=ec.reduce(function(n,g){return n[g]=detectOverflow(a,{placement:g,boundary:z,rootBoundary:H,padding:B})[getBasePlacement(g)],n},{})).sort(function(n,a){return eu[n]-eu[a]})):g)},[]),ed=a.rects.reference,ep=a.rects.popper,ef=new Map,em=!0,eh=eu[0],eg=0;eg=0,e_=eb?"width":"height",eS=detectOverflow(a,{placement:ex,boundary:ee,rootBoundary:et,altBoundary:er,padding:K}),ew=eb?ey?t$:tG:ey?tB:"top";ed[e_]>ep[e_]&&(ew=getOppositePlacement(ew));var ek=getOppositePlacement(ew),eO=[];if(z&&eO.push(eS[ev]<=0),B&&eO.push(eS[ew]<=0,eS[ek]<=0),eO.every(function(n){return n})){eh=ex,em=!1;break}ef.set(ex,eO)}if(em)for(var ej=eo?3:1,_loop=function(n){var a=eu.find(function(a){var g=ef.get(a);if(g)return g.slice(0,n).every(function(n){return n})});if(a)return eh=a,"break"},eC=ej;eC>0&&"break"!==_loop(eC);eC--);a.placement!==eh&&(a.modifiersData[v]._skip=!0,a.placement=eh,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(n){var a=n.state,g=n.options,v=n.name,j=g.mainAxis,z=g.altAxis,H=g.boundary,B=g.rootBoundary,W=g.altBoundary,K=g.padding,ee=g.tether,et=void 0===ee||ee,er=g.tetherOffset,en=void 0===er?0:er,eo=detectOverflow(a,{boundary:H,rootBoundary:B,padding:K,altBoundary:W}),ei=getBasePlacement(a.placement),es=getVariation(a.placement),el=!es,ec=getMainAxisFromPlacement(ei),eu="x"===ec?"y":"x",ed=a.modifiersData.popperOffsets,ep=a.rects.reference,ef=a.rects.popper,em="function"==typeof en?en(Object.assign({},a.rects,{placement:a.placement})):en,eh="number"==typeof em?{mainAxis:em,altAxis:em}:Object.assign({mainAxis:0,altAxis:0},em),eg=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,ex={x:0,y:0};if(ed){if(void 0===j||j){var ev,ey="y"===ec?"top":tG,eb="y"===ec?tB:t$,e_="y"===ec?"height":"width",eS=ed[ec],ew=eS+eo[ey],ek=eS-eo[eb],eO=et?-ef[e_]/2:0,ej=es===tK?ep[e_]:ef[e_],eC=es===tK?-ef[e_]:-ep[e_],eP=a.elements.arrow,eE=et&&eP?getLayoutRect(eP):{width:0,height:0},eI=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:getFreshSideObject(),eT=eI[ey],eM=eI[eb],eA=within(0,ep[e_],eE[e_]),eN=el?ep[e_]/2-eO-eA-eT-eh.mainAxis:ej-eA-eT-eh.mainAxis,eR=el?-ep[e_]/2+eO+eA+eM+eh.mainAxis:eC+eA+eM+eh.mainAxis,eD=a.elements.arrow&&getOffsetParent(a.elements.arrow),eL=eD?"y"===ec?eD.clientTop||0:eD.clientLeft||0:0,eZ=null!=(ev=null==eg?void 0:eg[ec])?ev:0,eF=eS+eN-eZ-eL,eV=eS+eR-eZ,eU=within(et?tz(ew,eF):ew,eS,et?tU(ek,eV):ek);ed[ec]=eU,ex[ec]=eU-eS}if(void 0!==z&&z){var ez,eH,eB="x"===ec?"top":tG,e$="x"===ec?tB:t$,eG=ed[eu],eq="y"===eu?"height":"width",eW=eG+eo[eB],eK=eG-eo[e$],eJ=-1!==["top",tG].indexOf(ei),eQ=null!=(eH=null==eg?void 0:eg[eu])?eH:0,eY=eJ?eW:eG-ep[eq]-ef[eq]-eQ+eh.altAxis,eX=eJ?eG+ep[eq]+ef[eq]-eQ-eh.altAxis:eK,e0=et&&eJ?(ez=within(eY,eG,eX))>eX?eX:ez:within(et?eY:eW,eG,et?eX:eK);ed[eu]=e0,ex[eu]=e0-eG}a.modifiersData[v]=ex}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(n){var a,g,v=n.state,j=n.name,z=n.options,H=v.elements.arrow,B=v.modifiersData.popperOffsets,W=getBasePlacement(v.placement),K=getMainAxisFromPlacement(W),ee=[tG,t$].indexOf(W)>=0?"height":"width";if(H&&B){var et=mergePaddingObject("number"!=typeof(a="function"==typeof(a=z.padding)?a(Object.assign({},v.rects,{placement:v.placement})):a)?a:expandToHashMap(a,tW)),er=getLayoutRect(H),en="y"===K?"top":tG,eo="y"===K?tB:t$,ei=v.rects.reference[ee]+v.rects.reference[K]-B[K]-v.rects.popper[ee],es=B[K]-v.rects.reference[K],el=getOffsetParent(H),ec=el?"y"===K?el.clientHeight||0:el.clientWidth||0:0,eu=et[en],ed=ec-er[ee]-et[eo],ep=ec/2-er[ee]/2+(ei/2-es/2),ef=within(eu,ep,ed);v.modifiersData[j]=((g={})[K]=ef,g.centerOffset=ef-ep,g)}},effect:function(n){var a=n.state,g=n.options.element,v=void 0===g?"[data-popper-arrow]":g;null!=v&&("string"!=typeof v||(v=a.elements.popper.querySelector(v)))&&contains(a.elements.popper,v)&&(a.elements.arrow=v)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(n){var a=n.state,g=n.name,v=a.rects.reference,j=a.rects.popper,z=a.modifiersData.preventOverflow,H=detectOverflow(a,{elementContext:"reference"}),B=detectOverflow(a,{altBoundary:!0}),W=getSideOffsets(H,v),K=getSideOffsets(B,j,z),ee=isAnySideFullyClipped(W),et=isAnySideFullyClipped(K);a.modifiersData[g]={referenceClippingOffsets:W,popperEscapeOffsets:K,isReferenceHidden:ee,hasPopperEscaped:et},a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-reference-hidden":ee,"data-popper-escaped":et})}}]}).defaultModifiers)?[]:W,et=void 0===(ee=B.defaultOptions)?t1:ee,function(n,a,g){void 0===g&&(g=et);var v,j={placement:"bottom",orderedModifiers:[],options:Object.assign({},t1,et),modifiersData:{},elements:{reference:n,popper:a},attributes:{},styles:{}},z=[],H=!1,B={state:j,setOptions:function(g){var v,H,W,ee,er,en="function"==typeof g?g(j.options):g;cleanupModifierEffects(),j.options=Object.assign({},et,j.options,en),j.scrollParents={reference:isElement(n)?listScrollParents(n):n.contextElement?listScrollParents(n.contextElement):[],popper:listScrollParents(a)};var eo=(H=Object.keys(v=[].concat(K,j.options.modifiers).reduce(function(n,a){var g=n[a.name];return n[a.name]=g?Object.assign({},g,a,{options:Object.assign({},g.options,a.options),data:Object.assign({},g.data,a.data)}):a,n},{})).map(function(n){return v[n]}),W=new Map,ee=new Set,er=[],H.forEach(function(n){W.set(n.name,n)}),H.forEach(function(n){ee.has(n.name)||function sort(n){ee.add(n.name),[].concat(n.requires||[],n.requiresIfExists||[]).forEach(function(n){if(!ee.has(n)){var a=W.get(n);a&&sort(a)}}),er.push(n)}(n)}),t0.reduce(function(n,a){return n.concat(er.filter(function(n){return n.phase===a}))},[]));return j.orderedModifiers=eo.filter(function(n){return n.enabled}),j.orderedModifiers.forEach(function(n){var a=n.name,g=n.options,v=n.effect;if("function"==typeof v){var H=v({state:j,name:a,instance:B,options:void 0===g?{}:g});z.push(H||function(){})}}),B.update()},forceUpdate:function(){if(!H){var n,a,g,v,z,W,K,ee,et,er,en,eo,ei=j.elements,es=ei.reference,el=ei.popper;if(areValidElements(es,el)){j.rects={reference:(a=getOffsetParent(el),g="fixed"===j.options.strategy,v=isHTMLElement(a),ee=isHTMLElement(a)&&(W=tH((z=a.getBoundingClientRect()).width)/a.offsetWidth||1,K=tH(z.height)/a.offsetHeight||1,1!==W||1!==K),et=getDocumentElement(a),er=getBoundingClientRect(es,ee,g),en={scrollLeft:0,scrollTop:0},eo={x:0,y:0},(v||!v&&!g)&&(("body"!==getNodeName(a)||isScrollParent(et))&&(en=(n=a)!==getWindow(n)&&isHTMLElement(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:getWindowScroll(n)),isHTMLElement(a)?(eo=getBoundingClientRect(a,!0),eo.x+=a.clientLeft,eo.y+=a.clientTop):et&&(eo.x=getWindowScrollBarX(et))),{x:er.left+en.scrollLeft-eo.x,y:er.top+en.scrollTop-eo.y,width:er.width,height:er.height}),popper:getLayoutRect(el)},j.reset=!1,j.placement=j.options.placement,j.orderedModifiers.forEach(function(n){return j.modifiersData[n.name]=Object.assign({},n.data)});for(var ec=0;ec=v))));a++);if(g)return z?qa(W,v,0):void(a[a.length]=W)}return!g&&W}function qa(n,a,g){return n=1===n.length?n[0]:[].concat.apply([],n),g||n.length>a?n.slice(g,g+a):n}function ra(n,a,g,v){return n=g?(n=n[(v=v&&a>g)?a:g])&&n[v?g:a]:n[a]}function Q(n,a,g,v,j){let z=0;if(n.constructor===Array){if(j)-1!==(a=n.indexOf(a))?1=this.B&&(et||!ee[eo])){var z=O(er,v,en),H="";switch(this.G){case"full":if(2z;B--)if(B-z>=this.B){var W=O(er,v,en,j,z);P(this,ee,H=eo.substring(z,B),W,n,g)}break}case"reverse":if(1=this.B&&P(this,ee,H,O(er,v,en,j,B),n,g);H=""}case"forward":if(1=this.B&&P(this,ee,H,z,n,g);break}default:if(this.C&&(z=Math.min(z/this.C(a,eo,en)|0,er-1)),P(this,ee,eo,z,n,g),et&&1=this.B&&!j[eo]){j[eo]=1;let a=this.l&&eo>z;P(this,K,a?z:eo,O(H+(v/2>H?0:1),v,en,B-1,W-1),n,g,a?eo:z)}}}}}this.m||(this.register[n]=1)}}return this},eS.search=function(n,a,g){let v,j,z;g||(!a&&D(n)?n=(g=n).query:D(a)&&(g=a));let H=[],B,W,K=0;if(g){n=g.query||n,a=g.limit,K=g.offset||0;var ee=g.context;W=g.suggest}if(n&&1<(B=(n=this.encode(""+n)).length)){g=x();var et=[];for(let a=0,v=0,j;a=this.B&&!g[j]){if(!this.s&&!W&&!this.map[j])return H;et[v++]=j,g[j]=1}B=(n=et).length}if(!B)return H;for(a||(a=100),ee=this.depth&&1{z=n})),j||(j=0)){case 0:if(H="reg",this.m)for(let n in B=x(),this.register)B[n]=1;else B=this.register;break;case 1:H="cfg",B={doc:0,opt:this.s?1:0};break;case 2:H="map",B=this.map;break;case 3:H="ctx",B=this.h;break;default:void 0===g&&z&&z();return}return oa(n,a||this,g,H,v,j,B,z),W},eS.import=function(n,a){if(a)switch(C(a)&&(a=JSON.parse(a)),n){case"cfg":this.s=!!a.opt;break;case"reg":this.m=!1,this.register=a;break;case"map":this.map=a;break;case"ctx":this.h=a}},ia(N.prototype);let rr=0;function flexsearch_bundle_module_min_S(n){var a;if(!(this instanceof flexsearch_bundle_module_min_S))return new flexsearch_bundle_module_min_S(n);n?E(a=n.encode)&&(n.encode=a.toString()):n={},(a=(self||window)._factory)&&(a=a.toString());let v="undefined"==typeof window&&self.exports,j=this;this.o=function(n,a,v){let j;try{j=a?new(g(5184)).Worker("//node/node.js"):n?new Worker(URL.createObjectURL(new Blob(["onmessage="+sa.toString()],{type:"text/javascript"}))):new Worker(C(v)?v:"worker/worker.js",{type:"module"})}catch(n){}return j}(a,v,n.worker),this.h=x(),this.o&&(v?this.o.on("message",function(n){j.h[n.id](n.msg),delete j.h[n.id]}):this.o.onmessage=function(n){n=n.data,j.h[n.id](n.msg),delete j.h[n.id]},this.o.postMessage({task:"init",factory:a,options:n}))}function T(n){flexsearch_bundle_module_min_S.prototype[n]=flexsearch_bundle_module_min_S.prototype[n+"Async"]=function(){let a;let g=this,v=[].slice.call(arguments);var j=v[v.length-1];return E(j)&&(a=j,v.splice(v.length-1,1)),j=new Promise(function(a){setTimeout(function(){g.h[++rr]=a,g.o.postMessage({task:n,id:rr,args:v})})}),a?(j.then(a),this):j}}function U(n){if(!(this instanceof U))return new U(n);var a,g=n.document||n.doc||n;this.K=[],this.h=[],this.A=[],this.register=x(),this.key=(a=g.key||g.id)&&V(a,this.A)||"id",this.m=flexsearch_bundle_module_min_u(n.fastupdate),this.C=(a=g.store)&&!0!==a&&[],this.store=a&&x(),this.I=(a=g.tag)&&V(a,this.A),this.l=a&&x(),this.cache=(a=n.cache)&&new M(a),n.cache=!1,this.o=n.worker,this.async=!1,a=x();let v=g.index||g.field||g;C(v)&&(v=[v]);for(let g=0,j,z;ga||g)&&(j=j.slice(g,g+a)),v&&(j=wa.call(this,j)),{tag:n,result:j}}function wa(n){let a=Array(n.length);for(let g=0,v;g{z=n})),j||(j=0),v||(v=0),v()=>n.dispose(),[n]),n}var rd=g(9140),rp=g(8656),rf=g(93),rm=g(121),rh=g(1963),rg=g(3142),rx=g(2549);function transition_g(n,...a){n&&a.length>0&&n.classList.add(...a)}function transition_v(n,...a){n&&a.length>0&&n.classList.remove(...a)}let rv=(0,eP.createContext)(null);rv.displayName="OpenClosedContext";var ry=((er=ry||{})[er.Open=1]="Open",er[er.Closed=2]="Closed",er[er.Closing=4]="Closing",er[er.Opening=8]="Opening",er);function open_closed_u(){return(0,eP.useContext)(rv)}function open_closed_s({value:n,children:a}){return eP.createElement(rv.Provider,{value:n},a)}var rb=g(9363),r_=g(2184);function transition_S(n=""){return n.split(/\s+/).filter(n=>n.length>1)}let rS=(0,eP.createContext)(null);rS.displayName="TransitionContext";var rw=((en=rw||{}).Visible="visible",en.Hidden="hidden",en);let rk=(0,eP.createContext)(null);function transition_U(n){return"children"in n?transition_U(n.children):n.current.filter(({el:n})=>null!==n.current).filter(({state:n})=>"visible"===n).length>0}function se(n,a){let g=(0,rm.E)(n),v=(0,eP.useRef)([]),j=(0,rp.t)(),z=use_disposables_p(),H=(0,rd.z)((n,a=r_.l4.Hidden)=>{let H=v.current.findIndex(({el:a})=>a===n);-1!==H&&((0,rx.E)(a,{[r_.l4.Unmount](){v.current.splice(H,1)},[r_.l4.Hidden](){v.current[H].state="hidden"}}),z.microTask(()=>{var n;!transition_U(v)&&j.current&&(null==(n=g.current)||n.call(g))}))}),B=(0,rd.z)(n=>{let a=v.current.find(({el:a})=>a===n);return a?"visible"!==a.state&&(a.state="visible"):v.current.push({el:n,state:"visible"}),()=>H(n,r_.l4.Unmount)}),W=(0,eP.useRef)([]),K=(0,eP.useRef)(Promise.resolve()),ee=(0,eP.useRef)({enter:[],leave:[],idle:[]}),et=(0,rd.z)((n,g,v)=>{W.current.splice(0),a&&(a.chains.current[g]=a.chains.current[g].filter(([a])=>a!==n)),null==a||a.chains.current[g].push([n,new Promise(n=>{W.current.push(n)})]),null==a||a.chains.current[g].push([n,new Promise(n=>{Promise.all(ee.current[g].map(([n,a])=>a)).then(()=>n())})]),"enter"===g?K.current=K.current.then(()=>null==a?void 0:a.wait.current).then(()=>v(g)):v(g)}),er=(0,rd.z)((n,a,g)=>{Promise.all(ee.current[a].splice(0).map(([n,a])=>a)).then(()=>{var n;null==(n=W.current.shift())||n()}).then(()=>g(a))});return(0,eP.useMemo)(()=>({children:v,register:B,unregister:H,onStart:et,onStop:er,wait:K,chains:ee}),[B,H,v,et,er,ee,K])}function Ne(){}rk.displayName="NestingContext";let rO=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ae(n){var a;let g={};for(let v of rO)g[v]=null!=(a=n[v])?a:Ne;return g}let rj=r_.AN.RenderStrategy,rC=(0,r_.yV)(function(n,a){let{show:g,appear:v=!1,unmount:j=!0,...z}=n,H=(0,eP.useRef)(null),B=(0,rg.T)(H,a);(0,rh.H)();let W=open_closed_u();if(void 0===g&&null!==W&&(g=(W&ry.Open)===ry.Open),![!0,!1].includes(g))throw Error("A is used but it is missing a `show={true | false}` prop.");let[K,ee]=(0,eP.useState)(g?"visible":"hidden"),et=se(()=>{ee("hidden")}),[er,en]=(0,eP.useState)(!0),eo=(0,eP.useRef)([g]);(0,rf.e)(()=>{!1!==er&&eo.current[eo.current.length-1]!==g&&(eo.current.push(g),en(!1))},[eo,g]);let ei=(0,eP.useMemo)(()=>({show:g,appear:v,initial:er}),[g,v,er]);(0,eP.useEffect)(()=>{if(g)ee("visible");else if(transition_U(et)){let n=H.current;if(!n)return;let a=n.getBoundingClientRect();0===a.x&&0===a.y&&0===a.width&&0===a.height&&ee("hidden")}else ee("hidden")},[g,et]);let es={unmount:j},el=(0,rd.z)(()=>{var a;er&&en(!1),null==(a=n.beforeEnter)||a.call(n)}),ec=(0,rd.z)(()=>{var a;er&&en(!1),null==(a=n.beforeLeave)||a.call(n)});return eP.createElement(rk.Provider,{value:et},eP.createElement(rS.Provider,{value:ei},(0,r_.sY)({ourProps:{...es,as:eP.Fragment,children:eP.createElement(rP,{ref:B,...es,...z,beforeEnter:el,beforeLeave:ec})},theirProps:{},defaultTag:eP.Fragment,features:rj,visible:"visible"===K,name:"Transition"})))}),rP=(0,r_.yV)(function(n,a){var g,v,j;let z;let{beforeEnter:H,afterEnter:B,beforeLeave:W,afterLeave:K,enter:ee,enterFrom:et,enterTo:er,entered:en,leave:eo,leaveFrom:ei,leaveTo:es,...el}=n,ec=(0,eP.useRef)(null),eu=(0,rg.T)(ec,a),ed=null==(g=el.unmount)||g?r_.l4.Unmount:r_.l4.Hidden,{show:ep,appear:ef,initial:em}=function(){let n=(0,eP.useContext)(rS);if(null===n)throw Error("A is used but it is missing a parent or .");return n}(),[eh,eg]=(0,eP.useState)(ep?"visible":"hidden"),ex=function(){let n=(0,eP.useContext)(rk);if(null===n)throw Error("A is used but it is missing a parent or .");return n}(),{register:ev,unregister:ey}=ex;(0,eP.useEffect)(()=>ev(ec),[ev,ec]),(0,eP.useEffect)(()=>{if(ed===r_.l4.Hidden&&ec.current){if(ep&&"visible"!==eh){eg("visible");return}return(0,rx.E)(eh,{hidden:()=>ey(ec),visible:()=>ev(ec)})}},[eh,ec,ev,ey,ep,ed]);let eb=(0,rm.E)({base:transition_S(el.className),enter:transition_S(ee),enterFrom:transition_S(et),enterTo:transition_S(er),entered:transition_S(en),leave:transition_S(eo),leaveFrom:transition_S(ei),leaveTo:transition_S(es)}),e_=(j={beforeEnter:H,afterEnter:B,beforeLeave:W,afterLeave:K},z=(0,eP.useRef)(ae(j)),(0,eP.useEffect)(()=>{z.current=ae(j)},[j]),z),eS=(0,rh.H)();(0,eP.useEffect)(()=>{if(eS&&"visible"===eh&&null===ec.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[ec,eh,eS]);let ew=ef&&ep&&em,ek=eS&&(!em||ef)?ep?"enter":"leave":"idle",eO=function(n=0){let[a,g]=(0,eP.useState)(n),v=(0,rp.t)(),j=(0,eP.useCallback)(n=>{v.current&&g(a=>a|n)},[a,v]),z=(0,eP.useCallback)(n=>!!(a&n),[a]);return{flags:a,addFlag:j,hasFlag:z,removeFlag:(0,eP.useCallback)(n=>{v.current&&g(a=>a&~n)},[g,v]),toggleFlag:(0,eP.useCallback)(n=>{v.current&&g(a=>a^n)},[g])}}(0),ej=(0,rd.z)(n=>(0,rx.E)(n,{enter:()=>{eO.addFlag(ry.Opening),e_.current.beforeEnter()},leave:()=>{eO.addFlag(ry.Closing),e_.current.beforeLeave()},idle:()=>{}})),eC=(0,rd.z)(n=>(0,rx.E)(n,{enter:()=>{eO.removeFlag(ry.Opening),e_.current.afterEnter()},leave:()=>{eO.removeFlag(ry.Closing),e_.current.afterLeave()},idle:()=>{}})),eE=se(()=>{eg("hidden"),ey(ec)},ex),eI=(0,eP.useRef)(!1);!function({immediate:n,container:a,direction:g,classes:v,onStart:j,onStop:z}){let H=(0,rp.t)(),B=use_disposables_p(),W=(0,rm.E)(g);(0,rf.e)(()=>{n&&(W.current="enter")},[n]),(0,rf.e)(()=>{let n=(0,ru.k)();B.add(n.dispose);let g=a.current;if(g&&"idle"!==W.current&&H.current){var K,ee,et;let a,H,B,er,en,eo,ei;return n.dispose(),j.current(W.current),n.add((K=v.current,ee="enter"===W.current,et=()=>{n.dispose(),z.current(W.current)},H=ee?"enter":"leave",B=(0,ru.k)(),er=void 0!==et?(a={called:!1},(...n)=>{if(!a.called)return a.called=!0,et(...n)}):()=>{},"enter"===H&&(g.removeAttribute("hidden"),g.style.display=""),en=(0,rx.E)(H,{enter:()=>K.enter,leave:()=>K.leave}),eo=(0,rx.E)(H,{enter:()=>K.enterTo,leave:()=>K.leaveTo}),ei=(0,rx.E)(H,{enter:()=>K.enterFrom,leave:()=>K.leaveFrom}),transition_v(g,...K.base,...K.enter,...K.enterTo,...K.enterFrom,...K.leave,...K.leaveFrom,...K.leaveTo,...K.entered),transition_g(g,...K.base,...en,...ei),B.nextFrame(()=>{transition_v(g,...K.base,...en,...ei),transition_g(g,...K.base,...en,...eo),function(n,a){let g=(0,ru.k)();if(!n)return g.dispose;let{transitionDuration:v,transitionDelay:j}=getComputedStyle(n),[z,H]=[v,j].map(n=>{let[a=0]=n.split(",").filter(Boolean).map(n=>n.includes("ms")?parseFloat(n):1e3*parseFloat(n)).sort((n,a)=>a-n);return a}),B=z+H;if(0!==B){g.group(g=>{g.setTimeout(()=>{a(),g.dispose()},B),g.addEventListener(n,"transitionrun",n=>{n.target===n.currentTarget&&g.dispose()})});let v=g.addEventListener(n,"transitionend",n=>{n.target===n.currentTarget&&(a(),v())})}else a();g.add(()=>a()),g.dispose}(g,()=>(transition_v(g,...K.base,...en),transition_g(g,...K.base,...K.entered),er()))}),B.dispose)),n.dispose}},[g])}({immediate:ew,container:ec,classes:eb,direction:ek,onStart:(0,rm.E)(n=>{eI.current=!0,eE.onStart(ec,n,ej)}),onStop:(0,rm.E)(n=>{eI.current=!1,eE.onStop(ec,n,eC),"leave"!==n||transition_U(eE)||(eg("hidden"),ey(ec))})});let eT=el;return ew?eT={...eT,className:(0,rb.A)(el.className,...eb.current.enter,...eb.current.enterFrom)}:eI.current&&(eT.className=(0,rb.A)(el.className,null==(v=ec.current)?void 0:v.className),""===eT.className&&delete eT.className),eP.createElement(rk.Provider,{value:eE},eP.createElement(open_closed_s,{value:(0,rx.E)(eh,{visible:ry.Open,hidden:ry.Closed})|eO.flags},(0,r_.sY)({ourProps:{ref:eu},theirProps:eT,defaultTag:"div",features:rj,visible:"visible"===eh,name:"Transition.Child"})))}),rE=(0,r_.yV)(function(n,a){let g=null!==(0,eP.useContext)(rS),v=null!==open_closed_u();return eP.createElement(eP.Fragment,null,!g&&v?eP.createElement(rC,{ref:a,...n}):eP.createElement(rP,{ref:a,...n}))}),rI=Object.assign(rC,{Child:rE,Root:rC});var rT=g(4407);function use_computed_i(n,a){let[g,v]=(0,eP.useState)(n),j=(0,rm.E)(n);return(0,rf.e)(()=>v(j.current),[j,v,...a]),g}var rM=g(2410),rA=g(4830);function use_document_event_d(n,a,g){let v=(0,rm.E)(a);(0,eP.useEffect)(()=>{function t(n){v.current(n)}return document.addEventListener(n,t,g),()=>document.removeEventListener(n,t,g)},[n,g])}function use_outside_click_y(n,a,g=!0){var v;let j,z=(0,eP.useRef)(!1);function c(g,v){if(!z.current||g.defaultPrevented)return;let j=v(g);if(null!==j&&j.getRootNode().contains(j)&&j.isConnected){for(let a of function u(n){return"function"==typeof n?u(n()):Array.isArray(n)||n instanceof Set?n:[n]}(n)){if(null===a)continue;let n=a instanceof HTMLElement?a:a.current;if(null!=n&&n.contains(j)||g.composed&&g.composedPath().includes(n))return}return(0,rA.sP)(j,rA.tJ.Loose)||-1===j.tabIndex||g.preventDefault(),a(g,j)}}(0,eP.useEffect)(()=>{requestAnimationFrame(()=>{z.current=g})},[g]);let H=(0,eP.useRef)(null);use_document_event_d("pointerdown",n=>{var a,g;z.current&&(H.current=(null==(g=null==(a=n.composedPath)?void 0:a.call(n))?void 0:g[0])||n.target)},!0),use_document_event_d("mousedown",n=>{var a,g;z.current&&(H.current=(null==(g=null==(a=n.composedPath)?void 0:a.call(n))?void 0:g[0])||n.target)},!0),use_document_event_d("click",n=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||H.current&&(c(n,()=>H.current),H.current=null)},!0),use_document_event_d("touchend",n=>c(n,()=>n.target instanceof HTMLElement?n.target:null),!0),v="blur",j=(0,rm.E)(n=>c(n,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null)),(0,eP.useEffect)(()=>{function t(n){j.current(n)}return window.addEventListener(v,t,!0),()=>window.removeEventListener(v,t,!0)},[v,!0])}var rN=g(2412);let rR=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(n){var a,g;let v=null!=(a=n.innerText)?a:"",j=n.cloneNode(!0);if(!(j instanceof HTMLElement))return v;let z=!1;for(let n of j.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))n.remove(),z=!0;let H=z?null!=(g=j.innerText)?g:"":v;return rR.test(H)&&(H=H.replace(rR,"")),H}function use_text_value_s(n){let a=(0,eP.useRef)(""),g=(0,eP.useRef)("");return(0,rd.z)(()=>{let v=n.current;if(!v)return"";let j=v.innerText;if(a.current===j)return g.current;let z=(function(n){let a=n.getAttribute("aria-label");if("string"==typeof a)return a.trim();let g=n.getAttribute("aria-labelledby");if(g){let n=g.split(" ").map(n=>{let a=document.getElementById(n);if(a){let n=a.getAttribute("aria-label");return"string"==typeof n?n.trim():o(a).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return o(n).trim()})(v).trim().toLowerCase();return a.current=j,g.current=z,z})}function use_tracked_pointer_t(n){return[n.screenX,n.screenY]}function use_tracked_pointer_u(){let n=(0,eP.useRef)([-1,-1]);return{wasMoved(a){let g=use_tracked_pointer_t(a);return(n.current[0]!==g[0]||n.current[1]!==g[1])&&(n.current=g,!0)},update(a){n.current=use_tracked_pointer_t(a)}}}var rD=g(4538);function bugs_r(n){let a=n.parentElement,g=null;for(;a&&!(a instanceof HTMLFieldSetElement);)a instanceof HTMLLegendElement&&(g=a),a=a.parentElement;let v=(null==a?void 0:a.getAttribute("disabled"))==="";return!(v&&function(n){if(!n)return!1;let a=n.previousElementSibling;for(;null!==a;){if(a instanceof HTMLLegendElement)return!1;a=a.previousElementSibling}return!0}(g))&&v}var rL=((eo=rL||{})[eo.First=0]="First",eo[eo.Previous=1]="Previous",eo[eo.Next=2]="Next",eo[eo.Last=3]="Last",eo[eo.Specific=4]="Specific",eo[eo.Nothing=5]="Nothing",eo);function calculate_active_index_f(n,a){let g=a.resolveItems();if(g.length<=0)return null;let v=a.resolveActiveIndex(),j=null!=v?v:-1;switch(n.focus){case 0:for(let n=0;n=0;--n)if(!a.resolveDisabled(g[n],n,g))return n;return v;case 2:for(let n=j+1;n=0;--n)if(!a.resolveDisabled(g[n],n,g))return n;return v;case 4:for(let v=0;vn){let g=null!==n.activeOptionIndex?n.options[n.activeOptionIndex]:null,v=(0,rA.z2)(a(n.options.slice()),n=>n.dataRef.current.domRef.current),j=g?v.indexOf(g):null;return -1===j&&(j=null),{options:v,activeOptionIndex:j}}let rB={1:n=>n.dataRef.current.disabled||1===n.listboxState?n:{...n,activeOptionIndex:null,listboxState:1},0(n){if(n.dataRef.current.disabled||0===n.listboxState)return n;let a=n.activeOptionIndex,{isSelected:g}=n.dataRef.current,v=n.options.findIndex(n=>g(n.dataRef.current.value));return -1!==v&&(a=v),{...n,listboxState:0,activeOptionIndex:a}},2(n,a){var g;if(n.dataRef.current.disabled||1===n.listboxState)return n;let v=listbox_z(n),j=calculate_active_index_f(a,{resolveItems:()=>v.options,resolveActiveIndex:()=>v.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...n,...v,searchQuery:"",activeOptionIndex:j,activationTrigger:null!=(g=a.trigger)?g:1}},3:(n,a)=>{if(n.dataRef.current.disabled||1===n.listboxState)return n;let g=""!==n.searchQuery?0:1,v=n.searchQuery+a.value.toLowerCase(),j=(null!==n.activeOptionIndex?n.options.slice(n.activeOptionIndex+g).concat(n.options.slice(0,n.activeOptionIndex+g)):n.options).find(n=>{var a;return!n.dataRef.current.disabled&&(null==(a=n.dataRef.current.textValue)?void 0:a.startsWith(v))}),z=j?n.options.indexOf(j):-1;return -1===z||z===n.activeOptionIndex?{...n,searchQuery:v}:{...n,searchQuery:v,activeOptionIndex:z,activationTrigger:1}},4:n=>n.dataRef.current.disabled||1===n.listboxState||""===n.searchQuery?n:{...n,searchQuery:""},5:(n,a)=>{let g={id:a.id,dataRef:a.dataRef},v=listbox_z(n,n=>[...n,g]);return null===n.activeOptionIndex&&n.dataRef.current.isSelected(a.dataRef.current.value)&&(v.activeOptionIndex=v.options.indexOf(g)),{...n,...v}},6:(n,a)=>{let g=listbox_z(n,n=>{let g=n.findIndex(n=>n.id===a.id);return -1!==g&&n.splice(g,1),n});return{...n,...g,activationTrigger:1}},7:(n,a)=>({...n,labelId:a.id})},r$=(0,eP.createContext)(null);function k(n){let a=(0,eP.useContext)(r$);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,k),a}return a}r$.displayName="ListboxActionsContext";let rG=(0,eP.createContext)(null);function w(n){let a=(0,eP.useContext)(rG);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,w),a}return a}function Ve(n,a){return(0,rx.E)(a.type,rB,n,a)}rG.displayName="ListboxDataContext";let rq=eP.Fragment,rW=r_.AN.RenderStrategy|r_.AN.Static,rK=Object.assign((0,r_.yV)(function(n,a){let{value:g,defaultValue:v,form:j,name:z,onChange:H,by:B=(n,a)=>n===a,disabled:W=!1,horizontal:K=!1,multiple:ee=!1,...et}=n,er=K?"horizontal":"vertical",en=(0,rg.T)(a),[eo=ee?[]:void 0,ei]=function(n,a,g){let[v,j]=(0,eP.useState)(g),z=void 0!==n,H=(0,eP.useRef)(z),B=(0,eP.useRef)(!1),W=(0,eP.useRef)(!1);return!z||H.current||B.current?z||!H.current||W.current||(W.current=!0,H.current=z,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(B.current=!0,H.current=z,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[z?n:v,(0,rd.z)(n=>(z||j(n),null==a?void 0:a(n)))]}(g,H,v),[es,el]=(0,eP.useReducer)(Ve,{dataRef:(0,eP.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),ec=(0,eP.useRef)({static:!1,hold:!1}),eu=(0,eP.useRef)(null),ed=(0,eP.useRef)(null),ep=(0,eP.useRef)(null),ef=(0,rd.z)("string"==typeof B?(n,a)=>(null==n?void 0:n[B])===(null==a?void 0:a[B]):B),em=(0,eP.useCallback)(n=>(0,rx.E)(eh.mode,{1:()=>eo.some(a=>ef(a,n)),0:()=>ef(eo,n)}),[eo]),eh=(0,eP.useMemo)(()=>({...es,value:eo,disabled:W,mode:ee?1:0,orientation:er,compare:ef,isSelected:em,optionsPropsRef:ec,labelRef:eu,buttonRef:ed,optionsRef:ep}),[eo,W,ee,es]);(0,rf.e)(()=>{es.dataRef.current=eh},[eh]),use_outside_click_y([eh.buttonRef,eh.optionsRef],(n,a)=>{var g;el({type:1}),(0,rA.sP)(a,rA.tJ.Loose)||(n.preventDefault(),null==(g=eh.buttonRef.current)||g.focus())},0===eh.listboxState);let eg=(0,eP.useMemo)(()=>({open:0===eh.listboxState,disabled:W,value:eo}),[eh,W,eo]),ex=(0,rd.z)(n=>{let a=eh.options.find(a=>a.id===n);a&&ek(a.dataRef.current.value)}),ev=(0,rd.z)(()=>{if(null!==eh.activeOptionIndex){let{dataRef:n,id:a}=eh.options[eh.activeOptionIndex];ek(n.current.value),el({type:2,focus:rL.Specific,id:a})}}),ey=(0,rd.z)(()=>el({type:0})),eb=(0,rd.z)(()=>el({type:1})),e_=(0,rd.z)((n,a,g)=>n===rL.Specific?el({type:2,focus:rL.Specific,id:a,trigger:g}):el({type:2,focus:n,trigger:g})),eS=(0,rd.z)((n,a)=>(el({type:5,id:n,dataRef:a}),()=>el({type:6,id:n}))),ew=(0,rd.z)(n=>(el({type:7,id:n}),()=>el({type:7,id:null}))),ek=(0,rd.z)(n=>(0,rx.E)(eh.mode,{0:()=>null==ei?void 0:ei(n),1(){let a=eh.value.slice(),g=a.findIndex(a=>ef(a,n));return -1===g?a.push(n):a.splice(g,1),null==ei?void 0:ei(a)}})),eO=(0,rd.z)(n=>el({type:3,value:n})),ej=(0,rd.z)(()=>el({type:4})),eC=(0,eP.useMemo)(()=>({onChange:ek,registerOption:eS,registerLabel:ew,goToOption:e_,closeListbox:eb,openListbox:ey,selectActiveOption:ev,selectOption:ex,search:eO,clearSearch:ej}),[]),eE=(0,eP.useRef)(null),eI=use_disposables_p();return(0,eP.useEffect)(()=>{eE.current&&void 0!==v&&eI.addEventListener(eE.current,"reset",()=>{null==ei||ei(v)})},[eE,ei]),eP.createElement(r$.Provider,{value:eC},eP.createElement(rG.Provider,{value:eh},eP.createElement(open_closed_s,{value:(0,rx.E)(eh.listboxState,{0:ry.Open,1:ry.Closed})},null!=z&&null!=eo&&(function form_e(n={},a=null,g=[]){for(let[v,j]of Object.entries(n))!function form_o(n,a,g){if(Array.isArray(g))for(let[v,j]of g.entries())form_o(n,form_f(a,v.toString()),j);else g instanceof Date?n.push([a,g.toISOString()]):"boolean"==typeof g?n.push([a,g?"1":"0"]):"string"==typeof g?n.push([a,g]):"number"==typeof g?n.push([a,`${g}`]):null==g?n.push([a,""]):form_e(g,a,n)}(g,form_f(a,v),j);return g})({[z]:eo}).map(([n,a],g)=>eP.createElement(rD._,{features:rD.A.Hidden,ref:0===g?n=>{var a;eE.current=null!=(a=null==n?void 0:n.closest("form"))?a:null}:void 0,...(0,r_.oA)({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,disabled:W,name:n,value:a})})),(0,r_.sY)({ourProps:{ref:en},theirProps:et,slot:eg,defaultTag:rq,name:"Listbox"}))))}),{Button:(0,r_.yV)(function(n,a){var g;let v=(0,rM.M)(),{id:j=`headlessui-listbox-button-${v}`,...z}=n,H=w("Listbox.Button"),B=k("Listbox.Button"),W=(0,rg.T)(H.buttonRef,a),K=use_disposables_p(),ee=(0,rd.z)(n=>{switch(n.key){case rF.R.Space:case rF.R.Enter:case rF.R.ArrowDown:n.preventDefault(),B.openListbox(),K.nextFrame(()=>{H.value||B.goToOption(rL.First)});break;case rF.R.ArrowUp:n.preventDefault(),B.openListbox(),K.nextFrame(()=>{H.value||B.goToOption(rL.Last)})}}),et=(0,rd.z)(n=>{n.key===rF.R.Space&&n.preventDefault()}),er=(0,rd.z)(n=>{if(bugs_r(n.currentTarget))return n.preventDefault();0===H.listboxState?(B.closeListbox(),K.nextFrame(()=>{var n;return null==(n=H.buttonRef.current)?void 0:n.focus({preventScroll:!0})})):(n.preventDefault(),B.openListbox())}),en=use_computed_i(()=>{if(H.labelId)return[H.labelId,j].join(" ")},[H.labelId,j]),eo=(0,eP.useMemo)(()=>({open:0===H.listboxState,disabled:H.disabled,value:H.value}),[H]),ei={ref:W,id:j,type:(0,rN.f)(n,H.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(g=H.optionsRef.current)?void 0:g.id,"aria-expanded":0===H.listboxState,"aria-labelledby":en,disabled:H.disabled,onKeyDown:ee,onKeyUp:et,onClick:er};return(0,r_.sY)({ourProps:ei,theirProps:z,slot:eo,defaultTag:"button",name:"Listbox.Button"})}),Label:(0,r_.yV)(function(n,a){let g=(0,rM.M)(),{id:v=`headlessui-listbox-label-${g}`,...j}=n,z=w("Listbox.Label"),H=k("Listbox.Label"),B=(0,rg.T)(z.labelRef,a);(0,rf.e)(()=>H.registerLabel(v),[v]);let W=(0,rd.z)(()=>{var n;return null==(n=z.buttonRef.current)?void 0:n.focus({preventScroll:!0})}),K=(0,eP.useMemo)(()=>({open:0===z.listboxState,disabled:z.disabled}),[z]);return(0,r_.sY)({ourProps:{ref:B,id:v,onClick:W},theirProps:j,slot:K,defaultTag:"label",name:"Listbox.Label"})}),Options:(0,r_.yV)(function(n,a){var g;let v=(0,rM.M)(),{id:j=`headlessui-listbox-options-${v}`,...z}=n,H=w("Listbox.Options"),B=k("Listbox.Options"),W=(0,rg.T)(H.optionsRef,a),K=use_disposables_p(),ee=use_disposables_p(),et=open_closed_u(),er=null!==et?(et&ry.Open)===ry.Open:0===H.listboxState;(0,eP.useEffect)(()=>{var n;let a=H.optionsRef.current;a&&0===H.listboxState&&a!==(null==(n=(0,rZ.r)(a))?void 0:n.activeElement)&&a.focus({preventScroll:!0})},[H.listboxState,H.optionsRef]);let en=(0,rd.z)(n=>{switch(ee.dispose(),n.key){case rF.R.Space:if(""!==H.searchQuery)return n.preventDefault(),n.stopPropagation(),B.search(n.key);case rF.R.Enter:if(n.preventDefault(),n.stopPropagation(),null!==H.activeOptionIndex){let{dataRef:n}=H.options[H.activeOptionIndex];B.onChange(n.current.value)}0===H.mode&&(B.closeListbox(),(0,ru.k)().nextFrame(()=>{var n;return null==(n=H.buttonRef.current)?void 0:n.focus({preventScroll:!0})}));break;case(0,rx.E)(H.orientation,{vertical:rF.R.ArrowDown,horizontal:rF.R.ArrowRight}):return n.preventDefault(),n.stopPropagation(),B.goToOption(rL.Next);case(0,rx.E)(H.orientation,{vertical:rF.R.ArrowUp,horizontal:rF.R.ArrowLeft}):return n.preventDefault(),n.stopPropagation(),B.goToOption(rL.Previous);case rF.R.Home:case rF.R.PageUp:return n.preventDefault(),n.stopPropagation(),B.goToOption(rL.First);case rF.R.End:case rF.R.PageDown:return n.preventDefault(),n.stopPropagation(),B.goToOption(rL.Last);case rF.R.Escape:return n.preventDefault(),n.stopPropagation(),B.closeListbox(),K.nextFrame(()=>{var n;return null==(n=H.buttonRef.current)?void 0:n.focus({preventScroll:!0})});case rF.R.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(B.search(n.key),ee.setTimeout(()=>B.clearSearch(),350))}}),eo=use_computed_i(()=>{var n;return null==(n=H.buttonRef.current)?void 0:n.id},[H.buttonRef.current]),ei=(0,eP.useMemo)(()=>({open:0===H.listboxState}),[H]),es={"aria-activedescendant":null===H.activeOptionIndex||null==(g=H.options[H.activeOptionIndex])?void 0:g.id,"aria-multiselectable":1===H.mode||void 0,"aria-labelledby":eo,"aria-orientation":H.orientation,id:j,onKeyDown:en,role:"listbox",tabIndex:0,ref:W};return(0,r_.sY)({ourProps:es,theirProps:z,slot:ei,defaultTag:"ul",features:rW,visible:er,name:"Listbox.Options"})}),Option:(0,r_.yV)(function(n,a){let g=(0,rM.M)(),{id:v=`headlessui-listbox-option-${g}`,disabled:j=!1,value:z,...H}=n,B=w("Listbox.Option"),W=k("Listbox.Option"),K=null!==B.activeOptionIndex&&B.options[B.activeOptionIndex].id===v,ee=B.isSelected(z),et=(0,eP.useRef)(null),er=use_text_value_s(et),en=(0,rm.E)({disabled:j,value:z,domRef:et,get textValue(){return er()}}),eo=(0,rg.T)(a,et);(0,rf.e)(()=>{if(0!==B.listboxState||!K||0===B.activationTrigger)return;let n=(0,ru.k)();return n.requestAnimationFrame(()=>{var n,a;null==(a=null==(n=et.current)?void 0:n.scrollIntoView)||a.call(n,{block:"nearest"})}),n.dispose},[et,K,B.listboxState,B.activationTrigger,B.activeOptionIndex]),(0,rf.e)(()=>W.registerOption(v,en),[en,v]);let ei=(0,rd.z)(n=>{if(j)return n.preventDefault();W.onChange(z),0===B.mode&&(W.closeListbox(),(0,ru.k)().nextFrame(()=>{var n;return null==(n=B.buttonRef.current)?void 0:n.focus({preventScroll:!0})}))}),es=(0,rd.z)(()=>{if(j)return W.goToOption(rL.Nothing);W.goToOption(rL.Specific,v)}),el=use_tracked_pointer_u(),ec=(0,rd.z)(n=>el.update(n)),eu=(0,rd.z)(n=>{el.wasMoved(n)&&(j||K||W.goToOption(rL.Specific,v,0))}),ed=(0,rd.z)(n=>{el.wasMoved(n)&&(j||K&&W.goToOption(rL.Nothing))}),ep=(0,eP.useMemo)(()=>({active:K,selected:ee,disabled:j}),[K,ee,j]);return(0,r_.sY)({ourProps:{id:v,ref:eo,role:"option",tabIndex:!0===j?void 0:-1,"aria-disabled":!0===j||void 0,"aria-selected":ee,disabled:void 0,onClick:ei,onFocus:es,onPointerEnter:ec,onMouseEnter:ec,onPointerMove:eu,onMouseMove:eu,onPointerLeave:ed,onMouseLeave:ed},theirProps:H,slot:ep,defaultTag:"li",name:"Listbox.Option"})})});var rJ=g(967),rQ=g(6053),rY=g.n(rQ);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(n){for(var a=1;a=0||(j[g]=n[g]);return j}var rX=["keyOverride"],r0=["crossOrigin"],r1={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},buildOpenGraphMediaTags=function(n,a,g){void 0===a&&(a=[]);var v=void 0===g?{}:g,j=v.defaultWidth,z=v.defaultHeight;return a.reduce(function(a,g,v){return a.push(eP.createElement("meta",{key:"og:"+n+":0"+v,property:"og:"+n,content:g.url})),g.alt&&a.push(eP.createElement("meta",{key:"og:"+n+":alt0"+v,property:"og:"+n+":alt",content:g.alt})),g.secureUrl&&a.push(eP.createElement("meta",{key:"og:"+n+":secure_url0"+v,property:"og:"+n+":secure_url",content:g.secureUrl.toString()})),g.type&&a.push(eP.createElement("meta",{key:"og:"+n+":type0"+v,property:"og:"+n+":type",content:g.type.toString()})),g.width?a.push(eP.createElement("meta",{key:"og:"+n+":width0"+v,property:"og:"+n+":width",content:g.width.toString()})):j&&a.push(eP.createElement("meta",{key:"og:"+n+":width0"+v,property:"og:"+n+":width",content:j.toString()})),g.height?a.push(eP.createElement("meta",{key:"og:"+n+":height"+v,property:"og:"+n+":height",content:g.height.toString()})):z&&a.push(eP.createElement("meta",{key:"og:"+n+":height"+v,property:"og:"+n+":height",content:z.toString()})),a},[])},buildTags=function(n){var a,g,v,j,z,H=[];n.titleTemplate&&(r1.templateTitle=n.titleTemplate);var B="";n.title?(B=n.title,r1.templateTitle&&(B=r1.templateTitle.replace(/%s/g,function(){return B}))):n.defaultTitle&&(B=n.defaultTitle),B&&H.push(eP.createElement("title",{key:"title"},B));var W=void 0===n.noindex?r1.noindex||n.dangerouslySetAllPagesToNoIndex:n.noindex,K=void 0===n.nofollow?r1.nofollow||n.dangerouslySetAllPagesToNoFollow:n.nofollow,ee=n.norobots||r1.norobots,et="";if(n.robotsProps){var er=n.robotsProps,en=er.nosnippet,eo=er.maxSnippet,ei=er.maxImagePreview,es=er.maxVideoPreview,el=er.noarchive,ec=er.noimageindex,eu=er.notranslate,ed=er.unavailableAfter;et=(en?",nosnippet":"")+(eo?",max-snippet:"+eo:"")+(ei?",max-image-preview:"+ei:"")+(el?",noarchive":"")+(ed?",unavailable_after:"+ed:"")+(ec?",noimageindex":"")+(es?",max-video-preview:"+es:"")+(eu?",notranslate":"")}if(n.norobots&&(r1.norobots=!0),W||K?(n.dangerouslySetAllPagesToNoIndex&&(r1.noindex=!0),n.dangerouslySetAllPagesToNoFollow&&(r1.nofollow=!0),H.push(eP.createElement("meta",{key:"robots",name:"robots",content:(W?"noindex":"index")+","+(K?"nofollow":"follow")+et}))):(!ee||et)&&H.push(eP.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+et})),n.description&&H.push(eP.createElement("meta",{key:"description",name:"description",content:n.description})),n.themeColor&&H.push(eP.createElement("meta",{key:"theme-color",name:"theme-color",content:n.themeColor})),n.mobileAlternate&&H.push(eP.createElement("link",{rel:"alternate",key:"mobileAlternate",media:n.mobileAlternate.media,href:n.mobileAlternate.href})),n.languageAlternates&&n.languageAlternates.length>0&&n.languageAlternates.forEach(function(n){H.push(eP.createElement("link",{rel:"alternate",key:"languageAlternate-"+n.hrefLang,hrefLang:n.hrefLang,href:n.href}))}),n.twitter&&(n.twitter.cardType&&H.push(eP.createElement("meta",{key:"twitter:card",name:"twitter:card",content:n.twitter.cardType})),n.twitter.site&&H.push(eP.createElement("meta",{key:"twitter:site",name:"twitter:site",content:n.twitter.site})),n.twitter.handle&&H.push(eP.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:n.twitter.handle}))),n.facebook&&n.facebook.appId&&H.push(eP.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:n.facebook.appId})),(null!=(a=n.openGraph)&&a.title||B)&&H.push(eP.createElement("meta",{key:"og:title",property:"og:title",content:(null==(j=n.openGraph)?void 0:j.title)||B})),(null!=(g=n.openGraph)&&g.description||n.description)&&H.push(eP.createElement("meta",{key:"og:description",property:"og:description",content:(null==(z=n.openGraph)?void 0:z.description)||n.description})),n.openGraph){if((n.openGraph.url||n.canonical)&&H.push(eP.createElement("meta",{key:"og:url",property:"og:url",content:n.openGraph.url||n.canonical})),n.openGraph.type){var ep=n.openGraph.type.toLowerCase();H.push(eP.createElement("meta",{key:"og:type",property:"og:type",content:ep})),"profile"===ep&&n.openGraph.profile?(n.openGraph.profile.firstName&&H.push(eP.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:n.openGraph.profile.firstName})),n.openGraph.profile.lastName&&H.push(eP.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:n.openGraph.profile.lastName})),n.openGraph.profile.username&&H.push(eP.createElement("meta",{key:"profile:username",property:"profile:username",content:n.openGraph.profile.username})),n.openGraph.profile.gender&&H.push(eP.createElement("meta",{key:"profile:gender",property:"profile:gender",content:n.openGraph.profile.gender}))):"book"===ep&&n.openGraph.book?(n.openGraph.book.authors&&n.openGraph.book.authors.length&&n.openGraph.book.authors.forEach(function(n,a){H.push(eP.createElement("meta",{key:"book:author:0"+a,property:"book:author",content:n}))}),n.openGraph.book.isbn&&H.push(eP.createElement("meta",{key:"book:isbn",property:"book:isbn",content:n.openGraph.book.isbn})),n.openGraph.book.releaseDate&&H.push(eP.createElement("meta",{key:"book:release_date",property:"book:release_date",content:n.openGraph.book.releaseDate})),n.openGraph.book.tags&&n.openGraph.book.tags.length&&n.openGraph.book.tags.forEach(function(n,a){H.push(eP.createElement("meta",{key:"book:tag:0"+a,property:"book:tag",content:n}))})):"article"===ep&&n.openGraph.article?(n.openGraph.article.publishedTime&&H.push(eP.createElement("meta",{key:"article:published_time",property:"article:published_time",content:n.openGraph.article.publishedTime})),n.openGraph.article.modifiedTime&&H.push(eP.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:n.openGraph.article.modifiedTime})),n.openGraph.article.expirationTime&&H.push(eP.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:n.openGraph.article.expirationTime})),n.openGraph.article.authors&&n.openGraph.article.authors.length&&n.openGraph.article.authors.forEach(function(n,a){H.push(eP.createElement("meta",{key:"article:author:0"+a,property:"article:author",content:n}))}),n.openGraph.article.section&&H.push(eP.createElement("meta",{key:"article:section",property:"article:section",content:n.openGraph.article.section})),n.openGraph.article.tags&&n.openGraph.article.tags.length&&n.openGraph.article.tags.forEach(function(n,a){H.push(eP.createElement("meta",{key:"article:tag:0"+a,property:"article:tag",content:n}))})):("video.movie"===ep||"video.episode"===ep||"video.tv_show"===ep||"video.other"===ep)&&n.openGraph.video&&(n.openGraph.video.actors&&n.openGraph.video.actors.length&&n.openGraph.video.actors.forEach(function(n,a){n.profile&&H.push(eP.createElement("meta",{key:"video:actor:0"+a,property:"video:actor",content:n.profile})),n.role&&H.push(eP.createElement("meta",{key:"video:actor:role:0"+a,property:"video:actor:role",content:n.role}))}),n.openGraph.video.directors&&n.openGraph.video.directors.length&&n.openGraph.video.directors.forEach(function(n,a){H.push(eP.createElement("meta",{key:"video:director:0"+a,property:"video:director",content:n}))}),n.openGraph.video.writers&&n.openGraph.video.writers.length&&n.openGraph.video.writers.forEach(function(n,a){H.push(eP.createElement("meta",{key:"video:writer:0"+a,property:"video:writer",content:n}))}),n.openGraph.video.duration&&H.push(eP.createElement("meta",{key:"video:duration",property:"video:duration",content:n.openGraph.video.duration.toString()})),n.openGraph.video.releaseDate&&H.push(eP.createElement("meta",{key:"video:release_date",property:"video:release_date",content:n.openGraph.video.releaseDate})),n.openGraph.video.tags&&n.openGraph.video.tags.length&&n.openGraph.video.tags.forEach(function(n,a){H.push(eP.createElement("meta",{key:"video:tag:0"+a,property:"video:tag",content:n}))}),n.openGraph.video.series&&H.push(eP.createElement("meta",{key:"video:series",property:"video:series",content:n.openGraph.video.series})))}n.defaultOpenGraphImageWidth&&(r1.defaultOpenGraphImageWidth=n.defaultOpenGraphImageWidth),n.defaultOpenGraphImageHeight&&(r1.defaultOpenGraphImageHeight=n.defaultOpenGraphImageHeight),n.openGraph.images&&n.openGraph.images.length&&H.push.apply(H,buildOpenGraphMediaTags("image",n.openGraph.images,{defaultWidth:r1.defaultOpenGraphImageWidth,defaultHeight:r1.defaultOpenGraphImageHeight})),n.defaultOpenGraphVideoWidth&&(r1.defaultOpenGraphVideoWidth=n.defaultOpenGraphVideoWidth),n.defaultOpenGraphVideoHeight&&(r1.defaultOpenGraphVideoHeight=n.defaultOpenGraphVideoHeight),n.openGraph.videos&&n.openGraph.videos.length&&H.push.apply(H,buildOpenGraphMediaTags("video",n.openGraph.videos,{defaultWidth:r1.defaultOpenGraphVideoWidth,defaultHeight:r1.defaultOpenGraphVideoHeight})),n.openGraph.audio&&H.push.apply(H,buildOpenGraphMediaTags("audio",n.openGraph.audio)),n.openGraph.locale&&H.push(eP.createElement("meta",{key:"og:locale",property:"og:locale",content:n.openGraph.locale})),(n.openGraph.siteName||n.openGraph.site_name)&&H.push(eP.createElement("meta",{key:"og:site_name",property:"og:site_name",content:n.openGraph.siteName||n.openGraph.site_name}))}return n.canonical&&H.push(eP.createElement("link",{rel:"canonical",href:n.canonical,key:"canonical"})),n.additionalMetaTags&&n.additionalMetaTags.length>0&&n.additionalMetaTags.forEach(function(n){var a,g,v=n.keyOverride,j=_objectWithoutPropertiesLoose(n,rX);H.push(eP.createElement("meta",_extends({key:"meta:"+(null!=(a=null!=(g=null!=v?v:j.name)?g:j.property)?a:j.httpEquiv)},j)))}),null!=(v=n.additionalLinkTags)&&v.length&&n.additionalLinkTags.forEach(function(n){var a,g=n.crossOrigin,v=_objectWithoutPropertiesLoose(n,r0);H.push(eP.createElement("link",_extends({key:"link"+(null!=(a=v.keyOverride)?a:v.href)+v.rel},v,{crossOrigin:"anonymous"===g||"use-credentials"===g||""===g?g:void 0})))}),H},WithHead=function(n){return eP.createElement(rY(),null,buildTags(n))},NextSeo=function(n){var a=n.title,g=n.themeColor,v=n.noindex,j=n.nofollow,z=n.robotsProps,H=n.description,B=n.canonical,W=n.openGraph,K=n.facebook,ee=n.twitter,et=n.additionalMetaTags,er=n.titleTemplate,en=n.defaultTitle,eo=n.mobileAlternate,ei=n.languageAlternates,es=n.additionalLinkTags;return eP.createElement(eP.Fragment,null,eP.createElement(WithHead,{title:a,themeColor:g,noindex:v,nofollow:j,robotsProps:z,description:H,canonical:B,facebook:K,openGraph:W,additionalMetaTags:et,twitter:ee,titleTemplate:er,defaultTitle:en,mobileAlternate:eo,languageAlternates:ei,additionalLinkTags:es}))};RegExp("["+Object.keys(Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"})).join("")+"]","g");var r2=((eu=r2||{})[eu.Open=0]="Open",eu[eu.Closed=1]="Closed",eu),r4=((ed=r4||{})[ed.Pointer=0]="Pointer",ed[ed.Other=1]="Other",ed),r3=((ep=r3||{})[ep.OpenMenu=0]="OpenMenu",ep[ep.CloseMenu=1]="CloseMenu",ep[ep.GoToItem=2]="GoToItem",ep[ep.Search=3]="Search",ep[ep.ClearSearch=4]="ClearSearch",ep[ep.RegisterItem=5]="RegisterItem",ep[ep.UnregisterItem=6]="UnregisterItem",ep);function menu_w(n,a=n=>n){let g=null!==n.activeItemIndex?n.items[n.activeItemIndex]:null,v=(0,rA.z2)(a(n.items.slice()),n=>n.dataRef.current.domRef.current),j=g?v.indexOf(g):null;return -1===j&&(j=null),{items:v,activeItemIndex:j}}let r5={1:n=>1===n.menuState?n:{...n,activeItemIndex:null,menuState:1},0:n=>0===n.menuState?n:{...n,__demoMode:!1,menuState:0},2:(n,a)=>{var g;let v=menu_w(n),j=calculate_active_index_f(a,{resolveItems:()=>v.items,resolveActiveIndex:()=>v.activeItemIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...n,...v,searchQuery:"",activeItemIndex:j,activationTrigger:null!=(g=a.trigger)?g:1}},3:(n,a)=>{let g=""!==n.searchQuery?0:1,v=n.searchQuery+a.value.toLowerCase(),j=(null!==n.activeItemIndex?n.items.slice(n.activeItemIndex+g).concat(n.items.slice(0,n.activeItemIndex+g)):n.items).find(n=>{var a;return(null==(a=n.dataRef.current.textValue)?void 0:a.startsWith(v))&&!n.dataRef.current.disabled}),z=j?n.items.indexOf(j):-1;return -1===z||z===n.activeItemIndex?{...n,searchQuery:v}:{...n,searchQuery:v,activeItemIndex:z,activationTrigger:1}},4:n=>""===n.searchQuery?n:{...n,searchQuery:"",searchActiveItemIndex:null},5:(n,a)=>{let g=menu_w(n,n=>[...n,{id:a.id,dataRef:a.dataRef}]);return{...n,...g}},6:(n,a)=>{let g=menu_w(n,n=>{let g=n.findIndex(n=>n.id===a.id);return -1!==g&&n.splice(g,1),n});return{...n,...g,activationTrigger:1}}},r6=(0,eP.createContext)(null);function menu_C(n){let a=(0,eP.useContext)(r6);if(null===a){let a=Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,menu_C),a}return a}function menu_ye(n,a){return(0,rx.E)(a.type,r5,n,a)}r6.displayName="MenuContext";let r7=eP.Fragment,r9=r_.AN.RenderStrategy|r_.AN.Static,r8=eP.Fragment,ne=Object.assign((0,r_.yV)(function(n,a){let{__demoMode:g=!1,...v}=n,j=(0,eP.useReducer)(menu_ye,{__demoMode:g,menuState:g?0:1,buttonRef:(0,eP.createRef)(),itemsRef:(0,eP.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:z,itemsRef:H,buttonRef:B},W]=j,K=(0,rg.T)(a);use_outside_click_y([B,H],(n,a)=>{var g;W({type:1}),(0,rA.sP)(a,rA.tJ.Loose)||(n.preventDefault(),null==(g=B.current)||g.focus())},0===z);let ee=(0,rd.z)(()=>{W({type:1})}),et=(0,eP.useMemo)(()=>({open:0===z,close:ee}),[z,ee]);return eP.createElement(r6.Provider,{value:j},eP.createElement(open_closed_s,{value:(0,rx.E)(z,{0:ry.Open,1:ry.Closed})},(0,r_.sY)({ourProps:{ref:K},theirProps:v,slot:et,defaultTag:r7,name:"Menu"})))}),{Button:(0,r_.yV)(function(n,a){var g;let v=(0,rM.M)(),{id:j=`headlessui-menu-button-${v}`,...z}=n,[H,B]=menu_C("Menu.Button"),W=(0,rg.T)(H.buttonRef,a),K=use_disposables_p(),ee=(0,rd.z)(n=>{switch(n.key){case rF.R.Space:case rF.R.Enter:case rF.R.ArrowDown:n.preventDefault(),n.stopPropagation(),B({type:0}),K.nextFrame(()=>B({type:2,focus:rL.First}));break;case rF.R.ArrowUp:n.preventDefault(),n.stopPropagation(),B({type:0}),K.nextFrame(()=>B({type:2,focus:rL.Last}))}}),et=(0,rd.z)(n=>{n.key===rF.R.Space&&n.preventDefault()}),er=(0,rd.z)(a=>{if(bugs_r(a.currentTarget))return a.preventDefault();n.disabled||(0===H.menuState?(B({type:1}),K.nextFrame(()=>{var n;return null==(n=H.buttonRef.current)?void 0:n.focus({preventScroll:!0})})):(a.preventDefault(),B({type:0})))}),en=(0,eP.useMemo)(()=>({open:0===H.menuState}),[H]),eo={ref:W,id:j,type:(0,rN.f)(n,H.buttonRef),"aria-haspopup":"menu","aria-controls":null==(g=H.itemsRef.current)?void 0:g.id,"aria-expanded":0===H.menuState,onKeyDown:ee,onKeyUp:et,onClick:er};return(0,r_.sY)({ourProps:eo,theirProps:z,slot:en,defaultTag:"button",name:"Menu.Button"})}),Items:(0,r_.yV)(function(n,a){var g,v;let j=(0,rM.M)(),{id:z=`headlessui-menu-items-${j}`,...H}=n,[B,W]=menu_C("Menu.Items"),K=(0,rg.T)(B.itemsRef,a),ee=function(...n){return(0,eP.useMemo)(()=>(0,rZ.r)(...n),[...n])}(B.itemsRef),et=use_disposables_p(),er=open_closed_u(),en=null!==er?(er&ry.Open)===ry.Open:0===B.menuState;(0,eP.useEffect)(()=>{let n=B.itemsRef.current;n&&0===B.menuState&&n!==(null==ee?void 0:ee.activeElement)&&n.focus({preventScroll:!0})},[B.menuState,B.itemsRef,ee]),function({container:n,accept:a,walk:g,enabled:v=!0}){let j=(0,eP.useRef)(a),z=(0,eP.useRef)(g);(0,eP.useEffect)(()=>{j.current=a,z.current=g},[a,g]),(0,rf.e)(()=>{if(!n||!v)return;let a=(0,rZ.r)(n);if(!a)return;let g=j.current,H=z.current,B=Object.assign(n=>g(n),{acceptNode:g}),W=a.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,B,!1);for(;W.nextNode();)H(W.currentNode)},[n,v,j,z])}({container:B.itemsRef.current,enabled:0===B.menuState,accept:n=>"menuitem"===n.getAttribute("role")?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(n){n.setAttribute("role","none")}});let eo=(0,rd.z)(n=>{var a,g;switch(et.dispose(),n.key){case rF.R.Space:if(""!==B.searchQuery)return n.preventDefault(),n.stopPropagation(),W({type:3,value:n.key});case rF.R.Enter:if(n.preventDefault(),n.stopPropagation(),W({type:1}),null!==B.activeItemIndex){let{dataRef:n}=B.items[B.activeItemIndex];null==(g=null==(a=n.current)?void 0:a.domRef.current)||g.click()}(0,rA.wI)(B.buttonRef.current);break;case rF.R.ArrowDown:return n.preventDefault(),n.stopPropagation(),W({type:2,focus:rL.Next});case rF.R.ArrowUp:return n.preventDefault(),n.stopPropagation(),W({type:2,focus:rL.Previous});case rF.R.Home:case rF.R.PageUp:return n.preventDefault(),n.stopPropagation(),W({type:2,focus:rL.First});case rF.R.End:case rF.R.PageDown:return n.preventDefault(),n.stopPropagation(),W({type:2,focus:rL.Last});case rF.R.Escape:n.preventDefault(),n.stopPropagation(),W({type:1}),(0,ru.k)().nextFrame(()=>{var n;return null==(n=B.buttonRef.current)?void 0:n.focus({preventScroll:!0})});break;case rF.R.Tab:n.preventDefault(),n.stopPropagation(),W({type:1}),(0,ru.k)().nextFrame(()=>{(0,rA.EO)(B.buttonRef.current,n.shiftKey?rA.TO.Previous:rA.TO.Next)});break;default:1===n.key.length&&(W({type:3,value:n.key}),et.setTimeout(()=>W({type:4}),350))}}),ei=(0,rd.z)(n=>{n.key===rF.R.Space&&n.preventDefault()}),es=(0,eP.useMemo)(()=>({open:0===B.menuState}),[B]),el={"aria-activedescendant":null===B.activeItemIndex||null==(g=B.items[B.activeItemIndex])?void 0:g.id,"aria-labelledby":null==(v=B.buttonRef.current)?void 0:v.id,id:z,onKeyDown:eo,onKeyUp:ei,role:"menu",tabIndex:0,ref:K};return(0,r_.sY)({ourProps:el,theirProps:H,slot:es,defaultTag:"div",features:r9,visible:en,name:"Menu.Items"})}),Item:(0,r_.yV)(function(n,a){let g=(0,rM.M)(),{id:v=`headlessui-menu-item-${g}`,disabled:j=!1,...z}=n,[H,B]=menu_C("Menu.Item"),W=null!==H.activeItemIndex&&H.items[H.activeItemIndex].id===v,K=(0,eP.useRef)(null),ee=(0,rg.T)(a,K);(0,rf.e)(()=>{if(H.__demoMode||0!==H.menuState||!W||0===H.activationTrigger)return;let n=(0,ru.k)();return n.requestAnimationFrame(()=>{var n,a;null==(a=null==(n=K.current)?void 0:n.scrollIntoView)||a.call(n,{block:"nearest"})}),n.dispose},[H.__demoMode,K,W,H.menuState,H.activationTrigger,H.activeItemIndex]);let et=use_text_value_s(K),er=(0,eP.useRef)({disabled:j,domRef:K,get textValue(){return et()}});(0,rf.e)(()=>{er.current.disabled=j},[er,j]),(0,rf.e)(()=>(B({type:5,id:v,dataRef:er}),()=>B({type:6,id:v})),[er,v]);let en=(0,rd.z)(()=>{B({type:1})}),eo=(0,rd.z)(n=>{if(j)return n.preventDefault();B({type:1}),(0,rA.wI)(H.buttonRef.current)}),ei=(0,rd.z)(()=>{if(j)return B({type:2,focus:rL.Nothing});B({type:2,focus:rL.Specific,id:v})}),es=use_tracked_pointer_u(),el=(0,rd.z)(n=>es.update(n)),ec=(0,rd.z)(n=>{es.wasMoved(n)&&(j||W||B({type:2,focus:rL.Specific,id:v,trigger:0}))}),eu=(0,rd.z)(n=>{es.wasMoved(n)&&(j||W&&B({type:2,focus:rL.Nothing}))}),ed=(0,eP.useMemo)(()=>({active:W,disabled:j,close:en}),[W,j,en]);return(0,r_.sY)({ourProps:{id:v,ref:ee,role:"menuitem",tabIndex:!0===j?void 0:-1,"aria-disabled":!0===j||void 0,disabled:void 0,onClick:eo,onFocus:ei,onPointerEnter:el,onMouseEnter:el,onPointerMove:ec,onMouseMove:ec,onPointerLeave:eu,onMouseLeave:eu},theirProps:z,slot:ed,defaultTag:r8,name:"Menu.Item"})})}),dist_t=n=>"object"==typeof n&&null!=n&&1===n.nodeType,e=(n,a)=>(!a||"hidden"!==n)&&"visible"!==n&&"clip"!==n,dist_n=(n,a)=>{if(n.clientHeight{let a=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch(n){return null}})(n);return!!a&&(a.clientHeightza||z>n&&H=a&&B>=g?z-n-v:H>a&&Bg?H-a+j:0,l=n=>{let a=n.parentElement;return null==a?n.getRootNode().host||null:a},dist_r=(n,a)=>{var g,v,j,z;if("undefined"==typeof document)return[];let{scrollMode:H,block:B,inline:W,boundary:K,skipOverflowHiddenElements:ee}=a,et="function"==typeof K?K:n=>n!==K;if(!dist_t(n))throw TypeError("Invalid target");let er=document.scrollingElement||document.documentElement,en=[],eo=n;for(;dist_t(eo)&&et(eo);){if((eo=l(eo))===er){en.push(eo);break}null!=eo&&eo===document.body&&dist_n(eo)&&!dist_n(document.documentElement)||null!=eo&&dist_n(eo,ee)&&en.push(eo)}let ei=null!=(v=null==(g=window.visualViewport)?void 0:g.width)?v:innerWidth,es=null!=(z=null==(j=window.visualViewport)?void 0:j.height)?z:innerHeight,{scrollX:el,scrollY:ec}=window,{height:eu,width:ed,top:ep,right:ef,bottom:em,left:eh}=n.getBoundingClientRect(),{top:eg,right:ex,bottom:ev,left:ey}=(n=>{let a=window.getComputedStyle(n);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(n),eb="start"===B||"nearest"===B?ep-eg:"end"===B?em+ev:ep+eu/2-eg+ev,e_="center"===W?eh+ed/2-ey+ex:"end"===W?ef+ex:eh-ey,eS=[];for(let n=0;n=0&&eh>=0&&em<=es&&ef<=ei&&ep>=j&&em<=K&&eh>=ee&&ef<=z)break;let et=getComputedStyle(a),eo=parseInt(et.borderLeftWidth,10),eg=parseInt(et.borderTopWidth,10),ex=parseInt(et.borderRightWidth,10),ev=parseInt(et.borderBottomWidth,10),ey=0,ew=0,ek="offsetWidth"in a?a.offsetWidth-a.clientWidth-eo-ex:0,eO="offsetHeight"in a?a.offsetHeight-a.clientHeight-eg-ev:0,ej="offsetWidth"in a?0===a.offsetWidth?0:v/a.offsetWidth:0,eC="offsetHeight"in a?0===a.offsetHeight?0:g/a.offsetHeight:0;if(er===a)ey="start"===B?eb:"end"===B?eb-es:"nearest"===B?dist_o(ec,ec+es,es,eg,ev,ec+eb,ec+eb+eu,eu):eb-es/2,ew="start"===W?e_:"center"===W?e_-ei/2:"end"===W?e_-ei:dist_o(el,el+ei,ei,eo,ex,el+e_,el+e_+ed,ed),ey=Math.max(0,ey+ec),ew=Math.max(0,ew+el);else{ey="start"===B?eb-j-eg:"end"===B?eb-K+ev+eO:"nearest"===B?dist_o(j,K,g,eg,ev+eO,eb,eb+eu,eu):eb-(j+g/2)+eO/2,ew="start"===W?e_-ee-eo:"center"===W?e_-(ee+v/2)+ek/2:"end"===W?e_-z+ex+ek:dist_o(ee,z,v,eo,ex+ek,e_,e_+ed,ed);let{scrollLeft:n,scrollTop:H}=a;ey=0===eC?0:Math.max(0,Math.min(H+ey/eC,a.scrollHeight-g/eC+eO)),ew=0===ej?0:Math.max(0,Math.min(n+ew/ej,a.scrollWidth-v/ej+ek)),eb+=H-ey,e_+=n-ew}eS.push({el:a,top:ey,left:ew})}return eS},scroll_into_view_if_needed_dist_o=n=>!1===n?{block:"end",inline:"nearest"}:n===Object(n)&&0!==Object.keys(n).length?n:{block:"start",inline:"nearest"};function dist_e(n,a){if(!n.isConnected||!(n=>{let a=n;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(n))return;let g=(n=>{let a=window.getComputedStyle(n);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(n);if("object"==typeof a&&"function"==typeof a.behavior)return a.behavior(dist_r(n,a));let v="boolean"==typeof a||null==a?void 0:a.behavior;for(let{el:j,top:z,left:H}of dist_r(n,scroll_into_view_if_needed_dist_o(a))){let n=z-g.top+g.bottom,a=H-g.left+g.right;j.scroll({top:n,left:a,behavior:v})}}var nt=g(2601),nr=g.n(nt);/** + * @name match-sorter + * @license MIT license. + * @copyright (c) 2020 Kent C. Dodds + * @author Kent C. Dodds (https://kentcdodds.com) + */let nn={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},defaultBaseSortFn=(n,a)=>String(n.rankedValue).localeCompare(String(a.rankedValue));function matchSorter(n,a,g){void 0===g&&(g={});let{keys:v,threshold:j=nn.MATCHES,baseSort:z=defaultBaseSortFn,sorter:H=n=>n.sort((n,a)=>(function(n,a,g){let{rank:v,keyIndex:j}=n,{rank:z,keyIndex:H}=a;return v!==z?v>z?-1:1:j===H?g(n,a):j{let{rank:z,rankedValue:H,keyIndex:B,keyThreshold:W}=n,{itemValue:K,attributes:ee}=a,et=getMatchRanking(K,g,v),er=H,{minRanking:en,maxRanking:eo,threshold:ei}=ee;return et=nn.MATCHES?et=en:et>eo&&(et=eo),et>z&&(z=et,B=j,W=ei,er=K),{rankedValue:er,rank:z,keyIndex:B,keyThreshold:W}},{rankedValue:n,rank:nn.NO_MATCH,keyIndex:-1,keyThreshold:v.threshold})}(z,v,a,g),{rank:W,keyThreshold:K=j}=B;return W>=K&&n.push({...B,item:z,index:H}),n},[]);return H(B).map(n=>{let{item:a}=n;return a})}function getMatchRanking(n,a,g){return(n=prepareValueForComparison(n,g),(a=prepareValueForComparison(a,g)).length>n.length)?nn.NO_MATCH:n===a?nn.CASE_SENSITIVE_EQUAL:(n=n.toLowerCase())===(a=a.toLowerCase())?nn.EQUAL:n.startsWith(a)?nn.STARTS_WITH:n.includes(` ${a}`)?nn.WORD_STARTS_WITH:n.includes(a)?nn.CONTAINS:1===a.length?nn.NO_MATCH:(function(n){let a="",g=n.split(" ");return g.forEach(n=>{let g=n.split("-");g.forEach(n=>{a+=n.substr(0,1)})}),a})(n).includes(a)?nn.ACRONYM:function(n,a){let g=0,v=0;function findMatchingCharacter(n,a,v){for(let j=v,z=a.length;j-1;if(!z)return nn.NO_MATCH}let z=v-j;return function(n){let v=g/a.length,j=nn.MATCHES+v*(1/n);return j}(z)}(n,a)}function prepareValueForComparison(n,a){let{keepDiacritics:g}=a;return n=`${n}`,g||(n=nr()(n)),n}matchSorter.rankings=nn;let no={maxRanking:1/0,minRanking:-1/0};var na=g(7100),ni=Object.defineProperty,ns=Object.defineProperties,nl=Object.getOwnPropertyDescriptors,nc=Object.getOwnPropertySymbols,nu=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,a,g)=>a in n?ni(n,a,{enumerable:!0,configurable:!0,writable:!0,value:g}):n[a]=g,__spreadValues=(n,a)=>{for(var g in a||(a={}))nu.call(a,g)&&__defNormalProp(n,g,a[g]);if(nc)for(var g of nc(a))nd.call(a,g)&&__defNormalProp(n,g,a[g]);return n},__spreadProps=(n,a)=>ns(n,nl(a)),__objRest=(n,a)=>{var g={};for(var v in n)nu.call(n,v)&&0>a.indexOf(v)&&(g[v]=n[v]);if(null!=n&&nc)for(var v of nc(n))0>a.indexOf(v)&&nd.call(n,v)&&(g[v]=n[v]);return g},__async=(n,a,g)=>new Promise((v,j)=>{var fulfilled=n=>{try{step(g.next(n))}catch(n){j(n)}},rejected=n=>{try{step(g.throw(n))}catch(n){j(n)}},step=n=>n.done?v(n.value):Promise.resolve(n.value).then(fulfilled,rejected);step((g=g.apply(n,a)).next())}),np=(0,eP.createContext)({}),nf=(0,eP.createContext)(n=>n),nm=(0,eP.createContext)(null),nh=new WeakMap,ng=(0,eP.createContext)(nh),useActiveAnchor=()=>(0,eP.useContext)(np),useSetActiveAnchor=()=>(0,eP.useContext)(nf),useIntersectionObserver=()=>(0,eP.useContext)(nm),useSlugs=()=>(0,eP.useContext)(ng),ActiveAnchorProvider=({children:n})=>{let[a,g]=(0,eP.useState)({}),v=(0,eP.useRef)(null);return nz&&!v.current&&(v.current=new IntersectionObserver(n=>{g(a=>{let g=__spreadValues({},a);for(let a of n)if((null==a?void 0:a.rootBounds)&&nh.has(a.target)){let[n,v]=nh.get(a.target),j=a.boundingClientRect.y+a.boundingClientRect.height<=a.rootBounds.y+a.rootBounds.height,z=a.intersectionRatio>0;g[n]={index:v,aboveHalfViewport:j,insideHalfViewport:z}}let v="",j=1/0,z=-1;for(let n in g)g[n].isActive=!1,g[n].insideHalfViewport&&g[n].indexz&&(z=g[n].index,v=n);return g[v]&&(g[v].isActive=!0),g})},{rootMargin:"0px 0px -50%",threshold:[0,1]})),(0,ej.jsx)(np.Provider,{value:a,children:(0,ej.jsx)(nf.Provider,{value:g,children:(0,ej.jsx)(ng.Provider,{value:nh,children:(0,ej.jsx)(nm.Provider,{value:v.current,children:n})})})})},nx=(0,eP.createContext)({menu:!1,setMenu:()=>!1}),useMenu=()=>(0,eP.useContext)(nx),nv=nx.Provider,ny=(0,eP.createContext)(__spreadValues({title:"",frontMatter:{}},nW));function useConfig(){return(0,eP.useContext)(ny)}var ConfigProvider=({children:n,value:{themeConfig:a,pageOpts:g}})=>{let[v,j]=(0,eP.useState)(!1);ew||(ew=__spreadValues(__spreadValues({},nW),Object.fromEntries(Object.entries(a).map(([n,a])=>[n,a&&"object"==typeof a&&nK.includes(n)?__spreadValues(__spreadValues({},nW[n]),a):a]))));let z=__spreadProps(__spreadValues(__spreadProps(__spreadValues({},ew),{flexsearch:g.flexsearch}),"boolean"==typeof g.newNextLinkBehavior&&{newNextLinkBehavior:g.newNextLinkBehavior}),{title:g.title,frontMatter:g.frontMatter}),{nextThemes:H}=z;return(0,ej.jsx)($,{attribute:"class",disableTransitionOnChange:!0,defaultTheme:H.defaultTheme,storageKey:H.storageKey,forcedTheme:H.forcedTheme,children:(0,ej.jsx)(ny.Provider,{value:z,children:(0,ej.jsx)(nv,{value:{menu:v,setMenu:j},children:n})})})},nb=(0,eP.createContext)(n=>n),useDetails=()=>(0,eP.useContext)(nb),n_=nb.Provider,nS=Number("13.5.6".split(".")[0]),nw=(0,eP.forwardRef)(function(n,a){var{href:g="",children:v,newWindow:j}=n,z=__objRest(n,["href","children","newWindow"]);let H=useConfig();return j?(0,ej.jsxs)("a",__spreadProps(__spreadValues({ref:a,href:g,target:"_blank",rel:"noreferrer"},z),{children:[v,(0,ej.jsx)("span",{className:"nx-sr-only nx-select-none",children:" (opens in a new tab)"})]})):g?nS>12||H.newNextLinkBehavior?(0,ej.jsx)(tw(),__spreadProps(__spreadValues({ref:a,href:g},z),{children:v})):(0,ej.jsx)(tw(),{href:g,passHref:!0,children:(0,ej.jsx)("a",__spreadProps(__spreadValues({ref:a},z),{children:v}))}):(0,ej.jsx)("a",__spreadProps(__spreadValues({ref:a},z),{children:v}))});nw.displayName="Anchor";var getGitIssueUrl=({repository:n="",title:a,labels:g})=>{let v=tV()(n);if(!v)throw Error("Invalid `docsRepositoryBase` URL!");return v.resource.includes("gitlab")?`${v.protocol}://${v.resource}/${v.owner}/${v.name}/-/issues/new?issue[title]=${encodeURIComponent(a)}${g?`&issue[description]=/label${encodeURIComponent(` ~${g} +`)}`:""}`:v.resource.includes("github")?`${v.protocol}://${v.resource}/${v.owner}/${v.name}/issues/new?title=${encodeURIComponent(a)}&labels=${g||""}`:"#"};function renderComponent(n,a){return n?"function"!=typeof n?n:(0,ej.jsx)(n,__spreadValues({},a)):null}function renderString(n,a={}){let g="function"==typeof n?n(a):n;return g||""}function Banner(){let{banner:n}=useConfig();if(!n.text)return null;let a=`try{if(localStorage.getItem(${JSON.stringify(n.key)})==='0'){document.body.classList.add('nextra-banner-hidden')}}catch(e){}`;return(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("script",{dangerouslySetInnerHTML:{__html:a}}),(0,ej.jsxs)("div",{className:(0,eE.Z)("nextra-banner-container nx-sticky nx-top-0 nx-z-20 nx-flex nx-items-center md:nx-relative","nx-h-[var(--nextra-banner-height)] [body.nextra-banner-hidden_&]:nx-hidden","nx-text-slate-50 dark:nx-text-white nx-bg-neutral-900 dark:nx-bg-[linear-gradient(1deg,#383838,#212121)]","nx-px-2 ltr:nx-pl-10 rtl:nx-pr-10 print:nx-hidden"),children:[(0,ej.jsx)("div",{className:"nx-w-full nx-truncate nx-px-4 nx-text-center nx-font-medium nx-text-sm",children:renderComponent(n.text)}),n.dismissible&&(0,ej.jsx)("button",{type:"button","aria-label":"Dismiss banner",className:"nx-w-8 nx-h-8 nx-opacity-80 hover:nx-opacity-100",onClick:()=>{try{localStorage.setItem(n.key,"0")}catch(n){}document.body.classList.add("nextra-banner-hidden")},children:(0,ej.jsx)(eM.b0,{className:"nx-mx-auto nx-h-4 nx-w-4"})})]})]})}function Breadcrumb({activePath:n}){return(0,ej.jsx)("div",{className:"nextra-breadcrumb nx-mt-1.5 nx-flex nx-items-center nx-gap-1 nx-overflow-hidden nx-text-sm nx-text-gray-500 dark:nx-text-gray-400 contrast-more:nx-text-current",children:n.map((a,g)=>{let v=!a.children||a.withIndexPage,j=g===n.length-1;return(0,ej.jsxs)(eP.Fragment,{children:[g>0&&(0,ej.jsx)(eM.LZ,{className:"nx-w-3.5 nx-shrink-0"}),(0,ej.jsx)("div",{className:(0,eE.Z)("nx-whitespace-nowrap nx-transition-colors",j?"nx-font-medium nx-text-gray-700 contrast-more:nx-font-bold contrast-more:nx-text-current dark:nx-text-gray-100 contrast-more:dark:nx-text-current":["nx-min-w-[24px] nx-overflow-hidden nx-text-ellipsis",v&&"hover:nx-text-gray-900 dark:hover:nx-text-gray-100"]),title:a.title,children:v&&!j?(0,ej.jsx)(nw,{href:a.route,children:a.title}):a.title})]},a.route+a.name)})})}function Collapse({children:n,className:a,isOpen:g,horizontal:v=!1}){let j=(0,eP.useRef)(null),z=(0,eP.useRef)(null),H=(0,eP.useRef)(0),B=(0,eP.useRef)(g),W=(0,eP.useRef)(!0);return(0,eP.useEffect)(()=>{let n=j.current,a=z.current,B=H.current;B&&clearTimeout(B),!W.current&&n&&a&&(n.classList.toggle("nx-duration-500",!g),n.classList.toggle("nx-duration-300",g),v?(a.style.width=`${a.clientWidth}px`,n.style.width=`${a.clientWidth}px`):n.style.height=`${a.clientHeight}px`,g?H.current=window.setTimeout(()=>{n.style.removeProperty("height")},300):setTimeout(()=>{v?n.style.width="0px":n.style.height="0px"},0))},[v,g]),(0,eP.useEffect)(()=>{W.current=!1},[]),(0,ej.jsx)("div",{ref:j,className:"nx-transform-gpu nx-overflow-hidden nx-transition-all nx-ease-in-out motion-reduce:nx-transition-none",style:B.current||v?void 0:{height:0},children:(0,ej.jsx)("div",{ref:z,className:(0,eE.Z)("nx-transition-opacity nx-duration-500 nx-ease-in-out motion-reduce:nx-transition-none",g?"nx-opacity-100":"nx-opacity-0",a),children:n})})}var nk=(0,eP.memo)(function({value:n,match:a}){let g;if(!n)return null;let v=n.split(""),j=function(n){if("string"!=typeof n)throw TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(a.trim()),z=RegExp(j.replaceAll(/\s+/g,"|"),"ig"),H=0,B=[];for(;g=z.exec(n);)if(g.index===z.lastIndex)z.lastIndex++;else{let n=v.splice(0,g.index-H).join(""),a=v.splice(0,z.lastIndex-g.index).join("");B.push(n,(0,ej.jsx)("span",{className:"nx-text-primary-600",children:a},g.index)),H=z.lastIndex}return(0,ej.jsxs)(ej.Fragment,{children:[B,v.join("")]})}),nO=(0,eP.forwardRef)((n,a)=>{var{className:g,suffix:v}=n,j=__objRest(n,["className","suffix"]);return(0,ej.jsxs)("div",{className:"nx-relative nx-flex nx-items-center nx-text-gray-900 contrast-more:nx-text-gray-800 dark:nx-text-gray-300 contrast-more:dark:nx-text-gray-300",children:[(0,ej.jsx)("input",__spreadValues({ref:a,spellCheck:!1,className:(0,eE.Z)(g,"nx-block nx-w-full nx-appearance-none nx-rounded-lg nx-px-3 nx-py-2 nx-transition-colors","nx-text-base nx-leading-tight md:nx-text-sm","nx-bg-black/[.05] dark:nx-bg-gray-50/10","focus:nx-bg-white dark:focus:nx-bg-dark","placeholder:nx-text-gray-500 dark:placeholder:nx-text-gray-400","contrast-more:nx-border contrast-more:nx-border-current")},j)),v]})});nO.displayName="Input";var nj=["input","select","button","textarea"];function Search({className:n,overlayClassName:a,value:g,onChange:v,onActive:j,loading:z,error:H,results:B}){let[W,K]=(0,eP.useState)(!1),ee=useConfig(),[et,er]=(0,eP.useState)(0),en=(0,eC.useRouter)(),{setMenu:eo}=useMenu(),ei=(0,eP.useRef)(null),es=(0,eP.useRef)(null),[el,ec]=(0,eP.useState)(!1),[eu,ed]=(0,eP.useState)(!0);(0,eP.useEffect)(()=>{er(0)},[g]),(0,eP.useEffect)(()=>{let down=n=>{let a=document.activeElement,g=null==a?void 0:a.tagName.toLowerCase();!ei.current||!g||nj.includes(g)||null!=a&&a.isContentEditable||("/"===n.key||"k"===n.key&&(n.metaKey||n.ctrlKey)?(n.preventDefault(),ei.current.focus({preventScroll:!0})):"Escape"===n.key&&(K(!1),ei.current.blur()))};return window.addEventListener("keydown",down),()=>{window.removeEventListener("keydown",down)}},[]);let ep=(0,eP.useCallback)(()=>{var n;null==(n=ei.current)||n.blur(),v(""),K(!1),eo(!1)},[v,eo]),ef=(0,eP.useCallback)(n=>{let{index:a}=n.currentTarget.dataset;er(Number(a))},[]),em=(0,eP.useCallback)(function(n){var a,g,v;switch(n.key){case"ArrowDown":if(et+1 a`);g&&(n.preventDefault(),ef({currentTarget:g}),g.focus())}break;case"ArrowUp":if(et-1>=0){let a=null==(g=es.current)?void 0:g.querySelector(`li:nth-of-type(${et}) > a`);a&&(n.preventDefault(),ef({currentTarget:a}),a.focus())}break;case"Enter":{let n=B[et];n&&eu&&(en.push(n.route),ep());break}case"Escape":K(!1),null==(v=ei.current)||v.blur()}},[et,B,en,ep,ef,eu]),eh=useMounted(),eg=W&&!!g,ex=(0,ej.jsx)(rI,{show:eh&&(!W||!!g),as:eP.Fragment,enter:"nx-transition-opacity",enterFrom:"nx-opacity-0",enterTo:"nx-opacity-100",leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ej.jsx)("kbd",{className:(0,eE.Z)("nx-absolute nx-my-1.5 nx-select-none ltr:nx-right-1.5 rtl:nx-left-1.5","nx-h-5 nx-rounded nx-bg-white nx-px-1.5 nx-font-mono nx-text-[10px] nx-font-medium nx-text-gray-500","nx-border dark:nx-border-gray-100/20 dark:nx-bg-dark/50","contrast-more:nx-border-current contrast-more:nx-text-current contrast-more:dark:nx-border-current","nx-items-center nx-gap-1 nx-transition-opacity",g?"nx-z-20 nx-flex nx-cursor-pointer hover:nx-opacity-70":"nx-pointer-events-none nx-hidden sm:nx-flex"),title:g?"Clear":void 0,onClick:()=>{v("")},children:g&&el?"ESC":eh&&(navigator.userAgent.includes("Macintosh")?(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("span",{className:"nx-text-xs",children:"⌘"}),"K"]}):"CTRL K")})}),ev=(0,eP.useCallback)(n=>{ed("compositionend"===n.type)},[]);return(0,ej.jsxs)("div",{className:(0,eE.Z)("nextra-search nx-relative md:nx-w-64",n),children:[eg&&(0,ej.jsx)("div",{className:"nx-fixed nx-inset-0 nx-z-10",onClick:()=>K(!1)}),(0,ej.jsx)(nO,{ref:ei,value:g,onChange:n=>{let{value:a}=n.target;v(a),K(!!a)},onFocus:()=>{null==j||j(!0),ec(!0)},onBlur:()=>{ec(!1)},onCompositionStart:ev,onCompositionEnd:ev,type:"search",placeholder:renderString(ee.search.placeholder),onKeyDown:em,suffix:ex}),(0,ej.jsx)(rI,{show:eg,as:rI.Child,leave:"nx-transition-opacity nx-duration-100",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:(0,ej.jsx)("ul",{className:(0,eE.Z)("nextra-scrollbar","nx-border nx-border-gray-200 nx-bg-white nx-text-gray-100 dark:nx-border-neutral-800 dark:nx-bg-neutral-900","nx-absolute nx-top-full nx-z-20 nx-mt-2 nx-overflow-auto nx-overscroll-contain nx-rounded-xl nx-py-2.5 nx-shadow-xl","nx-max-h-[min(calc(50vh-11rem-env(safe-area-inset-bottom)),400px)]","md:nx-max-h-[min(calc(100vh-5rem-env(safe-area-inset-bottom)),400px)]","nx-inset-x-0 ltr:md:nx-left-auto rtl:md:nx-right-auto","contrast-more:nx-border contrast-more:nx-border-gray-900 contrast-more:dark:nx-border-gray-50",a),ref:es,style:{transition:"max-height .2s ease"},children:H?(0,ej.jsxs)("span",{className:"nx-flex nx-select-none nx-justify-center nx-gap-2 nx-p-8 nx-text-center nx-text-sm nx-text-red-500",children:[(0,ej.jsx)(eM.AV,{className:"nx-h-5 nx-w-5"}),renderString(ee.search.error)]}):z?(0,ej.jsxs)("span",{className:"nx-flex nx-select-none nx-justify-center nx-gap-2 nx-p-8 nx-text-center nx-text-sm nx-text-gray-400",children:[(0,ej.jsx)(eM.L4,{className:"nx-h-5 nx-w-5 nx-animate-spin"}),renderComponent(ee.search.loading)]}):B.length>0?B.map(({route:n,prefix:a,children:g,id:v},j)=>(0,ej.jsxs)(eP.Fragment,{children:[a,(0,ej.jsx)("li",{className:(0,eE.Z)("nx-mx-2.5 nx-break-words nx-rounded-md","contrast-more:nx-border",j===et?"nx-bg-primary-500/10 nx-text-primary-600 contrast-more:nx-border-primary-500":"nx-text-gray-800 contrast-more:nx-border-transparent dark:nx-text-gray-300"),children:(0,ej.jsx)(nw,{className:"nx-block nx-scroll-m-12 nx-px-2.5 nx-py-2",href:n,"data-index":j,onFocus:ef,onMouseMove:ef,onClick:ep,onKeyDown:em,children:g})})]},v)):renderComponent(ee.search.emptyResult)})})]})}var nC={},nP=new Map,loadIndexes=(n,a)=>{let g=n+"@"+a;if(nP.has(g))return nP.get(g);let v=loadIndexesImpl(n,a);return nP.set(g,v),v},loadIndexesImpl=(n,a)=>__async(void 0,null,function*(){let g=yield fetch(`${n}/_next/static/chunks/nextra-data-${a}.json`),v=yield g.json(),j=new rc.Document({cache:100,tokenize:"full",document:{id:"id",index:"content",store:["title"]},context:{resolution:9,depth:2,bidirectional:!0}}),z=new rc.Document({cache:100,tokenize:"full",document:{id:"id",index:"content",tag:"pageId",store:["title","content","url","display"]},context:{resolution:9,depth:2,bidirectional:!0}}),H=0;for(let[n,a]of Object.entries(v)){let g="";for(let[v,j]of(++H,Object.entries(a.data))){let[B,W]=v.split("#"),K=n+(B?"#"+B:""),ee=W||a.title,et=j.split("\n");z.add(__spreadValues({id:K,url:K,title:ee,pageId:`page_${H}`,content:ee},et[0]&&{display:et[0]}));for(let n=0;n{var g,v;if(!n)return;let[j,z]=nC[a],H=(null==(g=j.search(n,5,{enrich:!0,suggest:!0})[0])?void 0:g.result)||[],B=[],K={};for(let a=0;an._page_rk===a._page_rk?n._section_rk-a._section_rk:K[n._page_rk]!==K[a._page_rk]?K[a._page_rk]-K[n._page_rk]:n._page_rk-a._page_rk).map(n=>({id:`${n._page_rk}_${n._section_rk}`,route:n.route,prefix:n.prefix,children:n.children})))},et=(0,eP.useCallback)(n=>__async(this,null,function*(){if(n&&!nC[a]){j(!0);try{yield loadIndexes(g,a)}catch(n){H(!0)}j(!1)}}),[a,g]);return(0,ej.jsx)(Search,{loading:v,error:z,value:K,onChange:n=>__async(this,null,function*(){if(ee(n),!v){if(!nC[a]){j(!0);try{yield loadIndexes(g,a)}catch(n){H(!0)}j(!1)}doSearch(n)}}),onActive:et,className:n,overlayClassName:"nx-w-screen nx-min-h-[100px] nx-max-w-[min(calc(100vw-2rem),calc(100%+20rem))]",results:B})}function Select({options:n,selected:a,onChange:g,title:v,className:j}){let[z,H]=function(n){let a=(0,eP.useRef)(null),g=(0,eP.useRef)(null),v=(0,eP.useRef)(),j=(0,eP.useCallback)(()=>{var j;a.current&&g.current&&(null==(j=v.current)||j.call(v),v.current=t6(a.current,g.current,n).destroy)},[a,g,v,n]);return(0,eP.useMemo)(()=>[n=>{a.current=n,j()},n=>{g.current=n,j()}],[a,g,j])}({strategy:"fixed",placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"sameWidth",enabled:!0,fn({state:n}){n.styles.popper.minWidth=`${n.rects.reference.width}px`},phase:"beforeWrite",requires:["computeStyles"]}]});return(0,ej.jsx)(rK,{value:a,onChange:g,children:({open:g})=>(0,ej.jsxs)(rK.Button,{ref:z,title:v,className:(0,eE.Z)("nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-xs nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400",g?"nx-bg-gray-200 nx-text-gray-900 dark:nx-bg-primary-100/10 dark:nx-text-gray-50":"hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",j),children:[a.name,(0,ej.jsx)(Portal,{children:(0,ej.jsx)(rI,{ref:H,show:g,as:rK.Options,className:"nx-z-20 nx-max-h-64 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",leave:"nx-transition-opacity",leaveFrom:"nx-opacity-100",leaveTo:"nx-opacity-0",children:n.map(n=>(0,ej.jsxs)(rK.Option,{value:n,className:({active:n})=>(0,eE.Z)(n?"nx-bg-primary-50 nx-text-primary-600 dark:nx-bg-primary-500/10":"nx-text-gray-800 dark:nx-text-gray-100","nx-relative nx-cursor-pointer nx-whitespace-nowrap nx-py-1.5","nx-transition-colors ltr:nx-pl-3 ltr:nx-pr-9 rtl:nx-pr-3 rtl:nx-pl-9"),children:[n.name,n.key===a.key&&(0,ej.jsx)("span",{className:"nx-absolute nx-inset-y-0 nx-flex nx-items-center ltr:nx-right-3 rtl:nx-left-3",children:(0,ej.jsx)(eM.nQ,{})})]},n.key))})})]})})}function Portal(n){let a=useMounted();return a?(0,rJ.createPortal)(n.children,document.body):null}function LocaleSwitch({lite:n,className:a}){let g=useConfig(),{locale:v,asPath:j}=(0,eC.useRouter)(),z=g.i18n;if(!z.length)return null;let H=z.find(n=>v===n.locale);return(0,ej.jsx)(Select,{title:"Change language",className:a,onChange:n=>{let a=new Date(Date.now()+31536e6);document.cookie=`NEXT_LOCALE=${n.key}; expires=${a.toUTCString()}; path=/`,location.href=(0,rT.addBasePath)(j)},selected:{key:(null==H?void 0:H.locale)||"",name:(0,ej.jsxs)("span",{className:"nx-flex nx-items-center nx-gap-2",children:[(0,ej.jsx)(eM.n9,{}),(0,ej.jsx)("span",{className:n?"nx-hidden":"",children:null==H?void 0:H.text})]})},options:z.map(n=>({key:n.locale,name:n.text}))})}function dist_Head(){var n;let a=useConfig(),{resolvedTheme:g}=y(),v=useMounted(),j="function"==typeof a.head?a.head({}):a.head,{primaryHue:z,primarySaturation:H}=a,{dark:B,light:W}="number"==typeof z?{dark:z,light:z}:z,{dark:K,light:ee}="number"==typeof H?{dark:H,light:H}:H,et=a.frontMatter;return(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(NextSeo,__spreadValues({title:a.title,description:et.description,canonical:et.canonical,openGraph:et.openGraph},null==(n=a.useNextSeoProps)?void 0:n.call(a))),(0,ej.jsxs)(rY(),{children:[a.faviconGlyph?(0,ej.jsx)("link",{rel:"icon",href:`data:image/svg+xml;utf8,${a.faviconGlyph}`}):null,v?(0,ej.jsx)("meta",{name:"theme-color",content:"dark"===g?"#111":"#fff"}):(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("meta",{name:"theme-color",content:"#fff",media:"(prefers-color-scheme: light)"}),(0,ej.jsx)("meta",{name:"theme-color",content:"#111",media:"(prefers-color-scheme: dark)"})]}),(0,ej.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, viewport-fit=cover"}),(0,ej.jsx)("style",{children:` + :root { + --nextra-primary-hue: ${W}deg; + --nextra-primary-saturation: ${ee}%; + --nextra-navbar-height: 4rem; + --nextra-menu-height: 3.75rem; + --nextra-banner-height: 2.5rem; + } + + .dark { + --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"}],n$=[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(...n$)).optional(),darkMode:t_.boolean(),direction:t_.enum(["ltr","rtl"]),docsRepositoryBase:t_.string().startsWith("https://"),editLink:t_.strictObject({component:t_.custom(...n$).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(...n$).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(...n$).optional(),title:t_.custom(...nB)}),useNextSeoProps:t_.custom(isFunction)}).deepPartial().extend({i18n:nH.optional()});var nG={"en-US":"Loading",fr:"Сhargement",ru:"Загрузка","zh-CN":"正在加载"},nq={"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&&nG[n]||nG[a];return(0,ej.jsxs)(ej.Fragment,{children:[g,"…"]})},placeholder:function(){let{locale:n,defaultLocale:a=nU}=(0,eC.useRouter)(),g=n&&nq[n]||nq[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]),e$=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},eq({"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({},e$,{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({},e$,{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:"8XXXVNJ7UW",apiKey:"bf7661918f784d59105bc70fcc22bfb0",indexName:"overextended"}),{})},head:function(){let{asPath:n}=(0,eC.useRouter)(),{frontMatter:a,title:g}=useConfig(),v=a.description||"Documentation for Overextended's resources for FiveM/RedM";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/ox.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://overextended.dev".concat(n)})]})},primaryHue:{dark:200,light:200},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]||"Overextended",v=a[a.length-1],j=/[a-z]/.test(v)&&/[A-Z]/.test(v)?v:"%s";return{titleTemplate:"".concat(j," - ").concat(v===g?"Documentation":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:"Introduction",guides:"Guides",oxmysql:"OxMySQL",ox_lib:"Ox Lib",fivemanage:{title:"Fivemanage",type:"page",href:"https://fivemanage.com/?ref=overextended"},creator_codes:{title:"Creator codes",type:"page",href:"https://overextended.dev/#creator-codes"},support:{title:"Support us",type:"page",href:"https://overextended.dev/#support-our-team"},ox_core:"Ox Core",ox_doorlock:"Ox Doorlock",ox_fuel:"Ox Fuel",ox_inventory:"Ox Inventory",ox_target:"Ox Target"}},{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:"Introduction"}},{kind:"Folder",name:"ox_core",route:"/ox_core",children:[{kind:"Folder",name:"Classes",route:"/ox_core/Classes",children:[{kind:"Folder",name:"Client",route:"/ox_core/Classes/Client",children:[{kind:"MdxPage",name:"OxPlayer",route:"/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"Meta",data:{OxPlayer:"OxPlayer"}}]},{kind:"Folder",name:"Server",route:"/ox_core/Classes/Server",children:[{kind:"MdxPage",name:"OxAccount",route:"/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"}},{kind:"MdxPage",name:"OxPlayer",route:"/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"}},{kind:"MdxPage",name:"OxVehicle",route:"/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"}},{kind:"Meta",data:{OxAccount:"OxAccount",OxPlayer:"OxPlayer",OxVehicle:"OxVehicle"}}]}]},{kind:"Folder",name:"Events",route:"/ox_core/Events",children:[{kind:"MdxPage",name:"client",route:"/ox_core/Events/client"},{kind:"MdxPage",name:"server",route:"/ox_core/Events/server"},{kind:"Meta",data:{client:"Client",server:"Server"}}]},{kind:"Folder",name:"Functions",route:"/ox_core/Functions",children:[{kind:"MdxPage",name:"common",route:"/ox_core/Functions/common"},{kind:"MdxPage",name:"server",route:"/ox_core/Functions/server"},{kind:"Meta",data:{common:"Common",server:"Server"}}]}]},{kind:"MdxPage",name:"ox_core",route:"/ox_core"},{kind:"Folder",name:"ox_doorlock",route:"/ox_doorlock",children:[{kind:"Folder",name:"Client",route:"/ox_doorlock/Client",children:[{kind:"MdxPage",name:"functions",route:"/ox_doorlock/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/ox_doorlock/Server",children:[{kind:"MdxPage",name:"events",route:"/ox_doorlock/Server/events"},{kind:"MdxPage",name:"functions",route:"/ox_doorlock/Server/functions"},{kind:"Meta",data:{events:"Events",functions:"Functions"}}]},{kind:"MdxPage",name:"settings",route:"/ox_doorlock/settings",frontMatter:{title:"Door Settings"}},{kind:"Meta",data:{settings:"Door Settings"}}]},{kind:"MdxPage",name:"ox_doorlock",route:"/ox_doorlock"},{kind:"Folder",name:"ox_fuel",route:"/ox_fuel",children:[{kind:"Folder",name:"Client",route:"/ox_fuel/Client",children:[{kind:"MdxPage",name:"functions",route:"/ox_fuel/Client/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"Folder",name:"Server",route:"/ox_fuel/Server",children:[{kind:"MdxPage",name:"functions",route:"/ox_fuel/Server/functions"},{kind:"Meta",data:{functions:"Functions"}}]},{kind:"MdxPage",name:"Shared",route:"/ox_fuel/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"MdxPage",name:"ox_fuel",route:"/ox_fuel"},{kind:"Folder",name:"ox_inventory",route:"/ox_inventory",children:[{kind:"Folder",name:"Events",route:"/ox_inventory/Events",children:[{kind:"MdxPage",name:"Client",route:"/ox_inventory/Events/Client"},{kind:"MdxPage",name:"Server",route:"/ox_inventory/Events/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Frameworks",route:"/ox_inventory/Frameworks",children:[{kind:"MdxPage",name:"esx",route:"/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"}},{kind:"MdxPage",name:"qbx",route:"/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"}},{kind:"Meta",data:{esx:"ESX",qbx:"Qbox"}}]},{kind:"Folder",name:"Functions",route:"/ox_inventory/Functions",children:[{kind:"MdxPage",name:"Client",route:"/ox_inventory/Functions/Client"},{kind:"Folder",name:"Server",route:"/ox_inventory/Functions/Server",children:[{kind:"MdxPage",name:"Hooks",route:"/ox_inventory/Functions/Server/Hooks"},{kind:"Meta",data:{Hooks:"Hooks"}}]},{kind:"MdxPage",name:"Server",route:"/ox_inventory/Functions/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Guides",route:"/ox_inventory/Guides",children:[{kind:"MdxPage",name:"crafting",route:"/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"}},{kind:"MdxPage",name:"creatingItems",route:"/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"}},{kind:"MdxPage",name:"metadata",route:"/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"shops",route:"/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"}},{kind:"MdxPage",name:"stashes",route:"/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:"/ox_inventory/issues",frontMatter:{title:"Common Issues"}},{kind:"Meta",data:{issues:"Common Issues"}}]},{kind:"MdxPage",name:"ox_inventory",route:"/ox_inventory"},{kind:"Folder",name:"ox_lib",route:"/ox_lib",children:[{kind:"Folder",name:"Modules",route:"/ox_lib/Modules",children:[{kind:"Folder",name:"ACL",route:"/ox_lib/Modules/ACL",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/ACL/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddCommand",route:"/ox_lib/Modules/AddCommand",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/AddCommand/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"AddKeybind",route:"/ox_lib/Modules/AddKeybind",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/AddKeybind/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Array",route:"/ox_lib/Modules/Array",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Array/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cache",route:"/ox_lib/Modules/Cache",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Cache/Client"},{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Cache/Shared"},{kind:"Meta",data:{Client:"Client",Shared:"Shared"}}]},{kind:"Folder",name:"Callback",route:"/ox_lib/Modules/Callback",children:[{kind:"Folder",name:"JavaScript",route:"/ox_lib/Modules/Callback/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Callback/JavaScript/Client"},{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Callback/JavaScript/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Callback/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Callback/Lua/Client"},{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Callback/Lua/Server"},{kind:"Meta",data:{Client:"Client",Server:"Server"}}]}]},{kind:"Folder",name:"Class",route:"/ox_lib/Modules/Class",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Class/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Cron",route:"/ox_lib/Modules/Cron",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Cron/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"DisableControls",route:"/ox_lib/Modules/DisableControls",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/DisableControls/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Dui",route:"/ox_lib/Modules/Dui",children:[{kind:"Folder",name:"Javascript",route:"/ox_lib/Modules/Dui/Javascript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Dui/Javascript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Dui/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Dui/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"GetClosestObject",route:"/ox_lib/Modules/GetClosestObject",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestObject/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPed",route:"/ox_lib/Modules/GetClosestPed",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestPed/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestPlayer",route:"/ox_lib/Modules/GetClosestPlayer",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestPlayer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetClosestVehicle",route:"/ox_lib/Modules/GetClosestVehicle",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetClosestVehicle/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyObjects",route:"/ox_lib/Modules/GetNearbyObjects",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyObjects/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPeds",route:"/ox_lib/Modules/GetNearbyPeds",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyPeds/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyPlayers",route:"/ox_lib/Modules/GetNearbyPlayers",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyPlayers/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"GetNearbyVehicles",route:"/ox_lib/Modules/GetNearbyVehicles",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/GetNearbyVehicles/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Interface",route:"/ox_lib/Modules/Interface",children:[{kind:"Folder",name:"Client",route:"/ox_lib/Modules/Interface/Client",children:[{kind:"MdxPage",name:"alert",route:"/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"}},{kind:"MdxPage",name:"clipboard",route:"/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"}},{kind:"MdxPage",name:"context",route:"/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"}},{kind:"MdxPage",name:"input",route:"/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"}},{kind:"MdxPage",name:"menu",route:"/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"}},{kind:"MdxPage",name:"notify",route:"/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"}},{kind:"MdxPage",name:"progress",route:"/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"}},{kind:"MdxPage",name:"radial",route:"/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"}},{kind:"MdxPage",name:"skillcheck",route:"/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"}},{kind:"MdxPage",name:"textui",route:"/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:"/ox_lib/Modules/Interface",frontMatter:{title:"Interface"}},{kind:"Folder",name:"Locale",route:"/ox_lib/Modules/Locale",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Locale/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Logger",route:"/ox_lib/Modules/Logger",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Logger/Server"},{kind:"Meta",data:{Server:"Server"}}]},{kind:"Folder",name:"Marker",route:"/ox_lib/Modules/Marker",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Marker/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Math",route:"/ox_lib/Modules/Math",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Math/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Points",route:"/ox_lib/Modules/Points",children:[{kind:"Folder",name:"JavaScript",route:"/ox_lib/Modules/Points/JavaScript",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Points/JavaScript/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Lua",route:"/ox_lib/Modules/Points/Lua",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Points/Lua/Client"},{kind:"Meta",data:{Client:"Client"}}]}]},{kind:"Folder",name:"Print",route:"/ox_lib/Modules/Print",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Print/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Raycast",route:"/ox_lib/Modules/Raycast",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Raycast/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Require",route:"/ox_lib/Modules/Require",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Require/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Streaming",route:"/ox_lib/Modules/Streaming",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/Streaming/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"String",route:"/ox_lib/Modules/String",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/String/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Table",route:"/ox_lib/Modules/Table",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Table/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Timer",route:"/ox_lib/Modules/Timer",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Timer/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"VehicleProperties",route:"/ox_lib/Modules/VehicleProperties",children:[{kind:"MdxPage",name:"Client",route:"/ox_lib/Modules/VehicleProperties/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"Folder",name:"Version",route:"/ox_lib/Modules/Version",children:[{kind:"MdxPage",name:"Server",route:"/ox_lib/Modules/Version/Server"},{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Version/Shared"},{kind:"Meta",data:{Server:"Server",Shared:"Shared"}}]},{kind:"Folder",name:"WaitFor",route:"/ox_lib/Modules/WaitFor",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/WaitFor/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Folder",name:"Zones",route:"/ox_lib/Modules/Zones",children:[{kind:"MdxPage",name:"Shared",route:"/ox_lib/Modules/Zones/Shared"},{kind:"Meta",data:{Shared:"Shared"}}]},{kind:"Meta",data:{Interface:"Interface"}}]}]},{kind:"MdxPage",name:"ox_lib",route:"/ox_lib"},{kind:"Folder",name:"ox_target",route:"/ox_target",children:[{kind:"Folder",name:"Functions",route:"/ox_target/Functions",children:[{kind:"MdxPage",name:"Client",route:"/ox_target/Functions/Client"},{kind:"Meta",data:{Client:"Client"}}]},{kind:"MdxPage",name:"TargetOptions",route:"/ox_target/TargetOptions"},{kind:"Meta",data:{TargetOptions:"TargetOptions"}}]},{kind:"MdxPage",name:"ox_target",route:"/ox_target"},{kind:"Folder",name:"oxmysql",route:"/oxmysql",children:[{kind:"Folder",name:"Functions",route:"/oxmysql/Functions",children:[{kind:"MdxPage",name:"insert",route:"/oxmysql/Functions/insert",frontMatter:{title:"insert"}},{kind:"MdxPage",name:"prepare",route:"/oxmysql/Functions/prepare",frontMatter:{title:"prepare"}},{kind:"MdxPage",name:"query",route:"/oxmysql/Functions/query",frontMatter:{title:"query"}},{kind:"MdxPage",name:"rawExecute",route:"/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"}},{kind:"MdxPage",name:"scalar",route:"/oxmysql/Functions/scalar",frontMatter:{title:"scalar"}},{kind:"MdxPage",name:"single",route:"/oxmysql/Functions/single",frontMatter:{title:"single"}},{kind:"MdxPage",name:"transaction",route:"/oxmysql/Functions/transaction",frontMatter:{title:"transaction"}},{kind:"MdxPage",name:"update",route:"/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:"MdxPage",name:"benchmark",route:"/oxmysql/benchmark"},{kind:"MdxPage",name:"placeholders",route:"/oxmysql/placeholders"},{kind:"MdxPage",name:"ui",route:"/oxmysql/ui",frontMatter:{title:"Using the Debug UI"}},{kind:"Meta",data:{benchmark:"Benchmark",placeholders:"Placeholders",ui:"Using the Debug UI"}}]},{kind:"MdxPage",name:"oxmysql",route:"/oxmysql",frontMatter:{title:"OxMySQL"}}],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:1729516534e3,title:"Guides",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:"Guides"}),"\n",(0,s.jsx)(n.p,{children:"General guides for working with Overextended resources."}),"\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:1729524649e3,title:"Guides",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-94ad0aacf252bd40.js b/_next/static/chunks/pages/guides/git-f61cc489918d5fe9.js similarity index 96% rename from _next/static/chunks/pages/guides/git-94ad0aacf252bd40.js rename to _next/static/chunks/pages/guides/git-f61cc489918d5fe9.js index 821cf753b7..94690d3001 100644 --- a/_next/static/chunks/pages/guides/git-94ad0aacf252bd40.js +++ b/_next/static/chunks/pages/guides/git-f61cc489918d5fe9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6730],{7444:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/git",function(){return n(149)}])},149:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return r}});var i=n(2676),s=n(2140),o=n(8745);let r=[];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a"},(0,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{children:"Git"}),"\n",(0,i.jsx)(t.p,{children:"Git is a version control system, allowing changes to be effectively tracked, merged, and reverted."}),"\n",(0,i.jsx)(t.p,{children:"As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Refer to ",(0,i.jsx)(t.a,{href:"https://docs.github.com/en/get-started/quickstart/set-up-git#setting-up-git",children:"GitHub's guide to setting up Git"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:["You can use a Git GUI client like ",(0,i.jsx)(t.a,{href:"https://www.gitkraken.com/",children:"GitKraken"})," to improve your workflow and more easily maintain changes."]}),"\n"]})]})}t.default=(0,s.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,i.jsx)(t,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/git.mdx",route:"/guides/git",timestamp:1729516534e3,title:"Git",headings:r},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,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/git",function(){return n(149)}])},149:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return r}});var i=n(2676),s=n(2140),o=n(8745);let r=[];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a"},(0,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{children:"Git"}),"\n",(0,i.jsx)(t.p,{children:"Git is a version control system, allowing changes to be effectively tracked, merged, and reverted."}),"\n",(0,i.jsx)(t.p,{children:"As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Refer to ",(0,i.jsx)(t.a,{href:"https://docs.github.com/en/get-started/quickstart/set-up-git#setting-up-git",children:"GitHub's guide to setting up Git"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:["You can use a Git GUI client like ",(0,i.jsx)(t.a,{href:"https://www.gitkraken.com/",children:"GitKraken"})," to improve your workflow and more easily maintain changes."]}),"\n"]})]})}t.default=(0,s.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,i.jsx)(t,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/git.mdx",route:"/guides/git",timestamp:1729524649e3,title:"Git",headings:r},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-8ca8d2e91e835e3d.js b/_next/static/chunks/pages/guides/nodejs-6daa6f967033422f.js similarity index 96% rename from _next/static/chunks/pages/guides/nodejs-8ca8d2e91e835e3d.js rename to _next/static/chunks/pages/guides/nodejs-6daa6f967033422f.js index 0c7763dc43..ea0d502c32 100644 --- a/_next/static/chunks/pages/guides/nodejs-8ca8d2e91e835e3d.js +++ b/_next/static/chunks/pages/guides/nodejs-6daa6f967033422f.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 s=t(2676),i=t(2140),o=t(8745);let r=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Node.js"}),"\n",(0,s.jsx)(n.p,{children:"Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://nodejs.org",children:"Download"})," and install the LTS version of Node.js."]}),"\n",(0,s.jsx)(n.li,{children:"Open a command-line terminal (e.g. Terminal, Command Prompt)."}),"\n",(0,s.jsxs)(n.li,{children:["Enter ",(0,s.jsx)(n.code,{children:"node --version"})," to confirm successful installation."]}),"\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,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/nodejs.mdx",route:"/guides/nodejs",frontMatter:{title:"Node.js"},timestamp:1729516534e3,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 s=t(2676),i=t(2140),o=t(8745);let r=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Node.js"}),"\n",(0,s.jsx)(n.p,{children:"Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://nodejs.org",children:"Download"})," and install the LTS version of Node.js."]}),"\n",(0,s.jsx)(n.li,{children:"Open a command-line terminal (e.g. Terminal, Command Prompt)."}),"\n",(0,s.jsxs)(n.li,{children:["Enter ",(0,s.jsx)(n.code,{children:"node --version"})," to confirm successful installation."]}),"\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,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/nodejs.mdx",route:"/guides/nodejs",frontMatter:{title:"Node.js"},timestamp:1729524649e3,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-fd5598aebd229f20.js b/_next/static/chunks/pages/guides/pnpm-d60d59534ec903fe.js similarity index 98% rename from _next/static/chunks/pages/guides/pnpm-fd5598aebd229f20.js rename to _next/static/chunks/pages/guides/pnpm-d60d59534ec903fe.js index 7b82760147..5e77ddac76 100644 --- a/_next/static/chunks/pages/guides/pnpm-fd5598aebd229f20.js +++ b/_next/static/chunks/pages/guides/pnpm-d60d59534ec903fe.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9302],{5110:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/pnpm",function(){return s(6469)}])},6469:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var i=s(2676),r=s(2140),l=s(8745);let t=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"pnpm"}),"\n",(0,i.jsx)(n.p,{children:"pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Ensure you have ",(0,i.jsx)(n.a,{href:"./nodejs",children:"installed Node.js"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Open a command-line terminal (e.g. Terminal, Command Prompt)."}),"\n",(0,i.jsxs)(n.li,{children:["Enter ",(0,i.jsx)(n.code,{children:"npm install -g pnpm"})," to globally install the package."]}),"\n",(0,i.jsxs)(n.li,{children:["You can install dependencies with pnpm using ",(0,i.jsx)(n.code,{children:"pnpm i"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["You can reference ",(0,i.jsx)(n.code,{children:"package.json"})," files for available scripts, i.e."]}),"\n",(0,i.jsx)(n.pre,{"data-language":"json","data-theme":"default",children:(0,i.jsxs)(n.code,{"data-language":"json","data-theme":"default",children:[(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"start"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"watch"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite build --watch"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"build"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tsc && vite build"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"preview"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite preview"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"format"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier --write \\"./src/**/*.{ts,tsx,css}\\""'})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,i.jsxs)(n.p,{children:["Using the example above ",(0,i.jsx)(n.code,{children:"pnpm build"})," will run the build script for the given package."]})]})}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,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/pnpm.mdx",route:"/guides/pnpm",frontMatter:{title:"pnpm"},timestamp:1729516534e3,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,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/pnpm",function(){return s(6469)}])},6469:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return t}});var i=s(2676),r=s(2140),l=s(8745);let t=[];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"pnpm"}),"\n",(0,i.jsx)(n.p,{children:"pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Ensure you have ",(0,i.jsx)(n.a,{href:"./nodejs",children:"installed Node.js"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Open a command-line terminal (e.g. Terminal, Command Prompt)."}),"\n",(0,i.jsxs)(n.li,{children:["Enter ",(0,i.jsx)(n.code,{children:"npm install -g pnpm"})," to globally install the package."]}),"\n",(0,i.jsxs)(n.li,{children:["You can install dependencies with pnpm using ",(0,i.jsx)(n.code,{children:"pnpm i"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["You can reference ",(0,i.jsx)(n.code,{children:"package.json"})," files for available scripts, i.e."]}),"\n",(0,i.jsx)(n.pre,{"data-language":"json","data-theme":"default",children:(0,i.jsxs)(n.code,{"data-language":"json","data-theme":"default",children:[(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"start"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"watch"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite build --watch"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"build"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tsc && vite build"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"preview"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"vite preview"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:'"format"'}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:":"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier --write \\"./src/**/*.{ts,tsx,css}\\""'})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"},"})})]})}),"\n",(0,i.jsxs)(n.p,{children:["Using the example above ",(0,i.jsx)(n.code,{children:"pnpm build"})," will run the build script for the given package."]})]})}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,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/pnpm.mdx",route:"/guides/pnpm",frontMatter:{title:"pnpm"},timestamp:1729524649e3,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-36f67a0737c51140.js b/_next/static/chunks/pages/guides/types-fa5fe5d1ee308bea.js similarity index 96% rename from _next/static/chunks/pages/guides/types-36f67a0737c51140.js rename to _next/static/chunks/pages/guides/types-fa5fe5d1ee308bea.js index dab2bd5be6..6af9fe642f 100644 --- a/_next/static/chunks/pages/guides/types-36f67a0737c51140.js +++ b/_next/static/chunks/pages/guides/types-fa5fe5d1ee308bea.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[970],{2598:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/types",function(){return n(2269)}])},2269:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var t=n(2676),i=n(2140),o=n(8745),r=n(7100);let a=[{depth:3,value:"Setup git, vscode, and vscode extensions",id:"setup-git-vscode-and-vscode-extensions"},{depth:3,value:"Download our Lua type definitions",id:"download-our-lua-type-definitions"},{depth:3,value:"Update your settings",id:"update-your-settings"}];function _createMdxContent(e){let s=Object.assign({h3:"h3",pre:"pre",code:"code",span:"span",p:"p",br:"br"},(0,o.a)(),e.components);return(0,t.jsxs)(r.Rg,{children:[(0,t.jsx)(s.h3,{id:"setup-git-vscode-and-vscode-extensions",children:"Setup git, vscode, and vscode extensions"}),(0,t.jsx)(s.h3,{id:"download-our-lua-type-definitions",children:"Download our Lua type definitions"}),(0,t.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,t.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_types.git"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"})]})})}),(0,t.jsx)(s.h3,{id:"update-your-settings",children:"Update your settings"}),(0,t.jsxs)(s.p,{children:["You can modify the user, workspace, or folder settings for vscode.",(0,t.jsx)(s.br,{}),"\n","Create an entry in ",(0,t.jsx)(s.code,{children:"Lua.workspace.library"})," pointing to the cloned directory, or specific subdirectories."]}),(0,t.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,t.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Lua.workspace.library"'}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_types/types"'}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_lib"'})]}),"\n",(0,t.jsx)(s.span,{className:"line",children:(0,t.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,o.a)(),e.components);return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/types.mdx",route:"/guides/types",timestamp:1729516534e3,title:"Types",headings:a},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,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guides/types",function(){return n(2269)}])},2269:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var t=n(2676),i=n(2140),o=n(8745),r=n(7100);let a=[{depth:3,value:"Setup git, vscode, and vscode extensions",id:"setup-git-vscode-and-vscode-extensions"},{depth:3,value:"Download our Lua type definitions",id:"download-our-lua-type-definitions"},{depth:3,value:"Update your settings",id:"update-your-settings"}];function _createMdxContent(e){let s=Object.assign({h3:"h3",pre:"pre",code:"code",span:"span",p:"p",br:"br"},(0,o.a)(),e.components);return(0,t.jsxs)(r.Rg,{children:[(0,t.jsx)(s.h3,{id:"setup-git-vscode-and-vscode-extensions",children:"Setup git, vscode, and vscode extensions"}),(0,t.jsx)(s.h3,{id:"download-our-lua-type-definitions",children:"Download our Lua type definitions"}),(0,t.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,t.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_types.git"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"})]})})}),(0,t.jsx)(s.h3,{id:"update-your-settings",children:"Update your settings"}),(0,t.jsxs)(s.p,{children:["You can modify the user, workspace, or folder settings for vscode.",(0,t.jsx)(s.br,{}),"\n","Create an entry in ",(0,t.jsx)(s.code,{children:"Lua.workspace.library"})," pointing to the cloned directory, or specific subdirectories."]}),(0,t.jsx)(s.pre,{"data-language":"json","data-theme":"default",children:(0,t.jsxs)(s.code,{"data-language":"json","data-theme":"default",children:[(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Lua.workspace.library"'}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_types/types"'}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"F:/GitHub/ox_lib"'})]}),"\n",(0,t.jsx)(s.span,{className:"line",children:(0,t.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,o.a)(),e.components);return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/types.mdx",route:"/guides/types",timestamp:1729524649e3,title:"Types",headings:a},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-3831aa770a7135ec.js b/_next/static/chunks/pages/guides/vscode-a6f407eb046a7fa4.js similarity index 99% rename from _next/static/chunks/pages/guides/vscode-3831aa770a7135ec.js rename to _next/static/chunks/pages/guides/vscode-a6f407eb046a7fa4.js index 8b785c6fb5..cf6ae61b6a 100644 --- a/_next/static/chunks/pages/guides/vscode-3831aa770a7135ec.js +++ b/_next/static/chunks/pages/guides/vscode-a6f407eb046a7fa4.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 i=n(5271),r=n(507),o=n.n(r),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,l=Object.getOwnPropertyDescriptors,d=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(d)for(var n of d(t))h.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,l(t)),__objRest=(e,t)=>{var n={};for(var i in e)u.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&d)for(var i of d(e))0>t.indexOf(i)&&h.call(e,i)&&(n[i]=e[i]);return n},createReactComponent=(e,t,n)=>{let r=(0,i.forwardRef)((t,r)=>{var{color:o="currentColor",size:a=24,stroke:c=2,children:l}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,i.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},s),{width:a,height:a,stroke:o,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,t])=>(0,i.createElement)(e,t)),...l||[]])});return r.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},r.displayName=`${t}`,r}},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 a}});var i=n(2676),r=n(2140),o=n(8745),s=n(3786);let a=[{depth:2,value:"Recommended extensions",id:"recommended-extensions"},{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,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{children:"VS Code"}),"\n",(0,i.jsx)(t.p,{children:"Visual Studio Code is our recommended editor when working with Lua."}),"\n",(0,i.jsx)(s.o6,{link:"https://code.visualstudio.com/Download"}),"\n",(0,i.jsx)(t.h2,{id:"recommended-extensions",children:"Recommended extensions"}),"\n",(0,i.jsx)(t.p,{children:"Extensions let you add languages, debuggers, and other tools to VS Code - improving your developer experience."}),"\n",(0,i.jsx)(t.h3,{id:"sumnekolua",children:"sumneko.lua"}),"\n",(0,i.jsx)(t.p,{children:"Lua Language Server provides numerous language features to make development easier and faster, e.g."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Annotations"}),"\n",(0,i.jsx)(t.li,{children:"Autocompletion"}),"\n",(0,i.jsx)(t.li,{children:"Code formatting"}),"\n",(0,i.jsx)(t.li,{children:"Diagnostics/warnings"}),"\n",(0,i.jsx)(t.li,{children:"Dynamic type checking"}),"\n",(0,i.jsx)(t.li,{children:"Syntax checking"}),"\n"]}),"\n",(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(s.eX,{link:"https://github.com/LuaLS/lua-language-server"}),(0,i.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=sumneko.lua"}),(0,i.jsx)(s.WR,{link:"https://github.com/LuaLS/lua-language-server/wiki"})]}),"\n",(0,i.jsx)(t.h3,{id:"overextendedcfxlua-vscode",children:"overextended.cfxlua-vscode"}),"\n",(0,i.jsxs)(t.p,{children:["Works alongside Lua Language Server to provide function and type declarations from Cfx's ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/code/components/citizen-scripting-lua/src/LuaScriptRuntime.cpp",children:"Lua runtime"}),", ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/lua/tree/luaglm-dev/cfx",children:"Lua dialect"}),", ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/data/shared/citizen/scripting/lua/scheduler.lua",children:"environment globals"}),", and game natives."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:"https://user-images.githubusercontent.com/65407488/141656446-21f9105a-9371-4bb3-9089-ab672930f830.png",alt:""})}),"\n",(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(s.eX,{link:"https://github.com/overextended/cfxlua-vscode"}),(0,i.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=overextended.cfxlua-vscode"})]})]})}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,i.jsx)(t,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/vscode.mdx",route:"/guides/vscode",frontMatter:{title:"VS Code"},timestamp:1729516534e3,title:"VS Code",headings:a},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 i=n(2676);n(5271);var r=n(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"}]]),s=(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"}]]),l=(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:t="left",children:n,icon:r,link:o}=e;return(0,i.jsx)("div",{className:"h-fit w-fit",children:(0,i.jsx)("a",{href:o,children:(0,i.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,i.jsx)("div",{children:r}),n,"right"===t&&(0,i.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}function DownloadButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Package"})}},4049:function(e,t,n){"use strict";var i=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,r,o,s){if(s!==i){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 i=n(5271),r=n(507),o=n.n(r),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,l=Object.getOwnPropertyDescriptors,d=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(d)for(var n of d(t))h.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>c(e,l(t)),__objRest=(e,t)=>{var n={};for(var i in e)u.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&d)for(var i of d(e))0>t.indexOf(i)&&h.call(e,i)&&(n[i]=e[i]);return n},createReactComponent=(e,t,n)=>{let r=(0,i.forwardRef)((t,r)=>{var{color:o="currentColor",size:a=24,stroke:c=2,children:l}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,i.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},s),{width:a,height:a,stroke:o,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,t])=>(0,i.createElement)(e,t)),...l||[]])});return r.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},r.displayName=`${t}`,r}},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 a}});var i=n(2676),r=n(2140),o=n(8745),s=n(3786);let a=[{depth:2,value:"Recommended extensions",id:"recommended-extensions"},{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,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{children:"VS Code"}),"\n",(0,i.jsx)(t.p,{children:"Visual Studio Code is our recommended editor when working with Lua."}),"\n",(0,i.jsx)(s.o6,{link:"https://code.visualstudio.com/Download"}),"\n",(0,i.jsx)(t.h2,{id:"recommended-extensions",children:"Recommended extensions"}),"\n",(0,i.jsx)(t.p,{children:"Extensions let you add languages, debuggers, and other tools to VS Code - improving your developer experience."}),"\n",(0,i.jsx)(t.h3,{id:"sumnekolua",children:"sumneko.lua"}),"\n",(0,i.jsx)(t.p,{children:"Lua Language Server provides numerous language features to make development easier and faster, e.g."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Annotations"}),"\n",(0,i.jsx)(t.li,{children:"Autocompletion"}),"\n",(0,i.jsx)(t.li,{children:"Code formatting"}),"\n",(0,i.jsx)(t.li,{children:"Diagnostics/warnings"}),"\n",(0,i.jsx)(t.li,{children:"Dynamic type checking"}),"\n",(0,i.jsx)(t.li,{children:"Syntax checking"}),"\n"]}),"\n",(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(s.eX,{link:"https://github.com/LuaLS/lua-language-server"}),(0,i.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=sumneko.lua"}),(0,i.jsx)(s.WR,{link:"https://github.com/LuaLS/lua-language-server/wiki"})]}),"\n",(0,i.jsx)(t.h3,{id:"overextendedcfxlua-vscode",children:"overextended.cfxlua-vscode"}),"\n",(0,i.jsxs)(t.p,{children:["Works alongside Lua Language Server to provide function and type declarations from Cfx's ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/code/components/citizen-scripting-lua/src/LuaScriptRuntime.cpp",children:"Lua runtime"}),", ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/lua/tree/luaglm-dev/cfx",children:"Lua dialect"}),", ",(0,i.jsx)(t.a,{href:"https://github.com/citizenfx/fivem/blob/master/data/shared/citizen/scripting/lua/scheduler.lua",children:"environment globals"}),", and game natives."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:"https://user-images.githubusercontent.com/65407488/141656446-21f9105a-9371-4bb3-9089-ab672930f830.png",alt:""})}),"\n",(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(s.eX,{link:"https://github.com/overextended/cfxlua-vscode"}),(0,i.jsx)(s.o6,{link:"https://marketplace.visualstudio.com/items?itemName=overextended.cfxlua-vscode"})]})]})}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,i.jsx)(t,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/guides/vscode.mdx",route:"/guides/vscode",frontMatter:{title:"VS Code"},timestamp:1729524649e3,title:"VS Code",headings:a},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 i=n(2676);n(5271);var r=n(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"}]]),s=(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"}]]),l=(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:t="left",children:n,icon:r,link:o}=e;return(0,i.jsx)("div",{className:"h-fit w-fit",children:(0,i.jsx)("a",{href:o,children:(0,i.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,i.jsx)("div",{children:r}),n,"right"===t&&(0,i.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(s,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}function DownloadButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Package"})}},4049:function(e,t,n){"use strict";var i=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,r,o,s){if(s!==i){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-3c9cd1221c8894fb.js b/_next/static/chunks/pages/index-711b79d226390d26.js similarity index 99% rename from _next/static/chunks/pages/index-3c9cd1221c8894fb.js rename to _next/static/chunks/pages/index-711b79d226390d26.js index 282449ecac..08857905ec 100644 --- a/_next/static/chunks/pages/index-3c9cd1221c8894fb.js +++ b/_next/static/chunks/pages/index-711b79d226390d26.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{5850:function(e,t,r){"use strict";r.d(t,{Z:function(){return createReactComponent}});var o=r(5271),n=r(507),s=r.n(n),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,l=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&__defNormalProp(e,r,t[r]);if(d)for(var r of d(t))h.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>c(e,l(t)),__objRest=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))0>t.indexOf(o)&&h.call(e,o)&&(r[o]=e[o]);return r},createReactComponent=(e,t,r)=>{let n=(0,o.forwardRef)((t,n)=>{var{color:s="currentColor",size:i=24,stroke:c=2,children:l}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:n},a),{width:i,height:i,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...r.map(([e,t])=>(0,o.createElement)(e,t)),...l||[]])});return n.propTypes={color:s().string,size:s().oneOfType([s().string,s().number]),stroke:s().oneOfType([s().string,s().number])},n.displayName=`${t}`,n}},2616:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(1898)}])},1898:function(e,t,r){"use strict";r.r(t),r.d(t,{__toc:function(){return p},default:function(){return h}});var o=r(2676),n=r(2140),s=r(8745),a=r(5850),i=(0,a.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:r,kofiName:n}=e;return(0,o.jsxs)("div",{className:"flex w-32 flex-col items-center justify-center gap-2",children:[(0,o.jsx)("p",{children:r}),(0,o.jsx)("img",{src:t,alt:"".concat(r,"-image"),className:"rounded-md bg-neutral-100 shadow-md dark:bg-neutral-900"}),(0,o.jsx)("a",{href:"https://ko-fi.com/".concat(n),target:"_blank",className:"w-full",children:(0,o.jsxs)("button",{className:"flex w-full items-center justify-center gap-2 rounded-md bg-sky-500/20 p-2 text-sky-500 hover:bg-sky-500/30",children:[(0,o.jsx)(i,{}),"Support"]})})]})},c=r(5271),l=(0,a.Z)("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),d=(0,a.Z)("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),components_CreatorCode=e=>{let[t,r,n,s,a]=e,[i,p]=c.useState(!1);return(0,o.jsxs)("div",{className:"flex flex-col border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-md",children:[(0,o.jsx)("a",{href:r,target:"_blank",className:"h-[150px] flex items-center justify-center bg-neutral-800 dark:hover:bg-neutral-800 hover:bg-neutral-700 dark:bg-neutral-900 rounded-none rounded-tl-lg rounded-tr-lg",children:(0,o.jsx)("img",{className:"self-center",width:"150",src:a,alt:t})}),(0,o.jsxs)("div",{className:"p-2 flex items-center justify-center flex-col gap-2",children:[(0,o.jsx)("p",{className:"font-bold text-lg line-clamp-1",children:t}),(0,o.jsxs)("p",{className:"text-sm",children:["Code: ",(0,o.jsx)("code",{className:"font-bold",children:n})," ",i?(0,o.jsx)("button",{children:(0,o.jsx)(d,{size:16})}):(0,o.jsx)("button",{onClick:function(){p(!0),navigator.clipboard.writeText(n).then(),setTimeout(()=>p(!1),1500)},children:(0,o.jsx)(l,{size:16})})]}),(0,o.jsxs)("p",{className:"text-sm self-end text-red-400 font-bold mt-4",children:[s,"% off"]})]})]},t)};let p=[{depth:2,value:"Support our team",id:"support-our-team"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:2,value:"Creator codes",id:"creator-codes"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",em:"em",a:"a",code:"code",ul:"ul",li:"li"},(0,s.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{children:"Introduction"}),"\n",(0,o.jsx)(t.p,{children:"Here you can find all of the official documentation for resources developed by the Overextended team."}),"\n",(0,o.jsx)(t.p,{children:'If you feel like the documentation is lacking in some department then feel free to go onto that page and click the "Edit this page" at the bottom and submit a Pull Request.'}),"\n",(0,o.jsx)(t.h2,{id:"support-our-team",children:"Support our team"}),"\n",(0,o.jsxs)(t.p,{children:["We enjoy being able to create and share ",(0,o.jsx)(t.em,{children:"free and open-source"})," work, but they often require considerable time and effort to maintain and support."]}),"\n",(0,o.jsx)(t.p,{children:"If you frequently use our resources and love what we do, consider supporting us so we can continue our work."}),"\n",(0,o.jsxs)("div",{className:"mt-2 flex flex-wrap justify-evenly gap-4",children:[(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/65407488?v=4",name:"Linden",kofiName:"thelindat"}),(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/39926192?v=4",name:"Luke",kofiName:"lukewastaken"}),(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/31368547?v=4",name:"DokaDoka",kofiName:"dokadoka"})]}),"\n",(0,o.jsx)(t.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," is a cloud management service tailored for game servers, offering a range of features to facilitate easier management and administration of your FiveM server."]}),"\n",(0,o.jsx)(t.p,{children:"Their services includes a free plan with limited media storage space, along with several paid plans designed to accommodate larger servers requiring more extensive storage and logging capabilities."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://fivemanage.com/?ref=overextended",children:"Get started with Fivemanage"})," and use code ",(0,o.jsx)(t.code,{children:"OX10"})," for 10% off your subscription - forever!"]}),"\n",(0,o.jsx)(t.h2,{id:"creator-codes",children:"Creator codes"}),"\n",(0,o.jsx)(t.p,{children:"Creator codes allow Tebex stores to share a percentage of a purchase with us, while giving a discount to the customer. We make these deals to advertise trusted creators who meet our criteria."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Resources are highly configurable or, preferably, source-available."}),"\n",(0,o.jsx)(t.li,{children:"We trust that customers will be given assistance."}),"\n",(0,o.jsx)(t.li,{children:"The creator is a known member of our community."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["More information about these creators is available in our ",(0,o.jsx)(t.a,{href:"https://discord.com/channels/813030955598086174/1028912864389496903",children:"Discord"}),"."]}),"\n",(0,o.jsx)("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 grid-cols-1 mt-4 gap-4",children:[["Andyyy","https://andyyy.tebex.io/","ox20",20,"/static/creators/andy.png"],["Berkie's Workshop","https://berkie.tebex.io/","ox10",10,"/static/creators/berkie.png"],["Dolu Mods","https://dolu.tebex.io/","overextended",25,"/static/creators/dolu.png"],["Electus Scripts","https://store.electus-scripts.com/","ox10",10,"/static/creators/electus.png"],["Loaf Scripts","https://store.loaf-scripts.com/","ox10",10,"/static/creators/loaf.png"],["OT Studios","https://store.otstudios.net/ox","ox10",10,"/static/creators/otstudios.png"],["Randolio Scripts","https://randolio.tebex.io/","OVEREXTENDED",20,"/static/creators/randolio.png"],["rcore","https://store.rcore.cz/","ox10",10,"/static/creators/rcore.png"],["Artwork Inventory","https://artwork-inventory.tebex.io/","ox10",10,"/static/creators/artworkInventory.gif"],["Renewed Scripts","https://renewed.tebex.io/ox","ox15",15,"/static/creators/renewed.png"],["Wasabi Scripts","https://store.wasabiscripts.com/ox","OX20",20,"/static/creators/wasabi.png"],["Three Amigos Modding","https://threeamigos.shop/","overextended",10,"/static/creators/tam.png"],["RAHE Development","https://rahe.tebex.io/","ox10",10,"/static/creators/rahe.png"],["CeebStudio","https://store.ceeb.studio/","ox10",10,"/static/creators/ceeb.png"]].sort((e,t)=>e[0].localeCompare(t[0])).map(e=>components_CreatorCode(e))}),"\n",(0,o.jsx)(t.p,{children:'You can apply a creator code at checkout under "Support A Creator".'})]})}var h=(0,n.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,o.jsx)(t,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/index.mdx",route:"/",frontMatter:{title:"Introduction"},timestamp:1729516534e3,title:"Introduction",headings:p},pageNextRoute:"/"})},4049:function(e,t,r){"use strict";var o=r(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,r,n,s,a){if(a!==o){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,r){e.exports=r(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=2616)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{5850:function(e,t,r){"use strict";r.d(t,{Z:function(){return createReactComponent}});var o=r(5271),n=r(507),s=r.n(n),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,l=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&__defNormalProp(e,r,t[r]);if(d)for(var r of d(t))h.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>c(e,l(t)),__objRest=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))0>t.indexOf(o)&&h.call(e,o)&&(r[o]=e[o]);return r},createReactComponent=(e,t,r)=>{let n=(0,o.forwardRef)((t,n)=>{var{color:s="currentColor",size:i=24,stroke:c=2,children:l}=t,d=__objRest(t,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:n},a),{width:i,height:i,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),d),[...r.map(([e,t])=>(0,o.createElement)(e,t)),...l||[]])});return n.propTypes={color:s().string,size:s().oneOfType([s().string,s().number]),stroke:s().oneOfType([s().string,s().number])},n.displayName=`${t}`,n}},2616:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(1898)}])},1898:function(e,t,r){"use strict";r.r(t),r.d(t,{__toc:function(){return p},default:function(){return h}});var o=r(2676),n=r(2140),s=r(8745),a=r(5850),i=(0,a.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:r,kofiName:n}=e;return(0,o.jsxs)("div",{className:"flex w-32 flex-col items-center justify-center gap-2",children:[(0,o.jsx)("p",{children:r}),(0,o.jsx)("img",{src:t,alt:"".concat(r,"-image"),className:"rounded-md bg-neutral-100 shadow-md dark:bg-neutral-900"}),(0,o.jsx)("a",{href:"https://ko-fi.com/".concat(n),target:"_blank",className:"w-full",children:(0,o.jsxs)("button",{className:"flex w-full items-center justify-center gap-2 rounded-md bg-sky-500/20 p-2 text-sky-500 hover:bg-sky-500/30",children:[(0,o.jsx)(i,{}),"Support"]})})]})},c=r(5271),l=(0,a.Z)("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),d=(0,a.Z)("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),components_CreatorCode=e=>{let[t,r,n,s,a]=e,[i,p]=c.useState(!1);return(0,o.jsxs)("div",{className:"flex flex-col border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-md",children:[(0,o.jsx)("a",{href:r,target:"_blank",className:"h-[150px] flex items-center justify-center bg-neutral-800 dark:hover:bg-neutral-800 hover:bg-neutral-700 dark:bg-neutral-900 rounded-none rounded-tl-lg rounded-tr-lg",children:(0,o.jsx)("img",{className:"self-center",width:"150",src:a,alt:t})}),(0,o.jsxs)("div",{className:"p-2 flex items-center justify-center flex-col gap-2",children:[(0,o.jsx)("p",{className:"font-bold text-lg line-clamp-1",children:t}),(0,o.jsxs)("p",{className:"text-sm",children:["Code: ",(0,o.jsx)("code",{className:"font-bold",children:n})," ",i?(0,o.jsx)("button",{children:(0,o.jsx)(d,{size:16})}):(0,o.jsx)("button",{onClick:function(){p(!0),navigator.clipboard.writeText(n).then(),setTimeout(()=>p(!1),1500)},children:(0,o.jsx)(l,{size:16})})]}),(0,o.jsxs)("p",{className:"text-sm self-end text-red-400 font-bold mt-4",children:[s,"% off"]})]})]},t)};let p=[{depth:2,value:"Support our team",id:"support-our-team"},{depth:2,value:"Fivemanage",id:"fivemanage"},{depth:2,value:"Creator codes",id:"creator-codes"}];function _createMdxContent(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",em:"em",a:"a",code:"code",ul:"ul",li:"li"},(0,s.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{children:"Introduction"}),"\n",(0,o.jsx)(t.p,{children:"Here you can find all of the official documentation for resources developed by the Overextended team."}),"\n",(0,o.jsx)(t.p,{children:'If you feel like the documentation is lacking in some department then feel free to go onto that page and click the "Edit this page" at the bottom and submit a Pull Request.'}),"\n",(0,o.jsx)(t.h2,{id:"support-our-team",children:"Support our team"}),"\n",(0,o.jsxs)(t.p,{children:["We enjoy being able to create and share ",(0,o.jsx)(t.em,{children:"free and open-source"})," work, but they often require considerable time and effort to maintain and support."]}),"\n",(0,o.jsx)(t.p,{children:"If you frequently use our resources and love what we do, consider supporting us so we can continue our work."}),"\n",(0,o.jsxs)("div",{className:"mt-2 flex flex-wrap justify-evenly gap-4",children:[(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/65407488?v=4",name:"Linden",kofiName:"thelindat"}),(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/39926192?v=4",name:"Luke",kofiName:"lukewastaken"}),(0,o.jsx)(components_DonateLink,{image:"https://avatars.githubusercontent.com/u/31368547?v=4",name:"DokaDoka",kofiName:"dokadoka"})]}),"\n",(0,o.jsx)(t.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"})," is a cloud management service tailored for game servers, offering a range of features to facilitate easier management and administration of your FiveM server."]}),"\n",(0,o.jsx)(t.p,{children:"Their services includes a free plan with limited media storage space, along with several paid plans designed to accommodate larger servers requiring more extensive storage and logging capabilities."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://fivemanage.com/?ref=overextended",children:"Get started with Fivemanage"})," and use code ",(0,o.jsx)(t.code,{children:"OX10"})," for 10% off your subscription - forever!"]}),"\n",(0,o.jsx)(t.h2,{id:"creator-codes",children:"Creator codes"}),"\n",(0,o.jsx)(t.p,{children:"Creator codes allow Tebex stores to share a percentage of a purchase with us, while giving a discount to the customer. We make these deals to advertise trusted creators who meet our criteria."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Resources are highly configurable or, preferably, source-available."}),"\n",(0,o.jsx)(t.li,{children:"We trust that customers will be given assistance."}),"\n",(0,o.jsx)(t.li,{children:"The creator is a known member of our community."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["More information about these creators is available in our ",(0,o.jsx)(t.a,{href:"https://discord.com/channels/813030955598086174/1028912864389496903",children:"Discord"}),"."]}),"\n",(0,o.jsx)("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 grid-cols-1 mt-4 gap-4",children:[["Andyyy","https://andyyy.tebex.io/","ox20",20,"/static/creators/andy.png"],["Berkie's Workshop","https://berkie.tebex.io/","ox10",10,"/static/creators/berkie.png"],["Dolu Mods","https://dolu.tebex.io/","overextended",25,"/static/creators/dolu.png"],["Electus Scripts","https://store.electus-scripts.com/","ox10",10,"/static/creators/electus.png"],["Loaf Scripts","https://store.loaf-scripts.com/","ox10",10,"/static/creators/loaf.png"],["OT Studios","https://store.otstudios.net/ox","ox10",10,"/static/creators/otstudios.png"],["Randolio Scripts","https://randolio.tebex.io/","OVEREXTENDED",20,"/static/creators/randolio.png"],["rcore","https://store.rcore.cz/","ox10",10,"/static/creators/rcore.png"],["Artwork Inventory","https://artwork-inventory.tebex.io/","ox10",10,"/static/creators/artworkInventory.gif"],["Renewed Scripts","https://renewed.tebex.io/ox","ox15",15,"/static/creators/renewed.png"],["Wasabi Scripts","https://store.wasabiscripts.com/ox","OX20",20,"/static/creators/wasabi.png"],["Three Amigos Modding","https://threeamigos.shop/","overextended",10,"/static/creators/tam.png"],["RAHE Development","https://rahe.tebex.io/","ox10",10,"/static/creators/rahe.png"],["CeebStudio","https://store.ceeb.studio/","ox10",10,"/static/creators/ceeb.png"]].sort((e,t)=>e[0].localeCompare(t[0])).map(e=>components_CreatorCode(e))}),"\n",(0,o.jsx)(t.p,{children:'You can apply a creator code at checkout under "Support A Creator".'})]})}var h=(0,n.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,o.jsx)(t,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/index.mdx",route:"/",frontMatter:{title:"Introduction"},timestamp:1729524649e3,title:"Introduction",headings:p},pageNextRoute:"/"})},4049:function(e,t,r){"use strict";var o=r(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,r,n,s,a){if(a!==o){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,r){e.exports=r(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=2616)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core-108ba824185479a8.js b/_next/static/chunks/pages/ox_core-87d0fc2a5c42bbe0.js similarity index 99% rename from _next/static/chunks/pages/ox_core-108ba824185479a8.js rename to _next/static/chunks/pages/ox_core-87d0fc2a5c42bbe0.js index 96e6c6f04c..f95d943da1 100644 --- a/_next/static/chunks/pages/ox_core-108ba824185479a8.js +++ b/_next/static/chunks/pages/ox_core-87d0fc2a5c42bbe0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8693],{5850:function(e,n,s){"use strict";s.d(n,{Z:function(){return createReactComponent}});var r=s(5271),i=s(507),t=s.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,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,s)=>n in e?o(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))u.call(n,s)&&__defNormalProp(e,s,n[s]);return e},__spreadProps=(e,n)=>a(e,c(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)&&u.call(e,r)&&(s[r]=e[r]);return s},createReactComponent=(e,n,s)=>{let i=(0,r.forwardRef)((n,i)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=n,d=__objRest(n,["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}`}),d),[...s.map(([e,n])=>(0,r.createElement)(e,n)),...c||[]])});return i.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},i.displayName=`${n}`,i}},952:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core",function(){return s(1311)}])},1311:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var r=s(2676),i=s(2140),t=s(8745),l=s(7100),o=s(8713),a=s(3786);let c=[{depth:2,value:"txAdmin recipe",id:"txadmin-recipe"},{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies.",id:"install-all-resource-dependencies"},{depth:3,value:"Download the latest release or build the source code.",id:"download-the-latest-release-or-build-the-source-code"},{depth:3,value:"Install optional dependencies.",id:"install-optional-dependencies"},{depth:2,value:"Using ox_core in your resources",id:"using-ox_core-in-your-resources"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Config",id:"config"},{depth:3,value:"Replicated",id:"replicated"}];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,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Ox Core"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_core"}),"\n",(0,r.jsx)(n.p,{children:"A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities."}),"\n",(0,r.jsx)(n.h2,{id:"txadmin-recipe",children:"txAdmin recipe"}),"\n",(0,r.jsxs)(n.p,{children:["If you're looking to quickly install and setup ox_core, try using ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/txAdminRecipe",children:"our recipe"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(l.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["We ",(0,r.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(n.a,{href:"../guides",children:"Guides"})," to setup necessary development tools."]})}),"\n",(0,r.jsxs)(l.Rg,{children:[(0,r.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(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:"download-the-latest-release-or-build-the-source-code",children:["Download the latest ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/ox_core/releases/latest",children:"release"})," or build the source code."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Setup ",(0,r.jsx)(n.a,{href:"../guides/git",children:"Git"}),", ",(0,r.jsx)(n.a,{href:"../guides/nodejs",children:"Node.js"}),", and ",(0,r.jsx)(n.a,{href:"../guides/pnpm",children:"pnpm"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Download and setup ",(0,r.jsx)(n.a,{href:"https://mariadb.com/downloads/community/community-server/",children:"MariaDB 11.4+"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"Run the following commands in your CLI (e.g. Terminal, Command Prompt)."}),"\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:"install-optional-dependencies",children:"Install optional dependencies."}),(0,r.jsx)(n.p,{children:"These resources aren't strictly required, but they are strongly recommended."}),(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:"using-ox_core-in-your-resources",children:"Using ox_core in your resources"}),"\n",(0,r.jsx)(n.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(n.p,{children:["You can import ox_core definitions by loading ",(0,r.jsx)(n.code,{children:"@ox_core/lib/init.lua"})," into your resource."]}),"\n",(0,r.jsxs)(l.mQ,{items:["fxmanifest.lua","require"],children:[(0,r.jsxs)(l.OK,{children:[(0,r.jsx)(n.p,{children:"This can be a client_script or server_script, if preferred."}),(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)(l.OK,{children:[(0,r.jsxs)(n.p,{children:["If you prefer, you can use our ",(0,r.jsx)(n.a,{href:"../ox_lib/Modules/Require/Shared",children:"require"})," function from ",(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:"To use ox_core with your JavaScript resources you'll need to use our npm package, providing full support for TypeScript and Intellisense."}),"\n",(0,r.jsx)(a.aj,{link:"https://www.npmjs.com/package/@overextended/ox_core"}),"\n",(0,r.jsxs)(n.p,{children:["To get started, try our ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/fivem-typescript-boilerplate",children:"fivem-typescript-boilerplate"})," and install the ox_core package."]}),"\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:"config",children:"Config"}),"\n",(0,r.jsxs)(n.p,{children:["Resource configuration is handled using ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"replicated",children:"Replicated"}),"\n",(0,r.jsxs)(n.p,{children:["These convars should use the ",(0,r.jsx)(n.code,{children:"setr"})," command to be read by clients."]}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"false"})]}),"\n",(0,r.jsxs)(n.li,{children:["Enables debug messages and commands. Enabled by default when using ",(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:["Default: ",(0,r.jsx)(n.code,{children:"1"})]}),"\n",(0,r.jsx)(n.li,{children:"Sets the number of character slots available for character selection resources (e.g. 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:["Default: ",(0,r.jsx)(n.code,{children:'"........"'})]}),"\n",(0,r.jsxs)(n.li,{children:["See ",(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:["Default: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Enables the built-in death and respawn system."}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Enables built-in character registration, and uses uses that character when joining."}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"[-258.211, -293.077, 21.6132, 206.0]"})]}),"\n",(0,r.jsx)(n.li,{children:"Sets the default spawn location for newly created characters."}),"\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,t.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_core.mdx",route:"/ox_core",timestamp:1729516534e3,title:"Ox Core",headings:c},pageNextRoute:"/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),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:n="left",children:s,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"===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)(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||"Documentation"})}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||"Package"})}},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,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,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=952)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8693],{5850:function(e,n,s){"use strict";s.d(n,{Z:function(){return createReactComponent}});var r=s(5271),i=s(507),t=s.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,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,s)=>n in e?o(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))u.call(n,s)&&__defNormalProp(e,s,n[s]);return e},__spreadProps=(e,n)=>a(e,c(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)&&u.call(e,r)&&(s[r]=e[r]);return s},createReactComponent=(e,n,s)=>{let i=(0,r.forwardRef)((n,i)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=n,d=__objRest(n,["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}`}),d),[...s.map(([e,n])=>(0,r.createElement)(e,n)),...c||[]])});return i.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},i.displayName=`${n}`,i}},952:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core",function(){return s(1311)}])},1311:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var r=s(2676),i=s(2140),t=s(8745),l=s(7100),o=s(8713),a=s(3786);let c=[{depth:2,value:"txAdmin recipe",id:"txadmin-recipe"},{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Install all resource dependencies.",id:"install-all-resource-dependencies"},{depth:3,value:"Download the latest release or build the source code.",id:"download-the-latest-release-or-build-the-source-code"},{depth:3,value:"Install optional dependencies.",id:"install-optional-dependencies"},{depth:2,value:"Using ox_core in your resources",id:"using-ox_core-in-your-resources"},{depth:3,value:"Lua",id:"lua"},{depth:3,value:"JavaScript",id:"javascript"},{depth:2,value:"Config",id:"config"},{depth:3,value:"Replicated",id:"replicated"}];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,t.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Ox Core"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_core"}),"\n",(0,r.jsx)(n.p,{children:"A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities."}),"\n",(0,r.jsx)(n.h2,{id:"txadmin-recipe",children:"txAdmin recipe"}),"\n",(0,r.jsxs)(n.p,{children:["If you're looking to quickly install and setup ox_core, try using ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/txAdminRecipe",children:"our recipe"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(l.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["We ",(0,r.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(n.a,{href:"../guides",children:"Guides"})," to setup necessary development tools."]})}),"\n",(0,r.jsxs)(l.Rg,{children:[(0,r.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(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:"download-the-latest-release-or-build-the-source-code",children:["Download the latest ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/ox_core/releases/latest",children:"release"})," or build the source code."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Setup ",(0,r.jsx)(n.a,{href:"../guides/git",children:"Git"}),", ",(0,r.jsx)(n.a,{href:"../guides/nodejs",children:"Node.js"}),", and ",(0,r.jsx)(n.a,{href:"../guides/pnpm",children:"pnpm"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Download and setup ",(0,r.jsx)(n.a,{href:"https://mariadb.com/downloads/community/community-server/",children:"MariaDB 11.4+"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"Run the following commands in your CLI (e.g. Terminal, Command Prompt)."}),"\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:"install-optional-dependencies",children:"Install optional dependencies."}),(0,r.jsx)(n.p,{children:"These resources aren't strictly required, but they are strongly recommended."}),(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:"using-ox_core-in-your-resources",children:"Using ox_core in your resources"}),"\n",(0,r.jsx)(n.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(n.p,{children:["You can import ox_core definitions by loading ",(0,r.jsx)(n.code,{children:"@ox_core/lib/init.lua"})," into your resource."]}),"\n",(0,r.jsxs)(l.mQ,{items:["fxmanifest.lua","require"],children:[(0,r.jsxs)(l.OK,{children:[(0,r.jsx)(n.p,{children:"This can be a client_script or server_script, if preferred."}),(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)(l.OK,{children:[(0,r.jsxs)(n.p,{children:["If you prefer, you can use our ",(0,r.jsx)(n.a,{href:"../ox_lib/Modules/Require/Shared",children:"require"})," function from ",(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:"To use ox_core with your JavaScript resources you'll need to use our npm package, providing full support for TypeScript and Intellisense."}),"\n",(0,r.jsx)(a.aj,{link:"https://www.npmjs.com/package/@overextended/ox_core"}),"\n",(0,r.jsxs)(n.p,{children:["To get started, try our ",(0,r.jsx)(n.a,{href:"https://github.com/overextended/fivem-typescript-boilerplate",children:"fivem-typescript-boilerplate"})," and install the ox_core package."]}),"\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:"config",children:"Config"}),"\n",(0,r.jsxs)(n.p,{children:["Resource configuration is handled using ",(0,r.jsx)(n.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"replicated",children:"Replicated"}),"\n",(0,r.jsxs)(n.p,{children:["These convars should use the ",(0,r.jsx)(n.code,{children:"setr"})," command to be read by clients."]}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"false"})]}),"\n",(0,r.jsxs)(n.li,{children:["Enables debug messages and commands. Enabled by default when using ",(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:["Default: ",(0,r.jsx)(n.code,{children:"1"})]}),"\n",(0,r.jsx)(n.li,{children:"Sets the number of character slots available for character selection resources (e.g. 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:["Default: ",(0,r.jsx)(n.code,{children:'"........"'})]}),"\n",(0,r.jsxs)(n.li,{children:["See ",(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:["Default: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Enables the built-in death and respawn system."}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"true"})]}),"\n",(0,r.jsx)(n.li,{children:"Enables built-in character registration, and uses uses that character when joining."}),"\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:["Default: ",(0,r.jsx)(n.code,{children:"[-258.211, -293.077, 21.6132, 206.0]"})]}),"\n",(0,r.jsx)(n.li,{children:"Sets the default spawn location for newly created characters."}),"\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,t.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_core.mdx",route:"/ox_core",timestamp:1729524649e3,title:"Ox Core",headings:c},pageNextRoute:"/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),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:n="left",children:s,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"===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)(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||"Documentation"})}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||"Package"})}},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,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,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=952)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-f3116e3ad7e2a4cf.js b/_next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-b262ef5e6401be98.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-f3116e3ad7e2a4cf.js rename to _next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-b262ef5e6401be98.js index 6abdd71ad7..c57f82c553 100644 --- a/_next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-f3116e3ad7e2a4cf.js +++ b/_next/static/chunks/pages/ox_core/Classes/Client/OxPlayer-b262ef5e6401be98.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1095],{3036:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Client/OxPlayer",function(){return s(6203)}])},6203: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/ox_core/Classes/Client/OxPlayer.mdx",route:"/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1729516534e3,title:"OxPlayer",headings:t},pageNextRoute:"/ox_core/Classes/Client/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3036)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1095],{3036:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Client/OxPlayer",function(){return s(6203)}])},6203: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/ox_core/Classes/Client/OxPlayer.mdx",route:"/ox_core/Classes/Client/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1729524649e3,title:"OxPlayer",headings:t},pageNextRoute:"/ox_core/Classes/Client/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3036)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Classes/Server/OxAccount-4898f2d8cabeab4e.js b/_next/static/chunks/pages/ox_core/Classes/Server/OxAccount-6e09273994e9cb78.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Classes/Server/OxAccount-4898f2d8cabeab4e.js rename to _next/static/chunks/pages/ox_core/Classes/Server/OxAccount-6e09273994e9cb78.js index 3a45265f9c..14ff0badcb 100644 --- a/_next/static/chunks/pages/ox_core/Classes/Server/OxAccount-4898f2d8cabeab4e.js +++ b/_next/static/chunks/pages/ox_core/Classes/Server/OxAccount-6e09273994e9cb78.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8642],{3883:function(e,n,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxAccount",function(){return c(1423)}])},1423: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/ox_core/Classes/Server/OxAccount.mdx",route:"/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"},timestamp:1729516534e3,title:"OxAccount",headings:i},pageNextRoute:"/ox_core/Classes/Server/OxAccount"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3883)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8642],{3883:function(e,n,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxAccount",function(){return c(1423)}])},1423: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/ox_core/Classes/Server/OxAccount.mdx",route:"/ox_core/Classes/Server/OxAccount",frontMatter:{title:"OxAccount"},timestamp:1729524649e3,title:"OxAccount",headings:i},pageNextRoute:"/ox_core/Classes/Server/OxAccount"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3883)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-82dedcc8e1106c18.js b/_next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-2fe4018bc4600939.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-82dedcc8e1106c18.js rename to _next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-2fe4018bc4600939.js index 155d9c45f1..9a139fb40e 100644 --- a/_next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-82dedcc8e1106c18.js +++ b/_next/static/chunks/pages/ox_core/Classes/Server/OxPlayer-2fe4018bc4600939.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9375],{2208:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxPlayer",function(){return s(2356)}])},2356: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/ox_core/Classes/Server/OxPlayer.mdx",route:"/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1729516534e3,title:"OxPlayer",headings:i},pageNextRoute:"/ox_core/Classes/Server/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2208)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9375],{2208:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxPlayer",function(){return s(2356)}])},2356: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/ox_core/Classes/Server/OxPlayer.mdx",route:"/ox_core/Classes/Server/OxPlayer",frontMatter:{title:"OxPlayer"},timestamp:1729524649e3,title:"OxPlayer",headings:i},pageNextRoute:"/ox_core/Classes/Server/OxPlayer"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2208)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-295fa2ed98fef1ea.js b/_next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-dc0b72c495905e06.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-295fa2ed98fef1ea.js rename to _next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-dc0b72c495905e06.js index 498c470a0b..fb7e92f127 100644 --- a/_next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-295fa2ed98fef1ea.js +++ b/_next/static/chunks/pages/ox_core/Classes/Server/OxVehicle-dc0b72c495905e06.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9422],{2824:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxVehicle",function(){return s(4679)}])},4679: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/ox_core/Classes/Server/OxVehicle.mdx",route:"/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"},timestamp:1729516534e3,title:"OxVehicle",headings:a},pageNextRoute:"/ox_core/Classes/Server/OxVehicle"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2824)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9422],{2824:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Classes/Server/OxVehicle",function(){return s(4679)}])},4679: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/ox_core/Classes/Server/OxVehicle.mdx",route:"/ox_core/Classes/Server/OxVehicle",frontMatter:{title:"OxVehicle"},timestamp:1729524649e3,title:"OxVehicle",headings:a},pageNextRoute:"/ox_core/Classes/Server/OxVehicle"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2824)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Events/client-035c638855b27aab.js b/_next/static/chunks/pages/ox_core/Events/client-74e885b2ac7d8a2b.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Events/client-035c638855b27aab.js rename to _next/static/chunks/pages/ox_core/Events/client-74e885b2ac7d8a2b.js index a2787d104b..950720abb2 100644 --- a/_next/static/chunks/pages/ox_core/Events/client-035c638855b27aab.js +++ b/_next/static/chunks/pages/ox_core/Events/client-74e885b2ac7d8a2b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8206],{4657:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Events/client",function(){return t(2937)}])},2937:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return o}});var n=t(2676),r=t(2140),a=t(8745),l=t(7100);let o=[{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)(l.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/ox_core/Events/client.mdx",route:"/ox_core/Events/client",timestamp:1729516534e3,title:"Client Events",headings:o},pageNextRoute:"/ox_core/Events/client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4657)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8206],{4657:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Events/client",function(){return t(2937)}])},2937:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return o}});var n=t(2676),r=t(2140),a=t(8745),l=t(7100);let o=[{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)(l.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/ox_core/Events/client.mdx",route:"/ox_core/Events/client",timestamp:1729524649e3,title:"Client Events",headings:o},pageNextRoute:"/ox_core/Events/client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4657)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Events/server-b0faf628678eaa77.js b/_next/static/chunks/pages/ox_core/Events/server-480535e95a4df78d.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Events/server-b0faf628678eaa77.js rename to _next/static/chunks/pages/ox_core/Events/server-480535e95a4df78d.js index 58727b12ca..efdae3a285 100644 --- a/_next/static/chunks/pages/ox_core/Events/server-b0faf628678eaa77.js +++ b/_next/static/chunks/pages/ox_core/Events/server-480535e95a4df78d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2606],{895:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Events/server",function(){return r(363)}])},363: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/ox_core/Events/server.mdx",route:"/ox_core/Events/server",timestamp:1729516534e3,title:"Server Events",headings:t},pageNextRoute:"/ox_core/Events/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=895)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2606],{895:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Events/server",function(){return r(363)}])},363: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/ox_core/Events/server.mdx",route:"/ox_core/Events/server",timestamp:1729524649e3,title:"Server Events",headings:t},pageNextRoute:"/ox_core/Events/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=895)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Functions/common-d075b00e8d468fd0.js b/_next/static/chunks/pages/ox_core/Functions/common-3f89be5210cfbdd7.js similarity index 98% rename from _next/static/chunks/pages/ox_core/Functions/common-d075b00e8d468fd0.js rename to _next/static/chunks/pages/ox_core/Functions/common-3f89be5210cfbdd7.js index 1461bd4f61..91d6297d57 100644 --- a/_next/static/chunks/pages/ox_core/Functions/common-d075b00e8d468fd0.js +++ b/_next/static/chunks/pages/ox_core/Functions/common-3f89be5210cfbdd7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9974],{440:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Functions/common",function(){return s(2266)}])},2266: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/ox_core/Functions/common.mdx",route:"/ox_core/Functions/common",timestamp:1729516534e3,title:"Common",headings:t},pageNextRoute:"/ox_core/Functions/common"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=440)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9974],{440:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Functions/common",function(){return s(2266)}])},2266: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/ox_core/Functions/common.mdx",route:"/ox_core/Functions/common",timestamp:1729524649e3,title:"Common",headings:t},pageNextRoute:"/ox_core/Functions/common"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=440)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_core/Functions/server-43269bb25b660c1f.js b/_next/static/chunks/pages/ox_core/Functions/server-e3465ceb0283f840.js similarity index 99% rename from _next/static/chunks/pages/ox_core/Functions/server-43269bb25b660c1f.js rename to _next/static/chunks/pages/ox_core/Functions/server-e3465ceb0283f840.js index bf2ebe8125..345bb54f0a 100644 --- a/_next/static/chunks/pages/ox_core/Functions/server-43269bb25b660c1f.js +++ b/_next/static/chunks/pages/ox_core/Functions/server-e3465ceb0283f840.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8528],{6039:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Functions/server",function(){return l(6661)}])},6661: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/ox_core/Functions/server.mdx",route:"/ox_core/Functions/server",timestamp:1729516534e3,title:"Server",headings:a},pageNextRoute:"/ox_core/Functions/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6039)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8528],{6039:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_core/Functions/server",function(){return l(6661)}])},6661: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/ox_core/Functions/server.mdx",route:"/ox_core/Functions/server",timestamp:1729524649e3,title:"Server",headings:a},pageNextRoute:"/ox_core/Functions/server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6039)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_doorlock-df84c8b5dcd807e6.js b/_next/static/chunks/pages/ox_doorlock-13d0ea7f46f69ff7.js similarity index 99% rename from _next/static/chunks/pages/ox_doorlock-df84c8b5dcd807e6.js rename to _next/static/chunks/pages/ox_doorlock-13d0ea7f46f69ff7.js index 19a853a1f4..f2ad1093d0 100644 --- a/_next/static/chunks/pages/ox_doorlock-df84c8b5dcd807e6.js +++ b/_next/static/chunks/pages/ox_doorlock-13d0ea7f46f69ff7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1046],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var o=t(5271),r=t(507),i=t.n(r),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"},l=Object.defineProperty,a=Object.defineProperties,d=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))h.call(n,t)&&__defNormalProp(e,t,n[t]);if(c)for(var t of c(n))u.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>a(e,d(n)),__objRest=(e,n)=>{var t={};for(var o in e)h.call(e,o)&&0>n.indexOf(o)&&(t[o]=e[o]);if(null!=e&&c)for(var o of c(e))0>n.indexOf(o)&&u.call(e,o)&&(t[o]=e[o]);return t},createReactComponent=(e,n,t)=>{let r=(0,o.forwardRef)((n,r)=>{var{color:i="currentColor",size:l=24,stroke:a=2,children:d}=n,c=__objRest(n,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},s),{width:l,height:l,stroke:i,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),c),[...t.map(([e,n])=>(0,o.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}},1407:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock",function(){return t(3301)}])},3301:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return a}});var o=t(2676),r=t(2140),i=t(8745),s=t(7100),l=t(8713);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:2,value:"Opening the UI",id:"opening-the-ui"},{depth:2,value:"Convert doors",id:"convert-doors"},{depth:2,value:"Adding new native audio",id:"adding-new-native-audio"}];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,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Ox Doorlock"}),"\n",(0,o.jsx)(l.Z,{repo:"https://github.com/overextended/ox_doorlock"}),"\n",(0,o.jsx)(n.p,{children:"A door management resource that can be used standalone or alongside ox_core, qbx_core, and es_extended."}),"\n",(0,o.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,o.jsx)(s.UW,{type:"info",children:(0,o.jsxs)(n.p,{children:["We ",(0,o.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,o.jsx)(n.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,o.jsxs)(s.Rg,{children:[(0,o.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,o.jsxs)(n.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,o.jsx)(n.a,{href:"https://github.com/overextended/ox_doorlock/releases",children:"release"})," or build the source code."]}),(0,o.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,o.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_doorlock.git"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_doorlock/web"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,o.jsx)(n.h3,{id:"install-optional-dependencies",children:"Install optional dependencies."}),(0,o.jsx)(n.p,{children:"These resources aren't required but provide additional functionality."}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]}),"\n",(0,o.jsx)(n.h2,{id:"opening-the-ui",children:"Opening the UI"}),"\n",(0,o.jsxs)(n.p,{children:["If you have installed and started the resource, you can use ",(0,o.jsx)(n.code,{children:"/doorlock"})," to open the UI."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"If the cursor is displayed but not the UI then you have not built it."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"You may not be authorised to use the command."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Enter ",(0,o.jsx)(n.code,{children:"test_ace player.1 command.doorlock"})," in the server console (replace 1 with your server id)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"convert-doors",children:"Convert doors"}),"\n",(0,o.jsx)(n.p,{children:"Door configuration files written for nui_doorlock can be automatically added to your MySQL database."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Any files with the ",(0,o.jsx)(n.code,{children:".lua"})," extension placed in the ",(0,o.jsx)(n.code,{children:"ox_doorlock/convert"})," directory will be read on resource start."]}),"\n",(0,o.jsx)(n.li,{children:"If the directory doesn't exist, you can create it."}),"\n",(0,o.jsx)(n.li,{children:"Conversion cannot be guaranteed, especially if the config was not written for nui_doorlock."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"adding-new-native-audio",children:"Adding new native audio"}),"\n",(0,o.jsxs)(n.p,{children:["A guide can be found ",(0,o.jsx)(n.a,{href:"https://forum.cfx.re/t/how-to-make-a-simplesound-using-native-audio/5156001",children:"here"})," for adding new native audio."]})]})}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,o.jsx)(n,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock.mdx",route:"/ox_doorlock",timestamp:1729516534e3,title:"Ox Doorlock",headings:a},pageNextRoute:"/ox_doorlock"})},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 o=t(2676);t(5271);var r=t(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"}]]),s=(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"}]]),l=(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"}]]),a=(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:t,icon:r,link:i}=e;return(0,o.jsx)("div",{className:"h-fit w-fit",children:(0,o.jsx)("a",{href:i,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"===n&&(0,o.jsx)("div",{children:r}),t,"right"===n&&(0,o.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(i,{}),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||"Documentation"})}function DownloadButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(a,{}),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||"Package"})}},8713:function(e,n,t){"use strict";var o=t(2676);t(5271);var r=t(3786);n.Z=e=>{let{repo:n,docs:t}=e;return(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(r.eX,{link:n}),(0,o.jsx)(r.Vg,{link:"".concat(n,"/releases")}),t&&(0,o.jsx)(r.WR,{link:t})]})}},4049:function(e,n,t){"use strict";var o=t(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,t,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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=1407)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1046],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var o=t(5271),r=t(507),i=t.n(r),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"},l=Object.defineProperty,a=Object.defineProperties,d=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))h.call(n,t)&&__defNormalProp(e,t,n[t]);if(c)for(var t of c(n))u.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>a(e,d(n)),__objRest=(e,n)=>{var t={};for(var o in e)h.call(e,o)&&0>n.indexOf(o)&&(t[o]=e[o]);if(null!=e&&c)for(var o of c(e))0>n.indexOf(o)&&u.call(e,o)&&(t[o]=e[o]);return t},createReactComponent=(e,n,t)=>{let r=(0,o.forwardRef)((n,r)=>{var{color:i="currentColor",size:l=24,stroke:a=2,children:d}=n,c=__objRest(n,["color","size","stroke","children"]);return(0,o.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},s),{width:l,height:l,stroke:i,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),c),[...t.map(([e,n])=>(0,o.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}},1407:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock",function(){return t(3301)}])},3301:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return a}});var o=t(2676),r=t(2140),i=t(8745),s=t(7100),l=t(8713);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:2,value:"Opening the UI",id:"opening-the-ui"},{depth:2,value:"Convert doors",id:"convert-doors"},{depth:2,value:"Adding new native audio",id:"adding-new-native-audio"}];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,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Ox Doorlock"}),"\n",(0,o.jsx)(l.Z,{repo:"https://github.com/overextended/ox_doorlock"}),"\n",(0,o.jsx)(n.p,{children:"A door management resource that can be used standalone or alongside ox_core, qbx_core, and es_extended."}),"\n",(0,o.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,o.jsx)(s.UW,{type:"info",children:(0,o.jsxs)(n.p,{children:["We ",(0,o.jsx)(n.strong,{children:"strongly"})," recommend referring to ",(0,o.jsx)(n.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,o.jsxs)(s.Rg,{children:[(0,o.jsx)(n.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies."}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,o.jsxs)(n.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,o.jsx)(n.a,{href:"https://github.com/overextended/ox_doorlock/releases",children:"release"})," or build the source code."]}),(0,o.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,o.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_doorlock.git"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"ox_doorlock/web"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,o.jsx)(n.h3,{id:"install-optional-dependencies",children:"Install optional dependencies."}),(0,o.jsx)(n.p,{children:"These resources aren't required but provide additional functionality."}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]})]}),"\n",(0,o.jsx)(n.h2,{id:"opening-the-ui",children:"Opening the UI"}),"\n",(0,o.jsxs)(n.p,{children:["If you have installed and started the resource, you can use ",(0,o.jsx)(n.code,{children:"/doorlock"})," to open the UI."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"If the cursor is displayed but not the UI then you have not built it."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"You may not be authorised to use the command."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Enter ",(0,o.jsx)(n.code,{children:"test_ace player.1 command.doorlock"})," in the server console (replace 1 with your server id)."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"convert-doors",children:"Convert doors"}),"\n",(0,o.jsx)(n.p,{children:"Door configuration files written for nui_doorlock can be automatically added to your MySQL database."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Any files with the ",(0,o.jsx)(n.code,{children:".lua"})," extension placed in the ",(0,o.jsx)(n.code,{children:"ox_doorlock/convert"})," directory will be read on resource start."]}),"\n",(0,o.jsx)(n.li,{children:"If the directory doesn't exist, you can create it."}),"\n",(0,o.jsx)(n.li,{children:"Conversion cannot be guaranteed, especially if the config was not written for nui_doorlock."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"adding-new-native-audio",children:"Adding new native audio"}),"\n",(0,o.jsxs)(n.p,{children:["A guide can be found ",(0,o.jsx)(n.a,{href:"https://forum.cfx.re/t/how-to-make-a-simplesound-using-native-audio/5156001",children:"here"})," for adding new native audio."]})]})}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,o.jsx)(n,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock.mdx",route:"/ox_doorlock",timestamp:1729524649e3,title:"Ox Doorlock",headings:a},pageNextRoute:"/ox_doorlock"})},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 o=t(2676);t(5271);var r=t(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"}]]),s=(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"}]]),l=(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"}]]),a=(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:t,icon:r,link:i}=e;return(0,o.jsx)("div",{className:"h-fit w-fit",children:(0,o.jsx)("a",{href:i,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"===n&&(0,o.jsx)("div",{children:r}),t,"right"===n&&(0,o.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(i,{}),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||"Documentation"})}function DownloadButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,o.jsx)(Button,{icon:(0,o.jsx)(a,{}),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||"Package"})}},8713:function(e,n,t){"use strict";var o=t(2676);t(5271);var r=t(3786);n.Z=e=>{let{repo:n,docs:t}=e;return(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,o.jsx)(r.eX,{link:n}),(0,o.jsx)(r.Vg,{link:"".concat(n,"/releases")}),t&&(0,o.jsx)(r.WR,{link:t})]})}},4049:function(e,n,t){"use strict";var o=t(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,n,t,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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=1407)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_doorlock/Client/functions-6e25337d179bd666.js b/_next/static/chunks/pages/ox_doorlock/Client/functions-9de093007bdca9db.js similarity index 98% rename from _next/static/chunks/pages/ox_doorlock/Client/functions-6e25337d179bd666.js rename to _next/static/chunks/pages/ox_doorlock/Client/functions-9de093007bdca9db.js index a9f0a315ff..08388f4979 100644 --- a/_next/static/chunks/pages/ox_doorlock/Client/functions-6e25337d179bd666.js +++ b/_next/static/chunks/pages/ox_doorlock/Client/functions-9de093007bdca9db.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2081],{8605:function(e,o,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Client/functions",function(){return t(9553)}])},9553:function(e,o,t){"use strict";t.r(o),t.d(o,{__toc:function(){return r}});var s=t(2676),n=t(2140),l=t(8745);let r=[{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,l.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h1,{children:"Functions"}),"\n",(0,s.jsx)(o.h2,{id:"pickclosestdoor",children:"pickClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail."}),"\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:"pickClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.h2,{id:"useclosestdoor",children:"useClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Interact with the closest door. Dependant on server-side checks and may fail."}),"\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:"Returns the closest door."}),"\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:"Return:"}),"\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,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,l.a)(),e.components);return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Client/functions.mdx",route:"/ox_doorlock/Client/functions",timestamp:1729516534e3,title:"Functions",headings:r},pageNextRoute:"/ox_doorlock/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8605)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2081],{8605:function(e,o,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Client/functions",function(){return t(9553)}])},9553:function(e,o,t){"use strict";t.r(o),t.d(o,{__toc:function(){return r}});var s=t(2676),n=t(2140),l=t(8745);let r=[{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,l.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h1,{children:"Functions"}),"\n",(0,s.jsx)(o.h2,{id:"pickclosestdoor",children:"pickClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail."}),"\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:"pickClosestDoor"}),(0,s.jsx)(o.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,s.jsx)(o.h2,{id:"useclosestdoor",children:"useClosestDoor"}),"\n",(0,s.jsx)(o.p,{children:"Interact with the closest door. Dependant on server-side checks and may fail."}),"\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:"Returns the closest door."}),"\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:"Return:"}),"\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,n.j)({MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,l.a)(),e.components);return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Client/functions.mdx",route:"/ox_doorlock/Client/functions",timestamp:1729524649e3,title:"Functions",headings:r},pageNextRoute:"/ox_doorlock/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8605)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_doorlock/Server/events-439e298e45f4a012.js b/_next/static/chunks/pages/ox_doorlock/Server/events-a95fe0c1308e29c4.js similarity index 98% rename from _next/static/chunks/pages/ox_doorlock/Server/events-439e298e45f4a012.js rename to _next/static/chunks/pages/ox_doorlock/Server/events-a95fe0c1308e29c4.js index 07e82240d6..86030e2901 100644 --- a/_next/static/chunks/pages/ox_doorlock/Server/events-439e298e45f4a012.js +++ b/_next/static/chunks/pages/ox_doorlock/Server/events-a95fe0c1308e29c4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[577],{4041:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Server/events",function(){return s(7071)}])},7071:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),o=s(2140),t=s(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:"Events"}),"\n",(0,r.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]}),"\n",(0,r.jsx)(n.h3,{id:"ox_doorlockstatechanged",children:"ox_doorlock:stateChanged"}),"\n",(0,r.jsx)(n.p,{children:"Triggered when a doors state is updated."}),"\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,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,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Server/events.mdx",route:"/ox_doorlock/Server/events",timestamp:1729516534e3,title:"Events",headings:l},pageNextRoute:"/ox_doorlock/Server/events"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4041)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[577],{4041:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Server/events",function(){return s(7071)}])},7071:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),o=s(2140),t=s(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:"Events"}),"\n",(0,r.jsx)(n.h2,{id:"handlers",children:"Handlers"}),"\n",(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]}),"\n",(0,r.jsx)(n.h3,{id:"ox_doorlockstatechanged",children:"ox_doorlock:stateChanged"}),"\n",(0,r.jsx)(n.p,{children:"Triggered when a doors state is updated."}),"\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,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,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Server/events.mdx",route:"/ox_doorlock/Server/events",timestamp:1729524649e3,title:"Events",headings:l},pageNextRoute:"/ox_doorlock/Server/events"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4041)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_doorlock/Server/functions-8a7b52fdd24c6d18.js b/_next/static/chunks/pages/ox_doorlock/Server/functions-33c97b8d95457bba.js similarity index 98% rename from _next/static/chunks/pages/ox_doorlock/Server/functions-8a7b52fdd24c6d18.js rename to _next/static/chunks/pages/ox_doorlock/Server/functions-33c97b8d95457bba.js index de83e38e10..4b5e341a93 100644 --- a/_next/static/chunks/pages/ox_doorlock/Server/functions-8a7b52fdd24c6d18.js +++ b/_next/static/chunks/pages/ox_doorlock/Server/functions-33c97b8d95457bba.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[889],{863:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Server/functions",function(){return o(6574)}])},6574:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return s}});var t=o(2676),r=o(2140),d=o(8745);let s=[{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 n=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,d.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Functions"}),"\n",(0,t.jsx)(n.p,{children:"Gets data for a door with the given id, matching the id for the database entry."}),"\n",(0,t.jsx)(n.h2,{id:"getdoor",children:"getDoor"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getDoor"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Gets data for a door with the given ",(0,t.jsx)(n.code,{children:"id"}),", matching the id for the database entry."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["id: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["door: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"getdoorfromname",children:"getDoorFromName"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getDoorFromName"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Gets data for a door with the given ",(0,t.jsx)(n.code,{children:"name"}),", matching the name for the database entry."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["name: ",(0,t.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["door: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"editdoor",children:"editDoor"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"editDoor"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, data)"})]})})}),"\n",(0,t.jsx)(n.p,{children:"Edit configuration for the given doorId."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["doorId: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["data: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"setdoorstate",children:"setDoorState"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setDoorState"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, state)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Sets a door with the given doorId as locked if state is ",(0,t.jsx)(n.code,{children:"true"})," or ",(0,t.jsx)(n.code,{children:"1"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["doorId: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["state: ",(0,t.jsx)(n.code,{children:"0"})," or ",(0,t.jsx)(n.code,{children:"1"})," or ",(0,t.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,d.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Server/functions.mdx",route:"/ox_doorlock/Server/functions",timestamp:1729516534e3,title:"Functions",headings:s},pageNextRoute:"/ox_doorlock/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=863)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[889],{863:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/Server/functions",function(){return o(6574)}])},6574:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return s}});var t=o(2676),r=o(2140),d=o(8745);let s=[{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 n=Object.assign({h1:"h1",p:"p",h2:"h2",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",h3:"h3"},(0,d.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Functions"}),"\n",(0,t.jsx)(n.p,{children:"Gets data for a door with the given id, matching the id for the database entry."}),"\n",(0,t.jsx)(n.h2,{id:"getdoor",children:"getDoor"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getDoor"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Gets data for a door with the given ",(0,t.jsx)(n.code,{children:"id"}),", matching the id for the database entry."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["id: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["door: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"getdoorfromname",children:"getDoorFromName"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getDoorFromName"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(name)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Gets data for a door with the given ",(0,t.jsx)(n.code,{children:"name"}),", matching the name for the database entry."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["name: ",(0,t.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Return:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["door: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"editdoor",children:"editDoor"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"editDoor"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, data)"})]})})}),"\n",(0,t.jsx)(n.p,{children:"Edit configuration for the given doorId."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["doorId: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["data: ",(0,t.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"setdoorstate",children:"setDoorState"}),"\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:"exports.ox_doorlock:"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"setDoorState"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(doorId, state)"})]})})}),"\n",(0,t.jsxs)(n.p,{children:["Sets a door with the given doorId as locked if state is ",(0,t.jsx)(n.code,{children:"true"})," or ",(0,t.jsx)(n.code,{children:"1"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["doorId: ",(0,t.jsx)(n.code,{children:"number"})]}),"\n",(0,t.jsxs)(n.li,{children:["state: ",(0,t.jsx)(n.code,{children:"0"})," or ",(0,t.jsx)(n.code,{children:"1"})," or ",(0,t.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,d.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_doorlock/Server/functions.mdx",route:"/ox_doorlock/Server/functions",timestamp:1729524649e3,title:"Functions",headings:s},pageNextRoute:"/ox_doorlock/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=863)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_doorlock/settings-9ada40a55ae8ac92.js b/_next/static/chunks/pages/ox_doorlock/settings-45183d6697da2113.js similarity index 98% rename from _next/static/chunks/pages/ox_doorlock/settings-9ada40a55ae8ac92.js rename to _next/static/chunks/pages/ox_doorlock/settings-45183d6697da2113.js index 21b7793f98..7eaa85ef79 100644 --- a/_next/static/chunks/pages/ox_doorlock/settings-9ada40a55ae8ac92.js +++ b/_next/static/chunks/pages/ox_doorlock/settings-45183d6697da2113.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4592],{1123:function(n,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/settings",function(){return i(1173)}])},1173:function(n,e,i){"use strict";i.r(e),i.d(e,{__toc:function(){return d}});var l=i(2676),s=i(2140),r=i(8745);let d=[{depth:2,value:"General",id:"general"},{depth:2,value:"Characters",id:"characters"},{depth:2,value:"Groups",id:"groups"},{depth:2,value:"Items",id:"items"},{depth:2,value:"Lockpick",id:"lockpick"},{depth:2,value:"Sound",id:"sound"}];function _createMdxContent(n){let e=Object.assign({h1:"h1",h2:"h2",ul:"ul",li:"li",a:"a",p:"p",em:"em",code:"code"},(0,r.a)(),n.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Door Settings"}),"\n",(0,l.jsx)(e.h2,{id:"general",children:"General"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Door name","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Used to easily identify the door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Passcode","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can be unlocked by anybody by using the code or phrase."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Autolock interval","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door will be locked after x seconds."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Interact distance","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can only be used when within x metres."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Door rate","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door movement speed for sliding/garage/automatic doors, or swinging doors when locked."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Locked","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sets the door as locked by default."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Double","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door is a set of two doors, controlled together."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Automatic","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sliding/garage/automatic door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Lockpick","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can be lockpicked when interacting with a targeting resource."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Hide UI","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"No indicators (i.e. icon, text) will display on the door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Hold Open","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Holds the door open while unlocked."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"characters",children:"Characters"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Character Id","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Character identifier used by a framework (i.e. player.charid, xPlayer.identifier, Player.CitizenId)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"groups",children:"Groups"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Group","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Framework dependent, referring to jobs, gangs, etc."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Grade","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The minimum grade to allow access for the group (0 to allow all)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Item","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Name of the item."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Metadata type","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Requires metadata support (i.e. ox_inventory) to check slot.metadata.type."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Remove on use","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes the item after interacting with the door."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"lockpick",children:"Lockpick"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Difficulty","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Sets the skillcheck difficulty (see ",(0,l.jsx)(e.a,{href:"../ox_lib/Modules/Interface/Client/skillcheck",children:"docs"}),")."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Area size","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Custom difficulty area size in degrees."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Speed multiplier","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Custom difficulty idicator speed multipier."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"sound",children:"Sound"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Lock sound","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sound to play on door lock."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Unlock sound","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sound to play on door unlock."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.p,{children:[(0,l.jsx)(e.em,{children:"Note"}),": Sounds are stored in the ",(0,l.jsx)(e.code,{children:"./web/public/sounds"})," directory."]})]})}e.default=(0,s.j)({MDXContent:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),n.components);return e?(0,l.jsx)(e,{...n,children:(0,l.jsx)(_createMdxContent,{...n})}):_createMdxContent(n)},pageOpts:{filePath:"pages/ox_doorlock/settings.mdx",route:"/ox_doorlock/settings",frontMatter:{title:"Door Settings"},timestamp:1729516534e3,title:"Door Settings",headings:d},pageNextRoute:"/ox_doorlock/settings"})}},function(n){n.O(0,[2601,9774,2888,179],function(){return n(n.s=1123)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4592],{1123:function(n,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_doorlock/settings",function(){return i(1173)}])},1173:function(n,e,i){"use strict";i.r(e),i.d(e,{__toc:function(){return d}});var l=i(2676),s=i(2140),r=i(8745);let d=[{depth:2,value:"General",id:"general"},{depth:2,value:"Characters",id:"characters"},{depth:2,value:"Groups",id:"groups"},{depth:2,value:"Items",id:"items"},{depth:2,value:"Lockpick",id:"lockpick"},{depth:2,value:"Sound",id:"sound"}];function _createMdxContent(n){let e=Object.assign({h1:"h1",h2:"h2",ul:"ul",li:"li",a:"a",p:"p",em:"em",code:"code"},(0,r.a)(),n.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Door Settings"}),"\n",(0,l.jsx)(e.h2,{id:"general",children:"General"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Door name","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Used to easily identify the door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Passcode","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can be unlocked by anybody by using the code or phrase."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Autolock interval","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door will be locked after x seconds."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Interact distance","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can only be used when within x metres."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Door rate","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door movement speed for sliding/garage/automatic doors, or swinging doors when locked."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Locked","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sets the door as locked by default."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Double","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door is a set of two doors, controlled together."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Automatic","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sliding/garage/automatic door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Lockpick","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Door can be lockpicked when interacting with a targeting resource."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Hide UI","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"No indicators (i.e. icon, text) will display on the door."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Hold Open","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Holds the door open while unlocked."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"characters",children:"Characters"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Character Id","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Character identifier used by a framework (i.e. player.charid, xPlayer.identifier, Player.CitizenId)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"groups",children:"Groups"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Group","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Framework dependent, referring to jobs, gangs, etc."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Grade","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"The minimum grade to allow access for the group (0 to allow all)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"items",children:"Items"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Item","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Name of the item."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Metadata type","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Requires metadata support (i.e. ox_inventory) to check slot.metadata.type."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Remove on use","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Removes the item after interacting with the door."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"lockpick",children:"Lockpick"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Difficulty","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Sets the skillcheck difficulty (see ",(0,l.jsx)(e.a,{href:"../ox_lib/Modules/Interface/Client/skillcheck",children:"docs"}),")."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Area size","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Custom difficulty area size in degrees."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Speed multiplier","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Custom difficulty idicator speed multipier."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"sound",children:"Sound"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsxs)(e.li,{children:["Lock sound","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sound to play on door lock."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.li,{children:["Unlock sound","\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Sound to play on door unlock."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(e.p,{children:[(0,l.jsx)(e.em,{children:"Note"}),": Sounds are stored in the ",(0,l.jsx)(e.code,{children:"./web/public/sounds"})," directory."]})]})}e.default=(0,s.j)({MDXContent:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),n.components);return e?(0,l.jsx)(e,{...n,children:(0,l.jsx)(_createMdxContent,{...n})}):_createMdxContent(n)},pageOpts:{filePath:"pages/ox_doorlock/settings.mdx",route:"/ox_doorlock/settings",frontMatter:{title:"Door Settings"},timestamp:1729524649e3,title:"Door Settings",headings:d},pageNextRoute:"/ox_doorlock/settings"})}},function(n){n.O(0,[2601,9774,2888,179],function(){return n(n.s=1123)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_fuel-15b1bdac605e7d10.js b/_next/static/chunks/pages/ox_fuel-e8700659d32d9a76.js similarity index 99% rename from _next/static/chunks/pages/ox_fuel-15b1bdac605e7d10.js rename to _next/static/chunks/pages/ox_fuel-e8700659d32d9a76.js index 752898c3e7..ec3a8215ea 100644 --- a/_next/static/chunks/pages/ox_fuel-15b1bdac605e7d10.js +++ b/_next/static/chunks/pages/ox_fuel-e8700659d32d9a76.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4513],{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}},3733:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel",function(){return n(108)}])},108: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/ox_fuel.mdx",route:"/ox_fuel",timestamp:1729516534e3,title:"Ox Fuel",headings:l},pageNextRoute:"/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||"Documentation"})}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||"Package"})}},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=3733)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4513],{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}},3733:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel",function(){return n(108)}])},108: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/ox_fuel.mdx",route:"/ox_fuel",timestamp:1729524649e3,title:"Ox Fuel",headings:l},pageNextRoute:"/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||"Documentation"})}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||"Package"})}},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=3733)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_fuel/Client/functions-8fe513c1a7af9b4e.js b/_next/static/chunks/pages/ox_fuel/Client/functions-1bdb435f9a39aa86.js similarity index 98% rename from _next/static/chunks/pages/ox_fuel/Client/functions-8fe513c1a7af9b4e.js rename to _next/static/chunks/pages/ox_fuel/Client/functions-1bdb435f9a39aa86.js index a6f5b36b6f..9e99c73407 100644 --- a/_next/static/chunks/pages/ox_fuel/Client/functions-8fe513c1a7af9b4e.js +++ b/_next/static/chunks/pages/ox_fuel/Client/functions-1bdb435f9a39aa86.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2525],{5832:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Client/functions",function(){return n(3939)}])},3939: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/ox_fuel/Client/functions.mdx",route:"/ox_fuel/Client/functions",timestamp:1729516534e3,title:"Functions",headings:t},pageNextRoute:"/ox_fuel/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5832)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2525],{5832:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Client/functions",function(){return n(3939)}])},3939: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/ox_fuel/Client/functions.mdx",route:"/ox_fuel/Client/functions",timestamp:1729524649e3,title:"Functions",headings:t},pageNextRoute:"/ox_fuel/Client/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5832)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_fuel/Server/functions-74208eacf2d3db46.js b/_next/static/chunks/pages/ox_fuel/Server/functions-1622d7c7c0653801.js similarity index 98% rename from _next/static/chunks/pages/ox_fuel/Server/functions-74208eacf2d3db46.js rename to _next/static/chunks/pages/ox_fuel/Server/functions-1622d7c7c0653801.js index 887c51b06c..96745ec7c4 100644 --- a/_next/static/chunks/pages/ox_fuel/Server/functions-74208eacf2d3db46.js +++ b/_next/static/chunks/pages/ox_fuel/Server/functions-1622d7c7c0653801.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[334],{8582:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Server/functions",function(){return n(6778)}])},6778: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/ox_fuel/Server/functions.mdx",route:"/ox_fuel/Server/functions",timestamp:1729516534e3,title:"Functions",headings:t},pageNextRoute:"/ox_fuel/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8582)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[334],{8582:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Server/functions",function(){return n(6778)}])},6778: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/ox_fuel/Server/functions.mdx",route:"/ox_fuel/Server/functions",timestamp:1729524649e3,title:"Functions",headings:t},pageNextRoute:"/ox_fuel/Server/functions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8582)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_fuel/Shared-4b14711ef15f011b.js b/_next/static/chunks/pages/ox_fuel/Shared-e079809618e90f17.js similarity index 97% rename from _next/static/chunks/pages/ox_fuel/Shared-4b14711ef15f011b.js rename to _next/static/chunks/pages/ox_fuel/Shared-e079809618e90f17.js index 801adc0862..35cc1c1c17 100644 --- a/_next/static/chunks/pages/ox_fuel/Shared-4b14711ef15f011b.js +++ b/_next/static/chunks/pages/ox_fuel/Shared-e079809618e90f17.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9498],{4683:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Shared",function(){return n(9268)}])},9268:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return o}});var l=n(2676),a=n(2140),s=n(8745);let o=[{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,s.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,s.a)(),e.components);return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_fuel/Shared.mdx",route:"/ox_fuel/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_fuel/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4683)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9498],{4683:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_fuel/Shared",function(){return n(9268)}])},9268:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return o}});var l=n(2676),a=n(2140),s=n(8745);let o=[{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,s.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,s.a)(),e.components);return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_fuel/Shared.mdx",route:"/ox_fuel/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_fuel/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4683)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory-7242e58270de617a.js b/_next/static/chunks/pages/ox_inventory-b8adb6c25b32c89b.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory-7242e58270de617a.js rename to _next/static/chunks/pages/ox_inventory-b8adb6c25b32c89b.js index 4a2c06e307..f937ff6814 100644 --- a/_next/static/chunks/pages/ox_inventory-7242e58270de617a.js +++ b/_next/static/chunks/pages/ox_inventory-b8adb6c25b32c89b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2991],{5850:function(s,e,n){"use strict";n.d(e,{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,p=Object.prototype.propertyIsEnumerable,__defNormalProp=(s,e,n)=>e in s?t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,__spreadValues=(s,e)=>{for(var n in e||(e={}))d.call(e,n)&&__defNormalProp(s,n,e[n]);if(h)for(var n of h(e))p.call(e,n)&&__defNormalProp(s,n,e[n]);return s},__spreadProps=(s,e)=>a(s,c(e)),__objRest=(s,e)=>{var n={};for(var r in s)d.call(s,r)&&0>e.indexOf(r)&&(n[r]=s[r]);if(null!=s&&h)for(var r of h(s))0>e.indexOf(r)&&p.call(s,r)&&(n[r]=s[r]);return n},createReactComponent=(s,e,n)=>{let i=(0,r.forwardRef)((e,i)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=e,h=__objRest(e,["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-${s}`}),h),[...n.map(([s,e])=>(0,r.createElement)(s,e)),...c||[]])});return i.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},i.displayName=`${e}`,i}},3881:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory",function(){return n(2846)}])},2846:function(s,e,n){"use strict";n.r(e),n.d(e,{__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(s){let e=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)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Ox Inventory"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_inventory"}),"\n",(0,r.jsx)(e.p,{children:'A slot-based inventory with item metadata for "item uniqueness".'}),"\n",(0,r.jsx)(t.UW,{type:"warning",children:(0,r.jsxs)(e.p,{children:["If you are replacing a built-in framework inventory there will be compatibility errors.",(0,r.jsx)(e.br,{}),"\n","If you are unwilling or incapable of resolving incompatibilities, do not install this resource."]})}),"\n",(0,r.jsx)(e.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(e.p,{children:["We ",(0,r.jsx)(e.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(e.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(e.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(e.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_inventory.git"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory/web"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(e.h3,{id:"install-optional-dependencies",children:"Install optional dependencies"}),(0,r.jsx)(e.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]}),(0,r.jsx)(e.h3,{id:"resource-start-order",children:"Resource start order"}),(0,r.jsx)(e.p,{children:"It's important for your resources to start in a logical order to prevent errors from missing dependencies."}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"oxmysql"}),(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 should be one of the first resources"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"framework"}),(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 name of your framework (i.e. ox_core, es_extended, qbx_core)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory"})]})]})}),(0,r.jsx)(e.h3,{id:"config",children:"Config"}),(0,r.jsxs)(e.p,{children:["Resource configuration is handled using ",(0,r.jsx)(e.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Shared"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(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:'"esx"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Number of slots for player inventories"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:slots"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Maximum carry capacity for players, in grams (frameworks may override this)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weight"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"30000"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Integrated support for qtarget/ox_target stashes, shops, etc"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:target"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Jobs with access to police armoury, evidence lockers, etc"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:police"}),(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:'"police"'}),(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:'"sheriff"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Client"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# The URL to load item images from"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:imagepath"}),(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:'"nui://ox_inventory/web/images"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons will reload after reaching 0 ammo"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:autoreload"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Blur the screen while accessing the inventory"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:screenblur"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Default hotkeys to access primary and secondary inventories, and hotbar"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:keys"}),(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:'"F2"'}),(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:'"K"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},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:'"TAB"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable control action when inventory is open"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:enablekeys"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [249]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons must be aimed before shooting"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:aimedfiring"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Show a list of all nearby players when giving items"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:giveplayerlist"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon draw/holster animations"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponanims"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle item notifications (add/remove)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:itemnotify"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon item notifications (equip/holster)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponnotify"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disable drop markers and spawn a prop instead"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropprops"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the default model used for drop props"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropmodel"}),(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_med_bag_01b"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponmismatch"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:ignoreweapons"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Suppress weapon and ammo pickups"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:suppresspickups"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Server"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Compare current version to latest release on GitHub"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:versioncheck"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Stashes will be wiped after remaining unchanged for the given time"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:clearstashes"}),(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:'"6 MONTH"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Discord webhook url, used for imageurl metadata content moderation (image embeds)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:webhook"}),(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:'""'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:loglevel"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Item prices fluctuate in shops"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomprices"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Loot will randomly generate inside unowned vehicles and dumpsters"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomloot"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Minimum job grade to remove items from evidence lockers"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:evidencegrade"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Trim whitespace from vehicle plates when checking owned vehicles"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:trimplate"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the contents of randomly generated inventories"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# [item name, minimum, maximum, loot chance]"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:vehicleloot"}),(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-string-expression)"},children:'"cola"'}),(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-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-function)"},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-string-expression)"},children:'"water"'}),(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-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-function)"},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-string-expression)"},children:'"garbage"'}),(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-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"panties"'}),(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-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-constant)"},children:"5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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-constant)"},children:"50"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"400"}),(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:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-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-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-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-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dumpsterloot"}),(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-string-expression)"},children:'"mustard"'}),(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-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-function)"},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-string-expression)"},children:'"garbage"'}),(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-constant)"},children:"3"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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-constant)"},children:"10"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-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-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-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.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set items to sync with framework accounts"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:accounts"}),(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:'"money"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]})]})})]}),"\n",(0,r.jsx)(e.h2,{id:"framework-incompatibilities",children:"Framework incompatibilities"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues."}),"\n",(0,r.jsxs)(e.li,{children:["Money as an item may conflict with banking/account systems.","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["You can sync these values with ",(0,r.jsx)(e.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)(e.p,{children:["Refer to issue ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/issues/1297",children:"#1297"})," for known compatibility issues."]}),"\n",(0,r.jsx)(e.h2,{id:"using-an-unsupported-framework",children:"Using an unsupported framework"}),"\n",(0,r.jsxs)(e.p,{children:["If your framework does not have official support you'll have to implement it yourself.",(0,r.jsx)(e.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)(e.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)(e.h3,{id:"setup-a-bridge-submodule",children:"Setup a bridge submodule"}),(0,r.jsx)(e.p,{children:'You\'ll want to set the target framework first - this could be the name, an acronym, or just "custom".'}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(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:'"custom"'})]})})}),(0,r.jsxs)(e.p,{children:["Copy the ",(0,r.jsx)(e.code,{children:"ox"})," directory from the ",(0,r.jsx)(e.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)(e.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)(e.h3,{id:"setup-database-references",children:"Setup database references"}),(0,r.jsxs)(e.p,{children:["Take a look at the ",(0,r.jsx)(e.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)(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:"elseif"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" shared.framework "}),(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:"'custom' "}),(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:" playerTable "}),(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:"'characters' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing player / character data"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerColumn "}),(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:"'charid' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the character (i.e. identifier, citizenid, id)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleTable "}),(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:"'vehicles' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing owned vehicle data"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleColumn "}),(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:"'id' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the vehicle (i.e. plate, vin, id)"})]}),"\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,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,l.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_inventory.mdx",route:"/ox_inventory",timestamp:1729516534e3,title:"Ox Inventory",headings:a},pageNextRoute:"/ox_inventory"})},3786:function(s,e,n){"use strict";n.d(e,{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=s=>{let{side:e="left",children:n,icon:i,link:l}=s;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"===e&&(0,r.jsx)("div",{children:i}),n,"right"===e&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:s.side,link:s.link,children:s.label||"Github"})}function DocButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:s.side,link:s.link,children:s.label||"Documentation"})}function DownloadButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:s.side,link:s.link,children:s.label||"Download"})}function ReleaseButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:s.side,link:s.link,children:s.label||"Releases"})}function NpmButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:s.side,link:s.link,children:s.label||"Package"})}},8713:function(s,e,n){"use strict";var r=n(2676);n(5271);var i=n(3786);e.Z=s=>{let{repo:e,docs:n}=s;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:e}),(0,r.jsx)(i.Vg,{link:"".concat(e,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(s,e,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,e,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 s={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 s.PropTypes=s,s}},507:function(s,e,n){s.exports=n(4049)()},6257:function(s){"use strict";s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3881)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2991],{5850:function(s,e,n){"use strict";n.d(e,{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,p=Object.prototype.propertyIsEnumerable,__defNormalProp=(s,e,n)=>e in s?t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,__spreadValues=(s,e)=>{for(var n in e||(e={}))d.call(e,n)&&__defNormalProp(s,n,e[n]);if(h)for(var n of h(e))p.call(e,n)&&__defNormalProp(s,n,e[n]);return s},__spreadProps=(s,e)=>a(s,c(e)),__objRest=(s,e)=>{var n={};for(var r in s)d.call(s,r)&&0>e.indexOf(r)&&(n[r]=s[r]);if(null!=s&&h)for(var r of h(s))0>e.indexOf(r)&&p.call(s,r)&&(n[r]=s[r]);return n},createReactComponent=(s,e,n)=>{let i=(0,r.forwardRef)((e,i)=>{var{color:l="currentColor",size:t=24,stroke:a=2,children:c}=e,h=__objRest(e,["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-${s}`}),h),[...n.map(([s,e])=>(0,r.createElement)(s,e)),...c||[]])});return i.propTypes={color:l().string,size:l().oneOfType([l().string,l().number]),stroke:l().oneOfType([l().string,l().number])},i.displayName=`${e}`,i}},3881:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory",function(){return n(2846)}])},2846:function(s,e,n){"use strict";n.r(e),n.d(e,{__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(s){let e=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)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Ox Inventory"}),"\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/ox_inventory"}),"\n",(0,r.jsx)(e.p,{children:'A slot-based inventory with item metadata for "item uniqueness".'}),"\n",(0,r.jsx)(t.UW,{type:"warning",children:(0,r.jsxs)(e.p,{children:["If you are replacing a built-in framework inventory there will be compatibility errors.",(0,r.jsx)(e.br,{}),"\n","If you are unwilling or incapable of resolving incompatibilities, do not install this resource."]})}),"\n",(0,r.jsx)(e.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.UW,{type:"info",children:(0,r.jsxs)(e.p,{children:["We ",(0,r.jsx)(e.strong,{children:"strongly"})," recommend referring to ",(0,r.jsx)(e.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,r.jsxs)(t.Rg,{children:[(0,r.jsx)(e.h3,{id:"install-all-resource-dependencies",children:"Install all resource dependencies"}),(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../oxmysql",children:"oxmysql"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../ox_lib/",children:"ox_lib"})}),"\n"]}),(0,r.jsxs)(e.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/releases",children:"release"})," or build the source code."]}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_inventory.git"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory/web"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,r.jsx)(e.h3,{id:"install-optional-dependencies",children:"Install optional dependencies"}),(0,r.jsx)(e.p,{children:"These resources aren't required but provide additional functionality."}),(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"../ox_target/",children:"ox_target"})}),"\n"]}),(0,r.jsx)(e.h3,{id:"resource-start-order",children:"Resource start order"}),(0,r.jsx)(e.p,{children:"It's important for your resources to start in a logical order to prevent errors from missing dependencies."}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"oxmysql"}),(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 should be one of the first resources"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"framework"}),(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 name of your framework (i.e. ox_core, es_extended, qbx_core)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_target"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"start"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"ox_inventory"})]})]})}),(0,r.jsx)(e.h3,{id:"config",children:"Config"}),(0,r.jsxs)(e.p,{children:["Resource configuration is handled using ",(0,r.jsx)(e.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Shared"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Activate specific event handlers and functions (supported: ox, esx, qbx, nd)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(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:'"esx"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Number of slots for player inventories"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:slots"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Maximum carry capacity for players, in grams (frameworks may override this)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weight"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"30000"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Integrated support for qtarget/ox_target stashes, shops, etc"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:target"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Jobs with access to police armoury, evidence lockers, etc"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:police"}),(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:'"police"'}),(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:'"sheriff"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Client"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# The URL to load item images from"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:imagepath"}),(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:'"nui://ox_inventory/web/images"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons will reload after reaching 0 ammo"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:autoreload"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Blur the screen while accessing the inventory"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:screenblur"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Default hotkeys to access primary and secondary inventories, and hotbar"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:keys"}),(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:'"F2"'}),(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:'"K"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},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:'"TAB"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Enable control action when inventory is open"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:enablekeys"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [249]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Weapons must be aimed before shooting"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:aimedfiring"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Show a list of all nearby players when giving items"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:giveplayerlist"}),(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.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon draw/holster animations"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponanims"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle item notifications (add/remove)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:itemnotify"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Toggle weapon item notifications (equip/holster)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponnotify"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Disable drop markers and spawn a prop instead"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropprops"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the default model used for drop props"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dropmodel"}),(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_med_bag_01b"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:weaponmismatch"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:ignoreweapons"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Suppress weapon and ammo pickups"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:suppresspickups"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"### Server"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Compare current version to latest release on GitHub"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:versioncheck"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Stashes will be wiped after remaining unchanged for the given time"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:clearstashes"}),(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:'"6 MONTH"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Discord webhook url, used for imageurl metadata content moderation (image embeds)"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:webhook"}),(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:'""'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.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)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:loglevel"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Item prices fluctuate in shops"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomprices"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Loot will randomly generate inside unowned vehicles and dumpsters"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:randomloot"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Minimum job grade to remove items from evidence lockers"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:evidencegrade"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Trim whitespace from vehicle plates when checking owned vehicles"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:trimplate"}),(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"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set the contents of randomly generated inventories"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# [item name, minimum, maximum, loot chance]"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:vehicleloot"}),(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-string-expression)"},children:'"cola"'}),(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-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-function)"},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-string-expression)"},children:'"water"'}),(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-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-function)"},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-string-expression)"},children:'"garbage"'}),(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-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"panties"'}),(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-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-constant)"},children:"5"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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-constant)"},children:"50"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"400"}),(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:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-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-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-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-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:dumpsterloot"}),(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-string-expression)"},children:'"mustard"'}),(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-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-function)"},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-string-expression)"},children:'"garbage"'}),(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-constant)"},children:"3"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-string-expression)"},children:'"money"'}),(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-constant)"},children:"10"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},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-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-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-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.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"# Set items to sync with framework accounts"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:accounts"}),(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:'"money"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]})]})})]}),"\n",(0,r.jsx)(e.h2,{id:"framework-incompatibilities",children:"Framework incompatibilities"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Any frameworks with their own built-in inventory, item, or weapon systems are expected to have compatibility issues."}),"\n",(0,r.jsxs)(e.li,{children:["Money as an item may conflict with banking/account systems.","\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["You can sync these values with ",(0,r.jsx)(e.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)(e.p,{children:["Refer to issue ",(0,r.jsx)(e.a,{href:"https://github.com/overextended/ox_inventory/issues/1297",children:"#1297"})," for known compatibility issues."]}),"\n",(0,r.jsx)(e.h2,{id:"using-an-unsupported-framework",children:"Using an unsupported framework"}),"\n",(0,r.jsxs)(e.p,{children:["If your framework does not have official support you'll have to implement it yourself.",(0,r.jsx)(e.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)(e.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)(e.h3,{id:"setup-a-bridge-submodule",children:"Setup a bridge submodule"}),(0,r.jsx)(e.p,{children:'You\'ll want to set the target framework first - this could be the name, an acronym, or just "custom".'}),(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"inventory:framework"}),(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:'"custom"'})]})})}),(0,r.jsxs)(e.p,{children:["Copy the ",(0,r.jsx)(e.code,{children:"ox"})," directory from the ",(0,r.jsx)(e.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)(e.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)(e.h3,{id:"setup-database-references",children:"Setup database references"}),(0,r.jsxs)(e.p,{children:["Take a look at the ",(0,r.jsx)(e.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)(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:"elseif"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" shared.framework "}),(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:"'custom' "}),(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:" playerTable "}),(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:"'characters' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing player / character data"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerColumn "}),(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:"'charid' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the character (i.e. identifier, citizenid, id)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleTable "}),(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:"'vehicles' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- table storing owned vehicle data"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" vehicleColumn "}),(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:"'id' "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- primary key for identifying the vehicle (i.e. plate, vin, id)"})]}),"\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,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,l.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_inventory.mdx",route:"/ox_inventory",timestamp:1729524649e3,title:"Ox Inventory",headings:a},pageNextRoute:"/ox_inventory"})},3786:function(s,e,n){"use strict";n.d(e,{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=s=>{let{side:e="left",children:n,icon:i,link:l}=s;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"===e&&(0,r.jsx)("div",{children:i}),n,"right"===e&&(0,r.jsx)("div",{children:i})]})})})};function GhButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(l,{}),side:s.side,link:s.link,children:s.label||"Github"})}function DocButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(o,{}),side:s.side,link:s.link,children:s.label||"Documentation"})}function DownloadButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(t,{}),side:s.side,link:s.link,children:s.label||"Download"})}function ReleaseButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(a,{}),side:s.side,link:s.link,children:s.label||"Releases"})}function NpmButton(s){return(0,r.jsx)(Button,{icon:(0,r.jsx)(c,{}),side:s.side,link:s.link,children:s.label||"Package"})}},8713:function(s,e,n){"use strict";var r=n(2676);n(5271);var i=n(3786);e.Z=s=>{let{repo:e,docs:n}=s;return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)(i.eX,{link:e}),(0,r.jsx)(i.Vg,{link:"".concat(e,"/releases")}),n&&(0,r.jsx)(i.WR,{link:n})]})}},4049:function(s,e,n){"use strict";var r=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,e,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 s={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 s.PropTypes=s,s}},507:function(s,e,n){s.exports=n(4049)()},6257:function(s){"use strict";s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3881)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Events/Client-6d191f4fd5b0695d.js b/_next/static/chunks/pages/ox_inventory/Events/Client-01c12f568d572be2.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Events/Client-6d191f4fd5b0695d.js rename to _next/static/chunks/pages/ox_inventory/Events/Client-01c12f568d572be2.js index ca037d76d8..39113186c1 100644 --- a/_next/static/chunks/pages/ox_inventory/Events/Client-6d191f4fd5b0695d.js +++ b/_next/static/chunks/pages/ox_inventory/Events/Client-01c12f568d572be2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1181],{3504:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Events/Client",function(){return s(9535)}])},9535:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),t=s(2140),i=s(8745),o=s(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,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Client"}),"\n",(0,r.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,r.jsx)(n.h2,{id:"event-triggers",children:"Event Triggers"}),"\n",(0,r.jsx)(o.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"are safe"})," to trigger and handle in other scripts."]})}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventorydisarm",children:"ox_inventory:disarm"}),"\n",(0,r.jsx)(n.p,{children:"Can be triggered to force the player to disarm."}),"\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:"TriggerClientEvent"}),(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_inventory:disarm'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", playerId, noAnim)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["playerId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["noAnim: ",(0,r.jsx)(n.code,{children:"boolean"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["If ",(0,r.jsx)(n.code,{children:"true"}),", disarm animation will be skipped"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"event-handlers",children:"Event Handlers"}),"\n",(0,r.jsx)(o.UW,{type:"warning",children:(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryupdateinventory",children:"ox_inventory:updateInventory"}),"\n",(0,r.jsxs)(n.p,{children:["Triggered after inventory slots have been updated, included on load.",(0,r.jsx)(n.br,{}),"\n","Changes is a table containing all updated slot data indexed by slotId. Empty slots are ",(0,r.jsx)(n.code,{children:"false"}),"."]}),"\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_inventory:updateInventory'"}),(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:"changes"}),(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:["changes: ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventorycurrentweapon",children:"ox_inventory:currentWeapon"}),"\n",(0,r.jsx)(n.p,{children:"Triggered when a weapon is equipped or its metadata is altered."}),"\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_inventory:currentWeapon'"}),(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:"weapon"}),(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:["weapon?: ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryitemcount",children:"ox_inventory:itemCount"}),"\n",(0,r.jsxs)(n.p,{children:["Triggered when the amount of an item in the player's inventory is changed.",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.em,{children:"Note: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem."})]}),"\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_inventory:itemCount'"}),(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:"itemName"}),(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:"totalCount"}),(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:["itemName: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["totalCount: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryupdateweaponcomponent",children:"ox_inventory:updateWeaponComponent"}),"\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_inventory:updateWeaponComponent'"}),(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:"action"}),(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:"componentHash"}),(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:"componentItem"}),(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:["action: ",(0,r.jsx)(n.code,{children:"'added' | 'removed'"})]}),"\n",(0,r.jsxs)(n.li,{children:["componentHash: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["componentItem: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\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_inventory: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:"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:"name"}),(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:"slotId"}),(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:"metadata"}),(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:["name: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["slotId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["metadata?: ",(0,r.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,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_inventory/Events/Client.mdx",route:"/ox_inventory/Events/Client",timestamp:1729516534e3,title:"Client",headings:l},pageNextRoute:"/ox_inventory/Events/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3504)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1181],{3504:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Events/Client",function(){return s(9535)}])},9535:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var r=s(2676),t=s(2140),i=s(8745),o=s(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,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Client"}),"\n",(0,r.jsx)(n.p,{children:"This is not a comprehensive list of events and is missing events intended for internal use only."}),"\n",(0,r.jsx)(n.h2,{id:"event-triggers",children:"Event Triggers"}),"\n",(0,r.jsx)(o.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"are safe"})," to trigger and handle in other scripts."]})}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventorydisarm",children:"ox_inventory:disarm"}),"\n",(0,r.jsx)(n.p,{children:"Can be triggered to force the player to disarm."}),"\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:"TriggerClientEvent"}),(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_inventory:disarm'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", playerId, noAnim)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["playerId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["noAnim: ",(0,r.jsx)(n.code,{children:"boolean"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["If ",(0,r.jsx)(n.code,{children:"true"}),", disarm animation will be skipped"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"event-handlers",children:"Event Handlers"}),"\n",(0,r.jsx)(o.UW,{type:"warning",children:(0,r.jsxs)(n.p,{children:["These events ",(0,r.jsx)(n.strong,{children:"should not"})," be triggered by any other scripts."]})}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryupdateinventory",children:"ox_inventory:updateInventory"}),"\n",(0,r.jsxs)(n.p,{children:["Triggered after inventory slots have been updated, included on load.",(0,r.jsx)(n.br,{}),"\n","Changes is a table containing all updated slot data indexed by slotId. Empty slots are ",(0,r.jsx)(n.code,{children:"false"}),"."]}),"\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_inventory:updateInventory'"}),(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:"changes"}),(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:["changes: ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventorycurrentweapon",children:"ox_inventory:currentWeapon"}),"\n",(0,r.jsx)(n.p,{children:"Triggered when a weapon is equipped or its metadata is altered."}),"\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_inventory:currentWeapon'"}),(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:"weapon"}),(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:["weapon?: ",(0,r.jsx)(n.code,{children:"table"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryitemcount",children:"ox_inventory:itemCount"}),"\n",(0,r.jsxs)(n.p,{children:["Triggered when the amount of an item in the player's inventory is changed.",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.em,{children:"Note: Not available for ESX, use esx:addInventoryItem or esx:removeInventoryItem."})]}),"\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_inventory:itemCount'"}),(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:"itemName"}),(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:"totalCount"}),(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:["itemName: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["totalCount: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryupdateweaponcomponent",children:"ox_inventory:updateWeaponComponent"}),"\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_inventory:updateWeaponComponent'"}),(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:"action"}),(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:"componentHash"}),(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:"componentItem"}),(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:["action: ",(0,r.jsx)(n.code,{children:"'added' | 'removed'"})]}),"\n",(0,r.jsxs)(n.li,{children:["componentHash: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["componentItem: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"ox_inventoryuseditem",children:"ox_inventory:usedItem"}),"\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_inventory: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:"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:"name"}),(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:"slotId"}),(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:"metadata"}),(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:["name: ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsxs)(n.li,{children:["slotId: ",(0,r.jsx)(n.code,{children:"number"})]}),"\n",(0,r.jsxs)(n.li,{children:["metadata?: ",(0,r.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,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_inventory/Events/Client.mdx",route:"/ox_inventory/Events/Client",timestamp:1729524649e3,title:"Client",headings:l},pageNextRoute:"/ox_inventory/Events/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3504)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Events/Server-39c569855742d6b3.js b/_next/static/chunks/pages/ox_inventory/Events/Server-9d8d599687bf5ad6.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Events/Server-39c569855742d6b3.js rename to _next/static/chunks/pages/ox_inventory/Events/Server-9d8d599687bf5ad6.js index 7b39e111f8..783f9e9c36 100644 --- a/_next/static/chunks/pages/ox_inventory/Events/Server-39c569855742d6b3.js +++ b/_next/static/chunks/pages/ox_inventory/Events/Server-9d8d599687bf5ad6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8555],{6142:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Events/Server",function(){return r(1890)}])},1890: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/ox_inventory/Events/Server.mdx",route:"/ox_inventory/Events/Server",timestamp:1729516534e3,title:"Server",headings:l},pageNextRoute:"/ox_inventory/Events/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6142)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8555],{6142:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Events/Server",function(){return r(1890)}])},1890: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/ox_inventory/Events/Server.mdx",route:"/ox_inventory/Events/Server",timestamp:1729524649e3,title:"Server",headings:l},pageNextRoute:"/ox_inventory/Events/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6142)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Frameworks/esx-547e5c4b61a08f49.js b/_next/static/chunks/pages/ox_inventory/Frameworks/esx-a430f754ebd7ca77.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Frameworks/esx-547e5c4b61a08f49.js rename to _next/static/chunks/pages/ox_inventory/Frameworks/esx-a430f754ebd7ca77.js index 419301bde9..fc5205a3d8 100644 --- a/_next/static/chunks/pages/ox_inventory/Frameworks/esx-547e5c4b61a08f49.js +++ b/_next/static/chunks/pages/ox_inventory/Frameworks/esx-a430f754ebd7ca77.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7180],{7627:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Frameworks/esx",function(){return n(5142)}])},5142: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/ox_inventory/Frameworks/esx.mdx",route:"/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"},timestamp:1729516534e3,title:"ESX",headings:l},pageNextRoute:"/ox_inventory/Frameworks/esx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7627)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7180],{7627:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Frameworks/esx",function(){return n(5142)}])},5142: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/ox_inventory/Frameworks/esx.mdx",route:"/ox_inventory/Frameworks/esx",frontMatter:{title:"ESX"},timestamp:1729524649e3,title:"ESX",headings:l},pageNextRoute:"/ox_inventory/Frameworks/esx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7627)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Frameworks/qbx-735fee7334f39418.js b/_next/static/chunks/pages/ox_inventory/Frameworks/qbx-db81eecf233fcad1.js similarity index 97% rename from _next/static/chunks/pages/ox_inventory/Frameworks/qbx-735fee7334f39418.js rename to _next/static/chunks/pages/ox_inventory/Frameworks/qbx-db81eecf233fcad1.js index da58c03c8d..acd2832f2e 100644 --- a/_next/static/chunks/pages/ox_inventory/Frameworks/qbx-735fee7334f39418.js +++ b/_next/static/chunks/pages/ox_inventory/Frameworks/qbx-db81eecf233fcad1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3818],{2380:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Frameworks/qbx",function(){return r(8983)}])},8983: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/ox_inventory/Frameworks/qbx.mdx",route:"/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"},timestamp:1729516534e3,title:"Qbox",headings:s},pageNextRoute:"/ox_inventory/Frameworks/qbx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2380)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3818],{2380:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Frameworks/qbx",function(){return r(8983)}])},8983: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/ox_inventory/Frameworks/qbx.mdx",route:"/ox_inventory/Frameworks/qbx",frontMatter:{title:"Qbox"},timestamp:1729524649e3,title:"Qbox",headings:s},pageNextRoute:"/ox_inventory/Frameworks/qbx"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2380)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Functions/Client-5825a1aaa21caacd.js b/_next/static/chunks/pages/ox_inventory/Functions/Client-775b0cd78ca5f341.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Functions/Client-5825a1aaa21caacd.js rename to _next/static/chunks/pages/ox_inventory/Functions/Client-775b0cd78ca5f341.js index 06eeafd1c2..09ae326fca 100644 --- a/_next/static/chunks/pages/ox_inventory/Functions/Client-5825a1aaa21caacd.js +++ b/_next/static/chunks/pages/ox_inventory/Functions/Client-775b0cd78ca5f341.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8741],{1153:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Client",function(){return n(8784)}])},8784: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/ox_inventory/Functions/Client.mdx",route:"/ox_inventory/Functions/Client",timestamp:1729516534e3,title:"Client",headings:o},pageNextRoute:"/ox_inventory/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1153)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8741],{1153:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Client",function(){return n(8784)}])},8784: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/ox_inventory/Functions/Client.mdx",route:"/ox_inventory/Functions/Client",timestamp:1729524649e3,title:"Client",headings:o},pageNextRoute:"/ox_inventory/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1153)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Functions/Server-3ef642b15b57ba85.js b/_next/static/chunks/pages/ox_inventory/Functions/Server-a8810716c65673f1.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Functions/Server-3ef642b15b57ba85.js rename to _next/static/chunks/pages/ox_inventory/Functions/Server-a8810716c65673f1.js index 20294c1cd7..8769fccc2b 100644 --- a/_next/static/chunks/pages/ox_inventory/Functions/Server-3ef642b15b57ba85.js +++ b/_next/static/chunks/pages/ox_inventory/Functions/Server-a8810716c65673f1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5789],{4268:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Server",function(){return n(9762)}])},9762: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/ox_inventory/Functions/Server.mdx",route:"/ox_inventory/Functions/Server",timestamp:1729516534e3,title:"Server",headings:o},pageNextRoute:"/ox_inventory/Functions/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4268)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5789],{4268:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Server",function(){return n(9762)}])},9762: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/ox_inventory/Functions/Server.mdx",route:"/ox_inventory/Functions/Server",timestamp:1729524649e3,title:"Server",headings:o},pageNextRoute:"/ox_inventory/Functions/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4268)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-e33828bb5b7b2c65.js b/_next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-500b05172c446ce6.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-e33828bb5b7b2c65.js rename to _next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-500b05172c446ce6.js index 79619789f7..0470a1c714 100644 --- a/_next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-e33828bb5b7b2c65.js +++ b/_next/static/chunks/pages/ox_inventory/Functions/Server/Hooks-500b05172c446ce6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2172],{9095:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Server/Hooks",function(){return n(7787)}])},7787: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/ox_inventory/Functions/Server/Hooks.mdx",route:"/ox_inventory/Functions/Server/Hooks",timestamp:1729516534e3,title:"Hooks",headings:i},pageNextRoute:"/ox_inventory/Functions/Server/Hooks"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9095)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2172],{9095:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Functions/Server/Hooks",function(){return n(7787)}])},7787: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/ox_inventory/Functions/Server/Hooks.mdx",route:"/ox_inventory/Functions/Server/Hooks",timestamp:1729524649e3,title:"Hooks",headings:i},pageNextRoute:"/ox_inventory/Functions/Server/Hooks"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9095)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Guides/crafting-91bc2efc48666447.js b/_next/static/chunks/pages/ox_inventory/Guides/crafting-e4072eb7c4f14ae1.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Guides/crafting-91bc2efc48666447.js rename to _next/static/chunks/pages/ox_inventory/Guides/crafting-e4072eb7c4f14ae1.js index 0c1ecfdb39..81642423b8 100644 --- a/_next/static/chunks/pages/ox_inventory/Guides/crafting-91bc2efc48666447.js +++ b/_next/static/chunks/pages/ox_inventory/Guides/crafting-e4072eb7c4f14ae1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4815],{1043:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/crafting",function(){return n(1603)}])},1603: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/ox_inventory/Guides/crafting.mdx",route:"/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"},timestamp:1729516534e3,title:"Crafting",headings:o},pageNextRoute:"/ox_inventory/Guides/crafting"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1043)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4815],{1043:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/crafting",function(){return n(1603)}])},1603: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/ox_inventory/Guides/crafting.mdx",route:"/ox_inventory/Guides/crafting",frontMatter:{title:"Crafting"},timestamp:1729524649e3,title:"Crafting",headings:o},pageNextRoute:"/ox_inventory/Guides/crafting"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1043)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Guides/creatingItems-40343832770dcfcf.js b/_next/static/chunks/pages/ox_inventory/Guides/creatingItems-9d25936877eb92e4.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Guides/creatingItems-40343832770dcfcf.js rename to _next/static/chunks/pages/ox_inventory/Guides/creatingItems-9d25936877eb92e4.js index 7b05e44709..4a58421dbf 100644 --- a/_next/static/chunks/pages/ox_inventory/Guides/creatingItems-40343832770dcfcf.js +++ b/_next/static/chunks/pages/ox_inventory/Guides/creatingItems-9d25936877eb92e4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[691],{7580:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/creatingItems",function(){return l(3574)}])},3574: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/ox_inventory/Guides/creatingItems.mdx",route:"/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"},timestamp:1729516534e3,title:"Creating Items",headings:t},pageNextRoute:"/ox_inventory/Guides/creatingItems"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=7580)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[691],{7580:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/creatingItems",function(){return l(3574)}])},3574: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/ox_inventory/Guides/creatingItems.mdx",route:"/ox_inventory/Guides/creatingItems",frontMatter:{title:"Creating Items"},timestamp:1729524649e3,title:"Creating Items",headings:t},pageNextRoute:"/ox_inventory/Guides/creatingItems"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=7580)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Guides/metadata-cb764dca16bb0c2a.js b/_next/static/chunks/pages/ox_inventory/Guides/metadata-ae8916aec3f22034.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Guides/metadata-cb764dca16bb0c2a.js rename to _next/static/chunks/pages/ox_inventory/Guides/metadata-ae8916aec3f22034.js index 743e217bc1..1d7de6c10a 100644 --- a/_next/static/chunks/pages/ox_inventory/Guides/metadata-cb764dca16bb0c2a.js +++ b/_next/static/chunks/pages/ox_inventory/Guides/metadata-ae8916aec3f22034.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6072],{9145:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/metadata",function(){return r(8699)}])},8699: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/ox_inventory/Guides/metadata.mdx",route:"/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"},timestamp:1729516534e3,title:"Metadata",headings:o},pageNextRoute:"/ox_inventory/Guides/metadata"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9145)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6072],{9145:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/metadata",function(){return r(8699)}])},8699: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/ox_inventory/Guides/metadata.mdx",route:"/ox_inventory/Guides/metadata",frontMatter:{title:"Metadata"},timestamp:1729524649e3,title:"Metadata",headings:o},pageNextRoute:"/ox_inventory/Guides/metadata"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9145)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Guides/shops-8b15351020f21e0c.js b/_next/static/chunks/pages/ox_inventory/Guides/shops-8a5833404bbc016d.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Guides/shops-8b15351020f21e0c.js rename to _next/static/chunks/pages/ox_inventory/Guides/shops-8a5833404bbc016d.js index 3b28003df4..155cfcdf8f 100644 --- a/_next/static/chunks/pages/ox_inventory/Guides/shops-8b15351020f21e0c.js +++ b/_next/static/chunks/pages/ox_inventory/Guides/shops-8a5833404bbc016d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1038],{5822:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/shops",function(){return n(4730)}])},4730: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/ox_inventory/Guides/shops.mdx",route:"/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"},timestamp:1729516534e3,title:"Creating Shops",headings:i},pageNextRoute:"/ox_inventory/Guides/shops"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5822)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1038],{5822:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/shops",function(){return n(4730)}])},4730: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/ox_inventory/Guides/shops.mdx",route:"/ox_inventory/Guides/shops",frontMatter:{title:"Creating Shops"},timestamp:1729524649e3,title:"Creating Shops",headings:i},pageNextRoute:"/ox_inventory/Guides/shops"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5822)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/Guides/stashes-a690c23545ef6808.js b/_next/static/chunks/pages/ox_inventory/Guides/stashes-ab92bec26a9cc052.js similarity index 99% rename from _next/static/chunks/pages/ox_inventory/Guides/stashes-a690c23545ef6808.js rename to _next/static/chunks/pages/ox_inventory/Guides/stashes-ab92bec26a9cc052.js index c4d7fc0482..8a89cf3e37 100644 --- a/_next/static/chunks/pages/ox_inventory/Guides/stashes-a690c23545ef6808.js +++ b/_next/static/chunks/pages/ox_inventory/Guides/stashes-ab92bec26a9cc052.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2384],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),l=n(507),o=n.n(l),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 l=(0,r.forwardRef)((s,l)=>{var{color:o="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:l},i),{width:t,height:t,stroke:o,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return l.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},l.displayName=`${s}`,l}},8240:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/stashes",function(){return n(3784)}])},3784: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),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,o.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,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/ox_inventory/Guides/stashes.mdx",route:"/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"},timestamp:1729516534e3,title:"Custom Stashes",headings:t},pageNextRoute:"/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 l=n(5850),o=(0,l.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,l.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,l.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,l.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,l.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:l,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"===s&&(0,r.jsx)("div",{children:l}),n,"right"===s&&(0,r.jsx)("div",{children:l})]})})})};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)(i,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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||"Package"})}},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,l,o,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=8240)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2384],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),l=n(507),o=n.n(l),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 l=(0,r.forwardRef)((s,l)=>{var{color:o="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:l},i),{width:t,height:t,stroke:o,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return l.propTypes={color:o().string,size:o().oneOfType([o().string,o().number]),stroke:o().oneOfType([o().string,o().number])},l.displayName=`${s}`,l}},8240:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/Guides/stashes",function(){return n(3784)}])},3784: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),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,o.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,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/ox_inventory/Guides/stashes.mdx",route:"/ox_inventory/Guides/stashes",frontMatter:{title:"Custom Stashes"},timestamp:1729524649e3,title:"Custom Stashes",headings:t},pageNextRoute:"/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 l=n(5850),o=(0,l.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,l.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,l.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,l.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,l.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:l,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"===s&&(0,r.jsx)("div",{children:l}),n,"right"===s&&(0,r.jsx)("div",{children:l})]})})})};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)(i,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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||"Package"})}},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,l,o,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=8240)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_inventory/issues-a5bacbc42f77e868.js b/_next/static/chunks/pages/ox_inventory/issues-9e19185f6cb1fb6a.js similarity index 98% rename from _next/static/chunks/pages/ox_inventory/issues-a5bacbc42f77e868.js rename to _next/static/chunks/pages/ox_inventory/issues-9e19185f6cb1fb6a.js index 36b07cba44..d45caf67d7 100644 --- a/_next/static/chunks/pages/ox_inventory/issues-a5bacbc42f77e868.js +++ b/_next/static/chunks/pages/ox_inventory/issues-9e19185f6cb1fb6a.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3854],{9882:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/issues",function(){return t(2514)}])},2514:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return o}});var s=t(2676),r=t(2140),i=t(8745);let o=[{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,i.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,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_inventory/issues.mdx",route:"/ox_inventory/issues",frontMatter:{title:"Common Issues"},timestamp:1729516534e3,title:"Common Issues",headings:o},pageNextRoute:"/ox_inventory/issues"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9882)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3854],{9882:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_inventory/issues",function(){return t(2514)}])},2514:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return o}});var s=t(2676),r=t(2140),i=t(8745);let o=[{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,i.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,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_inventory/issues.mdx",route:"/ox_inventory/issues",frontMatter:{title:"Common Issues"},timestamp:1729524649e3,title:"Common Issues",headings:o},pageNextRoute:"/ox_inventory/issues"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9882)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib-ba30b2f596395dae.js b/_next/static/chunks/pages/ox_lib-2aa8f6b11f50a5b3.js similarity index 99% rename from _next/static/chunks/pages/ox_lib-ba30b2f596395dae.js rename to _next/static/chunks/pages/ox_lib-2aa8f6b11f50a5b3.js index 71ce568696..d1f76c9a18 100644 --- a/_next/static/chunks/pages/ox_lib-ba30b2f596395dae.js +++ b/_next/static/chunks/pages/ox_lib-2aa8f6b11f50a5b3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2619],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var i=n(5271),r=n(507),t=n.n(r),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 i in e)d.call(e,i)&&0>s.indexOf(i)&&(n[i]=e[i]);if(null!=e&&h)for(var i of h(e))0>s.indexOf(i)&&x.call(e,i)&&(n[i]=e[i]);return n},createReactComponent=(e,s,n)=>{let r=(0,i.forwardRef)((s,r)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,i.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},l),{width:o,height:o,stroke:t,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,i.createElement)(e,s)),...c||[]])});return r.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},r.displayName=`${s}`,r}},3049:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib",function(){return n(4108)}])},4108:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var i=n(2676),r=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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Ox Lib"}),"\n",(0,i.jsx)(s.p,{children:"A standalone library for providing easily reusable code as importable modules and exports."}),"\n",(0,i.jsx)(o.Z,{repo:"https://github.com/overextended/ox_lib"}),"\n",(0,i.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(l.UW,{type:"info",children:(0,i.jsxs)(s.p,{children:["We ",(0,i.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,i.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,i.jsxs)(l.Rg,{children:[(0,i.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,i.jsx)(s.a,{href:"https://github.com/overextended/ox_lib/releases",children:"release"})," or build the source code."]}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_lib.git"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib/web"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,i.jsx)(s.h3,{id:"config",children:"Config"}),(0,i.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,i.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryColor"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"blue"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryShade"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:userLocales"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Allow users to select their locales using /ox_lib"})]})]})}),(0,i.jsx)(s.p,{children:"You'll also need to grant ace permissions to the resource."}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_principal"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_principal"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]})]})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,i.jsxs)(l.OK,{children:[(0,i.jsxs)(s.p,{children:["To enable the library inside of your resource just add ",(0,i.jsx)(s.code,{children:"@ox_lib/init.lua"})," as a shared_script in your ",(0,i.jsx)(s.code,{children:"fxmanifest.lua"})," file."]}),(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(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-function)"},children:"shared_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-string-expression)"},children:"'@ox_lib/init.lua'"}),(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:"}"})})]})}),(0,i.jsx)(s.p,{children:"Or if the library is the only shared script you use you can do:"}),(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-function)"},children:"shared_script"}),(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:"'@ox_lib/init.lua'"})]})})}),(0,i.jsxs)(s.p,{children:["You can specify modules to import from inside your ",(0,i.jsx)(s.code,{children:"fxmanifest.lua"}),", or load them dynamically."]}),(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(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-function)"},children:"ox_libs"}),(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:"'locale'"}),(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:"'math'"}),(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:"'table'"}),(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:"}"})})]})}),(0,i.jsx)(s.p,{children:"When ox_lib has been imported into your script, it will make several new globals available:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"lib"})," for dynamically importing ox_lib modules into your script."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"require"})," for importing modules from your own script."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"cache"})," see ",(0,i.jsx)(s.a,{href:"./ox_lib/Modules/Cache/Shared",children:"here"}),"."]}),"\n"]})]}),(0,i.jsxs)(l.OK,{children:[(0,i.jsxs)(l.UW,{children:[(0,i.jsxs)(s.p,{children:["Npm package for the lib does ",(0,i.jsx)(s.strong,{children:"not"})," support all the functions that are available for Lua."]}),(0,i.jsxs)(s.p,{children:["All supported functions are located inside the ",(0,i.jsx)(s.code,{children:"resource"})," folder in the lib."]})]}),(0,i.jsxs)(s.p,{children:["You can get the npm package ",(0,i.jsx)(s.a,{href:"https://npmjs.com/package/@overextended/ox_lib",children:"here"}),"."]}),(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Usage:"}),(0,i.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,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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/server'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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:" { versionCheck } "}),(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/server'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})})]})]}),"\n",(0,i.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,i.jsx)(s.h2,{id:"using-icons-for-interface-functions",children:"Using icons for interface functions"}),"\n",(0,i.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,i.jsx)(s.code,{children:"solid"}),".",(0,i.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,i.jsx)(s.code,{children:"array"}),") with the first value being the icon type (",(0,i.jsx)(s.code,{children:"fas"}),", ",(0,i.jsx)(s.code,{children:"far"}),", ",(0,i.jsx)(s.code,{children:"fab"}),") as a string, and the second being the icon name."]}),"\n",(0,i.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(l.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:"icon "}),(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-string-expression)"},children:"'fab'"}),(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:"'apple'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]})})})}),(0,i.jsx)(l.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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-color-text)"},children:"icon"}),(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:"'fab'"}),(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:"'apple'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]})})})})]}),"\n",(0,i.jsx)(s.h2,{id:"building-the-ui",children:"Building the UI"}),"\n",(0,i.jsxs)(s.p,{children:["If you wish to edit any of the UI elements you will need to download the ",(0,i.jsx)(s.em,{children:"source"})," code, edit what you need and then compile it."]}),"\n",(0,i.jsx)(l.UW,{type:"warning",children:(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"DO NOT"})," de-bundle and un-minify the release CSS and JS files to edit them."]})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Requirements:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://nodejs.org/",children:"Node.js (LTS)"})}),"\n",(0,i.jsx)(s.li,{children:"pnpm"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Installing Node.js:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Download the LTS version of Node.js."}),"\n",(0,i.jsx)(s.li,{children:"Go through the install and make sure you install all of the features."}),"\n",(0,i.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,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Installing pnpm:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["After installing NodeJS you can install pnpm by running ",(0,i.jsx)(s.code,{children:"npm install -g pnpm"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Building the UI:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"cd into the web directory."}),"\n",(0,i.jsxs)(s.li,{children:["run ",(0,i.jsx)(s.code,{children:"pnpm i"})," to install the dependencies."]}),"\n",(0,i.jsxs)(s.li,{children:["run ",(0,i.jsx)(s.code,{children:"pnpm build"})," to build the source files."]}),"\n"]}),"\n",(0,i.jsxs)(l.UW,{type:"info",children:[(0,i.jsxs)(s.p,{children:["When working in the browser you can run ",(0,i.jsx)(s.code,{children:"pnpm start"}),", which supports hot reloads meaning that\nyou will see your changes after saving your file."]}),(0,i.jsxs)(s.p,{children:["If you want to work in game you can run ",(0,i.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,r.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,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib.mdx",route:"/ox_lib",timestamp:1729516534e3,title:"Ox Lib",headings:a},pageNextRoute:"/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 i=n(2676);n(5271);var r=n(5850),t=(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"}]]),l=(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"}]]),o=(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"}]]),a=(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:s="left",children:n,icon:r,link:t}=e;return(0,i.jsx)("div",{className:"h-fit w-fit",children:(0,i.jsx)("a",{href:t,children:(0,i.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,i.jsx)("div",{children:r}),n,"right"===s&&(0,i.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}function DownloadButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Package"})}},8713:function(e,s,n){"use strict";var i=n(2676);n(5271);var r=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(r.eX,{link:s}),(0,i.jsx)(r.Vg,{link:"".concat(s,"/releases")}),n&&(0,i.jsx)(r.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var i=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,r,t,l){if(l!==i){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=3049)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2619],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var i=n(5271),r=n(507),t=n.n(r),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 i in e)d.call(e,i)&&0>s.indexOf(i)&&(n[i]=e[i]);if(null!=e&&h)for(var i of h(e))0>s.indexOf(i)&&x.call(e,i)&&(n[i]=e[i]);return n},createReactComponent=(e,s,n)=>{let r=(0,i.forwardRef)((s,r)=>{var{color:t="currentColor",size:o=24,stroke:a=2,children:c}=s,h=__objRest(s,["color","size","stroke","children"]);return(0,i.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:r},l),{width:o,height:o,stroke:t,strokeWidth:a,className:`tabler-icon tabler-icon-${e}`}),h),[...n.map(([e,s])=>(0,i.createElement)(e,s)),...c||[]])});return r.propTypes={color:t().string,size:t().oneOfType([t().string,t().number]),stroke:t().oneOfType([t().string,t().number])},r.displayName=`${s}`,r}},3049:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib",function(){return n(4108)}])},4108:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var i=n(2676),r=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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Ox Lib"}),"\n",(0,i.jsx)(s.p,{children:"A standalone library for providing easily reusable code as importable modules and exports."}),"\n",(0,i.jsx)(o.Z,{repo:"https://github.com/overextended/ox_lib"}),"\n",(0,i.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(l.UW,{type:"info",children:(0,i.jsxs)(s.p,{children:["We ",(0,i.jsx)(s.strong,{children:"strongly"})," recommend referring to ",(0,i.jsx)(s.a,{href:"../guides",children:"Guides"})," for setting up Git, Node.js, and pnpm."]})}),"\n",(0,i.jsxs)(l.Rg,{children:[(0,i.jsxs)(s.h3,{id:"download-a-release-or-build-the-source-code",children:["Download a ",(0,i.jsx)(s.a,{href:"https://github.com/overextended/ox_lib/releases",children:"release"})," or build the source code."]}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"git"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"clone"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"https://github.com/overextended/ox_lib.git"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox_lib/web"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"i"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"build"})]})]})}),(0,i.jsx)(s.h3,{id:"config",children:"Config"}),(0,i.jsxs)(s.p,{children:["Resource configuration is handled using ",(0,i.jsx)(s.a,{href:"https://docs.fivem.net/docs/scripting-reference/convars/",children:"convars"}),"."]}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# https://v6.mantine.dev/theming/colors/#default-colors"})}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryColor"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"blue"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:primaryShade"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"setr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"ox:userLocales"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"# Allow users to select their locales using /ox_lib"})]})]})}),(0,i.jsx)(s.p,{children:"You'll also need to grant ace permissions to the resource."}),(0,i.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"bash","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.add_principal"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"add_ace"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"resource.ox_lib"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"command.remove_principal"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"allow"})]})]})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,i.jsxs)(l.OK,{children:[(0,i.jsxs)(s.p,{children:["To enable the library inside of your resource just add ",(0,i.jsx)(s.code,{children:"@ox_lib/init.lua"})," as a shared_script in your ",(0,i.jsx)(s.code,{children:"fxmanifest.lua"})," file."]}),(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(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-function)"},children:"shared_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-string-expression)"},children:"'@ox_lib/init.lua'"}),(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:"}"})})]})}),(0,i.jsx)(s.p,{children:"Or if the library is the only shared script you use you can do:"}),(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-function)"},children:"shared_script"}),(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:"'@ox_lib/init.lua'"})]})})}),(0,i.jsxs)(s.p,{children:["You can specify modules to import from inside your ",(0,i.jsx)(s.code,{children:"fxmanifest.lua"}),", or load them dynamically."]}),(0,i.jsx)(s.pre,{"data-language":"lua","data-theme":"default",children:(0,i.jsxs)(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-function)"},children:"ox_libs"}),(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:"'locale'"}),(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:"'math'"}),(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:"'table'"}),(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:"}"})})]})}),(0,i.jsx)(s.p,{children:"When ox_lib has been imported into your script, it will make several new globals available:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"lib"})," for dynamically importing ox_lib modules into your script."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"require"})," for importing modules from your own script."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"cache"})," see ",(0,i.jsx)(s.a,{href:"./ox_lib/Modules/Cache/Shared",children:"here"}),"."]}),"\n"]})]}),(0,i.jsxs)(l.OK,{children:[(0,i.jsxs)(l.UW,{children:[(0,i.jsxs)(s.p,{children:["Npm package for the lib does ",(0,i.jsx)(s.strong,{children:"not"})," support all the functions that are available for Lua."]}),(0,i.jsxs)(s.p,{children:["All supported functions are located inside the ",(0,i.jsx)(s.code,{children:"resource"})," folder in the lib."]})]}),(0,i.jsxs)(s.p,{children:["You can get the npm package ",(0,i.jsx)(s.a,{href:"https://npmjs.com/package/@overextended/ox_lib",children:"here"}),"."]}),(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Usage:"}),(0,i.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,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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/server'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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:" { versionCheck } "}),(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/server'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})})]})]}),"\n",(0,i.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,i.jsx)(s.h2,{id:"using-icons-for-interface-functions",children:"Using icons for interface functions"}),"\n",(0,i.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,i.jsx)(s.code,{children:"solid"}),".",(0,i.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,i.jsx)(s.code,{children:"array"}),") with the first value being the icon type (",(0,i.jsx)(s.code,{children:"fas"}),", ",(0,i.jsx)(s.code,{children:"far"}),", ",(0,i.jsx)(s.code,{children:"fab"}),") as a string, and the second being the icon name."]}),"\n",(0,i.jsxs)(l.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(l.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:"icon "}),(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-string-expression)"},children:"'fab'"}),(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:"'apple'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]})})})}),(0,i.jsx)(l.OK,{children:(0,i.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,i.jsx)(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-color-text)"},children:"icon"}),(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:"'fab'"}),(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:"'apple'"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]})})})})]}),"\n",(0,i.jsx)(s.h2,{id:"building-the-ui",children:"Building the UI"}),"\n",(0,i.jsxs)(s.p,{children:["If you wish to edit any of the UI elements you will need to download the ",(0,i.jsx)(s.em,{children:"source"})," code, edit what you need and then compile it."]}),"\n",(0,i.jsx)(l.UW,{type:"warning",children:(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"DO NOT"})," de-bundle and un-minify the release CSS and JS files to edit them."]})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Requirements:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://nodejs.org/",children:"Node.js (LTS)"})}),"\n",(0,i.jsx)(s.li,{children:"pnpm"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Installing Node.js:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Download the LTS version of Node.js."}),"\n",(0,i.jsx)(s.li,{children:"Go through the install and make sure you install all of the features."}),"\n",(0,i.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,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Installing pnpm:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["After installing NodeJS you can install pnpm by running ",(0,i.jsx)(s.code,{children:"npm install -g pnpm"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Building the UI:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"cd into the web directory."}),"\n",(0,i.jsxs)(s.li,{children:["run ",(0,i.jsx)(s.code,{children:"pnpm i"})," to install the dependencies."]}),"\n",(0,i.jsxs)(s.li,{children:["run ",(0,i.jsx)(s.code,{children:"pnpm build"})," to build the source files."]}),"\n"]}),"\n",(0,i.jsxs)(l.UW,{type:"info",children:[(0,i.jsxs)(s.p,{children:["When working in the browser you can run ",(0,i.jsx)(s.code,{children:"pnpm start"}),", which supports hot reloads meaning that\nyou will see your changes after saving your file."]}),(0,i.jsxs)(s.p,{children:["If you want to work in game you can run ",(0,i.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,r.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,i.jsx)(s,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib.mdx",route:"/ox_lib",timestamp:1729524649e3,title:"Ox Lib",headings:a},pageNextRoute:"/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 i=n(2676);n(5271);var r=n(5850),t=(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"}]]),l=(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"}]]),o=(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"}]]),a=(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:s="left",children:n,icon:r,link:t}=e;return(0,i.jsx)("div",{className:"h-fit w-fit",children:(0,i.jsx)("a",{href:t,children:(0,i.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,i.jsx)("div",{children:r}),n,"right"===s&&(0,i.jsx)("div",{children:r})]})})})};function GhButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(t,{}),side:e.side,link:e.link,children:e.label||"Github"})}function DocButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(l,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}function DownloadButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(o,{}),side:e.side,link:e.link,children:e.label||"Download"})}function ReleaseButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(a,{}),side:e.side,link:e.link,children:e.label||"Releases"})}function NpmButton(e){return(0,i.jsx)(Button,{icon:(0,i.jsx)(c,{}),side:e.side,link:e.link,children:e.label||"Package"})}},8713:function(e,s,n){"use strict";var i=n(2676);n(5271);var r=n(3786);s.Z=e=>{let{repo:s,docs:n}=e;return(0,i.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)(r.eX,{link:s}),(0,i.jsx)(r.Vg,{link:"".concat(s,"/releases")}),n&&(0,i.jsx)(r.WR,{link:n})]})}},4049:function(e,s,n){"use strict";var i=n(6257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,s,n,r,t,l){if(l!==i){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=3049)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/ACL/Server-d311492c25c03652.js b/_next/static/chunks/pages/ox_lib/Modules/ACL/Server-dafffbeef7f1bd76.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/ACL/Server-d311492c25c03652.js rename to _next/static/chunks/pages/ox_lib/Modules/ACL/Server-dafffbeef7f1bd76.js index a273447a5e..79165c155d 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/ACL/Server-d311492c25c03652.js +++ b/_next/static/chunks/pages/ox_lib/Modules/ACL/Server-dafffbeef7f1bd76.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4266],{526:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/ACL/Server",function(){return n(7034)}])},7034: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),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(s){let e=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)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Server"}),"\n",(0,l.jsxs)(e.p,{children:["Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.",(0,l.jsx)(e.br,{}),"\n","Refer to ",(0,l.jsx)(e.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)(e.h2,{id:"libaddace",children:"lib.addAce"}),"\n",(0,l.jsxs)(e.p,{children:["Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(e.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)(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:"addAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\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:"addAce"}),(0,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'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(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":"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/server'"})]}),"\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:".addAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\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:".addAce"}),(0,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'"}),(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:"'command.say'"}),(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:["principal: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ace: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["allow: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libremoveace",children:"lib.removeAce"}),"\n",(0,l.jsxs)(e.p,{children:["Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(e.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)(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:"removeAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\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:"removeAce"}),(0,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'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(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":"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/server'"})]}),"\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:".removeAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\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:".removeAce"}),(0,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'"}),(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:"'command.say'"}),(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:["principal: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ace: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["allow: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libaddprincipal",children:"lib.addPrincipal"}),"\n",(0,l.jsx)(e.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)(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:"addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\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:"addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,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.moderator'"}),(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":"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/server'"})]}),"\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:".addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\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:".addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.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:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(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:["child: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["parent: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libremoveprincipal",children:"lib.removePrincipal"}),"\n",(0,l.jsx)(e.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)(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:"removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\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:"removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,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.moderator'"}),(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":"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/server'"})]}),"\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:".removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\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:".removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.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:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(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:["child: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["parent: ",(0,l.jsx)(e.code,{children:"string"})]}),"\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/ox_lib/Modules/ACL/Server.mdx",route:"/ox_lib/Modules/ACL/Server",timestamp:1729516534e3,title:"Server",headings:o},pageNextRoute:"/ox_lib/Modules/ACL/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=526)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4266],{526:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/ACL/Server",function(){return n(7034)}])},7034: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),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(s){let e=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)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Server"}),"\n",(0,l.jsxs)(e.p,{children:["Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions.",(0,l.jsx)(e.br,{}),"\n","Refer to ",(0,l.jsx)(e.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)(e.h2,{id:"libaddace",children:"lib.addAce"}),"\n",(0,l.jsxs)(e.p,{children:["Assigns the ace permission to a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(e.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)(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:"addAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\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:"addAce"}),(0,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'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(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":"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/server'"})]}),"\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:".addAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\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:".addAce"}),(0,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'"}),(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:"'command.say'"}),(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:["principal: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ace: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["allow: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libremoveace",children:"lib.removeAce"}),"\n",(0,l.jsxs)(e.p,{children:["Removes the ace permission from a principal. Third parameter defaults to 'allow', while passing ",(0,l.jsx)(e.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)(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:"removeAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal, ace, allow)"})]}),"\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:"removeAce"}),(0,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'"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'command.say'"}),(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":"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/server'"})]}),"\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:".removeAce"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(principal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ace"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" allow)"})]}),"\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:".removeAce"}),(0,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'"}),(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:"'command.say'"}),(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:["principal: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["ace: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["allow: ",(0,l.jsx)(e.code,{children:"boolean"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libaddprincipal",children:"lib.addPrincipal"}),"\n",(0,l.jsx)(e.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)(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:"addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\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:"addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,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.moderator'"}),(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":"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/server'"})]}),"\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:".addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\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:".addPrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.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:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(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:["child: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["parent: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n"]}),"\n",(0,l.jsx)(e.h2,{id:"libremoveprincipal",children:"lib.removePrincipal"}),"\n",(0,l.jsx)(e.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)(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:"removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child, parent)"})]}),"\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:"removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.1'"}),(0,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.moderator'"}),(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":"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/server'"})]}),"\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:".removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(child"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" parent)"})]}),"\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:".removePrincipal"}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'player.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:" "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'group.moderator'"}),(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:["child: ",(0,l.jsx)(e.code,{children:"string"})]}),"\n",(0,l.jsxs)(e.li,{children:["parent: ",(0,l.jsx)(e.code,{children:"string"})]}),"\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/ox_lib/Modules/ACL/Server.mdx",route:"/ox_lib/Modules/ACL/Server",timestamp:1729524649e3,title:"Server",headings:o},pageNextRoute:"/ox_lib/Modules/ACL/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=526)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-3b4a9d1921a625b4.js b/_next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-9e9e3936c0b4618e.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-3b4a9d1921a625b4.js rename to _next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-9e9e3936c0b4618e.js index b0721f4233..1daf14eb3f 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-3b4a9d1921a625b4.js +++ b/_next/static/chunks/pages/ox_lib/Modules/AddCommand/Server-9e9e3936c0b4618e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5673],{7127:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/AddCommand/Server",function(){return r(744)}])},744: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/ox_lib/Modules/AddCommand/Server.mdx",route:"/ox_lib/Modules/AddCommand/Server",timestamp:1729516534e3,title:"Server",headings:i},pageNextRoute:"/ox_lib/Modules/AddCommand/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=7127)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5673],{7127:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/AddCommand/Server",function(){return r(744)}])},744: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/ox_lib/Modules/AddCommand/Server.mdx",route:"/ox_lib/Modules/AddCommand/Server",timestamp:1729524649e3,title:"Server",headings:i},pageNextRoute:"/ox_lib/Modules/AddCommand/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=7127)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-dc1c4938c8d88d5f.js b/_next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-9cda8a73e80a6dc0.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-dc1c4938c8d88d5f.js rename to _next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-9cda8a73e80a6dc0.js index 141611aaac..d939da450a 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-dc1c4938c8d88d5f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/AddKeybind/Client-9cda8a73e80a6dc0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2685],{8389:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/AddKeybind/Client",function(){return s(3215)}])},3215: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/ox_lib/Modules/AddKeybind/Client.mdx",route:"/ox_lib/Modules/AddKeybind/Client",timestamp:1729516534e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/AddKeybind/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8389)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2685],{8389:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/AddKeybind/Client",function(){return s(3215)}])},3215: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/ox_lib/Modules/AddKeybind/Client.mdx",route:"/ox_lib/Modules/AddKeybind/Client",timestamp:1729524649e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/AddKeybind/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8389)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Array/Shared-3aa1996ac924086b.js b/_next/static/chunks/pages/ox_lib/Modules/Array/Shared-46989929334a032c.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Array/Shared-3aa1996ac924086b.js rename to _next/static/chunks/pages/ox_lib/Modules/Array/Shared-46989929334a032c.js index 82c5d0eae9..2915533436 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Array/Shared-3aa1996ac924086b.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Array/Shared-46989929334a032c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1632],{2686:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Array/Shared",function(){return n(728)}])},728: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/ox_lib/Modules/Array/Shared.mdx",route:"/ox_lib/Modules/Array/Shared",timestamp:1729516534e3,title:"Shared",headings:i},pageNextRoute:"/ox_lib/Modules/Array/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2686)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1632],{2686:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Array/Shared",function(){return n(728)}])},728: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/ox_lib/Modules/Array/Shared.mdx",route:"/ox_lib/Modules/Array/Shared",timestamp:1729524649e3,title:"Shared",headings:i},pageNextRoute:"/ox_lib/Modules/Array/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2686)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Cache/Client-f169e74f523055e3.js b/_next/static/chunks/pages/ox_lib/Modules/Cache/Client-edd76a6660c73743.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Cache/Client-f169e74f523055e3.js rename to _next/static/chunks/pages/ox_lib/Modules/Cache/Client-edd76a6660c73743.js index 23a5903f9f..a36c2ecf77 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Cache/Client-f169e74f523055e3.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Cache/Client-edd76a6660c73743.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9087],{7154:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cache/Client",function(){return n(9591)}])},9591: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),c=n(7100);let o=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"lib.onCache",id:"liboncache"}];function _createMdxContent(e){let s=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)(s.h1,{children:"Client"}),"\n",(0,l.jsxs)(s.p,{children:["Values and cache functionality available to the client, in addition to the ",(0,l.jsx)(s.a,{href:"../Shared",children:"shared"})," values."]}),"\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:["ped: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"player entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"player id"}),"\n"]}),"\n"]}),"\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:"player server id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["weapon: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"current weapon hash"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["vehicle: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"vehicle entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["seat: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"vehicle seat index"}),"\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:"current player coords"}),"\n",(0,l.jsxs)(s.li,{children:["only populated if using ",(0,l.jsx)(s.code,{children:"zones"})," or ",(0,l.jsx)(s.code,{children:"points"})]}),"\n",(0,l.jsxs)(s.li,{children:["cannot be listened for with ",(0,l.jsx)(s.code,{children:"lib.onCache"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["mount: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"})," (RedM only)","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"mount entity id"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"liboncache",children:"lib.onCache"}),"\n",(0,l.jsx)(s.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)(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."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(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:"value"}),(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:")"})]})})}),(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:(0,l.jsx)(s.code,{children:"ped"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"vehicle"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"seat"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"weapon"})}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value: ",(0,l.jsx)(s.code,{children:"any"})]}),"\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:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(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:"'vehicle'"}),(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:"value"}),(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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", cache.vehicle)"})]}),"\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:"'new vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", value)"})]}),"\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.jsxs)(c.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:" { onCache } "}),(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/client'"}),(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:"onCache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},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.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:(0,l.jsx)(s.code,{children:"ped"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"vehicle"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"seat"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"weapon"})}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value: ",(0,l.jsx)(s.code,{children:"any"})]}),"\n"]}),(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:" { cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" onCache } "}),(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/client'"}),(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:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".onCache"}),(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:"'vehicle'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},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:" {"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(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-constant)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".vehicle);"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(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/ox_lib/Modules/Cache/Client.mdx",route:"/ox_lib/Modules/Cache/Client",timestamp:1729516534e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/Cache/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7154)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9087],{7154:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cache/Client",function(){return n(9591)}])},9591: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),c=n(7100);let o=[{depth:2,value:"Default values",id:"default-values"},{depth:2,value:"lib.onCache",id:"liboncache"}];function _createMdxContent(e){let s=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)(s.h1,{children:"Client"}),"\n",(0,l.jsxs)(s.p,{children:["Values and cache functionality available to the client, in addition to the ",(0,l.jsx)(s.a,{href:"../Shared",children:"shared"})," values."]}),"\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:["ped: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"player entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["playerId: ",(0,l.jsx)(s.code,{children:"number"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"player id"}),"\n"]}),"\n"]}),"\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:"player server id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["weapon: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"current weapon hash"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["vehicle: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"vehicle entity id"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["seat: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"vehicle seat index"}),"\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:"current player coords"}),"\n",(0,l.jsxs)(s.li,{children:["only populated if using ",(0,l.jsx)(s.code,{children:"zones"})," or ",(0,l.jsx)(s.code,{children:"points"})]}),"\n",(0,l.jsxs)(s.li,{children:["cannot be listened for with ",(0,l.jsx)(s.code,{children:"lib.onCache"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["mount: ",(0,l.jsx)(s.code,{children:"number"})," or ",(0,l.jsx)(s.code,{children:"false"})," (RedM only)","\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"mount entity id"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"liboncache",children:"lib.onCache"}),"\n",(0,l.jsx)(s.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)(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."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key, "}),(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:"value"}),(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:")"})]})})}),(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:(0,l.jsx)(s.code,{children:"ped"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"vehicle"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"seat"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"weapon"})}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value: ",(0,l.jsx)(s.code,{children:"any"})]}),"\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:"lib."}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"onCache"}),(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:"'vehicle'"}),(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:"value"}),(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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", cache.vehicle)"})]}),"\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:"'new vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", value)"})]}),"\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.jsxs)(c.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:" { onCache } "}),(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/client'"}),(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:"onCache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(key"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},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.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:(0,l.jsx)(s.code,{children:"ped"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"vehicle"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"seat"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.code,{children:"weapon"})}),"\n",(0,l.jsxs)(s.li,{children:[(0,l.jsx)(s.code,{children:"mount"})," (RedM only)"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(s.li,{children:["value: ",(0,l.jsx)(s.code,{children:"any"})]}),"\n"]}),(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:" { cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" onCache } "}),(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/client'"}),(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:"lib"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".onCache"}),(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:"'vehicle'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},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:" {"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'old vehicle:'"}),(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-constant)"},children:"cache"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".vehicle);"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'new vehicle:'"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value);"})]}),"\n",(0,l.jsx)(s.span,{className:"line",children:(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/ox_lib/Modules/Cache/Client.mdx",route:"/ox_lib/Modules/Cache/Client",timestamp:1729524649e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/Cache/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7154)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Cache/Shared-cbb86bfe936ec745.js b/_next/static/chunks/pages/ox_lib/Modules/Cache/Shared-0ff60fb35dac66af.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Cache/Shared-cbb86bfe936ec745.js rename to _next/static/chunks/pages/ox_lib/Modules/Cache/Shared-0ff60fb35dac66af.js index 73e7c091e1..006fc4649b 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Cache/Shared-cbb86bfe936ec745.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Cache/Shared-0ff60fb35dac66af.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9714],{5425:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cache/Shared",function(){return n(29)}])},29: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/ox_lib/Modules/Cache/Shared.mdx",route:"/ox_lib/Modules/Cache/Shared",timestamp:1729516534e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/Cache/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5425)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9714],{5425:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cache/Shared",function(){return n(29)}])},29: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/ox_lib/Modules/Cache/Shared.mdx",route:"/ox_lib/Modules/Cache/Shared",timestamp:1729524649e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/Cache/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5425)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-80bbb5ea583d7952.js b/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-04b4da5fde84e12e.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-80bbb5ea583d7952.js rename to _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-04b4da5fde84e12e.js index f3ca4726d4..0fbe49f7c3 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-80bbb5ea583d7952.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-04b4da5fde84e12e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7975],{7942:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/JavaScript/Client",function(){return l(3782)}])},3782: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/ox_lib/Modules/Callback/JavaScript/Client.mdx",route:"/ox_lib/Modules/Callback/JavaScript/Client",timestamp:1729516534e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Callback/JavaScript/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7942)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7975],{7942:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/JavaScript/Client",function(){return l(3782)}])},3782: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/ox_lib/Modules/Callback/JavaScript/Client.mdx",route:"/ox_lib/Modules/Callback/JavaScript/Client",timestamp:1729524649e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Callback/JavaScript/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7942)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-8afb49ef4412af9c.js b/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-b1b1ba0aa2dce7dd.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-8afb49ef4412af9c.js rename to _next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-b1b1ba0aa2dce7dd.js index 70fc347f3e..da284a6974 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-8afb49ef4412af9c.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-b1b1ba0aa2dce7dd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6085],{269:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/JavaScript/Server",function(){return l(5307)}])},5307:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return i}});var n=l(2676),r=l(2140),o=l(8745);let i=[{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(s){let e=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)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Server"}),"\n",(0,n.jsx)(e.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,n.jsx)(e.h3,{id:"triggerclientcallback",children:"triggerClientCallback"}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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-function)"},children:"triggerClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(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:"args)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["eventName: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["playerId: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["...args: ",(0,n.jsx)(e.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,n.jsx)(e.h3,{id:"onclientcallback",children:"onClientCallback"}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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-function)"},children:"onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(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:["eventName: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["cb: ",(0,n.jsx)(e.code,{children:"function"}),"(playerId: ",(0,n.jsx)(e.code,{children:"number"}),", ...args: ",(0,n.jsx)(e.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(e.p,{children:["For this example to fully make sense take a look at the example on the ",(0,n.jsx)(e.a,{href:"./Client#usage-example",children:"client"})," page for the callbacks."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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:" { onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" triggerClientCallback } "}),(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/server'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(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-function)"},children:"onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (playerId"}),(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:"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:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(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:"number"}),(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:"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:"number"}),(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:"'onClientCallback'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(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:"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:"return"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" serverValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"3000"}),(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.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":"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-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-keyword)"},children:"async"}),(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-keyword)"},children:"const"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"<{ clientValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"string"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(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:"1"}),(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:"1"}),(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:"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:" "}),(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:"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:"6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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:"response) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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-constant)"},children:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".clientValue);"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"'Response from client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"100"}),(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,o.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_lib/Modules/Callback/JavaScript/Server.mdx",route:"/ox_lib/Modules/Callback/JavaScript/Server",timestamp:1729516534e3,title:"Server",headings:i},pageNextRoute:"/ox_lib/Modules/Callback/JavaScript/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=269)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6085],{269:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/JavaScript/Server",function(){return l(5307)}])},5307:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return i}});var n=l(2676),r=l(2140),o=l(8745);let i=[{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(s){let e=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)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Server"}),"\n",(0,n.jsx)(e.h2,{id:"trigger-client-callback",children:"Trigger Client Callback"}),"\n",(0,n.jsx)(e.h3,{id:"triggerclientcallback",children:"triggerClientCallback"}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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-function)"},children:"triggerClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(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:"args)"})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["eventName: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["playerId: ",(0,n.jsx)(e.code,{children:"number"})]}),"\n",(0,n.jsxs)(e.li,{children:["...args: ",(0,n.jsx)(e.code,{children:"any"})]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"register-server-callback",children:"Register Server Callback"}),"\n",(0,n.jsx)(e.h3,{id:"onclientcallback",children:"onClientCallback"}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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-function)"},children:"onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(eventName"}),(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:["eventName: ",(0,n.jsx)(e.code,{children:"string"})]}),"\n",(0,n.jsxs)(e.li,{children:["cb: ",(0,n.jsx)(e.code,{children:"function"}),"(playerId: ",(0,n.jsx)(e.code,{children:"number"}),", ...args: ",(0,n.jsx)(e.code,{children:"any"}),")"]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage Example"}),"\n",(0,n.jsxs)(e.p,{children:["For this example to fully make sense take a look at the example on the ",(0,n.jsx)(e.a,{href:"./Client#usage-example",children:"client"})," page for the callbacks."]}),"\n",(0,n.jsx)(e.pre,{"data-language":"ts","data-theme":"default",children:(0,n.jsx)(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:" { onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" triggerClientCallback } "}),(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/server'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(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-function)"},children:"onClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:server'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (playerId"}),(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:"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:" ["}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"number"}),(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:"number"}),(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:"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:"number"}),(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:"'onClientCallback'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" playerId"}),(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:"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:"return"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" serverValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"3000"}),(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.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":"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-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-keyword)"},children:"async"}),(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-keyword)"},children:"const"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"triggerClientCallback"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"<{ clientValue"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"string"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }>("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'test:client'"}),(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:"1"}),(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:"1"}),(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:"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:" "}),(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:"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:"6"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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:"response) "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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-constant)"},children:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".clientValue);"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"'Response from client'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response);"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"100"}),(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,o.a)(),s.components);return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_lib/Modules/Callback/JavaScript/Server.mdx",route:"/ox_lib/Modules/Callback/JavaScript/Server",timestamp:1729524649e3,title:"Server",headings:i},pageNextRoute:"/ox_lib/Modules/Callback/JavaScript/Server"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=269)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-460b145918854fa4.js b/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-a9a8efd3b2c42270.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-460b145918854fa4.js rename to _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-a9a8efd3b2c42270.js index eca6e15679..eb4341455e 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-460b145918854fa4.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-a9a8efd3b2c42270.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2058],{5855:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/Lua/Client",function(){return s(6405)}])},6405: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/ox_lib/Modules/Callback/Lua/Client.mdx",route:"/ox_lib/Modules/Callback/Lua/Client",timestamp:1729516534e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Callback/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5855)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2058],{5855:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/Lua/Client",function(){return s(6405)}])},6405: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/ox_lib/Modules/Callback/Lua/Client.mdx",route:"/ox_lib/Modules/Callback/Lua/Client",timestamp:1729524649e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Callback/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5855)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-7a5d815a020f2f8b.js b/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-ace556f325f19e92.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-7a5d815a020f2f8b.js rename to _next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-ace556f325f19e92.js index ef3d3bd2ef..7efe36cf21 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-7a5d815a020f2f8b.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-ace556f325f19e92.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4491],{3936:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/Lua/Server",function(){return l(5569)}])},5569: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/ox_lib/Modules/Callback/Lua/Server.mdx",route:"/ox_lib/Modules/Callback/Lua/Server",timestamp:1729516534e3,title:"Server",headings:a},pageNextRoute:"/ox_lib/Modules/Callback/Lua/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3936)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4491],{3936:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Callback/Lua/Server",function(){return l(5569)}])},5569: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/ox_lib/Modules/Callback/Lua/Server.mdx",route:"/ox_lib/Modules/Callback/Lua/Server",timestamp:1729524649e3,title:"Server",headings:a},pageNextRoute:"/ox_lib/Modules/Callback/Lua/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3936)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Class/Shared-ae69bcea5be7019b.js b/_next/static/chunks/pages/ox_lib/Modules/Class/Shared-df0b14cbf61ed323.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Class/Shared-ae69bcea5be7019b.js rename to _next/static/chunks/pages/ox_lib/Modules/Class/Shared-df0b14cbf61ed323.js index 7ab439fb27..d950cb37da 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Class/Shared-ae69bcea5be7019b.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Class/Shared-df0b14cbf61ed323.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4237],{3916:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Class/Shared",function(){return n(3292)}])},3292: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/ox_lib/Modules/Class/Shared.mdx",route:"/ox_lib/Modules/Class/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Class/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3916)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4237],{3916:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Class/Shared",function(){return n(3292)}])},3292: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/ox_lib/Modules/Class/Shared.mdx",route:"/ox_lib/Modules/Class/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Class/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3916)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Cron/Server-c50d5670a7bb82fb.js b/_next/static/chunks/pages/ox_lib/Modules/Cron/Server-843c04f1b3e07755.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/Cron/Server-c50d5670a7bb82fb.js rename to _next/static/chunks/pages/ox_lib/Modules/Cron/Server-843c04f1b3e07755.js index d0bf838579..102730b9a5 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Cron/Server-c50d5670a7bb82fb.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Cron/Server-843c04f1b3e07755.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9482],{9395:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cron/Server",function(){return s(1759)}])},1759: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/ox_lib/Modules/Cron/Server.mdx",route:"/ox_lib/Modules/Cron/Server",timestamp:1729516534e3,title:"Server",headings:t},pageNextRoute:"/ox_lib/Modules/Cron/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9395)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9482],{9395:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Cron/Server",function(){return s(1759)}])},1759: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/ox_lib/Modules/Cron/Server.mdx",route:"/ox_lib/Modules/Cron/Server",timestamp:1729524649e3,title:"Server",headings:t},pageNextRoute:"/ox_lib/Modules/Cron/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9395)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-d80e6782c5843980.js b/_next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-c3af78c8ad7d3bf6.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-d80e6782c5843980.js rename to _next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-c3af78c8ad7d3bf6.js index 35bdbac9fc..c729698218 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-d80e6782c5843980.js +++ b/_next/static/chunks/pages/ox_lib/Modules/DisableControls/Client-c3af78c8ad7d3bf6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2443],{5151:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/DisableControls/Client",function(){return n(5146)}])},5146: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/ox_lib/Modules/DisableControls/Client.mdx",route:"/ox_lib/Modules/DisableControls/Client",timestamp:1729516534e3,title:"Client",headings:t},pageNextRoute:"/ox_lib/Modules/DisableControls/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5151)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2443],{5151:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/DisableControls/Client",function(){return n(5146)}])},5146: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/ox_lib/Modules/DisableControls/Client.mdx",route:"/ox_lib/Modules/DisableControls/Client",timestamp:1729524649e3,title:"Client",headings:t},pageNextRoute:"/ox_lib/Modules/DisableControls/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5151)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-ac574f7fb8734f9f.js b/_next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-aab1cb51a6f3058c.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-ac574f7fb8734f9f.js rename to _next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-aab1cb51a6f3058c.js index afbda50223..d0fb406099 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-ac574f7fb8734f9f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-aab1cb51a6f3058c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6706],{8397:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Dui/Javascript/Client",function(){return n(1843)}])},1843: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/ox_lib/Modules/Dui/Javascript/Client.mdx",route:"/ox_lib/Modules/Dui/Javascript/Client",timestamp:1729516534e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/Dui/Javascript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8397)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6706],{8397:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Dui/Javascript/Client",function(){return n(1843)}])},1843: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/ox_lib/Modules/Dui/Javascript/Client.mdx",route:"/ox_lib/Modules/Dui/Javascript/Client",timestamp:1729524649e3,title:"Client",headings:o},pageNextRoute:"/ox_lib/Modules/Dui/Javascript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8397)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-73d3ed4dd71c9f2b.js b/_next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-efed75f97508feab.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-73d3ed4dd71c9f2b.js rename to _next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-efed75f97508feab.js index 8873794fde..be4b859735 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-73d3ed4dd71c9f2b.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-efed75f97508feab.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7175],{9581:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Dui/Lua/Client",function(){return n(1499)}])},1499: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/ox_lib/Modules/Dui/Lua/Client.mdx",route:"/ox_lib/Modules/Dui/Lua/Client",timestamp:1729516534e3,title:"Client",headings:c},pageNextRoute:"/ox_lib/Modules/Dui/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9581)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7175],{9581:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Dui/Lua/Client",function(){return n(1499)}])},1499: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/ox_lib/Modules/Dui/Lua/Client.mdx",route:"/ox_lib/Modules/Dui/Lua/Client",timestamp:1729524649e3,title:"Client",headings:c},pageNextRoute:"/ox_lib/Modules/Dui/Lua/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9581)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-f5839256ddd918bd.js b/_next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-d70aa7d07fd736c4.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-f5839256ddd918bd.js rename to _next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-d70aa7d07fd736c4.js index 0eedc7634e..cdffa8156a 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-f5839256ddd918bd.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-d70aa7d07fd736c4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4358],{2032:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestObject/Shared",function(){return t(5272)}])},5272: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/ox_lib/Modules/GetClosestObject/Shared.mdx",route:"/ox_lib/Modules/GetClosestObject/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/GetClosestObject/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2032)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4358],{2032:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestObject/Shared",function(){return t(5272)}])},5272: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/ox_lib/Modules/GetClosestObject/Shared.mdx",route:"/ox_lib/Modules/GetClosestObject/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/GetClosestObject/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2032)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-832f7d975e7a167e.js b/_next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-e1d5e0468fb6d1e7.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-832f7d975e7a167e.js rename to _next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-e1d5e0468fb6d1e7.js index 6f1c1f2f52..258205ee52 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-832f7d975e7a167e.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-e1d5e0468fb6d1e7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6666],{5801:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestPed/Shared",function(){return s(6345)}])},6345:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var t=s(2676),l=s(2140),d=s(8745);let c=[{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,d.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,l.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,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetClosestPed/Shared.mdx",route:"/ox_lib/Modules/GetClosestPed/Shared",timestamp:1729516534e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/GetClosestPed/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5801)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6666],{5801:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestPed/Shared",function(){return s(6345)}])},6345:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var t=s(2676),l=s(2140),d=s(8745);let c=[{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,d.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,l.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,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetClosestPed/Shared.mdx",route:"/ox_lib/Modules/GetClosestPed/Shared",timestamp:1729524649e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/GetClosestPed/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5801)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d5c47eb142210baa.js b/_next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-7c4e8a8ac1dad1ab.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d5c47eb142210baa.js rename to _next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-7c4e8a8ac1dad1ab.js index 1cb3e7230f..9eac11b721 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d5c47eb142210baa.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-7c4e8a8ac1dad1ab.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3504],{3938:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestPlayer/Shared",function(){return l(9545)}])},9545:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return c}});var s=l(2676),r=l(2140),t=l(8745);let c=[{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/ox_lib/Modules/GetClosestPlayer/Shared.mdx",route:"/ox_lib/Modules/GetClosestPlayer/Shared",timestamp:1729516534e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/GetClosestPlayer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3938)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3504],{3938:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestPlayer/Shared",function(){return l(9545)}])},9545:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return c}});var s=l(2676),r=l(2140),t=l(8745);let c=[{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/ox_lib/Modules/GetClosestPlayer/Shared.mdx",route:"/ox_lib/Modules/GetClosestPlayer/Shared",timestamp:1729524649e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/GetClosestPlayer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3938)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-5e73b0f2e3606dda.js b/_next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-0c9d39ba098e6576.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-5e73b0f2e3606dda.js rename to _next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-0c9d39ba098e6576.js index abea3b10f5..c7fd3cc751 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-5e73b0f2e3606dda.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-0c9d39ba098e6576.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1457],{1231:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestVehicle/Shared",function(){return l(2075)}])},2075:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return t}});var s=l(2676),c=l(2140),i=l(8745);let t=[{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,i.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,c.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/ox_lib/Modules/GetClosestVehicle/Shared.mdx",route:"/ox_lib/Modules/GetClosestVehicle/Shared",timestamp:1729516534e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/GetClosestVehicle/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1231)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1457],{1231:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetClosestVehicle/Shared",function(){return l(2075)}])},2075:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return t}});var s=l(2676),c=l(2140),i=l(8745);let t=[{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,i.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,c.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/ox_lib/Modules/GetClosestVehicle/Shared.mdx",route:"/ox_lib/Modules/GetClosestVehicle/Shared",timestamp:1729524649e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/GetClosestVehicle/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1231)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-fa2fbb81a8edf68f.js b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-a4069cf31d2b9407.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-fa2fbb81a8edf68f.js rename to _next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-a4069cf31d2b9407.js index 3fccc5d9a4..4aa9d5a76c 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-fa2fbb81a8edf68f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-a4069cf31d2b9407.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8691],{8626:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyObjects/Shared",function(){return t(8686)}])},8686:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),c=t(2140),r=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,r.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,c.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/ox_lib/Modules/GetNearbyObjects/Shared.mdx",route:"/ox_lib/Modules/GetNearbyObjects/Shared",timestamp:1729516534e3,title:"Shared",headings:l},pageNextRoute:"/ox_lib/Modules/GetNearbyObjects/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8626)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8691],{8626:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyObjects/Shared",function(){return t(8686)}])},8686:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),c=t(2140),r=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,r.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,c.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/ox_lib/Modules/GetNearbyObjects/Shared.mdx",route:"/ox_lib/Modules/GetNearbyObjects/Shared",timestamp:1729524649e3,title:"Shared",headings:l},pageNextRoute:"/ox_lib/Modules/GetNearbyObjects/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8626)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-99aa7025bc337722.js b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-b14af4a9197451e5.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-99aa7025bc337722.js rename to _next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-b14af4a9197451e5.js index 5aab59700a..eb641caa8f 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-99aa7025bc337722.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-b14af4a9197451e5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[969],{307:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyPeds/Shared",function(){return s(3269)}])},3269:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var t=s(2676),r=s(2140),d=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,d.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Shared"}),"\n",(0,t.jsx)(n.h2,{id:"libgetnearbypeds",children:"lib.getNearbyPeds"}),"\n",(0,t.jsx)(n.p,{children:"Get the ped handle and coords of all peds within range of 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:"getNearbyPeds"}),(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:["peds: ",(0,t.jsx)(n.code,{children:"{ ped: 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,d.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyPeds/Shared.mdx",route:"/ox_lib/Modules/GetNearbyPeds/Shared",timestamp:1729516534e3,title:"Shared",headings:l},pageNextRoute:"/ox_lib/Modules/GetNearbyPeds/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=307)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[969],{307:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyPeds/Shared",function(){return s(3269)}])},3269:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var t=s(2676),r=s(2140),d=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,d.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Shared"}),"\n",(0,t.jsx)(n.h2,{id:"libgetnearbypeds",children:"lib.getNearbyPeds"}),"\n",(0,t.jsx)(n.p,{children:"Get the ped handle and coords of all peds within range of 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:"getNearbyPeds"}),(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:["peds: ",(0,t.jsx)(n.code,{children:"{ ped: 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,d.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyPeds/Shared.mdx",route:"/ox_lib/Modules/GetNearbyPeds/Shared",timestamp:1729524649e3,title:"Shared",headings:l},pageNextRoute:"/ox_lib/Modules/GetNearbyPeds/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=307)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-5ba68fa66bcfe56d.js b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-a18073bf2185123f.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-5ba68fa66bcfe56d.js rename to _next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-a18073bf2185123f.js index 1b8c277c3e..339e6dc56f 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-5ba68fa66bcfe56d.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-a18073bf2185123f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6646],{4213:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyPlayers/Shared",function(){return l(5585)}])},5585:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var r=l(2676),s=l(2140),t=l(8745);let a=[{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,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libgetnearbyplayers",children:"lib.getNearbyPlayers"}),"\n",(0,r.jsx)(n.p,{children:"Get the player id, ped handle, and coords of all players within range of a set of coordinates."}),"\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:"getNearbyPlayers"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["coords: ",(0,r.jsx)(n.code,{children:"vector3"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["maxDistance?: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["includePlayer?: ",(0,r.jsx)(n.code,{children:"boolean"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:"false"})]}),"\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:["players: ",(0,r.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,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyPlayers/Shared.mdx",route:"/ox_lib/Modules/GetNearbyPlayers/Shared",timestamp:1729516534e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/GetNearbyPlayers/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4213)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6646],{4213:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyPlayers/Shared",function(){return l(5585)}])},5585:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return a}});var r=l(2676),s=l(2140),t=l(8745);let a=[{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,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Shared"}),"\n",(0,r.jsx)(n.h2,{id:"libgetnearbyplayers",children:"lib.getNearbyPlayers"}),"\n",(0,r.jsx)(n.p,{children:"Get the player id, ped handle, and coords of all players within range of a set of coordinates."}),"\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:"getNearbyPlayers"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, maxDistance, includePlayer)"})]})})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["coords: ",(0,r.jsx)(n.code,{children:"vector3"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The coords to check from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["maxDistance?: ",(0,r.jsx)(n.code,{children:"number"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The max distance to check."}),"\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:"2.0"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["includePlayer?: ",(0,r.jsx)(n.code,{children:"boolean"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Whether or not to include the current player. Ignored on the server."}),"\n",(0,r.jsxs)(n.li,{children:["Default: ",(0,r.jsx)(n.code,{children:"false"})]}),"\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:["players: ",(0,r.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,r.jsx)(n,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyPlayers/Shared.mdx",route:"/ox_lib/Modules/GetNearbyPlayers/Shared",timestamp:1729524649e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/GetNearbyPlayers/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4213)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-22e4892748217575.js b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-dd70d17ae5bf8017.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-22e4892748217575.js rename to _next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-dd70d17ae5bf8017.js index 6c47b3403c..b1d0bc1cfe 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-22e4892748217575.js +++ b/_next/static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-dd70d17ae5bf8017.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6865],{6424:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyVehicles/Shared",function(){return l(1509)}])},1509:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return r}});var i=l(2676),s=l(2140),c=l(8745);let r=[{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,c.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,s.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,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyVehicles/Shared.mdx",route:"/ox_lib/Modules/GetNearbyVehicles/Shared",timestamp:1729516534e3,title:"Shared",headings:r},pageNextRoute:"/ox_lib/Modules/GetNearbyVehicles/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6424)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6865],{6424:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/GetNearbyVehicles/Shared",function(){return l(1509)}])},1509:function(e,n,l){"use strict";l.r(n),l.d(n,{__toc:function(){return r}});var i=l(2676),s=l(2140),c=l(8745);let r=[{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,c.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,s.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,i.jsx)(n,{...e,children:(0,i.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/GetNearbyVehicles/Shared.mdx",route:"/ox_lib/Modules/GetNearbyVehicles/Shared",timestamp:1729524649e3,title:"Shared",headings:r},pageNextRoute:"/ox_lib/Modules/GetNearbyVehicles/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6424)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface-e80684bd007c1cfd.js b/_next/static/chunks/pages/ox_lib/Modules/Interface-45cca23f1617ebd9.js similarity index 97% rename from _next/static/chunks/pages/ox_lib/Modules/Interface-e80684bd007c1cfd.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface-45cca23f1617ebd9.js index 2671582c20..10f5308f3d 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface-e80684bd007c1cfd.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface-45cca23f1617ebd9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[966],{4136:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface",function(){return t(4668)}])},4668: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/ox_lib/Modules/Interface.mdx",route:"/ox_lib/Modules/Interface",frontMatter:{title:"Interface"},timestamp:1729516534e3,title:"Interface",headings:a},pageNextRoute:"/ox_lib/Modules/Interface"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4136)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[966],{4136:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface",function(){return t(4668)}])},4668: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/ox_lib/Modules/Interface.mdx",route:"/ox_lib/Modules/Interface",frontMatter:{title:"Interface"},timestamp:1729524649e3,title:"Interface",headings:a},pageNextRoute:"/ox_lib/Modules/Interface"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4136)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-0736acb1ed68e5a4.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-a23809f4eb39c2fc.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-0736acb1ed68e5a4.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-a23809f4eb39c2fc.js index e89389aa5e..4f3ccdd64e 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-0736acb1ed68e5a4.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/alert-a23809f4eb39c2fc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4457],{8213:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/alert",function(){return l(5388)}])},5388:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let a=[{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/ox_lib/Modules/Interface/Client/alert.mdx",route:"/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"},timestamp:1729516534e3,title:"Alert Dialog",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/alert"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8213)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4457],{8213:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/alert",function(){return l(5388)}])},5388:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return a}});var n=l(2676),r=l(2140),i=l(8745),o=l(7100);let a=[{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/ox_lib/Modules/Interface/Client/alert.mdx",route:"/ox_lib/Modules/Interface/Client/alert",frontMatter:{title:"Alert Dialog"},timestamp:1729524649e3,title:"Alert Dialog",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/alert"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8213)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-49a677233f41316c.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-6178a317e100e8df.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-49a677233f41316c.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-6178a317e100e8df.js index 943b1b90a5..08a865d07f 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-49a677233f41316c.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-6178a317e100e8df.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3190],{6790:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/clipboard",function(){return l(5222)}])},5222: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/ox_lib/Modules/Interface/Client/clipboard.mdx",route:"/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"},timestamp:1729516534e3,title:"Clipboard",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/clipboard"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6790)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3190],{6790:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/clipboard",function(){return l(5222)}])},5222: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/ox_lib/Modules/Interface/Client/clipboard.mdx",route:"/ox_lib/Modules/Interface/Client/clipboard",frontMatter:{title:"Clipboard"},timestamp:1729524649e3,title:"Clipboard",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/clipboard"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6790)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-061d724d33dcc9d7.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-5b0bb1887f6a3dfd.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-061d724d33dcc9d7.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-5b0bb1887f6a3dfd.js index 95d26fbb74..0191d72119 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-061d724d33dcc9d7.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/context-5b0bb1887f6a3dfd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7541],{4594:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/context",function(){return n(2431)}])},2431: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/ox_lib/Modules/Interface/Client/context.mdx",route:"/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"},timestamp:1729516534e3,title:"Context Menu",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/context"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4594)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7541],{4594:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/context",function(){return n(2431)}])},2431: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/ox_lib/Modules/Interface/Client/context.mdx",route:"/ox_lib/Modules/Interface/Client/context",frontMatter:{title:"Context Menu"},timestamp:1729524649e3,title:"Context Menu",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/context"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4594)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-4a74e0e55ff7e149.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-e4a973edff4bc121.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-4a74e0e55ff7e149.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-e4a973edff4bc121.js index 47eec61c38..2a137f55af 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-4a74e0e55ff7e149.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/input-e4a973edff4bc121.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8496],{1234:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/input",function(){return n(2537)}])},2537: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/ox_lib/Modules/Interface/Client/input.mdx",route:"/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"},timestamp:1729516534e3,title:"Input Dialog",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/input"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1234)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8496],{1234:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/input",function(){return n(2537)}])},2537: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/ox_lib/Modules/Interface/Client/input.mdx",route:"/ox_lib/Modules/Interface/Client/input",frontMatter:{title:"Input Dialog"},timestamp:1729524649e3,title:"Input Dialog",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/input"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1234)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-05b42d89e7713b0f.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-17f5923483c99241.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-05b42d89e7713b0f.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-17f5923483c99241.js index 62c82534c0..2fb8b19cb3 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-05b42d89e7713b0f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/menu-17f5923483c99241.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2231],{361:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/menu",function(){return l(1878)}])},1878: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/ox_lib/Modules/Interface/Client/menu.mdx",route:"/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"},timestamp:1729516534e3,title:"Menu",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/menu"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=361)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2231],{361:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/menu",function(){return l(1878)}])},1878: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/ox_lib/Modules/Interface/Client/menu.mdx",route:"/ox_lib/Modules/Interface/Client/menu",frontMatter:{title:"Menu"},timestamp:1729524649e3,title:"Menu",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/menu"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=361)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-67807ffecc1febbb.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-8474c3648fba790e.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-67807ffecc1febbb.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-8474c3648fba790e.js index 72a057fbda..c09bd9d38a 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-67807ffecc1febbb.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/notify-8474c3648fba790e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9420],{8223:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/notify",function(){return n(268)}])},268:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var i=n(2676),l=n(2140),r=n(8745),o=n(7100);let c=[{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/ox_lib/Modules/Interface/Client/notify.mdx",route:"/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"},timestamp:1729516534e3,title:"Notifications",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/notify"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8223)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9420],{8223:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/notify",function(){return n(268)}])},268:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var i=n(2676),l=n(2140),r=n(8745),o=n(7100);let c=[{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/ox_lib/Modules/Interface/Client/notify.mdx",route:"/ox_lib/Modules/Interface/Client/notify",frontMatter:{title:"Notifications"},timestamp:1729524649e3,title:"Notifications",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/notify"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8223)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-e8e5a4385aa9f4a2.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-82b0faf107c936ce.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-e8e5a4385aa9f4a2.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-82b0faf107c936ce.js index 337257c4d4..808bc81d28 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-e8e5a4385aa9f4a2.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/progress-82b0faf107c936ce.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46],{1738:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/progress",function(){return l(2581)}])},2581: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/ox_lib/Modules/Interface/Client/progress.mdx",route:"/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"},timestamp:1729516534e3,title:"Progress",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/progress"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1738)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46],{1738:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/progress",function(){return l(2581)}])},2581: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/ox_lib/Modules/Interface/Client/progress.mdx",route:"/ox_lib/Modules/Interface/Client/progress",frontMatter:{title:"Progress"},timestamp:1729524649e3,title:"Progress",headings:c},pageNextRoute:"/ox_lib/Modules/Interface/Client/progress"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1738)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-02d871e17f91346e.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-e3ced883e64d7800.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-02d871e17f91346e.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-e3ced883e64d7800.js index 2292eed8bb..38478659cb 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-02d871e17f91346e.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/radial-e3ced883e64d7800.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6508],{4349:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/radial",function(){return l(2222)}])},2222: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/ox_lib/Modules/Interface/Client/radial.mdx",route:"/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"},timestamp:1729516534e3,title:"Radial Menu",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/radial"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4349)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6508],{4349:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/radial",function(){return l(2222)}])},2222: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/ox_lib/Modules/Interface/Client/radial.mdx",route:"/ox_lib/Modules/Interface/Client/radial",frontMatter:{title:"Radial Menu"},timestamp:1729524649e3,title:"Radial Menu",headings:a},pageNextRoute:"/ox_lib/Modules/Interface/Client/radial"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=4349)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-0682e5376a104c60.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-19eea89a1006338d.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-0682e5376a104c60.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-19eea89a1006338d.js index 21a5bed74c..f53565e9d8 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-0682e5376a104c60.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-19eea89a1006338d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8194],{8695:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/skillcheck",function(){return l(9907)}])},9907:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var i=l(2676),n=l(2140),r=l(8745),c=l(7100);let t=[{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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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/ox_lib/Modules/Interface/Client/skillcheck.mdx",route:"/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"},timestamp:1729516534e3,title:"Skill Check",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/skillcheck"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8695)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8194],{8695:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/skillcheck",function(){return l(9907)}])},9907:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var i=l(2676),n=l(2140),r=l(8745),c=l(7100);let t=[{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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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)(c.mQ,{items:["Lua","JS"],children:[(0,i.jsx)(c.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)(c.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/ox_lib/Modules/Interface/Client/skillcheck.mdx",route:"/ox_lib/Modules/Interface/Client/skillcheck",frontMatter:{title:"Skill Check"},timestamp:1729524649e3,title:"Skill Check",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/skillcheck"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8695)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-2823bf7011716f5d.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-4707a2e915ef84ba.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-2823bf7011716f5d.js rename to _next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-4707a2e915ef84ba.js index 21b732fd57..ea4bc77302 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-2823bf7011716f5d.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-4707a2e915ef84ba.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8870],{8156:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/textui",function(){return l(5777)}])},5777: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/ox_lib/Modules/Interface/Client/textui.mdx",route:"/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},timestamp:1729516534e3,title:"TextUI",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8156)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8870],{8156:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/textui",function(){return l(5777)}])},5777: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/ox_lib/Modules/Interface/Client/textui.mdx",route:"/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},timestamp:1729524649e3,title:"TextUI",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8156)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Locale/Shared-c8e3d3a57ebb6c5c.js b/_next/static/chunks/pages/ox_lib/Modules/Locale/Shared-9ab66c2dc0acc516.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Locale/Shared-c8e3d3a57ebb6c5c.js rename to _next/static/chunks/pages/ox_lib/Modules/Locale/Shared-9ab66c2dc0acc516.js index 5f70de1a35..d7ba01ac4c 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Locale/Shared-c8e3d3a57ebb6c5c.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Locale/Shared-9ab66c2dc0acc516.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6580],{5061:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Locale/Shared",function(){return l(1068)}])},1068: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/ox_lib/Modules/Locale/Shared.mdx",route:"/ox_lib/Modules/Locale/Shared",timestamp:1729516534e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/Locale/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5061)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6580],{5061:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Locale/Shared",function(){return l(1068)}])},1068: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/ox_lib/Modules/Locale/Shared.mdx",route:"/ox_lib/Modules/Locale/Shared",timestamp:1729524649e3,title:"Shared",headings:a},pageNextRoute:"/ox_lib/Modules/Locale/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5061)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Logger/Server-c887360a73e245e9.js b/_next/static/chunks/pages/ox_lib/Modules/Logger/Server-d053df161a2fceee.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Logger/Server-c887360a73e245e9.js rename to _next/static/chunks/pages/ox_lib/Modules/Logger/Server-d053df161a2fceee.js index 5c35f50fe0..dc591a5d65 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Logger/Server-c887360a73e245e9.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Logger/Server-d053df161a2fceee.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1159],{388:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Logger/Server",function(){return n(2963)}])},2963:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),i=n(2140),a=n(8745),o=n(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 s=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)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"liblogger",children:"lib.logger"}),"\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:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, event, message, "}),(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:["source: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Preferably an active player id, otherwise an identifier, or wherever else it originated from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["event: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A name for the log event (i.e. the trigerring event or a description)"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["message: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The content for the log."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["vararg: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.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)(s.strong,{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-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicle "}),(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."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(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-string-expression)"},children:"`sultanrs`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"vector4"}),(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:"56.479122"}),(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:"1116.870362"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"26.432250"}),(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.000030517578"}),(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:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(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:"1"}),(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:"'CreateVehicle'"}),(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:"(vehicle))"})]})]})}),"\n",(0,r.jsx)(s.h2,{id:"datadog",children:"Datadog"}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(s.h3,{id:"create-your-datadog-account",children:["Create your ",(0,r.jsx)(s.a,{href:"https://www.datadoghq.com/",children:"Datadog"})," account"]}),(0,r.jsxs)(s.p,{children:["You will receive a free 14 day trial, otherwise refer to their ",(0,r.jsx)(s.a,{href:"https://www.datadoghq.com/pricing/",children:"pricing"})," guide.",(0,r.jsx)(s.br,{}),"\n","Free accounts are limited, however logs will still be retained for 14 days."]}),(0,r.jsxs)(s.h3,{id:"create-an-api-key",children:["Create an ",(0,r.jsx)(s.a,{href:"https://app.datadoghq.com/organization-settings/api-keys",children:"API key"})]}),(0,r.jsx)(s.p,{children:"This is a UUID used to submit logs to your Datadog organisation."}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Set your API key and ",(0,r.jsx)(s.a,{href:"https://docs.datadoghq.com/getting_started/site/",children:"Datadog site"})," using the following 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.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:"datadog:key"}),(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:'"yourapikey"'})]}),"\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:"datadog:site"}),(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:'"datadoghq.com"'})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"grafana-loki",children:"Grafana Loki"}),"\n",(0,r.jsxs)(s.p,{children:["Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.",(0,r.jsx)(s.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)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Has free tier with some restrictions"}),"\n",(0,r.jsx)(s.li,{children:"Easy to manage"}),"\n",(0,r.jsx)(s.li,{children:"Easier to setup"}),"\n",(0,r.jsx)(s.li,{children:"Mostly managed by Grafana"}),"\n"]}),(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(s.h3,{id:"create-your-grafana-account",children:["Create your ",(0,r.jsx)(s.a,{href:"https://grafana.com/",children:"Grafana"})," account"]}),(0,r.jsxs)(s.h3,{id:"head-to-my-account",children:["Head to ",(0,r.jsx)(s.a,{href:"https://grafana.com/auth/sign-in/?plcmt=top-nav&cta=myaccount",children:"My Account"})]}),(0,r.jsx)(s.h3,{id:"setup-loki",children:"Setup Loki"}),(0,r.jsxs)(s.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)(s.code,{children:"user"})," and ",(0,r.jsx)(s.code,{children:"url"}),"."]})]})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(s.p,{children:["To setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.",(0,r.jsx)(s.br,{}),"\n","Please find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that."]}),(0,r.jsx)(s.p,{children:"Once done, setup authentication and use the username and password securing your endpoint."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.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)(s.h3,{id:"config-1",children:"Config"}),"\n",(0,r.jsx)(s.p,{children:"Use the following convars to set your logging service, endpoint, and authentication details."}),"\n",(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:"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:"ox:logger"}),(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:'"loki"'})]}),"\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:"loki:user"}),(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.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:"loki:password"}),(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.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:"loki:endpoint"}),(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.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.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)(s.h3,{id:"create-an-account",children:"Create an account"}),(0,r.jsxs)(s.p,{children:["Sign up at ",(0,r.jsx)(s.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"}),"."]}),(0,r.jsxs)(s.h3,{id:"make-sure-you-have-the-hobby-or-pro-plan",children:["Make sure you have the ",(0,r.jsx)(s.code,{children:"Hobby"})," or ",(0,r.jsx)(s.code,{children:"Pro"})," plan."]}),(0,r.jsxs)(s.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)(s.a,{href:"https://fivemanage.com/profile/billing?ref=overextended",children:"here"})," and on the ",(0,r.jsx)(s.a,{href:"https://fivemanage.com/pricing?ref=overextended",children:"pricing"})," page."]}),(0,r.jsx)(s.h3,{id:"create-a-new-token",children:"Create a new token"}),(0,r.jsxs)(s.p,{children:["You'll need to create a new token with the type ",(0,r.jsx)(s.code,{children:"Logs"}),"."]}),(0,r.jsx)(s.h3,{id:"config-2",children:"Config"}),(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:"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:"ox:logger"}),(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:'"fivemanage"'})]}),"\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:"fivemanage:key"}),(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:'"YOUR_API_KEY"'})]})]})})]})]})}s.default=(0,i.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,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Logger/Server.mdx",route:"/ox_lib/Modules/Logger/Server",timestamp:1729516534e3,title:"Server",headings:t},pageNextRoute:"/ox_lib/Modules/Logger/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=388)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1159],{388:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Logger/Server",function(){return n(2963)}])},2963:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return t}});var r=n(2676),i=n(2140),a=n(8745),o=n(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 s=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)(s.h1,{children:"Server"}),"\n",(0,r.jsx)(s.h2,{id:"liblogger",children:"lib.logger"}),"\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:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(source, event, message, "}),(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:["source: ",(0,r.jsx)(s.code,{children:"number"})," or ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Preferably an active player id, otherwise an identifier, or wherever else it originated from."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["event: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A name for the log event (i.e. the trigerring event or a description)"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["message: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The content for the log."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["vararg: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.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)(s.strong,{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-token-keyword)"},children:"local"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vehicle "}),(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."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CreateVehicle"}),(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-string-expression)"},children:"`sultanrs`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"vector4"}),(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:"56.479122"}),(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:"1116.870362"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"26.432250"}),(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.000030517578"}),(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:"lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"logger"}),(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:"1"}),(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:"'CreateVehicle'"}),(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:"(vehicle))"})]})]})}),"\n",(0,r.jsx)(s.h2,{id:"datadog",children:"Datadog"}),"\n",(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(s.h3,{id:"create-your-datadog-account",children:["Create your ",(0,r.jsx)(s.a,{href:"https://www.datadoghq.com/",children:"Datadog"})," account"]}),(0,r.jsxs)(s.p,{children:["You will receive a free 14 day trial, otherwise refer to their ",(0,r.jsx)(s.a,{href:"https://www.datadoghq.com/pricing/",children:"pricing"})," guide.",(0,r.jsx)(s.br,{}),"\n","Free accounts are limited, however logs will still be retained for 14 days."]}),(0,r.jsxs)(s.h3,{id:"create-an-api-key",children:["Create an ",(0,r.jsx)(s.a,{href:"https://app.datadoghq.com/organization-settings/api-keys",children:"API key"})]}),(0,r.jsx)(s.p,{children:"This is a UUID used to submit logs to your Datadog organisation."}),(0,r.jsx)(s.h3,{id:"config",children:"Config"}),(0,r.jsxs)(s.p,{children:["Set your API key and ",(0,r.jsx)(s.a,{href:"https://docs.datadoghq.com/getting_started/site/",children:"Datadog site"})," using the following 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.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:"datadog:key"}),(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:'"yourapikey"'})]}),"\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:"datadog:site"}),(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:'"datadoghq.com"'})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"grafana-loki",children:"Grafana Loki"}),"\n",(0,r.jsxs)(s.p,{children:["Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus.",(0,r.jsx)(s.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)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Has free tier with some restrictions"}),"\n",(0,r.jsx)(s.li,{children:"Easy to manage"}),"\n",(0,r.jsx)(s.li,{children:"Easier to setup"}),"\n",(0,r.jsx)(s.li,{children:"Mostly managed by Grafana"}),"\n"]}),(0,r.jsxs)(o.Rg,{children:[(0,r.jsxs)(s.h3,{id:"create-your-grafana-account",children:["Create your ",(0,r.jsx)(s.a,{href:"https://grafana.com/",children:"Grafana"})," account"]}),(0,r.jsxs)(s.h3,{id:"head-to-my-account",children:["Head to ",(0,r.jsx)(s.a,{href:"https://grafana.com/auth/sign-in/?plcmt=top-nav&cta=myaccount",children:"My Account"})]}),(0,r.jsx)(s.h3,{id:"setup-loki",children:"Setup Loki"}),(0,r.jsxs)(s.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)(s.code,{children:"user"})," and ",(0,r.jsx)(s.code,{children:"url"}),"."]})]})]}),(0,r.jsxs)(o.OK,{children:[(0,r.jsxs)(s.p,{children:["To setup a grafana instance you'll need docker, and knowledge on containers or kubernetes.",(0,r.jsx)(s.br,{}),"\n","Please find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that."]}),(0,r.jsx)(s.p,{children:"Once done, setup authentication and use the username and password securing your endpoint."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.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)(s.h3,{id:"config-1",children:"Config"}),"\n",(0,r.jsx)(s.p,{children:"Use the following convars to set your logging service, endpoint, and authentication details."}),"\n",(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:"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:"ox:logger"}),(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:'"loki"'})]}),"\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:"loki:user"}),(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.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:"loki:password"}),(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.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:"loki:endpoint"}),(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.h2,{id:"fivemanage",children:"Fivemanage"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.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)(s.h3,{id:"create-an-account",children:"Create an account"}),(0,r.jsxs)(s.p,{children:["Sign up at ",(0,r.jsx)(s.a,{href:"https://fivemanage.com/?ref=overextended",children:"Fivemanage"}),"."]}),(0,r.jsxs)(s.h3,{id:"make-sure-you-have-the-hobby-or-pro-plan",children:["Make sure you have the ",(0,r.jsx)(s.code,{children:"Hobby"})," or ",(0,r.jsx)(s.code,{children:"Pro"})," plan."]}),(0,r.jsxs)(s.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)(s.a,{href:"https://fivemanage.com/profile/billing?ref=overextended",children:"here"})," and on the ",(0,r.jsx)(s.a,{href:"https://fivemanage.com/pricing?ref=overextended",children:"pricing"})," page."]}),(0,r.jsx)(s.h3,{id:"create-a-new-token",children:"Create a new token"}),(0,r.jsxs)(s.p,{children:["You'll need to create a new token with the type ",(0,r.jsx)(s.code,{children:"Logs"}),"."]}),(0,r.jsx)(s.h3,{id:"config-2",children:"Config"}),(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:"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:"ox:logger"}),(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:'"fivemanage"'})]}),"\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:"fivemanage:key"}),(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:'"YOUR_API_KEY"'})]})]})})]})]})}s.default=(0,i.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,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Logger/Server.mdx",route:"/ox_lib/Modules/Logger/Server",timestamp:1729524649e3,title:"Server",headings:t},pageNextRoute:"/ox_lib/Modules/Logger/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=388)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Marker/Client-b26c5323947471c3.js b/_next/static/chunks/pages/ox_lib/Modules/Marker/Client-5c7da1401ef85208.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Marker/Client-b26c5323947471c3.js rename to _next/static/chunks/pages/ox_lib/Modules/Marker/Client-5c7da1401ef85208.js index cc98f5058a..64dfd2f5cd 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Marker/Client-b26c5323947471c3.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Marker/Client-5c7da1401ef85208.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{3520:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Marker/Client",function(){return l(5939)}])},5939: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/ox_lib/Modules/Marker/Client.mdx",route:"/ox_lib/Modules/Marker/Client",timestamp:1729516534e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Marker/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3520)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{3520:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Marker/Client",function(){return l(5939)}])},5939: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/ox_lib/Modules/Marker/Client.mdx",route:"/ox_lib/Modules/Marker/Client",timestamp:1729524649e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Marker/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3520)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Math/Shared-2afe9ad4093c7d64.js b/_next/static/chunks/pages/ox_lib/Modules/Math/Shared-95fd6d58ed9c4b08.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Math/Shared-2afe9ad4093c7d64.js rename to _next/static/chunks/pages/ox_lib/Modules/Math/Shared-95fd6d58ed9c4b08.js index dcce21eea8..938ba4022e 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Math/Shared-2afe9ad4093c7d64.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Math/Shared-95fd6d58ed9c4b08.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6682],{5894:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Math/Shared",function(){return l(4399)}])},4399: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/ox_lib/Modules/Math/Shared.mdx",route:"/ox_lib/Modules/Math/Shared",timestamp:1729516534e3,title:"Shared",headings:i},pageNextRoute:"/ox_lib/Modules/Math/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5894)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6682],{5894:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Math/Shared",function(){return l(4399)}])},4399: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/ox_lib/Modules/Math/Shared.mdx",route:"/ox_lib/Modules/Math/Shared",timestamp:1729524649e3,title:"Shared",headings:i},pageNextRoute:"/ox_lib/Modules/Math/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5894)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-9a02741360e1a6f4.js b/_next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-554183eb0ec80783.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-9a02741360e1a6f4.js rename to _next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-554183eb0ec80783.js index 392a9e5cf6..fab9443cf8 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-9a02741360e1a6f4.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-554183eb0ec80783.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9922],{8076:function(s,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Points/JavaScript/Client",function(){return o(7197)}])},7197: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/ox_lib/Modules/Points/JavaScript/Client.mdx",route:"/ox_lib/Modules/Points/JavaScript/Client",timestamp:1729516534e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Points/JavaScript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8076)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9922],{8076:function(s,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Points/JavaScript/Client",function(){return o(7197)}])},7197: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/ox_lib/Modules/Points/JavaScript/Client.mdx",route:"/ox_lib/Modules/Points/JavaScript/Client",timestamp:1729524649e3,title:"Client",headings:i},pageNextRoute:"/ox_lib/Modules/Points/JavaScript/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8076)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-5c9b26f9ca3c61ba.js b/_next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-864c82af26aa22c5.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-5c9b26f9ca3c61ba.js rename to _next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-864c82af26aa22c5.js index ef96e3764b..3353d8462d 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-5c9b26f9ca3c61ba.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Points/Lua/Client-864c82af26aa22c5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8762],{2239:function(s,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Points/Lua/Client",function(){return e(3890)}])},3890:function(s,n,e){"use strict";e.r(n),e.d(n,{__toc:function(){return r}});var l=e(2676),i=e(2140),o=e(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 n=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)(n.h1,{children:"Client"}),"\n",(0,l.jsx)(n.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,l.jsx)(n.h2,{id:"cpoint-class",children:"CPoint Class"}),"\n",(0,l.jsx)(n.p,{children:"A table representing a point with the following properties."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["id: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(n.li,{children:["distance: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:'The distance for the player to be "inside" a point (i.e. the point\'s radius).'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["currentDistance: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The players current distance from the centre of the point."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["isClosest?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["remove: ",(0,l.jsx)(n.code,{children:"function()"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Removes the point from the points registry."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onEnter?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered when player gets within ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onExit?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered when player goes beyond ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["nearby?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered on frame when within ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsnew",children:"lib.points.new"}),"\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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(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:["coords: ",(0,l.jsx)(n.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(n.li,{children:["distance: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:"Returns:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["point: ",(0,l.jsx)(n.code,{children:"CPoint"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"usage-example",children:"Usage Example"}),"\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:" point "}),(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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(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:" coords "}),(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-function)"},children:"GetEntityCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(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-constant)"},children:"5"}),(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:" dunak "}),(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:"'nerd'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\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.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",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:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(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:"'entered range of point'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\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-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(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:"'left range of point'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\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-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(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:"DrawMarker"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.coords.x, self.coords.y, self.coords.z, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(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.0"}),(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.0"}),(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.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"180.0"}),(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.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(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-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-constant)"},children:"2"}),(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-constant)"},children:"nil"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(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:")"})]}),"\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-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(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-constant)"},children:"1"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(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"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\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:"'inside marker'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dunak is a '"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" self.dunak)"})]}),"\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-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetallpoints",children:"lib.points.getAllPoints"}),"\n",(0,l.jsx)(n.p,{children:"Get a table of all points created in the resource."}),"\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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getAllPoints"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["points: ",(0,l.jsx)(n.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetnearbypoints",children:"lib.points.getNearbyPoints"}),"\n",(0,l.jsx)(n.p,{children:"Get an array of all points in range of 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:"lib.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPoints"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["nearbyPoints: ",(0,l.jsx)(n.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetclosestpoint",children:"lib.points.getClosestPoint"}),"\n",(0,l.jsx)(n.p,{children:"Get the data for the closest point 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:"lib.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPoint"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["closestPoint?: ",(0,l.jsx)(n.code,{children:"CPoint"})]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),s.components);return n?(0,l.jsx)(n,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_lib/Modules/Points/Lua/Client.mdx",route:"/ox_lib/Modules/Points/Lua/Client",timestamp:1729516534e3,title:"Client",headings:r},pageNextRoute:"/ox_lib/Modules/Points/Lua/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=2239)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8762],{2239:function(s,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Points/Lua/Client",function(){return e(3890)}])},3890:function(s,n,e){"use strict";e.r(n),e.d(n,{__toc:function(){return r}});var l=e(2676),i=e(2140),o=e(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 n=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)(n.h1,{children:"Client"}),"\n",(0,l.jsx)(n.p,{children:"Simple and centralised distance checking, supporting callbacks when entering, leaving, and standing in-range of set coordinates."}),"\n",(0,l.jsx)(n.h2,{id:"cpoint-class",children:"CPoint Class"}),"\n",(0,l.jsx)(n.p,{children:"A table representing a point with the following properties."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["id: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n",(0,l.jsxs)(n.li,{children:["coords: ",(0,l.jsx)(n.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(n.li,{children:["distance: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:'The distance for the player to be "inside" a point (i.e. the point\'s radius).'}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["currentDistance: ",(0,l.jsx)(n.code,{children:"number"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"The players current distance from the centre of the point."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["isClosest?: ",(0,l.jsx)(n.code,{children:"boolean"})]}),"\n",(0,l.jsxs)(n.li,{children:["remove: ",(0,l.jsx)(n.code,{children:"function()"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Removes the point from the points registry."}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onEnter?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered when player gets within ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["onExit?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered when player goes beyond ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["nearby?: ",(0,l.jsx)(n.code,{children:"function(self: CPoint)"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Function triggered on frame when within ",(0,l.jsx)(n.code,{children:"distance"})," of the point"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsnew",children:"lib.points.new"}),"\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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(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:["coords: ",(0,l.jsx)(n.code,{children:"vector3"})]}),"\n",(0,l.jsxs)(n.li,{children:["distance: ",(0,l.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:"Returns:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["point: ",(0,l.jsx)(n.code,{children:"CPoint"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"usage-example",children:"Usage Example"}),"\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:" point "}),(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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"new"}),(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:" coords "}),(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-function)"},children:"GetEntityCoords"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(cache.ped),"})]}),"\n",(0,l.jsxs)(n.span,{className:"line",children:[(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" distance "}),(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-constant)"},children:"5"}),(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:" dunak "}),(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:"'nerd'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\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.span,{className:"line",children:" "}),"\n",(0,l.jsxs)(n.span,{className:"line",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:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onEnter"}),(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:"'entered range of point'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\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-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onExit"}),(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:"'left range of point'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id)"})]}),"\n",(0,l.jsx)(n.span,{className:"line",children:(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"end"})}),"\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-keyword)"},children:"function"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" point:"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nearby"}),(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:"DrawMarker"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.coords.x, self.coords.y, self.coords.z, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0.0"}),(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.0"}),(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.0"}),(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.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"180.0"}),(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.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"1.0"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"200"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"20"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"50"}),(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-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-constant)"},children:"2"}),(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-constant)"},children:"nil"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"nil"}),(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:")"})]}),"\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-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" self.currentDistance "}),(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-constant)"},children:"1"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"and"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"IsControlJustReleased"}),(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"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"38"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"then"})]}),"\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:"'inside marker'"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:", self.id, "}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dunak is a '"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:".."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" self.dunak)"})]}),"\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-token-keyword)"},children:"end"})})]})}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetallpoints",children:"lib.points.getAllPoints"}),"\n",(0,l.jsx)(n.p,{children:"Get a table of all points created in the resource."}),"\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.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getAllPoints"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["points: ",(0,l.jsx)(n.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetnearbypoints",children:"lib.points.getNearbyPoints"}),"\n",(0,l.jsx)(n.p,{children:"Get an array of all points in range of 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:"lib.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getNearbyPoints"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["nearbyPoints: ",(0,l.jsx)(n.code,{children:"CPoint[]"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"libpointsgetclosestpoint",children:"lib.points.getClosestPoint"}),"\n",(0,l.jsx)(n.p,{children:"Get the data for the closest point 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:"lib.points."}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"getClosestPoint"}),(0,l.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]})})}),"\n",(0,l.jsx)(n.p,{children:"Return:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["closestPoint?: ",(0,l.jsx)(n.code,{children:"CPoint"})]}),"\n"]})]})}n.default=(0,i.j)({MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),s.components);return n?(0,l.jsx)(n,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/ox_lib/Modules/Points/Lua/Client.mdx",route:"/ox_lib/Modules/Points/Lua/Client",timestamp:1729524649e3,title:"Client",headings:r},pageNextRoute:"/ox_lib/Modules/Points/Lua/Client"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=2239)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Print/Shared-d6db7452a1d7b68f.js b/_next/static/chunks/pages/ox_lib/Modules/Print/Shared-451f227690360adc.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Print/Shared-d6db7452a1d7b68f.js rename to _next/static/chunks/pages/ox_lib/Modules/Print/Shared-451f227690360adc.js index f6b10320de..52be8693eb 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Print/Shared-d6db7452a1d7b68f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Print/Shared-451f227690360adc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8027],{6650:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Print/Shared",function(){return s(7645)}])},7645: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/ox_lib/Modules/Print/Shared.mdx",route:"/ox_lib/Modules/Print/Shared",timestamp:1729516534e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Print/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6650)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8027],{6650:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Print/Shared",function(){return s(7645)}])},7645: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/ox_lib/Modules/Print/Shared.mdx",route:"/ox_lib/Modules/Print/Shared",timestamp:1729524649e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Print/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6650)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Raycast/Client-55047fbd72e5dd7c.js b/_next/static/chunks/pages/ox_lib/Modules/Raycast/Client-b940a4ee574cc4e0.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Raycast/Client-55047fbd72e5dd7c.js rename to _next/static/chunks/pages/ox_lib/Modules/Raycast/Client-b940a4ee574cc4e0.js index fd46d2fbcb..3d83adfc06 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Raycast/Client-55047fbd72e5dd7c.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Raycast/Client-b940a4ee574cc4e0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5980],{6052:function(n,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Raycast/Client",function(){return s(2847)}])},2847:function(n,e,s){"use strict";s.r(e),s.d(e,{__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(n){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a"},(0,r.a)(),n.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{children:"Client"}),"\n",(0,i.jsx)(e.h2,{id:"libraycastfromcoords",children:"lib.raycast.fromCoords"}),"\n",(0,i.jsx)(e.p,{children:"Starts a shapetest originating from starting coordinates and ending at destination coordinates."}),"\n",(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.raycast."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fromCoords"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, destination, flags, ignore)"})]})})}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["coords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Starting coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["destination: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Destination coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["flags?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["See: ",(0,i.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["ignore?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.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)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Return:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["hit: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["entityHit: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["endCoords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["surfaceNormal: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["materialHash: ",(0,i.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"libraycastfromcamera",children:"lib.raycast.fromCamera"}),"\n",(0,i.jsx)(e.p,{children:"Starts a shapetest originating from the camera, extending to ~10m by default."}),"\n",(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.raycast."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fromCamera"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(flags, ignore, distance)"})]})})}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["flags?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["See: ",(0,i.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["ignore?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.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)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["distance?: ",(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:"10"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Return:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["hit: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["entityHit: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["endCoords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["surfaceNormal: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["materialHash: ",(0,i.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(e.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!"})]})}e.default=(0,l.j)({MDXContent:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),n.components);return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(_createMdxContent,{...n})}):_createMdxContent(n)},pageOpts:{filePath:"pages/ox_lib/Modules/Raycast/Client.mdx",route:"/ox_lib/Modules/Raycast/Client",timestamp:1729516534e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Raycast/Client"})}},function(n){n.O(0,[2601,9774,2888,179],function(){return n(n.s=6052)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5980],{6052:function(n,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Raycast/Client",function(){return s(2847)}])},2847:function(n,e,s){"use strict";s.r(e),s.d(e,{__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(n){let e=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a"},(0,r.a)(),n.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{children:"Client"}),"\n",(0,i.jsx)(e.h2,{id:"libraycastfromcoords",children:"lib.raycast.fromCoords"}),"\n",(0,i.jsx)(e.p,{children:"Starts a shapetest originating from starting coordinates and ending at destination coordinates."}),"\n",(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.raycast."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fromCoords"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(coords, destination, flags, ignore)"})]})})}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["coords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Starting coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["destination: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Destination coords for raycast"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["flags?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["See: ",(0,i.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["ignore?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.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)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Return:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["hit: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["entityHit: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["endCoords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["surfaceNormal: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["materialHash: ",(0,i.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"libraycastfromcamera",children:"lib.raycast.fromCamera"}),"\n",(0,i.jsx)(e.p,{children:"Starts a shapetest originating from the camera, extending to ~10m by default."}),"\n",(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.raycast."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fromCamera"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(flags, ignore, distance)"})]})})}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["flags?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["See: ",(0,i.jsx)(e.a,{href:"https://docs.fivem.net/natives/?_0x377906D8A31E5586",children:"https://docs.fivem.net/natives/?_0x377906D8A31E5586"})]}),"\n",(0,i.jsxs)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"511"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["ignore?: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.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)(e.li,{children:["Default: ",(0,i.jsx)(e.code,{children:"4"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["distance?: ",(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:"10"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Return:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["hit: ",(0,i.jsx)(e.code,{children:"boolean"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Whether or not an entity was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["entityHit: ",(0,i.jsx)(e.code,{children:"number"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Entity handle of hit entity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["endCoords: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Closest coords to where the raycast hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["surfaceNormal: ",(0,i.jsx)(e.code,{children:"vector3"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Normal to the surface that was hit"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["materialHash: ",(0,i.jsx)(e.code,{children:"number"})]}),"\n"]}),"\n",(0,i.jsx)(e.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!"})]})}e.default=(0,l.j)({MDXContent:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.a)(),n.components);return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(_createMdxContent,{...n})}):_createMdxContent(n)},pageOpts:{filePath:"pages/ox_lib/Modules/Raycast/Client.mdx",route:"/ox_lib/Modules/Raycast/Client",timestamp:1729524649e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Raycast/Client"})}},function(n){n.O(0,[2601,9774,2888,179],function(){return n(n.s=6052)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Require/Shared-982715eaa77ec55b.js b/_next/static/chunks/pages/ox_lib/Modules/Require/Shared-c45851c3368ab813.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Require/Shared-982715eaa77ec55b.js rename to _next/static/chunks/pages/ox_lib/Modules/Require/Shared-c45851c3368ab813.js index d01aba0783..123edce7e8 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Require/Shared-982715eaa77ec55b.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Require/Shared-c45851c3368ab813.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9982],{5574:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Require/Shared",function(){return l(4117)}])},4117: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/ox_lib/Modules/Require/Shared.mdx",route:"/ox_lib/Modules/Require/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Require/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5574)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9982],{5574:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Require/Shared",function(){return l(4117)}])},4117: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/ox_lib/Modules/Require/Shared.mdx",route:"/ox_lib/Modules/Require/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Require/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=5574)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Streaming/Client-5eb19c6c0b811475.js b/_next/static/chunks/pages/ox_lib/Modules/Streaming/Client-46f1398917dc59fd.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Streaming/Client-5eb19c6c0b811475.js rename to _next/static/chunks/pages/ox_lib/Modules/Streaming/Client-46f1398917dc59fd.js index 21826524da..46aff6736d 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Streaming/Client-5eb19c6c0b811475.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Streaming/Client-46f1398917dc59fd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3321],{6490:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Streaming/Client",function(){return l(737)}])},737: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/ox_lib/Modules/Streaming/Client.mdx",route:"/ox_lib/Modules/Streaming/Client",timestamp:1729516534e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Streaming/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6490)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3321],{6490:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Streaming/Client",function(){return l(737)}])},737: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/ox_lib/Modules/Streaming/Client.mdx",route:"/ox_lib/Modules/Streaming/Client",timestamp:1729524649e3,title:"Client",headings:a},pageNextRoute:"/ox_lib/Modules/Streaming/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6490)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/String/Shared-ea16e9201376b385.js b/_next/static/chunks/pages/ox_lib/Modules/String/Shared-4d2cf6ff6bcd9392.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/String/Shared-ea16e9201376b385.js rename to _next/static/chunks/pages/ox_lib/Modules/String/Shared-4d2cf6ff6bcd9392.js index 6b43265a6a..b85348300a 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/String/Shared-ea16e9201376b385.js +++ b/_next/static/chunks/pages/ox_lib/Modules/String/Shared-4d2cf6ff6bcd9392.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2636],{1589:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/String/Shared",function(){return t(8237)}])},8237: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/ox_lib/Modules/String/Shared.mdx",route:"/ox_lib/Modules/String/Shared",timestamp:1729516534e3,title:"Shared",headings:s},pageNextRoute:"/ox_lib/Modules/String/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1589)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2636],{1589:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/String/Shared",function(){return t(8237)}])},8237: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/ox_lib/Modules/String/Shared.mdx",route:"/ox_lib/Modules/String/Shared",timestamp:1729524649e3,title:"Shared",headings:s},pageNextRoute:"/ox_lib/Modules/String/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=1589)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Table/Shared-97bc31e1b41ebc8f.js b/_next/static/chunks/pages/ox_lib/Modules/Table/Shared-055d8f70811b6ced.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Table/Shared-97bc31e1b41ebc8f.js rename to _next/static/chunks/pages/ox_lib/Modules/Table/Shared-055d8f70811b6ced.js index 4ebefce98f..f713021feb 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Table/Shared-97bc31e1b41ebc8f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Table/Shared-055d8f70811b6ced.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4272],{2259:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Table/Shared",function(){return n(7504)}])},7504:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return t}});var a=n(2676),s=n(2140),i=n(8745);let t=[{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,i.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,i.a)(),e.components);return l?(0,a.jsx)(l,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Table/Shared.mdx",route:"/ox_lib/Modules/Table/Shared",timestamp:1729516534e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Table/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2259)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4272],{2259:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Table/Shared",function(){return n(7504)}])},7504:function(e,l,n){"use strict";n.r(l),n.d(l,{__toc:function(){return t}});var a=n(2676),s=n(2140),i=n(8745);let t=[{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,i.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,i.a)(),e.components);return l?(0,a.jsx)(l,{...e,children:(0,a.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Table/Shared.mdx",route:"/ox_lib/Modules/Table/Shared",timestamp:1729524649e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Table/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=2259)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Timer/Shared-0ca259aa7506f805.js b/_next/static/chunks/pages/ox_lib/Modules/Timer/Shared-216b6e5016c7ccff.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Timer/Shared-0ca259aa7506f805.js rename to _next/static/chunks/pages/ox_lib/Modules/Timer/Shared-216b6e5016c7ccff.js index 1e86d05419..d26c16562d 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Timer/Shared-0ca259aa7506f805.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Timer/Shared-216b6e5016c7ccff.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6261],{7037:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Timer/Shared",function(){return l(4913)}])},4913: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/ox_lib/Modules/Timer/Shared.mdx",route:"/ox_lib/Modules/Timer/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Timer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7037)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6261],{7037:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Timer/Shared",function(){return l(4913)}])},4913: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/ox_lib/Modules/Timer/Shared.mdx",route:"/ox_lib/Modules/Timer/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/Timer/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=7037)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-9b91f57db4f28264.js b/_next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-b1ba91ed7e331200.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-9b91f57db4f28264.js rename to _next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-b1ba91ed7e331200.js index 3c9ce3efd3..05d28aaaaf 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-9b91f57db4f28264.js +++ b/_next/static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-b1ba91ed7e331200.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5060],{3584:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/VehicleProperties/Client",function(){return s(58)}])},58: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/ox_lib/Modules/VehicleProperties/Client.mdx",route:"/ox_lib/Modules/VehicleProperties/Client",timestamp:1729516534e3,title:"Client",headings:c},pageNextRoute:"/ox_lib/Modules/VehicleProperties/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3584)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5060],{3584:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/VehicleProperties/Client",function(){return s(58)}])},58: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/ox_lib/Modules/VehicleProperties/Client.mdx",route:"/ox_lib/Modules/VehicleProperties/Client",timestamp:1729524649e3,title:"Client",headings:c},pageNextRoute:"/ox_lib/Modules/VehicleProperties/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3584)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Version/Server-4dd5f0f50a365112.js b/_next/static/chunks/pages/ox_lib/Modules/Version/Server-0c2541409379c601.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/Version/Server-4dd5f0f50a365112.js rename to _next/static/chunks/pages/ox_lib/Modules/Version/Server-0c2541409379c601.js index 66a3c62c4c..716ca2067c 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Version/Server-4dd5f0f50a365112.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Version/Server-0c2541409379c601.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8645],{4963:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Version/Server",function(){return n(5755)}])},5755: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/ox_lib/Modules/Version/Server.mdx",route:"/ox_lib/Modules/Version/Server",timestamp:1729516534e3,title:"Server",headings:o},pageNextRoute:"/ox_lib/Modules/Version/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4963)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8645],{4963:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Version/Server",function(){return n(5755)}])},5755: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/ox_lib/Modules/Version/Server.mdx",route:"/ox_lib/Modules/Version/Server",timestamp:1729524649e3,title:"Server",headings:o},pageNextRoute:"/ox_lib/Modules/Version/Server"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4963)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Version/Shared-0df296cab3aeaf8f.js b/_next/static/chunks/pages/ox_lib/Modules/Version/Shared-5ae5ea0c9b40e27c.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/Version/Shared-0df296cab3aeaf8f.js rename to _next/static/chunks/pages/ox_lib/Modules/Version/Shared-5ae5ea0c9b40e27c.js index c9a02be3a6..2854cc3c78 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Version/Shared-0df296cab3aeaf8f.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Version/Shared-5ae5ea0c9b40e27c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7427],{3509:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Version/Shared",function(){return n(2964)}])},2964: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/ox_lib/Modules/Version/Shared.mdx",route:"/ox_lib/Modules/Version/Shared",timestamp:1729516534e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Version/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3509)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7427],{3509:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Version/Shared",function(){return n(2964)}])},2964: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/ox_lib/Modules/Version/Shared.mdx",route:"/ox_lib/Modules/Version/Shared",timestamp:1729524649e3,title:"Shared",headings:t},pageNextRoute:"/ox_lib/Modules/Version/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=3509)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-f14a994ac8037bb1.js b/_next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-b94f7770803fdbd3.js similarity index 98% rename from _next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-f14a994ac8037bb1.js rename to _next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-b94f7770803fdbd3.js index f553c23c69..8579a2f926 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-f14a994ac8037bb1.js +++ b/_next/static/chunks/pages/ox_lib/Modules/WaitFor/Shared-b94f7770803fdbd3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9803],{686:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/WaitFor/Shared",function(){return n(82)}])},82: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);let o=[{depth:2,value:"lib.waitFor",id:"libwaitfor"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",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:"Shared"}),"\n",(0,r.jsx)(s.h2,{id:"libwaitfor",children:"lib.waitFor"}),"\n",(0,r.jsxs)(s.p,{children:["Calls a function repeatedly until it receives a non-nil value, or it times out.",(0,r.jsx)(s.br,{}),"\n","The function result is then returned."]}),"\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:"waitFor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(cb, errMessage, timeout)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A function to call each frame."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["errMessage?: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The error message to display if the function times out."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["timeout?: ",(0,r.jsx)(s.code,{children:"number | false"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["The duration to run the function for, defaulting to 1000ms, unless set to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\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:" value "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[['abc']]"}),(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:" lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(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:"()"})]}),"\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-function)"},children:"math.random"}),(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"}),(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:" "}),(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:"then"}),(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-string-expression)"},children:"'abc' "}),(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:")"})]})]})})]})}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/ox_lib/Modules/WaitFor/Shared.mdx",route:"/ox_lib/Modules/WaitFor/Shared",timestamp:1729516534e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/WaitFor/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=686)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9803],{686:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/WaitFor/Shared",function(){return n(82)}])},82: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);let o=[{depth:2,value:"lib.waitFor",id:"libwaitfor"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",h2:"h2",p:"p",br:"br",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:"Shared"}),"\n",(0,r.jsx)(s.h2,{id:"libwaitfor",children:"lib.waitFor"}),"\n",(0,r.jsxs)(s.p,{children:["Calls a function repeatedly until it receives a non-nil value, or it times out.",(0,r.jsx)(s.br,{}),"\n","The function result is then returned."]}),"\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:"waitFor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(cb, errMessage, timeout)"})]})})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["cb: ",(0,r.jsx)(s.code,{children:"function"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A function to call each frame."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["errMessage?: ",(0,r.jsx)(s.code,{children:"string"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"The error message to display if the function times out."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["timeout?: ",(0,r.jsx)(s.code,{children:"number | false"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["The duration to run the function for, defaulting to 1000ms, unless set to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\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:" value "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"--[['abc']]"}),(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:" lib."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"waitFor"}),(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:"()"})]}),"\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-function)"},children:"math.random"}),(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"}),(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:" "}),(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:"then"}),(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-string-expression)"},children:"'abc' "}),(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:")"})]})]})})]})}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/ox_lib/Modules/WaitFor/Shared.mdx",route:"/ox_lib/Modules/WaitFor/Shared",timestamp:1729524649e3,title:"Shared",headings:o},pageNextRoute:"/ox_lib/Modules/WaitFor/Shared"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=686)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Zones/Shared-035e56cd6699b7a7.js b/_next/static/chunks/pages/ox_lib/Modules/Zones/Shared-a4b6c21d153dbe05.js similarity index 99% rename from _next/static/chunks/pages/ox_lib/Modules/Zones/Shared-035e56cd6699b7a7.js rename to _next/static/chunks/pages/ox_lib/Modules/Zones/Shared-a4b6c21d153dbe05.js index aea1dbd95d..5aa2776920 100644 --- a/_next/static/chunks/pages/ox_lib/Modules/Zones/Shared-035e56cd6699b7a7.js +++ b/_next/static/chunks/pages/ox_lib/Modules/Zones/Shared-a4b6c21d153dbe05.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[606],{9828:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Zones/Shared",function(){return l(6309)}])},6309: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/ox_lib/Modules/Zones/Shared.mdx",route:"/ox_lib/Modules/Zones/Shared",timestamp:1729516534e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/Zones/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9828)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[606],{9828:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Zones/Shared",function(){return l(6309)}])},6309: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/ox_lib/Modules/Zones/Shared.mdx",route:"/ox_lib/Modules/Zones/Shared",timestamp:1729524649e3,title:"Shared",headings:c},pageNextRoute:"/ox_lib/Modules/Zones/Shared"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=9828)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_target-5f6d5e7e27569924.js b/_next/static/chunks/pages/ox_target-fc8f48ceae6e22df.js similarity index 99% rename from _next/static/chunks/pages/ox_target-5f6d5e7e27569924.js rename to _next/static/chunks/pages/ox_target-fc8f48ceae6e22df.js index 020543aaa8..9b837e1a47 100644 --- a/_next/static/chunks/pages/ox_target-5f6d5e7e27569924.js +++ b/_next/static/chunks/pages/ox_target-fc8f48ceae6e22df.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1523],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var s=t(5271),r=t(507),i=t.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"},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:i="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},o),{width:a,height:a,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),h),[...t.map(([e,n])=>(0,s.createElement)(e,n)),...c||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${n}`,r}},9818:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target",function(){return t(9580)}])},9580:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),i=t(8745),o=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,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Target"}),"\n",(0,s.jsx)(o.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,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_target.mdx",route:"/ox_target",timestamp:1729516534e3,title:"Ox Target",headings:l},pageNextRoute:"/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),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"}]]),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: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}),t,"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)(o,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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||"Package"})}},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,i,o){if(o!==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=9818)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1523],{5850:function(e,n,t){"use strict";t.d(n,{Z:function(){return createReactComponent}});var s=t(5271),r=t(507),i=t.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"},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:i="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},o),{width:a,height:a,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),h),[...t.map(([e,n])=>(0,s.createElement)(e,n)),...c||[]])});return r.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},r.displayName=`${n}`,r}},9818:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target",function(){return t(9580)}])},9580:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var s=t(2676),r=t(2140),i=t(8745),o=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,i.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{children:"Ox Target"}),"\n",(0,s.jsx)(o.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,i.a)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/ox_target.mdx",route:"/ox_target",timestamp:1729524649e3,title:"Ox Target",headings:l},pageNextRoute:"/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),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"}]]),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: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}),t,"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)(o,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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||"Package"})}},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,i,o){if(o!==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=9818)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_target/Functions/Client-3a9a3f3227c80543.js b/_next/static/chunks/pages/ox_target/Functions/Client-b07ea9f5607f2a9d.js similarity index 99% rename from _next/static/chunks/pages/ox_target/Functions/Client-3a9a3f3227c80543.js rename to _next/static/chunks/pages/ox_target/Functions/Client-b07ea9f5607f2a9d.js index 16717202ad..e486757cca 100644 --- a/_next/static/chunks/pages/ox_target/Functions/Client-3a9a3f3227c80543.js +++ b/_next/static/chunks/pages/ox_target/Functions/Client-b07ea9f5607f2a9d.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6577],{8967:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target/Functions/Client",function(){return l(5107)}])},5107: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/ox_target/Functions/Client.mdx",route:"/ox_target/Functions/Client",timestamp:1729516534e3,title:"Client",headings:t},pageNextRoute:"/ox_target/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8967)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6577],{8967:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target/Functions/Client",function(){return l(5107)}])},5107: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/ox_target/Functions/Client.mdx",route:"/ox_target/Functions/Client",timestamp:1729524649e3,title:"Client",headings:t},pageNextRoute:"/ox_target/Functions/Client"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=8967)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_target/TargetOptions-37c57e7c0abf5083.js b/_next/static/chunks/pages/ox_target/TargetOptions-c8d7f28475b6b91f.js similarity index 99% rename from _next/static/chunks/pages/ox_target/TargetOptions-37c57e7c0abf5083.js rename to _next/static/chunks/pages/ox_target/TargetOptions-c8d7f28475b6b91f.js index 6b9b2d6c70..248683a4da 100644 --- a/_next/static/chunks/pages/ox_target/TargetOptions-37c57e7c0abf5083.js +++ b/_next/static/chunks/pages/ox_target/TargetOptions-c8d7f28475b6b91f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1653],{6051:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target/TargetOptions",function(){return i(6812)}])},6812: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/ox_target/TargetOptions.mdx",route:"/ox_target/TargetOptions",timestamp:1729516534e3,title:"TargetOptions",headings:t},pageNextRoute:"/ox_target/TargetOptions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6051)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1653],{6051:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_target/TargetOptions",function(){return i(6812)}])},6812: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/ox_target/TargetOptions.mdx",route:"/ox_target/TargetOptions",timestamp:1729524649e3,title:"TargetOptions",headings:t},pageNextRoute:"/ox_target/TargetOptions"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6051)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql-98786afa1a1070e2.js b/_next/static/chunks/pages/oxmysql-675d990728d616e7.js similarity index 99% rename from _next/static/chunks/pages/oxmysql-98786afa1a1070e2.js rename to _next/static/chunks/pages/oxmysql-675d990728d616e7.js index f010e3749d..bd2c7da18b 100644 --- a/_next/static/chunks/pages/oxmysql-98786afa1a1070e2.js +++ b/_next/static/chunks/pages/oxmysql-675d990728d616e7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9659],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),t=n(507),i=n.n(t),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"},o=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,p=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={}))h.call(s,n)&&__defNormalProp(e,n,s[n]);if(d)for(var n of d(s))p.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>l(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)h.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>s.indexOf(r)&&p.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let t=(0,r.forwardRef)((s,t)=>{var{color:i="currentColor",size:o=24,stroke:l=2,children:c}=s,d=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:t},a),{width:o,height:o,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return t.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},t.displayName=`${s}`,t}},9262:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql",function(){return n(6786)}])},6786:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var r=n(2676),t=n(2140),i=n(8745),a=n(7100),o=n(8713);let l=[{depth:2,value:"MySQL or MariaDB?",id:"mysql-or-mariadb"},{depth:2,value:"Should I use XAMPP?",id:"should-i-use-xampp"},{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Download and install MariaDB",id:"download-and-install-mariadb"},{depth:3,value:"Download the latest release of oxmysql",id:"download-the-latest-release-of-oxmysql"},{depth:3,value:"Configure your server",id:"configure-your-server"},{depth:3,value:"Slow query warnings",id:"slow-query-warnings"},{depth:3,value:"Debug",id:"debug"},{depth:2,value:"Compatibility",id:"compatibility"},{depth:2,value:"Usage",id:"usage"},{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",br:"br",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"OxMySQL"}),"\n","\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/oxmysql"}),"\n",(0,r.jsx)(s.p,{children:"A replacement of mysql-async and ghmattimysql with expanded API and improved compatibility for MySQL 8."}),"\n",(0,r.jsx)(s.h2,{id:"mysql-or-mariadb",children:"MySQL or MariaDB?"}),"\n",(0,r.jsx)(s.p,{children:"Most resources for FiveM were designed to be used with MySQL 5.7 and may hit compatibility issues when using MySQL 8, i.e."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"More reserved keywords, like 'stored' and 'group'."}),"\n",(0,r.jsx)(s.li,{children:"Longtext / JSON fields do not support default values."}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," is highly recommended for compatibility, and improved performance (over all versions of MySQL)."]}),"\n",(0,r.jsx)(s.h2,{id:"should-i-use-xampp",children:"Should I use XAMPP?"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"No."})," XAMPP is a ",(0,r.jsx)(s.em,{children:"webserver stack"})," intended to be used for development, allowing easy local development and testing.",(0,r.jsx)(s.br,{}),"\n","Do not setup XAMPP just to run your database, and install ",(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," directly instead."]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsxs)(s.h3,{id:"download-and-install-mariadb",children:["Download and install ",(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})]}),(0,r.jsxs)(s.h3,{id:"download-the-latest-release-of-oxmysql",children:["Download the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/oxmysql/releases/latest",children:"latest release"})," of oxmysql"]}),(0,r.jsx)(s.h3,{id:"configure-your-server",children:"Configure your server"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Open your server ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/server-manual/setting-up-a-server-vanilla/#servercfg",children:"configuration file"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["Add ",(0,r.jsx)(s.code,{children:"start oxmysql"})," to the top of your resource list."]}),"\n",(0,r.jsx)(s.li,{children:"Configure your mysql connection string and set it before starting any resources."}),"\n"]}),(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:"# Use your preferred format. Make sure you only ever use set."})}),"\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:"mysql_connection_string"}),(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:'"mysql://root:12345@localhost:3306/fivem"'})]}),"\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:"mysql_connection_string"}),(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:'"user=root;password=12345;host=localhost;port=3306;database=fivem"'})]})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["Certain special characters are reserved or unsupported depending on your connection string.",(0,r.jsx)(s.br,{}),"\n","Avoid using these characters ",(0,r.jsx)(s.code,{children:"; , / ? : @ & = + $ #"}),", and try swapping connection string format."]})}),(0,r.jsx)(s.h3,{id:"slow-query-warnings",children:"Slow query warnings"}),(0,r.jsx)(s.p,{children:"You will receive warnings if a query took a long time to complete, configurable with a convar."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Query time may not be entirely accurate."}),"\n",(0,r.jsx)(s.li,{children:"Slow queries may not indicate a database issue (e.g. server hitches)."}),"\n",(0,r.jsx)(s.li,{children:"Slow queries on server startup are not necessarily problematic."}),"\n"]}),(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:"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:"mysql_slow_query_warning"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"150"})]})})}),(0,r.jsx)(s.h3,{id:"debug",children:"Debug"}),(0,r.jsx)(s.p,{children:"Enabling the debug option will print all queries in the server console; you can also use an array to only print from a list of resources instead."}),(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:"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:"mysql_debug"}),(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-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:"mysql_debug"}),(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:'"ox_core"'}),(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-function)"},children:'"ox_inventory"'})]}),"\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:"You can temporarily modify the resource list with commands."}),(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:"oxmysql_debug"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"remove"}),(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_core"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(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_core"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,r.jsx)(s.p,{children:"You can delete the following resources and allow oxmysql to provide their functionality."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"mysql-async"}),"\n",(0,r.jsx)(s.li,{children:"ghmattimysql"}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(s.p,{children:"Resources can import oxmysql methods by including our library, granting some type-checking and minor performance improvements over raw export calls."}),"\n",(0,r.jsx)(s.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(s.p,{children:["Modify ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"})," for your resource, and add the following above any other script files."]}),"\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-token-function)"},children:"server_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:"'@oxmysql/lib/MySQL.lua'"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,r.jsxs)(s.p,{children:["You can use raw exports, or install ",(0,r.jsx)(s.a,{href:"https://www.npmjs.com/package/@overextended/oxmysql",children:"our npm package"})," for intellisense and similar usage as Lua."]}),"\n",(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:"# With pnpm"})}),"\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:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\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:"# With Yarn"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\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:"# With npm"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"Import the oxmysql object into your resource."}),"\n",(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsx)(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:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { oxmysql "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL } "}),(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/oxmysql'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,r.jsx)(s.h2,{id:"upserting",children:"Upserting"}),"\n",(0,r.jsx)(s.p,{children:"When uncertain if a row should be inserted into the database, or an existing row should be updated, queries should check for duplicate keys."}),"\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:"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:"'INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { owner, dbId, inventory })"})]})})}),"\n",(0,r.jsxs)(s.p,{children:["This is preferred over checking the existence of a row, then inserting or updating depending on the result.",(0,r.jsx)(s.br,{}),"\n","Furthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted."]})]})}s.default=(0,t.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/oxmysql.mdx",route:"/oxmysql",frontMatter:{title:"OxMySQL"},timestamp:1729516534e3,title:"OxMySQL",headings:l},pageNextRoute:"/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 r=n(2676);n(5271);var t=n(5850),i=(0,t.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"}]]),a=(0,t.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,t.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,t.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,t.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:t,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"===s&&(0,r.jsx)("div",{children:t}),n,"right"===s&&(0,r.jsx)("div",{children:t})]})})})};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)(a,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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)(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||"Package"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var t=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)(t.eX,{link:s}),(0,r.jsx)(t.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(t.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,t,i,a){if(a!==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=9262)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9659],{5850:function(e,s,n){"use strict";n.d(s,{Z:function(){return createReactComponent}});var r=n(5271),t=n(507),i=n.n(t),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"},o=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,p=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={}))h.call(s,n)&&__defNormalProp(e,n,s[n]);if(d)for(var n of d(s))p.call(s,n)&&__defNormalProp(e,n,s[n]);return e},__spreadProps=(e,s)=>l(e,c(s)),__objRest=(e,s)=>{var n={};for(var r in e)h.call(e,r)&&0>s.indexOf(r)&&(n[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>s.indexOf(r)&&p.call(e,r)&&(n[r]=e[r]);return n},createReactComponent=(e,s,n)=>{let t=(0,r.forwardRef)((s,t)=>{var{color:i="currentColor",size:o=24,stroke:l=2,children:c}=s,d=__objRest(s,["color","size","stroke","children"]);return(0,r.createElement)("svg",__spreadValues(__spreadProps(__spreadValues({ref:t},a),{width:o,height:o,stroke:i,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([e,s])=>(0,r.createElement)(e,s)),...c||[]])});return t.propTypes={color:i().string,size:i().oneOfType([i().string,i().number]),stroke:i().oneOfType([i().string,i().number])},t.displayName=`${s}`,t}},9262:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql",function(){return n(6786)}])},6786:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return l}});var r=n(2676),t=n(2140),i=n(8745),a=n(7100),o=n(8713);let l=[{depth:2,value:"MySQL or MariaDB?",id:"mysql-or-mariadb"},{depth:2,value:"Should I use XAMPP?",id:"should-i-use-xampp"},{depth:2,value:"Installation",id:"installation"},{depth:3,value:"Download and install MariaDB",id:"download-and-install-mariadb"},{depth:3,value:"Download the latest release of oxmysql",id:"download-the-latest-release-of-oxmysql"},{depth:3,value:"Configure your server",id:"configure-your-server"},{depth:3,value:"Slow query warnings",id:"slow-query-warnings"},{depth:3,value:"Debug",id:"debug"},{depth:2,value:"Compatibility",id:"compatibility"},{depth:2,value:"Usage",id:"usage"},{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",br:"br",h3:"h3",code:"code",pre:"pre",span:"span"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"OxMySQL"}),"\n","\n",(0,r.jsx)(o.Z,{repo:"https://github.com/overextended/oxmysql"}),"\n",(0,r.jsx)(s.p,{children:"A replacement of mysql-async and ghmattimysql with expanded API and improved compatibility for MySQL 8."}),"\n",(0,r.jsx)(s.h2,{id:"mysql-or-mariadb",children:"MySQL or MariaDB?"}),"\n",(0,r.jsx)(s.p,{children:"Most resources for FiveM were designed to be used with MySQL 5.7 and may hit compatibility issues when using MySQL 8, i.e."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"More reserved keywords, like 'stored' and 'group'."}),"\n",(0,r.jsx)(s.li,{children:"Longtext / JSON fields do not support default values."}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," is highly recommended for compatibility, and improved performance (over all versions of MySQL)."]}),"\n",(0,r.jsx)(s.h2,{id:"should-i-use-xampp",children:"Should I use XAMPP?"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"No."})," XAMPP is a ",(0,r.jsx)(s.em,{children:"webserver stack"})," intended to be used for development, allowing easy local development and testing.",(0,r.jsx)(s.br,{}),"\n","Do not setup XAMPP just to run your database, and install ",(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})," directly instead."]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsxs)(s.h3,{id:"download-and-install-mariadb",children:["Download and install ",(0,r.jsx)(s.a,{href:"https://mariadb.com/downloads/community/",children:"MariaDB"})]}),(0,r.jsxs)(s.h3,{id:"download-the-latest-release-of-oxmysql",children:["Download the ",(0,r.jsx)(s.a,{href:"https://github.com/overextended/oxmysql/releases/latest",children:"latest release"})," of oxmysql"]}),(0,r.jsx)(s.h3,{id:"configure-your-server",children:"Configure your server"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Open your server ",(0,r.jsx)(s.a,{href:"https://docs.fivem.net/docs/server-manual/setting-up-a-server-vanilla/#servercfg",children:"configuration file"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["Add ",(0,r.jsx)(s.code,{children:"start oxmysql"})," to the top of your resource list."]}),"\n",(0,r.jsx)(s.li,{children:"Configure your mysql connection string and set it before starting any resources."}),"\n"]}),(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:"# Use your preferred format. Make sure you only ever use set."})}),"\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:"mysql_connection_string"}),(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:'"mysql://root:12345@localhost:3306/fivem"'})]}),"\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:"mysql_connection_string"}),(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:'"user=root;password=12345;host=localhost;port=3306;database=fivem"'})]})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsxs)(s.p,{children:["Certain special characters are reserved or unsupported depending on your connection string.",(0,r.jsx)(s.br,{}),"\n","Avoid using these characters ",(0,r.jsx)(s.code,{children:"; , / ? : @ & = + $ #"}),", and try swapping connection string format."]})}),(0,r.jsx)(s.h3,{id:"slow-query-warnings",children:"Slow query warnings"}),(0,r.jsx)(s.p,{children:"You will receive warnings if a query took a long time to complete, configurable with a convar."}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Query time may not be entirely accurate."}),"\n",(0,r.jsx)(s.li,{children:"Slow queries may not indicate a database issue (e.g. server hitches)."}),"\n",(0,r.jsx)(s.li,{children:"Slow queries on server startup are not necessarily problematic."}),"\n"]}),(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:"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:"mysql_slow_query_warning"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"150"})]})})}),(0,r.jsx)(s.h3,{id:"debug",children:"Debug"}),(0,r.jsx)(s.p,{children:"Enabling the debug option will print all queries in the server console; you can also use an array to only print from a list of resources instead."}),(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:"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:"mysql_debug"}),(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-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:"mysql_debug"}),(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:'"ox_core"'}),(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-function)"},children:'"ox_inventory"'})]}),"\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:"You can temporarily modify the resource list with commands."}),(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:"oxmysql_debug"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"remove"}),(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_core"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"oxmysql_debug"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(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_core"})]})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,r.jsx)(s.p,{children:"You can delete the following resources and allow oxmysql to provide their functionality."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"mysql-async"}),"\n",(0,r.jsx)(s.li,{children:"ghmattimysql"}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(s.p,{children:"Resources can import oxmysql methods by including our library, granting some type-checking and minor performance improvements over raw export calls."}),"\n",(0,r.jsx)(s.h3,{id:"lua",children:"Lua"}),"\n",(0,r.jsxs)(s.p,{children:["Modify ",(0,r.jsx)(s.code,{children:"fxmanifest.lua"})," for your resource, and add the following above any other script files."]}),"\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-token-function)"},children:"server_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:"'@oxmysql/lib/MySQL.lua'"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"javascript",children:"JavaScript"}),"\n",(0,r.jsxs)(s.p,{children:["You can use raw exports, or install ",(0,r.jsx)(s.a,{href:"https://www.npmjs.com/package/@overextended/oxmysql",children:"our npm package"})," for intellisense and similar usage as Lua."]}),"\n",(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:"# With pnpm"})}),"\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:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\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:"# With Yarn"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]}),"\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:"# With npm"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@overextended/oxmysql"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"Import the oxmysql object into your resource."}),"\n",(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsx)(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:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { oxmysql "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL } "}),(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/oxmysql'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,r.jsx)(s.h2,{id:"upserting",children:"Upserting"}),"\n",(0,r.jsx)(s.p,{children:"When uncertain if a row should be inserted into the database, or an existing row should be updated, queries should check for duplicate keys."}),"\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:"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:"'INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:", { owner, dbId, inventory })"})]})})}),"\n",(0,r.jsxs)(s.p,{children:["This is preferred over checking the existence of a row, then inserting or updating depending on the result.",(0,r.jsx)(s.br,{}),"\n","Furthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted."]})]})}s.default=(0,t.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/oxmysql.mdx",route:"/oxmysql",frontMatter:{title:"OxMySQL"},timestamp:1729524649e3,title:"OxMySQL",headings:l},pageNextRoute:"/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 r=n(2676);n(5271);var t=n(5850),i=(0,t.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"}]]),a=(0,t.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,t.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,t.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,t.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:t,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"===s&&(0,r.jsx)("div",{children:t}),n,"right"===s&&(0,r.jsx)("div",{children:t})]})})})};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)(a,{}),side:e.side,link:e.link,children:e.label||"Documentation"})}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)(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||"Package"})}},8713:function(e,s,n){"use strict";var r=n(2676);n(5271);var t=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)(t.eX,{link:s}),(0,r.jsx)(t.Vg,{link:"".concat(s,"/releases")}),n&&(0,r.jsx)(t.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,t,i,a){if(a!==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=9262)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/insert-d56f7d5a70b20321.js b/_next/static/chunks/pages/oxmysql/Functions/insert-d7416eb5acb2ce44.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/insert-d56f7d5a70b20321.js rename to _next/static/chunks/pages/oxmysql/Functions/insert-d7416eb5acb2ce44.js index 56d1a27a70..e2b2523dba 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/insert-d56f7d5a70b20321.js +++ b/_next/static/chunks/pages/oxmysql/Functions/insert-d7416eb5acb2ce44.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8119],{5060:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/insert",function(){return n(7648)}])},7648: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:"Insert"}),"\n",(0,l.jsx)(e.p,{children:"Inserts a new entry into the database and returns the insert id for the row, if valid."}),"\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/oxmysql/Functions/insert.mdx",route:"/oxmysql/Functions/insert",frontMatter:{title:"insert"},timestamp:1729516534e3,title:"insert",headings:o},pageNextRoute:"/oxmysql/Functions/insert"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5060)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8119],{5060:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/insert",function(){return n(7648)}])},7648: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:"Insert"}),"\n",(0,l.jsx)(e.p,{children:"Inserts a new entry into the database and returns the insert id for the row, if valid."}),"\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/oxmysql/Functions/insert.mdx",route:"/oxmysql/Functions/insert",frontMatter:{title:"insert"},timestamp:1729524649e3,title:"insert",headings:o},pageNextRoute:"/oxmysql/Functions/insert"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5060)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/prepare-ca09475ae583968b.js b/_next/static/chunks/pages/oxmysql/Functions/prepare-0c67598fd38072cb.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/prepare-ca09475ae583968b.js rename to _next/static/chunks/pages/oxmysql/Functions/prepare-0c67598fd38072cb.js index 66c49ca650..3bedd2e04c 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/prepare-ca09475ae583968b.js +++ b/_next/static/chunks/pages/oxmysql/Functions/prepare-0c67598fd38072cb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2788],{5846:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/prepare",function(){return n(6483)}])},6483:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var r=n(2676),l=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",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong"},(0,i.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Prepare"}),"\n",(0,r.jsx)(e.p,{children:"Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query."}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Date will not return the datestring commonly used in FiveM"}),"\n",(0,r.jsx)(e.li,{children:"TINYINT 1 and BIT will not return a boolean"}),"\n",(0,r.jsx)(e.li,{children:"You can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error"}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:["Unlike ",(0,r.jsx)(e.a,{href:"./rawExecute",children:"rawExecute"}),", the SELECT statement will return a column, row, or array of rows depending on the number of columns and rows selected."]}),"\n",(0,r.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],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-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.prepare."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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.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-function)"},children:"print"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(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:", sort_keys "}),(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:" }))"})]})]})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"await"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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-constant)"},children:"console"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"exports.oxmysql.prepare_async"})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],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:"MySQL."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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:"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:"response"}),(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:"print"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(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:", sort_keys "}),(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-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(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-constant)"},children:"console"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\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.p,{children:(0,r.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"exports.oxmysql.prepare"})}),"\n"]})]})}e.default=(0,l.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/oxmysql/Functions/prepare.mdx",route:"/oxmysql/Functions/prepare",frontMatter:{title:"prepare"},timestamp:1729516534e3,title:"prepare",headings:t},pageNextRoute:"/oxmysql/Functions/prepare"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5846)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2788],{5846:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/prepare",function(){return n(6483)}])},6483:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return t}});var r=n(2676),l=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",ul:"ul",li:"li",a:"a",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong"},(0,i.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Prepare"}),"\n",(0,r.jsx)(e.p,{children:"Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query."}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Date will not return the datestring commonly used in FiveM"}),"\n",(0,r.jsx)(e.li,{children:"TINYINT 1 and BIT will not return a boolean"}),"\n",(0,r.jsx)(e.li,{children:"You can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error"}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:["Unlike ",(0,r.jsx)(e.a,{href:"./rawExecute",children:"rawExecute"}),", the SELECT statement will return a column, row, or array of rows depending on the number of columns and rows selected."]}),"\n",(0,r.jsx)(e.h2,{id:"promise",children:"Promise"}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],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-token-keyword)"},children:"local"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.prepare."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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.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-function)"},children:"print"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(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:", sort_keys "}),(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:" }))"})]})]})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"await"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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-constant)"},children:"console"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"exports.oxmysql.prepare_async"})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"callback",children:"Callback"}),"\n",(0,r.jsxs)(o.mQ,{items:["Lua","JS"],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:"MySQL."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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:"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:"response"}),(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:"print"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(json."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"encode"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response, { indent "}),(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:", sort_keys "}),(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-token-keyword)"},children:"end"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]})]})})}),(0,r.jsx)(o.OK,{children:(0,r.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".prepare"}),(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:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) "}),(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-constant)"},children:"console"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]}),"\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.p,{children:(0,r.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.code,{children:"exports.oxmysql.prepare"})}),"\n"]})]})}e.default=(0,l.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/oxmysql/Functions/prepare.mdx",route:"/oxmysql/Functions/prepare",frontMatter:{title:"prepare"},timestamp:1729524649e3,title:"prepare",headings:t},pageNextRoute:"/oxmysql/Functions/prepare"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=5846)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/query-db4bb5ed65fa34d2.js b/_next/static/chunks/pages/oxmysql/Functions/query-dd6be384c9a87851.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/query-db4bb5ed65fa34d2.js rename to _next/static/chunks/pages/oxmysql/Functions/query-dd6be384c9a87851.js index 902eef33c2..6cbb3e838d 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/query-db4bb5ed65fa34d2.js +++ b/_next/static/chunks/pages/oxmysql/Functions/query-dd6be384c9a87851.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3958],{3111:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/query",function(){return l(7771)}])},7771:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),r=l(2140),o=l(8745),i=l(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",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Query"}),"\n",(0,n.jsx)(e.p,{children:"When selecting data, returns all matching rows and columns; otherwise, returns data like insertId, affectedRows, etc."}),"\n",(0,n.jsx)(e.h2,{id:"promise",children:"Promise"}),"\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.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:" response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.query."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(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-keyword)"},children:"for"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"#"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"(row.firstname, row.lastname)"})]}),"\n",(0,n.jsxs)(e.span,{className:"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-token-keyword)"},children:"end"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"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:"MySQL"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(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-constant)"},children:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".identifier"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\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.p,{children:(0,n.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"MySQL.Sync.fetchAll"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.oxmysql.query_async"})}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"callback",children:"Callback"}),"\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.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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:" response "}),(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-keyword)"},children:"for"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"#"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"(row.firstname, row.lastname)"})]}),"\n",(0,n.jsxs)(e.span,{className:"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-token-keyword)"},children:"end"}),(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":"js","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\n",(0,n.jsxs)(e.span,{className:"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:" (response) "}),(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:" (response) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(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-constant)"},children:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\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.p,{children:(0,n.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"MySQL.Async.fetchAll"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.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,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/oxmysql/Functions/query.mdx",route:"/oxmysql/Functions/query",frontMatter:{title:"query"},timestamp:1729516534e3,title:"query",headings:c},pageNextRoute:"/oxmysql/Functions/query"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3111)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3958],{3111:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/query",function(){return l(7771)}])},7771:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var n=l(2676),r=l(2140),o=l(8745),i=l(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",h2:"h2",pre:"pre",code:"code",span:"span",strong:"strong",ul:"ul",li:"li"},(0,o.a)(),s.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"Query"}),"\n",(0,n.jsx)(e.p,{children:"When selecting data, returns all matching rows and columns; otherwise, returns data like insertId, affectedRows, etc."}),"\n",(0,n.jsx)(e.h2,{id:"promise",children:"Promise"}),"\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.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:" response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" MySQL.query."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"await"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\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:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response "}),(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-keyword)"},children:"for"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"#"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"(row.firstname, row.lastname)"})]}),"\n",(0,n.jsxs)(e.span,{className:"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-token-keyword)"},children:"end"})})]})})}),(0,n.jsx)(i.OK,{children:(0,n.jsx)(e.pre,{"data-language":"js","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(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:"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:"MySQL"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\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:"if"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (response) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(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-constant)"},children:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".identifier"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\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.p,{children:(0,n.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"MySQL.Sync.fetchAll"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.oxmysql.query_async"})}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:"callback",children:"Callback"}),"\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.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"MySQL."}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(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:" identifier"})}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-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:" response "}),(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-keyword)"},children:"for"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" i "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-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:"#"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"response "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"do"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"local"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" row "}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" response[i]"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"(row.firstname, row.lastname)"})]}),"\n",(0,n.jsxs)(e.span,{className:"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-token-keyword)"},children:"end"}),(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":"js","data-theme":"default",children:(0,n.jsxs)(e.code,{"data-language":"js","data-theme":"default",children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"MySQL"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".query"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ?'"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},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:" identifier"})}),"\n",(0,n.jsxs)(e.span,{className:"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:" (response) "}),(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:" (response) {"})]}),"\n",(0,n.jsxs)(e.span,{className:"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:"response"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"((row) "}),(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-constant)"},children:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".firstname"}),(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:"row"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".lastname)"})]}),"\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.p,{children:(0,n.jsx)(e.strong,{children:"Aliases"})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"MySQL.Async.fetchAll"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.jsx)(e.code,{children:"exports.ghmattimysql.execute"})}),"\n",(0,n.jsx)(e.li,{children:(0,n.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,n.jsx)(e,{...s,children:(0,n.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/oxmysql/Functions/query.mdx",route:"/oxmysql/Functions/query",frontMatter:{title:"query"},timestamp:1729524649e3,title:"query",headings:c},pageNextRoute:"/oxmysql/Functions/query"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=3111)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/rawExecute-0ec1f1a7b98a565d.js b/_next/static/chunks/pages/oxmysql/Functions/rawExecute-5d2c65791cb88ca7.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/rawExecute-0ec1f1a7b98a565d.js rename to _next/static/chunks/pages/oxmysql/Functions/rawExecute-5d2c65791cb88ca7.js index f8998b30dd..738ba66a9a 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/rawExecute-0ec1f1a7b98a565d.js +++ b/_next/static/chunks/pages/oxmysql/Functions/rawExecute-5d2c65791cb88ca7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7545],{4421:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/rawExecute",function(){return n(3940)}])},3940:function(e,s,n){"use strict";n.r(s),n.d(s,{__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(e){let s=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"RawExecute"}),"\n",(0,l.jsx)(s.p,{children:"rawExecute can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Date will not return the datestring commonly used in FiveM"}),"\n",(0,l.jsx)(s.li,{children:"TINYINT 1 and BIT will not return a boolean"}),"\n",(0,l.jsx)(s.li,{children:"You can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Unlike ",(0,l.jsx)(s.a,{href:"./prepare",children:"prepare"}),", the SELECT statement will always return an array of rows.\nWhen using SELECT, the return value will match ",(0,l.jsx)(s.code,{children:"query"}),", ",(0,l.jsx)(s.code,{children:"single"}),", or ",(0,l.jsx)(s.code,{children:"scalar"})," depending on the number of columns and rows selected."]}),"\n",(0,l.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.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:" 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:" MySQL.rawExecute."}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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:" 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.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-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:", sort_keys "}),(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:" }))"})]})]})})}),(0,l.jsx)(o.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:"response"}),(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:".rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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.jsx)(s.span,{className:"line",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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\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:"exports.oxmysql.rawExecute_async"})}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.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:"rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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:" 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:"response"}),(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:"(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-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:", sort_keys "}),(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.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)(o.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:".rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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.jsx)(s.span,{className:"line",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:" (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:" {"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(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-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:"exports.oxmysql.rawExecute"})}),"\n"]})]})}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/oxmysql/Functions/rawExecute.mdx",route:"/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"},timestamp:1729516534e3,title:"rawExecute",headings:t},pageNextRoute:"/oxmysql/Functions/rawExecute"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4421)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7545],{4421:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/rawExecute",function(){return n(3940)}])},3940:function(e,s,n){"use strict";n.r(s),n.d(s,{__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(e){let s=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",a:"a",code:"code",h2:"h2",pre:"pre",span:"span",strong:"strong"},(0,i.a)(),e.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h1,{children:"RawExecute"}),"\n",(0,l.jsx)(s.p,{children:"rawExecute can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query."}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"Date will not return the datestring commonly used in FiveM"}),"\n",(0,l.jsx)(s.li,{children:"TINYINT 1 and BIT will not return a boolean"}),"\n",(0,l.jsx)(s.li,{children:"You can only use ? value placeholders, ?? column placeholders and named placeholders will throw an error"}),"\n"]}),"\n",(0,l.jsxs)(s.p,{children:["Unlike ",(0,l.jsx)(s.a,{href:"./prepare",children:"prepare"}),", the SELECT statement will always return an array of rows.\nWhen using SELECT, the return value will match ",(0,l.jsx)(s.code,{children:"query"}),", ",(0,l.jsx)(s.code,{children:"single"}),", or ",(0,l.jsx)(s.code,{children:"scalar"})," depending on the number of columns and rows selected."]}),"\n",(0,l.jsx)(s.h2,{id:"promise",children:"Promise"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.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:" 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:" MySQL.rawExecute."}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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:" 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.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-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:", sort_keys "}),(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:" }))"})]})]})})}),(0,l.jsx)(o.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:"response"}),(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:".rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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.jsx)(s.span,{className:"line",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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(response))"})]})]})})})]}),"\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:"exports.oxmysql.rawExecute_async"})}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"callback",children:"Callback"}),"\n",(0,l.jsxs)(o.mQ,{items:["Lua","JS"],children:[(0,l.jsx)(o.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:"rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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:" 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:"response"}),(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:"(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-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:", sort_keys "}),(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.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)(o.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:".rawExecute"}),(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:"'SELECT `firstname`, `lastname` FROM `users` 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.jsx)(s.span,{className:"line",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:" (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:" {"})]}),"\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:"("}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,l.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(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-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:"exports.oxmysql.rawExecute"})}),"\n"]})]})}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/oxmysql/Functions/rawExecute.mdx",route:"/oxmysql/Functions/rawExecute",frontMatter:{title:"rawExecute"},timestamp:1729524649e3,title:"rawExecute",headings:t},pageNextRoute:"/oxmysql/Functions/rawExecute"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4421)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/scalar-fbe9aee005fcfe3e.js b/_next/static/chunks/pages/oxmysql/Functions/scalar-0a86b75e937efa0c.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/scalar-fbe9aee005fcfe3e.js rename to _next/static/chunks/pages/oxmysql/Functions/scalar-0a86b75e937efa0c.js index f9f1b4863f..0808fddde8 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/scalar-fbe9aee005fcfe3e.js +++ b/_next/static/chunks/pages/oxmysql/Functions/scalar-0a86b75e937efa0c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7997],{8650:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/scalar",function(){return n(5259)}])},5259:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),r=n(2140),i=n(8745),a=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",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:"Returns the first column for a single row."}),"\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/oxmysql/Functions/scalar.mdx",route:"/oxmysql/Functions/scalar",frontMatter:{title:"scalar"},timestamp:1729516534e3,title:"scalar",headings:c},pageNextRoute:"/oxmysql/Functions/scalar"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8650)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7997],{8650:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/scalar",function(){return n(5259)}])},5259:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var l=n(2676),r=n(2140),i=n(8745),a=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",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:"Returns the first column for a single row."}),"\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/oxmysql/Functions/scalar.mdx",route:"/oxmysql/Functions/scalar",frontMatter:{title:"scalar"},timestamp:1729524649e3,title:"scalar",headings:c},pageNextRoute:"/oxmysql/Functions/scalar"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=8650)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/single-d7ddd3f8f69c3f92.js b/_next/static/chunks/pages/oxmysql/Functions/single-74f3cf11212b27a0.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/single-d7ddd3f8f69c3f92.js rename to _next/static/chunks/pages/oxmysql/Functions/single-74f3cf11212b27a0.js index 458db46790..e5a3066ecd 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/single-d7ddd3f8f69c3f92.js +++ b/_next/static/chunks/pages/oxmysql/Functions/single-74f3cf11212b27a0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4553],{1678:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/single",function(){return n(3212)}])},3212: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:"Returns all selected columns for a single row."}),"\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/oxmysql/Functions/single.mdx",route:"/oxmysql/Functions/single",frontMatter:{title:"single"},timestamp:1729516534e3,title:"single",headings:t},pageNextRoute:"/oxmysql/Functions/single"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1678)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4553],{1678:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/single",function(){return n(3212)}])},3212: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:"Returns all selected columns for a single row."}),"\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/oxmysql/Functions/single.mdx",route:"/oxmysql/Functions/single",frontMatter:{title:"single"},timestamp:1729524649e3,title:"single",headings:t},pageNextRoute:"/oxmysql/Functions/single"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1678)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/transaction-46722bf1ac361453.js b/_next/static/chunks/pages/oxmysql/Functions/transaction-26fee29a6b762090.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/Functions/transaction-46722bf1ac361453.js rename to _next/static/chunks/pages/oxmysql/Functions/transaction-26fee29a6b762090.js index 57d8bfbcc7..379c018a19 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/transaction-46722bf1ac361453.js +++ b/_next/static/chunks/pages/oxmysql/Functions/transaction-26fee29a6b762090.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2288],{1925:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/transaction",function(){return n(2578)}])},2578:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return a}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let a=[{depth:2,value:"Specific format",id:"specific-format"},{depth:2,value:"Shared format",id:"shared-format"},{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"},{depth:2,value:"Transaction Isolation Level",id:"transaction-isolation-level"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",br:"br",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,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Transaction"}),"\n",(0,l.jsxs)(e.p,{children:["A transaction executes multiple queries and commits them only if all succeed.",(0,l.jsx)(e.br,{}),"\n","If one fails, none of the queries are committed."]}),"\n",(0,l.jsx)(e.p,{children:"The return value is a boolean, which is the result of the transaction."}),"\n",(0,l.jsx)(e.h2,{id:"specific-format",children:"Specific format"}),"\n",(0,l.jsxs)(e.p,{children:["When using this format, you must pass an array containing sets of queries and parameters to the transaction method.",(0,l.jsx)(e.br,{}),"\n","In this case, your queries do not necessarily match and the values are unique to each query."]}),"\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:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})}),"\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:"-- You can also pass an array of 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:"shared-format",children:"Shared format"}),"\n",(0,l.jsxs)(e.p,{children:["When using this format, you must pass an array containing queries and a set containing shared parameters to the transaction method.",(0,l.jsx)(e.br,{}),"\n","In this case, your queries do not necessarily match and the values are unique to each query."]}),"\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:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})}),"\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)(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:" 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:"--[[leave nil for specific format]]"}),(0,l.jsx)(e.span,{style:{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)(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:"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:"/*leave nil for specific format*/"}),(0,l.jsx)(e.span,{style:{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)(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.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- specific"})}),"\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:"-- shared"})}),"\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)(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.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// specific"})}),"\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:"// shared"})}),"\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:"transaction-isolation-level",children:"Transaction Isolation Level"}),"\n",(0,l.jsxs)(e.p,{children:["This can be set through the convar ",(0,l.jsx)(e.code,{children:"mysql_transaction_isolation_level"}),", and is an integer ranging from ",(0,l.jsx)(e.code,{children:"1-4"}),".",(0,l.jsx)(e.br,{}),"\n","The default value is 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:"Convar Value"}),(0,l.jsx)(e.th,{children:"Result"})]})}),(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,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/oxmysql/Functions/transaction.mdx",route:"/oxmysql/Functions/transaction",frontMatter:{title:"transaction"},timestamp:1729516534e3,title:"transaction",headings:a},pageNextRoute:"/oxmysql/Functions/transaction"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1925)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2288],{1925:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/transaction",function(){return n(2578)}])},2578:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return a}});var l=n(2676),r=n(2140),i=n(8745),o=n(7100);let a=[{depth:2,value:"Specific format",id:"specific-format"},{depth:2,value:"Shared format",id:"shared-format"},{depth:2,value:"Promise",id:"promise"},{depth:2,value:"Callback",id:"callback"},{depth:2,value:"Transaction Isolation Level",id:"transaction-isolation-level"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",br:"br",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,i.a)(),s.components);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h1,{children:"Transaction"}),"\n",(0,l.jsxs)(e.p,{children:["A transaction executes multiple queries and commits them only if all succeed.",(0,l.jsx)(e.br,{}),"\n","If one fails, none of the queries are committed."]}),"\n",(0,l.jsx)(e.p,{children:"The return value is a boolean, which is the result of the transaction."}),"\n",(0,l.jsx)(e.h2,{id:"specific-format",children:"Specific format"}),"\n",(0,l.jsxs)(e.p,{children:["When using this format, you must pass an array containing sets of queries and parameters to the transaction method.",(0,l.jsx)(e.br,{}),"\n","In this case, your queries do not necessarily match and the values are unique to each query."]}),"\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:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})}),"\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:"-- You can also pass an array of 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:"shared-format",children:"Shared format"}),"\n",(0,l.jsxs)(e.p,{children:["When using this format, you must pass an array containing queries and a set containing shared parameters to the transaction method.",(0,l.jsx)(e.br,{}),"\n","In this case, your queries do not necessarily match and the values are unique to each query."]}),"\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:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})}),"\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)(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:" 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:"--[[leave nil for specific format]]"}),(0,l.jsx)(e.span,{style:{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)(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:"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:"/*leave nil for specific format*/"}),(0,l.jsx)(e.span,{style:{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)(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.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- specific"})}),"\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:"-- shared"})}),"\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)(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.jsx)(e.span,{className:"line",children:(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"// specific"})}),"\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:"// shared"})}),"\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:"transaction-isolation-level",children:"Transaction Isolation Level"}),"\n",(0,l.jsxs)(e.p,{children:["This can be set through the convar ",(0,l.jsx)(e.code,{children:"mysql_transaction_isolation_level"}),", and is an integer ranging from ",(0,l.jsx)(e.code,{children:"1-4"}),".",(0,l.jsx)(e.br,{}),"\n","The default value is 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:"Convar Value"}),(0,l.jsx)(e.th,{children:"Result"})]})}),(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,i.a)(),s.components);return e?(0,l.jsx)(e,{...s,children:(0,l.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/oxmysql/Functions/transaction.mdx",route:"/oxmysql/Functions/transaction",frontMatter:{title:"transaction"},timestamp:1729524649e3,title:"transaction",headings:a},pageNextRoute:"/oxmysql/Functions/transaction"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=1925)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/Functions/update-a1a423a5f2a6e62a.js b/_next/static/chunks/pages/oxmysql/Functions/update-951df841729e0a60.js similarity index 98% rename from _next/static/chunks/pages/oxmysql/Functions/update-a1a423a5f2a6e62a.js rename to _next/static/chunks/pages/oxmysql/Functions/update-951df841729e0a60.js index 4baec051c7..5f6d2b98d4 100644 --- a/_next/static/chunks/pages/oxmysql/Functions/update-a1a423a5f2a6e62a.js +++ b/_next/static/chunks/pages/oxmysql/Functions/update-951df841729e0a60.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6161],{6676:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/update",function(){return n(5093)}])},5093: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:"Returns the number of rows affected by the query."}),"\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/oxmysql/Functions/update.mdx",route:"/oxmysql/Functions/update",frontMatter:{title:"update"},timestamp:1729516534e3,title:"update",headings:o},pageNextRoute:"/oxmysql/Functions/update"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6676)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6161],{6676:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/Functions/update",function(){return n(5093)}])},5093: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:"Returns the number of rows affected by the query."}),"\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/oxmysql/Functions/update.mdx",route:"/oxmysql/Functions/update",frontMatter:{title:"update"},timestamp:1729524649e3,title:"update",headings:o},pageNextRoute:"/oxmysql/Functions/update"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=6676)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/benchmark-541a8ef482b3180c.js b/_next/static/chunks/pages/oxmysql/benchmark-3f6fa6a22e39baa7.js similarity index 99% rename from _next/static/chunks/pages/oxmysql/benchmark-541a8ef482b3180c.js rename to _next/static/chunks/pages/oxmysql/benchmark-3f6fa6a22e39baa7.js index 9899409a10..57d11d7dfa 100644 --- a/_next/static/chunks/pages/oxmysql/benchmark-541a8ef482b3180c.js +++ b/_next/static/chunks/pages/oxmysql/benchmark-3f6fa6a22e39baa7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1643],{6853:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/benchmark",function(){return r(8047)}])},8047: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:"Results",id:"results"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",pre:"pre",code:"code",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:["Benchmarking is based on the time spent when to receive a response from exports.",(0,l.jsx)(e.br,{}),"\n","Real query speeds will be reported in the debug UI and in the server console with mysql_debug enabled."]}),"\n",(0,l.jsx)(e.p,{children:"Speeds will vary greatly based on system hardware, database settings, database version, and the current workload."}),"\n",(0,l.jsx)(e.h2,{id:"script",children:"Script"}),"\n",(0,l.jsx)(e.p,{children:"This script tests export times when using the Lua 5.4 runtime with lib/MySQL.lua syntax."}),"\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:"'Executed ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-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:"' queries in ' "}),(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:"'initialise 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-comment)"},children:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})]}),"\n",(0,l.jsxs)(e.span,{className:"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 }[] transaction'"}),(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-comment)"},children:"-- You can pass an array of arrays."})]}),"\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[]][] transaction'"}),(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-comment)"},children:"-- You can pass an array of queries."})]}),"\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[] transaction'"}),(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:"'insert ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-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:"'select every 4th 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:"'insert'"}),(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:"'update'"}),(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:"'scalar'"}),(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:"'single'"}),(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:"'prepare'"}),(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:"'query'"}),(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.h2,{id:"results",children:"Results"}),"\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/oxmysql/benchmark.mdx",route:"/oxmysql/benchmark",timestamp:1729516534e3,title:"Benchmark",headings:o},pageNextRoute:"/oxmysql/benchmark"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6853)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1643],{6853:function(s,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/benchmark",function(){return r(8047)}])},8047: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:"Results",id:"results"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",br:"br",h2:"h2",pre:"pre",code:"code",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:["Benchmarking is based on the time spent when to receive a response from exports.",(0,l.jsx)(e.br,{}),"\n","Real query speeds will be reported in the debug UI and in the server console with mysql_debug enabled."]}),"\n",(0,l.jsx)(e.p,{children:"Speeds will vary greatly based on system hardware, database settings, database version, and the current workload."}),"\n",(0,l.jsx)(e.h2,{id:"script",children:"Script"}),"\n",(0,l.jsx)(e.p,{children:"This script tests export times when using the Lua 5.4 runtime with lib/MySQL.lua syntax."}),"\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:"'Executed ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-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:"' queries in ' "}),(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:"'initialise 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-comment)"},children:'-- You might rename "values" as "parameters" for mysql-async compatibility.'})]}),"\n",(0,l.jsxs)(e.span,{className:"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 }[] transaction'"}),(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-comment)"},children:"-- You can pass an array of arrays."})]}),"\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[]][] transaction'"}),(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-comment)"},children:"-- You can pass an array of queries."})]}),"\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[] transaction'"}),(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:"'insert ' "}),(0,l.jsx)(e.span,{style:{color:"var(--shiki-token-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:"'select every 4th 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:"'insert'"}),(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:"'update'"}),(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:"'scalar'"}),(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:"'single'"}),(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:"'prepare'"}),(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:"'query'"}),(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.h2,{id:"results",children:"Results"}),"\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/oxmysql/benchmark.mdx",route:"/oxmysql/benchmark",timestamp:1729524649e3,title:"Benchmark",headings:o},pageNextRoute:"/oxmysql/benchmark"})}},function(s){s.O(0,[2601,9774,2888,179],function(){return s(s.s=6853)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/placeholders-345946587ec29d85.js b/_next/static/chunks/pages/oxmysql/placeholders-e4edfd6dba9e3655.js similarity index 98% rename from _next/static/chunks/pages/oxmysql/placeholders-345946587ec29d85.js rename to _next/static/chunks/pages/oxmysql/placeholders-e4edfd6dba9e3655.js index 148aafb5ed..01de630b6c 100644 --- a/_next/static/chunks/pages/oxmysql/placeholders-345946587ec29d85.js +++ b/_next/static/chunks/pages/oxmysql/placeholders-e4edfd6dba9e3655.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9324],{4610:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/placeholders",function(){return r(1028)}])},1028:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return i}});var n=r(2676),l=r(2140),o=r(8745);let i=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",a:"a",pre:"pre",code:"code",span:"span"},(0,o.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 allow for query parameters to be safely executed, preventing ",(0,n.jsx)(s.a,{href:"https://bobby-tables.com/",children:"common SQL injection methods"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Parameters can be passed an an array or object (referred to as named parameters)."}),"\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:"-- Named placeholders (deprecated)"})}),"\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:["These are distinct from prepared statements which are handled by the MySQL server; you can use ",(0,n.jsx)(s.code,{children:"MySQL.prepare"})," for more optimised and secure queries."]})]})}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,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/oxmysql/placeholders.mdx",route:"/oxmysql/placeholders",timestamp:1729516534e3,title:"Placeholders",headings:i},pageNextRoute:"/oxmysql/placeholders"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4610)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9324],{4610:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/placeholders",function(){return r(1028)}])},1028:function(e,s,r){"use strict";r.r(s),r.d(s,{__toc:function(){return i}});var n=r(2676),l=r(2140),o=r(8745);let i=[];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",a:"a",pre:"pre",code:"code",span:"span"},(0,o.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 allow for query parameters to be safely executed, preventing ",(0,n.jsx)(s.a,{href:"https://bobby-tables.com/",children:"common SQL injection methods"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Parameters can be passed an an array or object (referred to as named parameters)."}),"\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:"-- Named placeholders (deprecated)"})}),"\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:["These are distinct from prepared statements which are handled by the MySQL server; you can use ",(0,n.jsx)(s.code,{children:"MySQL.prepare"})," for more optimised and secure queries."]})]})}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,n.jsx)(s,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/oxmysql/placeholders.mdx",route:"/oxmysql/placeholders",timestamp:1729524649e3,title:"Placeholders",headings:i},pageNextRoute:"/oxmysql/placeholders"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=4610)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/oxmysql/ui-f694988fae518f38.js b/_next/static/chunks/pages/oxmysql/ui-fc82894a1d782e0a.js similarity index 98% rename from _next/static/chunks/pages/oxmysql/ui-f694988fae518f38.js rename to _next/static/chunks/pages/oxmysql/ui-fc82894a1d782e0a.js index 2f36886607..879d5308fb 100644 --- a/_next/static/chunks/pages/oxmysql/ui-f694988fae518f38.js +++ b/_next/static/chunks/pages/oxmysql/ui-fc82894a1d782e0a.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[458],{9857:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/ui",function(){return n(8503)}])},8503:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var t=n(2676),r=n(2140),i=n(8745),o=n(7100);let a=[{depth:2,value:"Main page",id:"main-page"},{depth:2,value:"Resource page",id:"resource-page"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",pre:"pre",span:"span",em:"em",h2:"h2",img:"img",br:"br"},(0,i.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h1,{children:"Using the Debug UI"}),"\n","\n",(0,t.jsx)(s.p,{children:"The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics.\nYou should only enable this during development, or with a small player count - for larger servers, look into builtin MySQL logging."}),"\n",(0,t.jsxs)(s.p,{children:["Before using the UI first you have to make sure you have the ",(0,t.jsx)(s.code,{children:"mysql_ui"})," convar set to true:"]}),"\n",(0,t.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,t.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_ui"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["Also make sure that you have ",(0,t.jsx)(s.code,{children:"command"})," or ",(0,t.jsx)(s.code,{children:"command.mysql"})," ace permission access, then you should be able to use the ",(0,t.jsx)(s.code,{children:"mysql"})," command in game."]}),"\n",(0,t.jsx)(o.UW,{type:"info",children:(0,t.jsxs)(s.p,{children:["You ",(0,t.jsx)(s.em,{children:"do not"})," need to have the ",(0,t.jsx)(s.code,{children:"mysql_debug"})," enabled to use the debug ui."]})}),"\n",(0,t.jsx)(s.h2,{id:"main-page",children:"Main page"}),"\n",(0,t.jsx)(s.p,{children:"The main page shows you the resources that ran queries where you can filter them through a search bar, your general data\nalong side a pie chart which shows what resources took the most query time."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{src:"https://i.imgur.com/iQqWELJ.png",alt:"oxmysql_ui_main"})}),"\n",(0,t.jsx)(s.h2,{id:"resource-page",children:"Resource page"}),"\n",(0,t.jsx)(s.p,{children:"The resource page shows you all the queries and their execution time inside a table that the resource previously ran,\nalongside the total amount of the queries, execution time and slow queries for the selected resource."}),"\n",(0,t.jsx)(s.p,{children:"Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip."}),"\n",(0,t.jsx)(o.UW,{type:"info",children:(0,t.jsxs)(s.p,{children:["Queries that exceed ",(0,t.jsx)(s.code,{children:"mysql_slow_query_warning"})," (default 150ms) are displayed in orange.",(0,t.jsx)(s.br,{}),"\n","For demonstation purposes the ",(0,t.jsx)(s.code,{children:"mysql_slow_query_warning"})," convar was set to 5 here."]})}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{src:"https://i.imgur.com/gZpJoIg.png",alt:"oxmysql_ui_queries"})})]})}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,t.jsx)(s,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/oxmysql/ui.mdx",route:"/oxmysql/ui",frontMatter:{title:"Using the Debug UI"},timestamp:1729516534e3,title:"Using the Debug UI",headings:a},pageNextRoute:"/oxmysql/ui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9857)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[458],{9857:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oxmysql/ui",function(){return n(8503)}])},8503:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var t=n(2676),r=n(2140),i=n(8745),o=n(7100);let a=[{depth:2,value:"Main page",id:"main-page"},{depth:2,value:"Resource page",id:"resource-page"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",code:"code",pre:"pre",span:"span",em:"em",h2:"h2",img:"img",br:"br"},(0,i.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h1,{children:"Using the Debug UI"}),"\n","\n",(0,t.jsx)(s.p,{children:"The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics.\nYou should only enable this during development, or with a small player count - for larger servers, look into builtin MySQL logging."}),"\n",(0,t.jsxs)(s.p,{children:["Before using the UI first you have to make sure you have the ",(0,t.jsx)(s.code,{children:"mysql_ui"})," convar set to true:"]}),"\n",(0,t.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,t.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(s.span,{className:"line",children:[(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"set"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"mysql_ui"}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["Also make sure that you have ",(0,t.jsx)(s.code,{children:"command"})," or ",(0,t.jsx)(s.code,{children:"command.mysql"})," ace permission access, then you should be able to use the ",(0,t.jsx)(s.code,{children:"mysql"})," command in game."]}),"\n",(0,t.jsx)(o.UW,{type:"info",children:(0,t.jsxs)(s.p,{children:["You ",(0,t.jsx)(s.em,{children:"do not"})," need to have the ",(0,t.jsx)(s.code,{children:"mysql_debug"})," enabled to use the debug ui."]})}),"\n",(0,t.jsx)(s.h2,{id:"main-page",children:"Main page"}),"\n",(0,t.jsx)(s.p,{children:"The main page shows you the resources that ran queries where you can filter them through a search bar, your general data\nalong side a pie chart which shows what resources took the most query time."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{src:"https://i.imgur.com/iQqWELJ.png",alt:"oxmysql_ui_main"})}),"\n",(0,t.jsx)(s.h2,{id:"resource-page",children:"Resource page"}),"\n",(0,t.jsx)(s.p,{children:"The resource page shows you all the queries and their execution time inside a table that the resource previously ran,\nalongside the total amount of the queries, execution time and slow queries for the selected resource."}),"\n",(0,t.jsx)(s.p,{children:"Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip."}),"\n",(0,t.jsx)(o.UW,{type:"info",children:(0,t.jsxs)(s.p,{children:["Queries that exceed ",(0,t.jsx)(s.code,{children:"mysql_slow_query_warning"})," (default 150ms) are displayed in orange.",(0,t.jsx)(s.br,{}),"\n","For demonstation purposes the ",(0,t.jsx)(s.code,{children:"mysql_slow_query_warning"})," convar was set to 5 here."]})}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{src:"https://i.imgur.com/gZpJoIg.png",alt:"oxmysql_ui_queries"})})]})}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,t.jsx)(s,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/oxmysql/ui.mdx",route:"/oxmysql/ui",frontMatter:{title:"Using the Debug UI"},timestamp:1729524649e3,title:"Using the Debug UI",headings:a},pageNextRoute:"/oxmysql/ui"})}},function(e){e.O(0,[2601,9774,2888,179],function(){return e(e.s=9857)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/css/685730f9fa8dc1ed.css b/_next/static/css/685730f9fa8dc1ed.css deleted file mode 100644 index 44cff90a7e..0000000000 --- a/_next/static/css/685730f9fa8dc1ed.css +++ /dev/null @@ -1 +0,0 @@ -*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{color:inherit;border-top-width:1px;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.nx-sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.nx-pointer-events-none{pointer-events:none}.nx-invisible{visibility:hidden}.nx-fixed{position:fixed}.nx-absolute{position:absolute}.nx-relative{position:relative}.nx-sticky{position:sticky}.nx-inset-0{top:0;bottom:0}.nx-inset-0,.nx-inset-x-0{left:0;right:0}.nx-inset-y-0{top:0;bottom:0}.nx-bottom-0{bottom:0}.nx-right-0{right:0}.nx-top-0{top:0}.nx-top-16{top:4rem}.nx-top-8{top:2rem}.nx-top-full{top:100%}.nx-z-10{z-index:10}.nx-z-20{z-index:20}.nx-z-\[-1\]{z-index:-1}.nx-z-\[1\]{z-index:1}.nx-order-last{order:9999}.nx-m-0{margin:0}.nx-m-\[11px\]{margin:11px}.-nx-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.nx-mx-2{margin-left:.5rem;margin-right:.5rem}.nx-mx-2\.5{margin-left:.625rem;margin-right:.625rem}.nx-mx-4{margin-left:1rem;margin-right:1rem}.nx-mx-auto{margin-left:auto;margin-right:auto}.nx-my-1{margin-top:.25rem;margin-bottom:.25rem}.nx-my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.nx-my-2{margin-top:.5rem;margin-bottom:.5rem}.nx-my-4{margin-top:1rem;margin-bottom:1rem}.nx-my-8{margin-top:2rem;margin-bottom:2rem}.-nx-mb-0{margin-bottom:0}.-nx-mb-0\.5{margin-bottom:-.125rem}.-nx-ml-2{margin-left:-.5rem}.-nx-mr-2{margin-right:-.5rem}.nx-mb-12{margin-bottom:3rem}.nx-mb-2{margin-bottom:.5rem}.nx-mb-4{margin-bottom:1rem}.nx-mb-8{margin-bottom:2rem}.nx-ml-1{margin-left:.25rem}.nx-ml-2{margin-left:.5rem}.nx-ml-4{margin-left:1rem}.nx-mr-2{margin-right:.5rem}.nx-mt-1{margin-top:.25rem}.nx-mt-1\.5{margin-top:.375rem}.nx-mt-10{margin-top:2.5rem}.nx-mt-12{margin-top:3rem}.nx-mt-16{margin-top:4rem}.nx-mt-2{margin-top:.5rem}.nx-mt-4{margin-top:1rem}.nx-mt-5{margin-top:1.25rem}.nx-mt-6{margin-top:1.5rem}.nx-mt-8{margin-top:2rem}.nx-block{display:block}.nx-inline-block{display:inline-block}.nx-inline{display:inline}.nx-flex{display:flex}.nx-inline-flex{display:inline-flex}.nx-grid{display:grid}.nx-hidden{display:none}.nx-h-0{height:0}.nx-h-3{height:.75rem}.nx-h-3\.5{height:.875rem}.nx-h-4{height:1rem}.nx-h-5{height:1.25rem}.nx-h-7{height:1.75rem}.nx-h-8{height:2rem}.nx-h-\[18px\]{height:18px}.nx-h-\[var\(--nextra-banner-height\)\]{height:var(--nextra-banner-height)}.nx-h-\[var\(--nextra-navbar-height\)\]{height:var(--nextra-navbar-height)}.nx-h-full{height:100%}.nx-max-h-64{max-height:16rem}.nx-max-h-\[calc\(100vh-var\(--nextra-navbar-height\)-env\(safe-area-inset-bottom\)\)\]{max-height:calc(100vh - var(--nextra-navbar-height) - env(safe-area-inset-bottom))}.nx-max-h-\[min\(calc\(50vh-11rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(50vh - 11rem - env(safe-area-inset-bottom)),400px)}.nx-min-h-\[100px\]{min-height:100px}.nx-min-h-\[calc\(100vh-var\(--nextra-navbar-height\)\)\]{min-height:calc(100vh - var(--nextra-navbar-height))}.nx-w-3{width:.75rem}.nx-w-3\.5{width:.875rem}.nx-w-4{width:1rem}.nx-w-5{width:1.25rem}.nx-w-64{width:16rem}.nx-w-8{width:2rem}.nx-w-full{width:100%}.nx-w-max{width:-moz-max-content;width:max-content}.nx-w-screen{width:100vw}.nx-min-w-0{min-width:0}.nx-min-w-\[18px\]{min-width:18px}.nx-min-w-\[24px\]{min-width:24px}.nx-min-w-full{min-width:100%}.nx-max-w-6xl{max-width:72rem}.nx-max-w-\[50\%\]{max-width:50%}.nx-max-w-\[90rem\]{max-width:90rem}.nx-max-w-\[min\(calc\(100vw-2rem\)\,calc\(100\%\+20rem\)\)\]{max-width:min(100vw - 2rem,100% + 20rem)}.nx-shrink-0{flex-shrink:0}.nx-grow{flex-grow:1}.nx-origin-\[35\%\]{transform-origin:35%}.nx-origin-center{transform-origin:50%}.-nx-rotate-90{--tw-rotate:-90deg}.-nx-rotate-90,.nx-rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nx-rotate-180{--tw-rotate:180deg}.nx-rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nx-transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0)rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes nx-spin{to{transform:rotate(1turn)}}.nx-animate-spin{animation:nx-spin 1s linear infinite}.nx-cursor-default{cursor:default}.nx-cursor-pointer{cursor:pointer}.nx-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.nx-scroll-m-12{scroll-margin:3rem}.nx-scroll-my-6{scroll-margin-top:1.5rem;scroll-margin-bottom:1.5rem}.nx-scroll-py-6{scroll-padding-top:1.5rem;scroll-padding-bottom:1.5rem}.nx-list-decimal{list-style-type:decimal}.nx-list-disc{list-style-type:disc}.nx-list-none{list-style-type:none}.nx-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.nx-flex-col{flex-direction:column}.nx-flex-wrap{flex-wrap:wrap}.nx-items-start{align-items:flex-start}.nx-items-center{align-items:center}.nx-justify-start{justify-content:flex-start}.nx-justify-end{justify-content:flex-end}.nx-justify-center{justify-content:center}.nx-justify-between{justify-content:space-between}.nx-gap-1{gap:.25rem}.nx-gap-1\.5{gap:.375rem}.nx-gap-2{gap:.5rem}.nx-gap-4{gap:1rem}.nx-overflow-auto{overflow:auto}.nx-overflow-hidden{overflow:hidden}.nx-overflow-x-auto{overflow-x:auto}.nx-overflow-y-auto{overflow-y:auto}.nx-overflow-x-hidden{overflow-x:hidden}.nx-overflow-y-hidden{overflow-y:hidden}.nx-overflow-x-scroll{overflow-x:scroll}.nx-overscroll-contain{overscroll-behavior:contain}.nx-overscroll-x-contain{overscroll-behavior-x:contain}.nx-truncate{white-space:nowrap;overflow:hidden}.nx-text-ellipsis,.nx-truncate{text-overflow:ellipsis}.nx-whitespace-nowrap{white-space:nowrap}.nx-break-words{overflow-wrap:break-word}.nx-rounded{border-radius:.25rem}.nx-rounded-full{border-radius:9999px}.nx-rounded-lg{border-radius:.5rem}.nx-rounded-md{border-radius:.375rem}.nx-rounded-sm{border-radius:.125rem}.nx-rounded-xl{border-radius:.75rem}.nx-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nx-rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.nx-border{border-width:1px}.nx-border-b{border-bottom-width:1px}.nx-border-b-2{border-bottom-width:2px}.nx-border-l{border-left-width:1px}.nx-border-t{border-top-width:1px}.nx-border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.nx-border-black\/10{border-color:rgba(0,0,0,.1)}.nx-border-black\/5{border-color:rgba(0,0,0,.05)}.nx-border-blue-200{--tw-border-opacity:1;border-color:rgba(191,219,254,var(--tw-border-opacity))}.nx-border-current{border-color:currentColor}.nx-border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.nx-border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.nx-border-neutral-200\/70{border-color:hsla(0,0%,90%,.7)}.nx-border-orange-100{--tw-border-opacity:1;border-color:rgba(255,237,213,var(--tw-border-opacity))}.nx-border-primary-500{--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}.nx-border-red-200{--tw-border-opacity:1;border-color:rgba(254,202,202,var(--tw-border-opacity))}.nx-border-transparent{border-color:transparent}.nx-border-yellow-100{--tw-border-opacity:1;border-color:rgba(254,249,195,var(--tw-border-opacity))}.nx-border-opacity-\[0\.04\]{--tw-border-opacity:.04}.nx-bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.nx-bg-black\/80{background-color:rgba(0,0,0,.8)}.nx-bg-black\/\[\.05\]{background-color:rgba(0,0,0,.05)}.nx-bg-blue-100{--tw-bg-opacity:1;background-color:rgba(219,234,254,var(--tw-bg-opacity))}.nx-bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.nx-bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.nx-bg-neutral-900{--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}.nx-bg-orange-50{--tw-bg-opacity:1;background-color:rgba(255,247,237,var(--tw-bg-opacity))}.nx-bg-primary-100{--tw-bg-opacity:1;background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/var(--tw-bg-opacity))}.nx-bg-primary-50{--tw-bg-opacity:1;background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)97%/var(--tw-bg-opacity))}.nx-bg-primary-500\/10{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/.1)}.nx-bg-primary-700\/5{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%/.05)}.nx-bg-red-100{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.nx-bg-transparent{background-color:transparent}.nx-bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.nx-bg-yellow-50{--tw-bg-opacity:1;background-color:rgba(254,252,232,var(--tw-bg-opacity))}.nx-bg-opacity-\[0\.03\]{--tw-bg-opacity:.03}.nx-p-0{padding:0}.nx-p-0\.5{padding:.125rem}.nx-p-1{padding:.25rem}.nx-p-1\.5{padding:.375rem}.nx-p-2{padding:.5rem}.nx-p-4{padding:1rem}.nx-p-8{padding:2rem}.nx-px-1{padding-left:.25rem;padding-right:.25rem}.nx-px-1\.5{padding-left:.375rem;padding-right:.375rem}.nx-px-2{padding-left:.5rem;padding-right:.5rem}.nx-px-2\.5{padding-left:.625rem;padding-right:.625rem}.nx-px-3{padding-left:.75rem;padding-right:.75rem}.nx-px-4{padding-left:1rem;padding-right:1rem}.nx-px-6{padding-left:1.5rem;padding-right:1.5rem}.nx-px-\[\.25em\]{padding-left:.25em;padding-right:.25em}.nx-py-0{padding-top:0;padding-bottom:0}.nx-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.nx-py-1{padding-top:.25rem;padding-bottom:.25rem}.nx-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.nx-py-12{padding-top:3rem;padding-bottom:3rem}.nx-py-2{padding-top:.5rem;padding-bottom:.5rem}.nx-py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.nx-py-4{padding-top:1rem;padding-bottom:1rem}.nx-pb-1{padding-bottom:.25rem}.nx-pb-1\.5{padding-bottom:.375rem}.nx-pb-4{padding-bottom:1rem}.nx-pb-8{padding-bottom:2rem}.nx-pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.nx-pb-px{padding-bottom:1px}.nx-pl-6{padding-left:1.5rem}.nx-pl-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\]{padding-left:max(env(safe-area-inset-left),1.5rem)}.nx-pr-4{padding-right:1rem}.nx-pr-\[calc\(env\(safe-area-inset-right\)-1\.5rem\)\]{padding-right:calc(env(safe-area-inset-right) - 1.5rem)}.nx-pr-\[max\(env\(safe-area-inset-right\)\,1\.5rem\)\]{padding-right:max(env(safe-area-inset-right),1.5rem)}.nx-pt-1{padding-top:.25rem}.nx-pt-12{padding-top:3rem}.nx-pt-4{padding-top:1rem}.nx-pt-6{padding-top:1.5rem}.nx-pt-8{padding-top:2rem}.nx-text-left{text-align:left}.nx-text-center{text-align:center}.nx-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nx-text-2xl{font-size:1.5rem}.nx-text-3xl{font-size:1.875rem}.nx-text-4xl{font-size:2.25rem}.nx-text-\[\.9em\]{font-size:.9em}.nx-text-\[10px\]{font-size:10px}.nx-text-base{font-size:1rem}.nx-text-lg{font-size:1.125rem}.nx-text-sm{font-size:.875rem}.nx-text-xl{font-size:1.25rem}.nx-text-xs{font-size:.75rem}.nx-font-bold{font-weight:700}.nx-font-extrabold{font-weight:800}.nx-font-medium{font-weight:500}.nx-font-normal{font-weight:400}.nx-font-semibold{font-weight:600}.nx-uppercase{text-transform:uppercase}.nx-capitalize{text-transform:capitalize}.nx-italic{font-style:italic}.nx-leading-5{line-height:1.25rem}.nx-leading-7{line-height:1.75rem}.nx-leading-\[1\.35rem\]{line-height:1.35rem}.nx-leading-tight{line-height:1.25}.nx-tracking-tight{letter-spacing:-.015em}.nx-text-blue-900{--tw-text-opacity:1;color:rgba(30,58,138,var(--tw-text-opacity))}.nx-text-current{color:currentColor}.nx-text-gray-100{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.nx-text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.nx-text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.nx-text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.nx-text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.nx-text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.nx-text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.nx-text-orange-800{--tw-text-opacity:1;color:rgba(154,52,18,var(--tw-text-opacity))}.nx-text-primary-600{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}.nx-text-primary-800{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-text-opacity))}.nx-text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.nx-text-red-900{--tw-text-opacity:1;color:rgba(127,29,29,var(--tw-text-opacity))}.nx-text-slate-50{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.nx-text-slate-900{--tw-text-opacity:1;color:rgba(15,23,42,var(--tw-text-opacity))}.nx-text-yellow-900{--tw-text-opacity:1;color:rgba(113,63,18,var(--tw-text-opacity))}.nx-underline{text-decoration-line:underline}.nx-no-underline{text-decoration-line:none}.nx-decoration-from-font{text-decoration-thickness:from-font}.nx-subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.nx-opacity-0{opacity:0}.nx-opacity-100{opacity:1}.nx-opacity-25{opacity:.25}.nx-opacity-75{opacity:.75}.nx-opacity-80{opacity:.8}.nx-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-\[0_-12px_16px_\#fff\],.nx-shadow-\[0_-12px_16px_white\]{--tw-shadow:0 -12px 16px #fff;--tw-shadow-colored:0 -12px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-\[0_2px_4px_rgba\(0\,0\,0\,\.02\)\,0_1px_0_rgba\(0\,0\,0\,\.06\)\]{--tw-shadow:0 2px 4px rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.06);--tw-shadow-colored:0 2px 4px var(--tw-shadow-color),0 1px 0 var(--tw-shadow-color)}.nx-shadow-\[0_2px_4px_rgba\(0\,0\,0\,\.02\)\,0_1px_0_rgba\(0\,0\,0\,\.06\)\],.nx-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nx-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nx-shadow-sm,.nx-shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.nx-shadow-gray-100{--tw-shadow-color:#f3f4f6;--tw-shadow:var(--tw-shadow-colored)}.nx-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.nx-ring-black\/5{--tw-ring-color:rgba(0,0,0,.05)}.nx-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-duration-100{transition-duration:.1s}.nx-duration-200{transition-duration:.2s}.nx-duration-300{transition-duration:.3s}.nx-duration-500{transition-duration:.5s}.nx-duration-75{transition-duration:75ms}.nx-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[-webkit-tap-highlight-color\:transparent\]{-webkit-tap-highlight-color:transparent}.\[-webkit-touch-callout\:none\]{-webkit-touch-callout:none}.\[counter-reset\:line\]{counter-reset:line}.\[counter-reset\:step\]{counter-reset:step}.\[hyphens\:auto\]{-webkit-hyphens:auto;hyphens:auto}.\[text-underline-position\:from-font\]{text-underline-position:from-font}.\[transition\:background-color_1\.5s_ease\]{transition:background-color 1.5s}.\[word-break\:break-word\]{word-break:break-word}:root{--shiki-color-text:#414141;--shiki-color-background:transparent;--shiki-token-constant:#1976d2;--shiki-token-string:#22863a;--shiki-token-comment:#aaa;--shiki-token-keyword:#d32f2f;--shiki-token-parameter:#ff9801;--shiki-token-function:#6f42c1;--shiki-token-string-expression:var(--shiki-token-string);--shiki-token-punctuation:#212121;--shiki-token-link:var(--shiki-token-string);--shiki-color-ansi-black:#24292e;--shiki-color-ansi-black-dim:rgba(36,41,46,.5);--shiki-color-ansi-red:#d73a49;--shiki-color-ansi-red-dim:rgba(215,58,73,.5);--shiki-color-ansi-green:#28a745;--shiki-color-ansi-green-dim:rgba(40,167,69,.5);--shiki-color-ansi-yellow:#dbab09;--shiki-color-ansi-yellow-dim:rgba(219,171,9,.5);--shiki-color-ansi-blue:#0366d6;--shiki-color-ansi-blue-dim:rgba(3,102,214,.5);--shiki-color-ansi-magenta:#5a32a3;--shiki-color-ansi-magenta-dim:rgba(90,50,163,.5);--shiki-color-ansi-cyan:#1b7c83;--shiki-color-ansi-cyan-dim:rgba(27,124,131,.5);--shiki-color-ansi-white:#6a737d;--shiki-color-ansi-white-dim:hsla(212,8%,45%,.5);--shiki-color-ansi-bright-black:#959da5;--shiki-color-ansi-bright-black-dim:hsla(210,8%,62%,.5);--shiki-color-ansi-bright-red:#cb2431;--shiki-color-ansi-bright-red-dim:rgba(203,36,49,.5);--shiki-color-ansi-bright-green:#22863a;--shiki-color-ansi-bright-green-dim:rgba(34,134,58,.5);--shiki-color-ansi-bright-yellow:#b08800;--shiki-color-ansi-bright-yellow-dim:rgba(176,136,0,.5);--shiki-color-ansi-bright-blue:#005cc5;--shiki-color-ansi-bright-blue-dim:rgba(0,92,197,.5);--shiki-color-ansi-bright-magenta:#5a32a3;--shiki-color-ansi-bright-magenta-dim:rgba(90,50,163,.5);--shiki-color-ansi-bright-cyan:#3192aa;--shiki-color-ansi-bright-cyan-dim:rgba(49,146,170,.5);--shiki-color-ansi-bright-white:#d1d5da;--shiki-color-ansi-bright-white-dim:rgba(209,213,218,.5)}@supports (color:lab(0% 0 0)){:root{--shiki-color-text:lab(27.5348% 0 0);--shiki-token-constant:lab(48.3994% .649333 -55.5719);--shiki-token-string:lab(49.1367% -42.0409 31.8582);--shiki-token-comment:lab(69.608% -.0000298023 0);--shiki-token-keyword:lab(47.8876% 63.025 42.31);--shiki-token-parameter:lab(72.7377% 33.9074 77.3632);--shiki-token-function:lab(39.0339% 41.1896 -60.5821);--shiki-token-punctuation:lab(12.7448% 0 0)}}.dark{--shiki-color-text:#d1d1d1;--shiki-token-constant:#79b8ff;--shiki-token-string:#ffab70;--shiki-token-comment:#6b737c;--shiki-token-keyword:#f97583;--shiki-token-function:#b392f0;--shiki-token-string-expression:#4bb74a;--shiki-token-punctuation:#bbb;--shiki-token-link:var(--shiki-token-string);--shiki-color-ansi-black:#586069;--shiki-color-ansi-black-dim:rgba(88,96,105,.5);--shiki-color-ansi-red:#ea4a5a;--shiki-color-ansi-red-dim:rgba(234,74,90,.5);--shiki-color-ansi-green:#34d058;--shiki-color-ansi-green-dim:rgba(52,208,88,.5);--shiki-color-ansi-yellow:#ffea7f;--shiki-color-ansi-yellow-dim:rgba(255,234,127,.5);--shiki-color-ansi-blue:#2188ff;--shiki-color-ansi-blue-dim:rgba(33,136,255,.5);--shiki-color-ansi-magenta:#b392f0;--shiki-color-ansi-magenta-dim:rgba(179,146,240,.5);--shiki-color-ansi-cyan:#39c5cf;--shiki-color-ansi-cyan-dim:rgba(57,197,207,.5);--shiki-color-ansi-white:#d1d5da;--shiki-color-ansi-white-dim:rgba(209,213,218,.5);--shiki-color-ansi-bright-black:#959da5;--shiki-color-ansi-bright-black-dim:hsla(210,8%,62%,.5);--shiki-color-ansi-bright-red:#f97583;--shiki-color-ansi-bright-red-dim:rgba(249,117,131,.5);--shiki-color-ansi-bright-green:#85e89d;--shiki-color-ansi-bright-green-dim:rgba(133,232,157,.5);--shiki-color-ansi-bright-yellow:#ffea7f;--shiki-color-ansi-bright-yellow-dim:rgba(255,234,127,.5);--shiki-color-ansi-bright-blue:#79b8ff;--shiki-color-ansi-bright-blue-dim:rgba(121,184,255,.5);--shiki-color-ansi-bright-magenta:#b392f0;--shiki-color-ansi-bright-magenta-dim:rgba(179,146,240,.5);--shiki-color-ansi-bright-cyan:#56d4dd;--shiki-color-ansi-bright-cyan-dim:rgba(86,212,221,.5);--shiki-color-ansi-bright-white:#fafbfc;--shiki-color-ansi-bright-white-dim:rgba(250,251,252,.5)}@supports (color:lab(0% 0 0)){.dark{--shiki-color-text:lab(83.8412% -.0000298023 0);--shiki-token-constant:lab(72.6797% -5.9377 -41.8341);--shiki-token-string:lab(77.5312% 27.4176 43.2358);--shiki-token-comment:lab(47.984% -1.63257 -6.06269);--shiki-token-keyword:lab(65.9075% 52.4906 18.1315);--shiki-token-function:lab(66.4473% 27.2323 -43.2583);--shiki-token-string-expression:lab(66.4666% -48.7314 44.7269);--shiki-token-punctuation:lab(75.8836% 0 -.0000119209)}}code{-webkit-box-decoration-break:slice;box-decoration-break:slice;font-feature-settings:"rlig" 1,"calt" 1,"ss01" 1}code[data-line-numbers]>.line{padding-left:.5rem}code[data-line-numbers]>.line:before{counter-increment:line;content:counter(line);float:left;text-align:right;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity));min-width:2.6rem;height:100%;padding-right:1rem}code .line.highlighted{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/.1);color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/.5);--tw-shadow:2px 0 currentColor inset;--tw-shadow-colored:inset 2px 0 var(--tw-shadow-color)}code .line .highlighted,code .line.highlighted{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}code .line .highlighted{--tw-shadow:0 0 0 2px rgba(0,0,0,.3);--tw-shadow-colored:0 0 0 2px var(--tw-shadow-color);background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/.1);--tw-shadow-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/.1);--tw-shadow:var(--tw-shadow-colored);border-radius:.125rem}:is(html[class~=dark] code .line .highlighted){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1);--tw-shadow-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1);--tw-shadow:var(--tw-shadow-colored)}pre{contain:paint}pre code{color:currentColor;border-style:none;border-radius:0;min-width:100%;font-size:.875rem;line-height:1.25rem;display:grid;background-color:transparent!important;padding:0!important}:is(html[class~=dark] pre code){background-color:transparent!important}pre code .line,pre:not([data-theme]){padding-left:1rem;padding-right:1rem}html[data-nextra-word-wrap] pre{word-break:break-word;white-space:pre-wrap}@media (min-width:768px){html[data-nextra-word-wrap] pre{white-space:pre}}html[data-nextra-word-wrap] pre .line{display:inline-block}pre .nextra-copy-icon{animation:fade-in .3s forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@supports (-webkit-backdrop-filter:blur(1px)) or ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.nextra-button{--tw-bg-opacity:.85;--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}:is(html[class~=dark] .nextra-button){--tw-bg-opacity:.8}}.subheading-anchor{opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:is([dir=ltr] .subheading-anchor){margin-left:.25rem}:is([dir=rtl] .subheading-anchor){margin-right:.25rem}.subheading-anchor:focus,:hover>.subheading-anchor{opacity:1}.subheading-anchor:after{--tw-content:"#";content:var(--tw-content);--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity));padding-left:.25rem;padding-right:.25rem}:is(html[class~=dark] .subheading-anchor):after{--tw-text-opacity:1;color:rgba(64,64,64,var(--tw-text-opacity))}span:target+.subheading-anchor:after{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] span:target+.subheading-anchor):after{--tw-text-opacity:1;color:rgba(115,115,115,var(--tw-text-opacity))}.nextra-scrollbar{scrollbar-width:thin;scrollbar-color:hsla(0,0%,45%,.4) transparent;scrollbar-gutter:stable}@supports (color:lab(0% 0 0)){.nextra-scrollbar{scrollbar-color:lab(48.438% 0 0/.4) transparent}}.nextra-scrollbar::-webkit-scrollbar{width:.75rem;height:.75rem}.nextra-scrollbar::-webkit-scrollbar-track{background-color:transparent}.nextra-scrollbar::-webkit-scrollbar-thumb{border-radius:10px}.nextra-scrollbar:hover::-webkit-scrollbar-thumb{background-color:var(--tw-shadow-color);--tw-shadow-color:hsla(0,0%,45%,.2);--tw-shadow:var(--tw-shadow-colored);background-clip:content-box;border:3px solid transparent}.nextra-scrollbar:hover::-webkit-scrollbar-thumb:hover{--tw-shadow-color:hsla(0,0%,45%,.4);--tw-shadow:var(--tw-shadow-colored)}@media (max-width:767px){.nextra-container .nextra-scrollbar{scrollbar-gutter:auto}}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.nextra-steps h3{counter-increment:step}.nextra-steps h3:before{--tw-border-opacity:1;border-width:4px;border-color:rgba(255,255,255,var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity));width:33px;height:33px;position:absolute}:is(html[class~=dark] .nextra-steps h3):before{--tw-border-opacity:1;border-color:rgba(17,17,17,var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}.nextra-steps h3:before{text-align:center;text-indent:-1px;--tw-text-opacity:1;color:rgba(163,163,163,var(--tw-text-opacity));content:counter(step);border-radius:9999px;margin-top:3px;margin-left:-41px;font-size:1rem;font-weight:400}.nextra-cards{grid-template-columns:repeat(auto-fill,minmax(max(250px,calc((100% - 1rem*2)/var(--rows))),1fr))}.nextra-card img{-webkit-user-select:none;-moz-user-select:none;user-select:none}.nextra-card:hover svg{color:currentColor}.nextra-card svg{color:rgba(0,0,0,.2);width:1.5rem;transition:color .3s}.nextra-card p{margin-top:.5rem}.dark .nextra-card svg{color:hsla(0,0%,100%,.4)}.dark .nextra-card:hover svg{color:currentColor}.nextra-hamburger svg g{transform-origin:50%;transition:transform .2s cubic-bezier(.25,1,.5,1)}.nextra-hamburger svg path{opacity:1;transition:transform .2s cubic-bezier(.25,1,.5,1) .2s,opacity .2s .2s}.nextra-hamburger svg.open path{transition:transform .2s cubic-bezier(.25,1,.5,1),opacity 0s .2s}.nextra-hamburger svg.open g{transition:transform .2s cubic-bezier(.25,1,.5,1) .2s}.nextra-hamburger svg.open>path{opacity:0}.nextra-hamburger svg.open>g:first-of-type{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nextra-hamburger svg.open>g:first-of-type path{transform:translateY(6px)}.nextra-hamburger svg.open>g:nth-of-type(2){--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nextra-hamburger svg.open>g:nth-of-type(2) path{transform:translateY(-6px)}article.nextra-body-typesetting-article{font-feature-settings:"rlig" 1,"calt" 1;font-size:17px}article.nextra-body-typesetting-article h1{text-align:center;margin-top:1.5rem;margin-bottom:1rem;font-size:2.5rem}article.nextra-body-typesetting-article h2{border-style:none}article.nextra-body-typesetting-article a{text-decoration-line:none}article.nextra-body-typesetting-article a:hover{text-decoration-line:underline}article.nextra-body-typesetting-article p{line-height:2rem}article.nextra-body-typesetting-article code{border-style:none}:is(html[class~=dark] article.nextra-body-typesetting-article code){--tw-bg-opacity:1;background-color:rgba(64,64,64,var(--tw-bg-opacity))}:is(html[class~=dark] article.nextra-body-typesetting-article pre code){background-color:transparent}article.nextra-body-typesetting-article .subheading-anchor+a{text-decoration-line:none}article.nextra-body-typesetting-article .subheading-anchor+a:after{content:var(--tw-content);display:none}article.nextra-body-typesetting-article .subheading-anchor+a:hover{text-decoration-line:none}html{scroll-padding-top:var(--nextra-navbar-height);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"rlig" 1,"calt" 1,"ss01" 1;-webkit-tap-highlight-color:transparent;font-size:1rem}body{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));width:100%}:is(html[class~=dark] body){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}[tabindex]:not([tabindex="-1"]),a,button,input,summary{outline-offset:2px;outline:2px solid transparent}a:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}summary:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}button:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}input:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}[tabindex]:not([tabindex="-1"]):focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}:is(html[class~=dark] a:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] summary:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] button:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] input:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] [tabindex]:not([tabindex="-1"]):focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}a,summary{border-radius:.25rem}.nextra-content{--tw-text-opacity:1;color:rgba(51,65,85,var(--tw-text-opacity))}:is(html[class~=dark] .nextra-content){--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity))}@media (max-width:767px){.nextra-sidebar-container{z-index:15;overscroll-behavior:contain;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));padding-top:calc(var(--nextra-navbar-height));width:100%;position:fixed;top:0;bottom:0}:is(html[class~=dark] .nextra-sidebar-container){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}.nextra-sidebar-container{will-change:transform,opacity;contain:layout style;backface-visibility:hidden;transition:transform .8s cubic-bezier(.52,.16,.04,1)}.nextra-sidebar-container>.nextra-scrollbar{-webkit-mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0);mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0)}.nextra-banner-container~div .nextra-sidebar-container{padding-top:6.5rem}.nextra-banner-container~div.nextra-nav-container{top:2.5rem}@media (min-width:768px){.nextra-banner-container~div.nextra-nav-container{top:0}}.nextra-banner-hidden .nextra-banner-container~div .nextra-sidebar-container{padding-top:4rem}.nextra-banner-hidden .nextra-nav-container{top:0!important}.nextra-search .excerpt{text-overflow:ellipsis;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}@media (prefers-reduced-motion:reduce) and (max-width:767px){.nextra-sidebar-container,.nextra-sidebar-container.open,article:before,body.resizing .nextra-sidebar-container{transition-property:none}}article details>summary::-webkit-details-marker{display:none}article details>summary:before{vertical-align:-4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='h-5 w-5' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E");width:1.2em;height:1.2em}@media (min-width:768px){.nextra-sidebar-container,.nextra-toc>.div{-webkit-mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0);mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0)}}@supports (-webkit-backdrop-filter:blur(1px)) or ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.nextra-search ul{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);background-color:hsla(0,0%,100%,.7)}:is(html[class~=dark] .nextra-search ul){background-color:hsla(0,0%,7%,.8)}.nextra-nav-container-blur{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);background-color:hsla(0,0%,100%,.85)}:is(html[class~=dark] .nextra-nav-container-blur){background-color:hsla(0,0%,7%,.8)!important}}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}.contains-task-list{margin-left:0;list-style-type:none}.contains-task-list input[type=checkbox]{margin-right:.25rem}.nextra-banner-hidden .nextra-banner-container{display:none}.nextra-sidebar-container [data-toggle-animation=show] button{opacity:0;animation:nextra-fadein 1s .2s forwards}.nextra-sidebar-container [data-toggle-animation=hide] button{opacity:0;animation:nextra-fadein2 1s .2s forwards}.footnotes a[data-footnote-backref]{font-family:initial}@keyframes nextra-fadein{0%{opacity:0}to{opacity:1}}@keyframes nextra-fadein2{0%{opacity:0}to{opacity:1}}.placeholder\:nx-text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.placeholder\:nx-text-gray-500::placeholder{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.before\:nx-absolute:before{content:var(--tw-content);position:absolute}.before\:nx-inset-y-1:before{content:var(--tw-content);top:.25rem;bottom:.25rem}.before\:nx-mr-1:before{content:var(--tw-content);margin-right:.25rem}.before\:nx-inline-block:before{content:var(--tw-content);display:inline-block}.before\:nx-w-px:before{content:var(--tw-content);width:1px}.before\:nx-shrink-0:before{content:var(--tw-content);flex-shrink:0}.before\:nx-bg-gray-200:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.before\:nx-opacity-25:before{content:var(--tw-content);opacity:.25}.before\:nx-transition-transform:before{content:var(--tw-content);transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.before\:nx-content-\[\"\"\]:before{--tw-content:"";content:var(--tw-content)}.before\:nx-content-\[\"\#\"\]:before{--tw-content:"#";content:var(--tw-content)}.before\:nx-content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.first\:nx-mt-0:first-child{margin-top:0}.even\:nx-bg-gray-100:nth-child(2n){--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.focus-within\:nx-opacity-100:focus-within{opacity:1}.hover\:nx-border-gray-200:hover{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hover\:nx-border-gray-300:hover{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.hover\:nx-bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:nx-bg-gray-800\/5:hover{background-color:rgba(31,41,55,.05)}.hover\:nx-bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.hover\:nx-text-black:hover{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.hover\:nx-text-gray-800:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.hover\:nx-text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:nx-text-primary-600:hover{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}.hover\:nx-opacity-100:hover{opacity:1}.hover\:nx-opacity-60:hover{opacity:.6}.hover\:nx-opacity-70:hover{opacity:.7}.hover\:nx-opacity-75:hover{opacity:.75}.hover\:nx-shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:nx-shadow-lg:hover,.hover\:nx-shadow-md:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hover\:nx-shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.hover\:nx-shadow-gray-100:hover{--tw-shadow-color:#f3f4f6;--tw-shadow:var(--tw-shadow-colored)}.focus\:nx-not-sr-only:focus{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:nx-fixed:focus{position:fixed}.focus\:nx-z-50:focus{z-index:50}.focus\:nx-m-3:focus{margin:.75rem}.focus\:nx-ml-4:focus{margin-left:1rem}.focus\:nx-h-\[calc\(var\(--nextra-navbar-height\)-1\.5rem\)\]:focus{height:calc(var(--nextra-navbar-height) - 1.5rem)}.focus\:nx-rounded-lg:focus{border-radius:.5rem}.focus\:nx-border:focus{border-width:1px}.focus\:nx-border-neutral-400:focus{--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}.focus\:nx-bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.focus\:nx-px-3:focus{padding-left:.75rem;padding-right:.75rem}.focus\:nx-py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:nx-align-middle:focus{vertical-align:middle}.focus\:nx-text-sm:focus{font-size:.875rem}.focus\:nx-font-bold:focus{font-weight:700}.focus\:nx-text-gray-900:focus{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.active\:nx-bg-gray-400\/20:active{background-color:rgba(156,163,175,.2)}.active\:nx-opacity-50:active{opacity:.5}.active\:nx-shadow-sm:active{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.active\:nx-shadow-gray-200:active{--tw-shadow-color:#e5e7eb;--tw-shadow:var(--tw-shadow-colored)}.nx-group:hover .group-hover\:nx-translate-x-\[2px\]{--tw-translate-x:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-right-1){right:.25rem}:is([dir=ltr] .ltr\:nx-right-1\.5){right:.375rem}:is([dir=ltr] .ltr\:nx-right-3){right:.75rem}:is([dir=ltr] .ltr\:-nx-mr-4){margin-right:-1rem}:is([dir=ltr] .ltr\:nx-ml-3){margin-left:.75rem}:is([dir=ltr] .ltr\:nx-ml-6){margin-left:1.5rem}:is([dir=ltr] .ltr\:nx-ml-auto){margin-left:auto}:is([dir=ltr] .ltr\:nx-mr-auto){margin-right:auto}:is([dir=ltr] .ltr\:nx-rotate-180){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-rotate-90){--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-border-l-2){border-left-width:2px}:is([dir=ltr] .ltr\:nx-pl-10){padding-left:2.5rem}:is([dir=ltr] .ltr\:nx-pl-12){padding-left:3rem}:is([dir=ltr] .ltr\:nx-pl-16){padding-left:4rem}:is([dir=ltr] .ltr\:nx-pl-3){padding-left:.75rem}:is([dir=ltr] .ltr\:nx-pl-4){padding-left:1rem}:is([dir=ltr] .ltr\:nx-pl-6){padding-left:1.5rem}:is([dir=ltr] .ltr\:nx-pl-8){padding-left:2rem}:is([dir=ltr] .ltr\:nx-pr-0){padding-right:0}:is([dir=ltr] .ltr\:nx-pr-2){padding-right:.5rem}:is([dir=ltr] .ltr\:nx-pr-4){padding-right:1rem}:is([dir=ltr] .ltr\:nx-pr-9){padding-right:2.25rem}:is([dir=ltr] .ltr\:nx-text-right){text-align:right}:is([dir=ltr] .ltr\:before\:nx-left-0):before{content:var(--tw-content);left:0}:is([dir=rtl] .rtl\:nx-left-1){left:.25rem}:is([dir=rtl] .rtl\:nx-left-1\.5){left:.375rem}:is([dir=rtl] .rtl\:nx-left-3){left:.75rem}:is([dir=rtl] .rtl\:-nx-ml-4){margin-left:-1rem}:is([dir=rtl] .rtl\:nx-ml-auto){margin-left:auto}:is([dir=rtl] .rtl\:nx-mr-3){margin-right:.75rem}:is([dir=rtl] .rtl\:nx-mr-6){margin-right:1.5rem}:is([dir=rtl] .rtl\:nx-mr-auto){margin-right:auto}:is([dir=rtl] .rtl\:-nx-rotate-180){--tw-rotate:-180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-rotate-180){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-rotate-\[-270deg\]){--tw-rotate:-270deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-border-r-2){border-right-width:2px}:is([dir=rtl] .rtl\:nx-pl-0){padding-left:0}:is([dir=rtl] .rtl\:nx-pl-2){padding-left:.5rem}:is([dir=rtl] .rtl\:nx-pl-4){padding-left:1rem}:is([dir=rtl] .rtl\:nx-pl-9){padding-left:2.25rem}:is([dir=rtl] .rtl\:nx-pr-10){padding-right:2.5rem}:is([dir=rtl] .rtl\:nx-pr-12){padding-right:3rem}:is([dir=rtl] .rtl\:nx-pr-16){padding-right:4rem}:is([dir=rtl] .rtl\:nx-pr-3){padding-right:.75rem}:is([dir=rtl] .rtl\:nx-pr-4){padding-right:1rem}:is([dir=rtl] .rtl\:nx-pr-6){padding-right:1.5rem}:is([dir=rtl] .rtl\:nx-pr-8){padding-right:2rem}:is([dir=rtl] .rtl\:nx-text-left){text-align:left}:is([dir=rtl] .rtl\:before\:nx-right-0):before{content:var(--tw-content);right:0}:is([dir=rtl] .rtl\:before\:nx-rotate-180):before{content:var(--tw-content);--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@media (prefers-reduced-motion:reduce){.motion-reduce\:nx-transform-none{transform:none}.motion-reduce\:nx-transition-none{transition-property:none}}@media (prefers-contrast:more){.contrast-more\:nx-border{border-width:1px}.contrast-more\:nx-border-t{border-top-width:1px}.contrast-more\:nx-border-current{border-color:currentColor}.contrast-more\:nx-border-gray-600{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}.contrast-more\:nx-border-gray-900{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.contrast-more\:nx-border-neutral-400{--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}.contrast-more\:nx-border-primary-500{--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}.contrast-more\:nx-border-primary-900\/20{border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)24%/.2)}.contrast-more\:nx-border-transparent{border-color:transparent}.contrast-more\:nx-font-bold{font-weight:700}.contrast-more\:\!nx-text-primary-600{--tw-text-opacity:1!important;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))!important}.contrast-more\:nx-text-current{color:currentColor}.contrast-more\:nx-text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.contrast-more\:nx-text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.contrast-more\:nx-text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.contrast-more\:nx-underline{text-decoration-line:underline}.contrast-more\:nx-shadow-\[0_0_0_1px_\#000\]{--tw-shadow:0 0 0 1px #000;--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color)}.contrast-more\:nx-shadow-\[0_0_0_1px_\#000\],.contrast-more\:nx-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.contrast-more\:nx-shadow-none{--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}.contrast-more\:nx-contrast-150{--tw-contrast:contrast(1.5);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.contrast-more\:hover\:nx-border-gray-900:hover{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}}:is(html[class~=dark] .dark\:nx-border-blue-200\/30){border-color:rgba(191,219,254,.3)}:is(html[class~=dark] .dark\:nx-border-gray-100\/20){border-color:rgba(243,244,246,.2)}:is(html[class~=dark] .dark\:nx-border-gray-600){--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-gray-700){--tw-border-opacity:1;border-color:rgba(55,65,81,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-neutral-700){--tw-border-opacity:1;border-color:rgba(64,64,64,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-neutral-800){--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-orange-400\/30){border-color:rgba(251,146,60,.3)}:is(html[class~=dark] .dark\:nx-border-primary-100\/10){border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.1)}:is(html[class~=dark] .dark\:nx-border-red-200\/30){border-color:hsla(0,96%,89%,.3)}:is(html[class~=dark] .dark\:nx-border-white\/10){border-color:hsla(0,0%,100%,.1)}:is(html[class~=dark] .dark\:nx-border-white\/20){border-color:hsla(0,0%,100%,.2)}:is(html[class~=dark] .dark\:nx-border-yellow-200\/30){border-color:hsla(53,98%,77%,.3)}:is(html[class~=dark] .dark\:nx-bg-black\/60){background-color:rgba(0,0,0,.6)}:is(html[class~=dark] .dark\:nx-bg-blue-900\/30){background-color:rgba(30,58,138,.3)}:is(html[class~=dark] .dark\:nx-bg-dark){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-dark\/50){background-color:hsla(0,0%,7%,.5)}:is(html[class~=dark] .dark\:nx-bg-gray-50\/10){background-color:rgba(249,250,251,.1)}:is(html[class~=dark] .dark\:nx-bg-neutral-800){--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-neutral-900){--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-orange-400\/20){background-color:rgba(251,146,60,.2)}:is(html[class~=dark] .dark\:nx-bg-primary-100\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-300\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-400\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)66%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-500\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/.1)}:is(html[class~=dark] .dark\:nx-bg-red-900\/30){background-color:rgba(127,29,29,.3)}:is(html[class~=dark] .dark\:nx-bg-white\/10){background-color:hsla(0,0%,100%,.1)}:is(html[class~=dark] .dark\:nx-bg-yellow-700\/30){background-color:rgba(161,98,7,.3)}:is(html[class~=dark] .dark\:nx-bg-\[linear-gradient\(1deg\,\#383838\,\#212121\)\]){background-image:linear-gradient(1deg,#383838,#212121)}:is(html[class~=dark] .dark\:nx-text-blue-200){--tw-text-opacity:1;color:rgba(191,219,254,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-100){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-200){--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-300){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-400){--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-50){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-200){--tw-text-opacity:1;color:rgba(229,229,229,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-400){--tw-text-opacity:1;color:rgba(163,163,163,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-600){--tw-text-opacity:1;color:rgba(82,82,82,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-orange-300){--tw-text-opacity:1;color:rgba(253,186,116,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-primary-600){--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-red-200){--tw-text-opacity:1;color:rgba(254,202,202,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-slate-100){--tw-text-opacity:1;color:rgba(241,245,249,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-white){--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-yellow-200){--tw-text-opacity:1;color:rgba(254,240,138,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-shadow-\[0_-12px_16px_\#111\]){--tw-shadow:0 -12px 16px #111;--tw-shadow-colored:0 -12px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-shadow-\[0_-1px_0_rgba\(255\,255\,255\,\.1\)_inset\]){--tw-shadow:0 -1px 0 hsla(0,0%,100%,.1) inset;--tw-shadow-colored:inset 0 -1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-shadow-none){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-ring-white\/20){--tw-ring-color:hsla(0,0%,100%,.2)}:is(html[class~=dark] .dark\:placeholder\:nx-text-gray-400)::-moz-placeholder{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:placeholder\:nx-text-gray-400)::placeholder{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:before\:nx-bg-neutral-800):before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:before\:nx-invert):before{content:var(--tw-content);--tw-invert:invert(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}:is(html[class~=dark] .even\:dark\:nx-bg-gray-600\/20):nth-child(2n){background-color:rgba(75,85,99,.2)}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-500:hover){--tw-border-opacity:1;border-color:rgba(115,115,115,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-700:hover){--tw-border-opacity:1;border-color:rgba(64,64,64,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-800:hover){--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-gray-100\/5:hover){background-color:rgba(243,244,246,.05)}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-700:hover){--tw-bg-opacity:1;background-color:rgba(64,64,64,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-800:hover){--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-900:hover){--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-primary-100\/5:hover){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.05)}:is(html[class~=dark] .dark\:hover\:nx-text-gray-100:hover){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-200:hover){--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-300:hover){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-50:hover){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-neutral-50:hover){--tw-text-opacity:1;color:rgba(250,250,250,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-white:hover){--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-shadow-none:hover){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .focus\:dark\:nx-border-neutral-800):focus{--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:focus\:nx-bg-dark:focus){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}:is(html[class~=dark] .focus\:dark\:nx-bg-neutral-900):focus{--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .focus\:dark\:nx-text-gray-100):focus{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}@media (prefers-contrast:more){:is(html[class~=dark] .contrast-more\:dark\:nx-border-current){border-color:currentColor}:is(html[class~=dark] .contrast-more\:dark\:nx-border-gray-50){--tw-border-opacity:1;border-color:rgba(249,250,251,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-border-neutral-400){--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-border-primary-100\/40){border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.4)}:is(html[class~=dark] .contrast-more\:dark\:nx-border-primary-500){--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}:is(html[class~=dark] .dark\:contrast-more\:nx-border-neutral-400){--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-current){color:currentColor}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-100){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-300){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-50){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-shadow-\[0_0_0_1px_\#fff\]){--tw-shadow:0 0 0 1px #fff;--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .contrast-more\:dark\:nx-shadow-none){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .contrast-more\:dark\:hover\:nx-border-gray-50:hover){--tw-border-opacity:1;border-color:rgba(249,250,251,var(--tw-border-opacity))}}@media print{.print\:nx-hidden{display:none}.print\:nx-bg-transparent{background-color:transparent}}@media not all and (min-width:1280px){.max-xl\:nx-hidden{display:none}}@media not all and (min-width:768px){.max-md\:nx-hidden{display:none}.max-md\:nx-grow{flex-grow:1}.max-md\:\[transform\:translate3d\(0\,-100\%\,0\)\]{transform:translateY(-100%)}.max-md\:\[transform\:translate3d\(0\,0\,0\)\]{transform:translate(0)}}@media (min-width:640px){.sm\:nx-flex{display:flex}}@media (min-width:768px){.md\:nx-relative{position:relative}.md\:nx-sticky{position:sticky}.md\:nx-top-16{top:4rem}.md\:-nx-mx-8{margin-left:-2rem;margin-right:-2rem}.md\:nx-inline-block{display:inline-block}.md\:nx-inline{display:inline}.md\:nx-inline-flex{display:inline-flex}.md\:nx-hidden{display:none}.md\:nx-h-\[calc\(100vh-var\(--nextra-navbar-height\)-var\(--nextra-menu-height\)\)\]{height:calc(100vh - var(--nextra-navbar-height) - var(--nextra-menu-height))}.md\:nx-max-h-\[min\(calc\(100vh-5rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(100vh - 5rem - env(safe-area-inset-bottom)),400px)}.md\:nx-w-20{width:5rem}.md\:nx-w-64{width:16rem}.md\:nx-shrink-0{flex-shrink:0}.md\:nx-justify-start{justify-content:flex-start}.md\:nx-self-start{align-self:flex-start}.md\:nx-overflow-auto{overflow:auto}.md\:nx-px-12{padding-left:3rem;padding-right:3rem}.md\:nx-text-lg{font-size:1.125rem}.md\:nx-text-sm{font-size:.875rem}:is([dir=ltr] .ltr\:md\:nx-left-auto){left:auto}:is([dir=rtl] .rtl\:md\:nx-right-auto){right:auto}}@media (min-width:1280px){.xl\:nx-block{display:block}:is([dir=ltr] .ltr\:xl\:nx-ml-\[calc\(50\%-50vw\+16rem\)\]){margin-left:calc(50% - 50vw + 16rem)}:is([dir=ltr] .ltr\:xl\:nx-mr-\[calc\(50\%-50vw\)\]){margin-right:calc(50% - 50vw)}:is([dir=rtl] .rtl\:xl\:nx-ml-\[calc\(50\%-50vw\)\]){margin-left:calc(50% - 50vw)}:is([dir=rtl] .rtl\:xl\:nx-mr-\[calc\(50\%-50vw\+16rem\)\]){margin-right:calc(50% - 50vw + 16rem)}}@media (min-width:1536px){.\32 xl\:-nx-mx-24{margin-left:-6rem;margin-right:-6rem}}[data-expanded]>.\[\[data-expanded\]\>\&\]\:before\:nx-rotate-90:before{content:var(--tw-content);--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}body.nextra-banner-hidden .\[body\.nextra-banner-hidden_\&\]\:nx-hidden{display:none}div:hover>.\[div\:hover\>\&\]\:nx-opacity-100{opacity:1}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.h-\[150px\]{height:150px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.w-32{width:8rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.grow{flex-grow:1}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-evenly{justify-content:space-evenly}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.self-end{align-self:flex-end}.self-center{align-self:center}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-tr-lg{border-top-right-radius:.5rem}.border{border-width:1px}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.bg-sky-500\/20{background-color:rgba(14,165,233,.2)}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\[script\:test\]{script:test}#__next,body,html{width:100%;height:100%}a{text-decoration:none!important}ul.nx-list-disc{margin-top:0!important;list-style-type:disc}ul.nx-list-disc li li{list-style-type:circle}ul.nx-list-disc li li li{list-style-type:square}ol.nx-list-decimal{margin-top:0!important}:root{--docsearch-highlight-color:#0ea5e9;--docsearch-primary-color:#0ea5e9}.DocSearch-Modal{border-radius:.375rem!important;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Modal:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Button{margin:0;width:13rem;border-radius:.375rem;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.DocSearch-Button,.DocSearch-Button:hover{background-color:rgb(229 229 229/var(--tw-bg-opacity))}.DocSearch-Button:hover{--tw-bg-opacity:1}.DocSearch-Button:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.DocSearch-Search-Icon{--tw-text-opacity:1!important;color:rgb(31 41 55/var(--tw-text-opacity))!important}.DocSearch-Search-Icon:is(.dark *){--tw-text-opacity:1!important;color:rgb(156 163 175/var(--tw-text-opacity))!important}.DocSearch-Button-Key{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity));background-image:none!important;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Button-Key:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity))!important;--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.DocSearch-Commands-Key{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity));background-image:none!important;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Commands-Key:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity))!important;--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.DocSearch-Container:is(.dark *){background-color:rgba(0,0,0,.5)}.DocSearch-Input{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.DocSearch-Input:focus-visible{--tw-ring-color:transparent!important;--tw-ring-offset-width:0px}.DocSearch-Input:is(.dark *){background-color:transparent}.DocSearch-Form{--tw-shadow-color:#3b82f6;--tw-shadow:var(--tw-shadow-colored)}.DocSearch-Form:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-SearchBar{border-radius:.375rem}.DocSearch-SearchBar:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Dropdown:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Footer{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Footer:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Hit-source:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Hit[aria-selected=true]>a{background-color:var(--docsearch-primary-color)!important}.DocSearch-Hit>a{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Hit>a:is(.dark *){--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.DocSearch-Hit-title:is(.dark *){--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.DocSearch-Hit-icon:is(.dark *){--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.DocSearch-Dropdown:is(.dark *)::-webkit-scrollbar-thumb{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}.DocSearch-Dropdown:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}.nextra-code-block pre:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(39 39 42/var(--tw-bg-opacity))!important}:is([dir=ltr] .ltr\:nx-pl-3){padding-left:.6rem}:is([dir=ltr] .ltr\:nx-ml-3){margin-left:.6rem}.hover\:bg-black:hover{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.hover\:bg-sky-500\/30:hover{background-color:rgba(14,165,233,.3)}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:border-neutral-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}.dark\:border-white:is(.dark *){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.dark\:bg-neutral-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hover\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.dark\:hover\:bg-white:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.dark\:hover\:text-black:hover:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} \ No newline at end of file diff --git a/_next/static/css/f4dd0062b25be451.css b/_next/static/css/f4dd0062b25be451.css new file mode 100644 index 0000000000..b318f2557e --- /dev/null +++ b/_next/static/css/f4dd0062b25be451.css @@ -0,0 +1,4 @@ +/*! @docsearch/css 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.302);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}html{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}a{-webkit-text-decoration:inherit}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}input::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}textarea::placeholder{opacity:1;color:#9ca3af}*,:after,:before{--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}::backdrop{--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}.nx-sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.nx-pointer-events-none{pointer-events:none}.nx-invisible{visibility:hidden}.nx-fixed{position:fixed}.nx-absolute{position:absolute}.nx-relative{position:relative}.nx-sticky{position:sticky}.nx-inset-0{top:0;bottom:0}.nx-inset-0,.nx-inset-x-0{left:0;right:0}.nx-inset-y-0{top:0;bottom:0}.nx-bottom-0{bottom:0}.nx-right-0{right:0}.nx-top-0{top:0}.nx-top-16{top:4rem}.nx-top-8{top:2rem}.nx-top-full{top:100%}.nx-z-10{z-index:10}.nx-z-20{z-index:20}.nx-z-\[-1\]{z-index:-1}.nx-z-\[1\]{z-index:1}.nx-order-last{order:9999}.nx-m-0{margin:0}.nx-m-\[11px\]{margin:11px}.-nx-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.nx-mx-2{margin-left:.5rem;margin-right:.5rem}.nx-mx-2\.5{margin-left:.625rem;margin-right:.625rem}.nx-mx-4{margin-left:1rem;margin-right:1rem}.nx-mx-auto{margin-left:auto;margin-right:auto}.nx-my-1{margin-top:.25rem;margin-bottom:.25rem}.nx-my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.nx-my-2{margin-top:.5rem;margin-bottom:.5rem}.nx-my-4{margin-top:1rem;margin-bottom:1rem}.nx-my-8{margin-top:2rem;margin-bottom:2rem}.-nx-mb-0{margin-bottom:0}.-nx-mb-0\.5{margin-bottom:-.125rem}.-nx-ml-2{margin-left:-.5rem}.-nx-mr-2{margin-right:-.5rem}.nx-mb-12{margin-bottom:3rem}.nx-mb-2{margin-bottom:.5rem}.nx-mb-4{margin-bottom:1rem}.nx-mb-8{margin-bottom:2rem}.nx-ml-1{margin-left:.25rem}.nx-ml-2{margin-left:.5rem}.nx-ml-4{margin-left:1rem}.nx-mr-2{margin-right:.5rem}.nx-mt-1{margin-top:.25rem}.nx-mt-1\.5{margin-top:.375rem}.nx-mt-10{margin-top:2.5rem}.nx-mt-12{margin-top:3rem}.nx-mt-16{margin-top:4rem}.nx-mt-2{margin-top:.5rem}.nx-mt-4{margin-top:1rem}.nx-mt-5{margin-top:1.25rem}.nx-mt-6{margin-top:1.5rem}.nx-mt-8{margin-top:2rem}.nx-block{display:block}.nx-inline-block{display:inline-block}.nx-inline{display:inline}.nx-flex{display:flex}.nx-inline-flex{display:inline-flex}.nx-grid{display:grid}.nx-hidden{display:none}.nx-h-0{height:0}.nx-h-3{height:.75rem}.nx-h-3\.5{height:.875rem}.nx-h-4{height:1rem}.nx-h-5{height:1.25rem}.nx-h-7{height:1.75rem}.nx-h-8{height:2rem}.nx-h-\[18px\]{height:18px}.nx-h-\[var\(--nextra-banner-height\)\]{height:var(--nextra-banner-height)}.nx-h-\[var\(--nextra-navbar-height\)\]{height:var(--nextra-navbar-height)}.nx-h-full{height:100%}.nx-max-h-64{max-height:16rem}.nx-max-h-\[calc\(100vh-var\(--nextra-navbar-height\)-env\(safe-area-inset-bottom\)\)\]{max-height:calc(100vh - var(--nextra-navbar-height) - env(safe-area-inset-bottom))}.nx-max-h-\[min\(calc\(50vh-11rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(50vh - 11rem - env(safe-area-inset-bottom)),400px)}.nx-min-h-\[100px\]{min-height:100px}.nx-min-h-\[calc\(100vh-var\(--nextra-navbar-height\)\)\]{min-height:calc(100vh - var(--nextra-navbar-height))}.nx-w-3{width:.75rem}.nx-w-3\.5{width:.875rem}.nx-w-4{width:1rem}.nx-w-5{width:1.25rem}.nx-w-64{width:16rem}.nx-w-8{width:2rem}.nx-w-full{width:100%}.nx-w-max{width:-moz-max-content;width:max-content}.nx-w-screen{width:100vw}.nx-min-w-0{min-width:0}.nx-min-w-\[18px\]{min-width:18px}.nx-min-w-\[24px\]{min-width:24px}.nx-min-w-full{min-width:100%}.nx-max-w-6xl{max-width:72rem}.nx-max-w-\[50\%\]{max-width:50%}.nx-max-w-\[90rem\]{max-width:90rem}.nx-max-w-\[min\(calc\(100vw-2rem\)\,calc\(100\%\+20rem\)\)\]{max-width:min(100vw - 2rem,100% + 20rem)}.nx-shrink-0{flex-shrink:0}.nx-grow{flex-grow:1}.nx-origin-\[35\%\]{transform-origin:35%}.nx-origin-center{transform-origin:50%}.-nx-rotate-90{--tw-rotate:-90deg}.-nx-rotate-90,.nx-rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nx-rotate-180{--tw-rotate:180deg}.nx-rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nx-transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0)rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes nx-spin{to{transform:rotate(1turn)}}.nx-animate-spin{animation:nx-spin 1s linear infinite}.nx-cursor-default{cursor:default}.nx-cursor-pointer{cursor:pointer}.nx-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.nx-scroll-m-12{scroll-margin:3rem}.nx-scroll-my-6{scroll-margin-top:1.5rem;scroll-margin-bottom:1.5rem}.nx-scroll-py-6{scroll-padding-top:1.5rem;scroll-padding-bottom:1.5rem}.nx-list-decimal{list-style-type:decimal}.nx-list-disc{list-style-type:disc}.nx-list-none{list-style-type:none}.nx-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.nx-flex-col{flex-direction:column}.nx-flex-wrap{flex-wrap:wrap}.nx-items-start{align-items:flex-start}.nx-items-center{align-items:center}.nx-justify-start{justify-content:flex-start}.nx-justify-end{justify-content:flex-end}.nx-justify-center{justify-content:center}.nx-justify-between{justify-content:space-between}.nx-gap-1{gap:.25rem}.nx-gap-1\.5{gap:.375rem}.nx-gap-2{gap:.5rem}.nx-gap-4{gap:1rem}.nx-overflow-auto{overflow:auto}.nx-overflow-hidden{overflow:hidden}.nx-overflow-x-auto{overflow-x:auto}.nx-overflow-y-auto{overflow-y:auto}.nx-overflow-x-hidden{overflow-x:hidden}.nx-overflow-y-hidden{overflow-y:hidden}.nx-overflow-x-scroll{overflow-x:scroll}.nx-overscroll-contain{overscroll-behavior:contain}.nx-overscroll-x-contain{overscroll-behavior-x:contain}.nx-truncate{white-space:nowrap;overflow:hidden}.nx-text-ellipsis,.nx-truncate{text-overflow:ellipsis}.nx-whitespace-nowrap{white-space:nowrap}.nx-break-words{overflow-wrap:break-word}.nx-rounded{border-radius:.25rem}.nx-rounded-full{border-radius:9999px}.nx-rounded-lg{border-radius:.5rem}.nx-rounded-md{border-radius:.375rem}.nx-rounded-sm{border-radius:.125rem}.nx-rounded-xl{border-radius:.75rem}.nx-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nx-rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.nx-border{border-width:1px}.nx-border-b{border-bottom-width:1px}.nx-border-b-2{border-bottom-width:2px}.nx-border-l{border-left-width:1px}.nx-border-t{border-top-width:1px}.nx-border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.nx-border-black\/10{border-color:rgba(0,0,0,.1)}.nx-border-black\/5{border-color:rgba(0,0,0,.05)}.nx-border-blue-200{--tw-border-opacity:1;border-color:rgba(191,219,254,var(--tw-border-opacity))}.nx-border-current{border-color:currentColor}.nx-border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.nx-border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.nx-border-neutral-200\/70{border-color:hsla(0,0%,90%,.7)}.nx-border-orange-100{--tw-border-opacity:1;border-color:rgba(255,237,213,var(--tw-border-opacity))}.nx-border-primary-500{--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}.nx-border-red-200{--tw-border-opacity:1;border-color:rgba(254,202,202,var(--tw-border-opacity))}.nx-border-transparent{border-color:transparent}.nx-border-yellow-100{--tw-border-opacity:1;border-color:rgba(254,249,195,var(--tw-border-opacity))}.nx-border-opacity-\[0\.04\]{--tw-border-opacity:.04}.nx-bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.nx-bg-black\/80{background-color:rgba(0,0,0,.8)}.nx-bg-black\/\[\.05\]{background-color:rgba(0,0,0,.05)}.nx-bg-blue-100{--tw-bg-opacity:1;background-color:rgba(219,234,254,var(--tw-bg-opacity))}.nx-bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.nx-bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.nx-bg-neutral-900{--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}.nx-bg-orange-50{--tw-bg-opacity:1;background-color:rgba(255,247,237,var(--tw-bg-opacity))}.nx-bg-primary-100{--tw-bg-opacity:1;background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/var(--tw-bg-opacity))}.nx-bg-primary-50{--tw-bg-opacity:1;background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)97%/var(--tw-bg-opacity))}.nx-bg-primary-500\/10{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/.1)}.nx-bg-primary-700\/5{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%/.05)}.nx-bg-red-100{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.nx-bg-transparent{background-color:transparent}.nx-bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.nx-bg-yellow-50{--tw-bg-opacity:1;background-color:rgba(254,252,232,var(--tw-bg-opacity))}.nx-bg-opacity-\[0\.03\]{--tw-bg-opacity:.03}.nx-p-0{padding:0}.nx-p-0\.5{padding:.125rem}.nx-p-1{padding:.25rem}.nx-p-1\.5{padding:.375rem}.nx-p-2{padding:.5rem}.nx-p-4{padding:1rem}.nx-p-8{padding:2rem}.nx-px-1{padding-left:.25rem;padding-right:.25rem}.nx-px-1\.5{padding-left:.375rem;padding-right:.375rem}.nx-px-2{padding-left:.5rem;padding-right:.5rem}.nx-px-2\.5{padding-left:.625rem;padding-right:.625rem}.nx-px-3{padding-left:.75rem;padding-right:.75rem}.nx-px-4{padding-left:1rem;padding-right:1rem}.nx-px-6{padding-left:1.5rem;padding-right:1.5rem}.nx-px-\[\.25em\]{padding-left:.25em;padding-right:.25em}.nx-py-0{padding-top:0;padding-bottom:0}.nx-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.nx-py-1{padding-top:.25rem;padding-bottom:.25rem}.nx-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.nx-py-12{padding-top:3rem;padding-bottom:3rem}.nx-py-2{padding-top:.5rem;padding-bottom:.5rem}.nx-py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.nx-py-4{padding-top:1rem;padding-bottom:1rem}.nx-pb-1{padding-bottom:.25rem}.nx-pb-1\.5{padding-bottom:.375rem}.nx-pb-4{padding-bottom:1rem}.nx-pb-8{padding-bottom:2rem}.nx-pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.nx-pb-px{padding-bottom:1px}.nx-pl-6{padding-left:1.5rem}.nx-pl-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\]{padding-left:max(env(safe-area-inset-left),1.5rem)}.nx-pr-4{padding-right:1rem}.nx-pr-\[calc\(env\(safe-area-inset-right\)-1\.5rem\)\]{padding-right:calc(env(safe-area-inset-right) - 1.5rem)}.nx-pr-\[max\(env\(safe-area-inset-right\)\,1\.5rem\)\]{padding-right:max(env(safe-area-inset-right),1.5rem)}.nx-pt-1{padding-top:.25rem}.nx-pt-12{padding-top:3rem}.nx-pt-4{padding-top:1rem}.nx-pt-6{padding-top:1.5rem}.nx-pt-8{padding-top:2rem}.nx-text-left{text-align:left}.nx-text-center{text-align:center}.nx-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nx-text-2xl{font-size:1.5rem}.nx-text-3xl{font-size:1.875rem}.nx-text-4xl{font-size:2.25rem}.nx-text-\[\.9em\]{font-size:.9em}.nx-text-\[10px\]{font-size:10px}.nx-text-base{font-size:1rem}.nx-text-lg{font-size:1.125rem}.nx-text-sm{font-size:.875rem}.nx-text-xl{font-size:1.25rem}.nx-text-xs{font-size:.75rem}.nx-font-bold{font-weight:700}.nx-font-extrabold{font-weight:800}.nx-font-medium{font-weight:500}.nx-font-normal{font-weight:400}.nx-font-semibold{font-weight:600}.nx-uppercase{text-transform:uppercase}.nx-capitalize{text-transform:capitalize}.nx-italic{font-style:italic}.nx-leading-5{line-height:1.25rem}.nx-leading-7{line-height:1.75rem}.nx-leading-\[1\.35rem\]{line-height:1.35rem}.nx-leading-tight{line-height:1.25}.nx-tracking-tight{letter-spacing:-.015em}.nx-text-blue-900{--tw-text-opacity:1;color:rgba(30,58,138,var(--tw-text-opacity))}.nx-text-current{color:currentColor}.nx-text-gray-100{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.nx-text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.nx-text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.nx-text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.nx-text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.nx-text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.nx-text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.nx-text-orange-800{--tw-text-opacity:1;color:rgba(154,52,18,var(--tw-text-opacity))}.nx-text-primary-600{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}.nx-text-primary-800{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-text-opacity))}.nx-text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.nx-text-red-900{--tw-text-opacity:1;color:rgba(127,29,29,var(--tw-text-opacity))}.nx-text-slate-50{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.nx-text-slate-900{--tw-text-opacity:1;color:rgba(15,23,42,var(--tw-text-opacity))}.nx-text-yellow-900{--tw-text-opacity:1;color:rgba(113,63,18,var(--tw-text-opacity))}.nx-underline{text-decoration-line:underline}.nx-no-underline{text-decoration-line:none}.nx-decoration-from-font{text-decoration-thickness:from-font}.nx-subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.nx-opacity-0{opacity:0}.nx-opacity-100{opacity:1}.nx-opacity-25{opacity:.25}.nx-opacity-75{opacity:.75}.nx-opacity-80{opacity:.8}.nx-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-\[0_-12px_16px_\#fff\],.nx-shadow-\[0_-12px_16px_white\]{--tw-shadow:0 -12px 16px #fff;--tw-shadow-colored:0 -12px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-\[0_2px_4px_rgba\(0\,0\,0\,\.02\)\,0_1px_0_rgba\(0\,0\,0\,\.06\)\]{--tw-shadow:0 2px 4px rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.06);--tw-shadow-colored:0 2px 4px var(--tw-shadow-color),0 1px 0 var(--tw-shadow-color)}.nx-shadow-\[0_2px_4px_rgba\(0\,0\,0\,\.02\)\,0_1px_0_rgba\(0\,0\,0\,\.06\)\],.nx-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nx-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nx-shadow-sm,.nx-shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.nx-shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.nx-shadow-gray-100{--tw-shadow-color:#f3f4f6;--tw-shadow:var(--tw-shadow-colored)}.nx-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.nx-ring-black\/5{--tw-ring-color:rgba(0,0,0,.05)}.nx-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nx-duration-100{transition-duration:.1s}.nx-duration-200{transition-duration:.2s}.nx-duration-300{transition-duration:.3s}.nx-duration-500{transition-duration:.5s}.nx-duration-75{transition-duration:75ms}.nx-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[-webkit-tap-highlight-color\:transparent\]{-webkit-tap-highlight-color:transparent}.\[-webkit-touch-callout\:none\]{-webkit-touch-callout:none}.\[counter-reset\:line\]{counter-reset:line}.\[counter-reset\:step\]{counter-reset:step}.\[hyphens\:auto\]{-webkit-hyphens:auto;hyphens:auto}.\[text-underline-position\:from-font\]{text-underline-position:from-font}.\[transition\:background-color_1\.5s_ease\]{transition:background-color 1.5s}.\[word-break\:break-word\]{word-break:break-word}:root{--shiki-color-text:#414141;--shiki-color-background:transparent;--shiki-token-constant:#1976d2;--shiki-token-string:#22863a;--shiki-token-comment:#aaa;--shiki-token-keyword:#d32f2f;--shiki-token-parameter:#ff9801;--shiki-token-function:#6f42c1;--shiki-token-string-expression:var(--shiki-token-string);--shiki-token-punctuation:#212121;--shiki-token-link:var(--shiki-token-string);--shiki-color-ansi-black:#24292e;--shiki-color-ansi-black-dim:rgba(36,41,46,.5);--shiki-color-ansi-red:#d73a49;--shiki-color-ansi-red-dim:rgba(215,58,73,.5);--shiki-color-ansi-green:#28a745;--shiki-color-ansi-green-dim:rgba(40,167,69,.5);--shiki-color-ansi-yellow:#dbab09;--shiki-color-ansi-yellow-dim:rgba(219,171,9,.5);--shiki-color-ansi-blue:#0366d6;--shiki-color-ansi-blue-dim:rgba(3,102,214,.5);--shiki-color-ansi-magenta:#5a32a3;--shiki-color-ansi-magenta-dim:rgba(90,50,163,.5);--shiki-color-ansi-cyan:#1b7c83;--shiki-color-ansi-cyan-dim:rgba(27,124,131,.5);--shiki-color-ansi-white:#6a737d;--shiki-color-ansi-white-dim:hsla(212,8%,45%,.5);--shiki-color-ansi-bright-black:#959da5;--shiki-color-ansi-bright-black-dim:hsla(210,8%,62%,.5);--shiki-color-ansi-bright-red:#cb2431;--shiki-color-ansi-bright-red-dim:rgba(203,36,49,.5);--shiki-color-ansi-bright-green:#22863a;--shiki-color-ansi-bright-green-dim:rgba(34,134,58,.5);--shiki-color-ansi-bright-yellow:#b08800;--shiki-color-ansi-bright-yellow-dim:rgba(176,136,0,.5);--shiki-color-ansi-bright-blue:#005cc5;--shiki-color-ansi-bright-blue-dim:rgba(0,92,197,.5);--shiki-color-ansi-bright-magenta:#5a32a3;--shiki-color-ansi-bright-magenta-dim:rgba(90,50,163,.5);--shiki-color-ansi-bright-cyan:#3192aa;--shiki-color-ansi-bright-cyan-dim:rgba(49,146,170,.5);--shiki-color-ansi-bright-white:#d1d5da;--shiki-color-ansi-bright-white-dim:rgba(209,213,218,.5)}@supports (color:lab(0% 0 0)){:root{--shiki-color-text:lab(27.5348% 0 0);--shiki-token-constant:lab(48.3994% .649333 -55.5719);--shiki-token-string:lab(49.1367% -42.0409 31.8582);--shiki-token-comment:lab(69.608% -.0000298023 0);--shiki-token-keyword:lab(47.8876% 63.025 42.31);--shiki-token-parameter:lab(72.7377% 33.9074 77.3632);--shiki-token-function:lab(39.0339% 41.1896 -60.5821);--shiki-token-punctuation:lab(12.7448% 0 0)}}.dark{--shiki-color-text:#d1d1d1;--shiki-token-constant:#79b8ff;--shiki-token-string:#ffab70;--shiki-token-comment:#6b737c;--shiki-token-keyword:#f97583;--shiki-token-function:#b392f0;--shiki-token-string-expression:#4bb74a;--shiki-token-punctuation:#bbb;--shiki-token-link:var(--shiki-token-string);--shiki-color-ansi-black:#586069;--shiki-color-ansi-black-dim:rgba(88,96,105,.5);--shiki-color-ansi-red:#ea4a5a;--shiki-color-ansi-red-dim:rgba(234,74,90,.5);--shiki-color-ansi-green:#34d058;--shiki-color-ansi-green-dim:rgba(52,208,88,.5);--shiki-color-ansi-yellow:#ffea7f;--shiki-color-ansi-yellow-dim:rgba(255,234,127,.5);--shiki-color-ansi-blue:#2188ff;--shiki-color-ansi-blue-dim:rgba(33,136,255,.5);--shiki-color-ansi-magenta:#b392f0;--shiki-color-ansi-magenta-dim:rgba(179,146,240,.5);--shiki-color-ansi-cyan:#39c5cf;--shiki-color-ansi-cyan-dim:rgba(57,197,207,.5);--shiki-color-ansi-white:#d1d5da;--shiki-color-ansi-white-dim:rgba(209,213,218,.5);--shiki-color-ansi-bright-black:#959da5;--shiki-color-ansi-bright-black-dim:hsla(210,8%,62%,.5);--shiki-color-ansi-bright-red:#f97583;--shiki-color-ansi-bright-red-dim:rgba(249,117,131,.5);--shiki-color-ansi-bright-green:#85e89d;--shiki-color-ansi-bright-green-dim:rgba(133,232,157,.5);--shiki-color-ansi-bright-yellow:#ffea7f;--shiki-color-ansi-bright-yellow-dim:rgba(255,234,127,.5);--shiki-color-ansi-bright-blue:#79b8ff;--shiki-color-ansi-bright-blue-dim:rgba(121,184,255,.5);--shiki-color-ansi-bright-magenta:#b392f0;--shiki-color-ansi-bright-magenta-dim:rgba(179,146,240,.5);--shiki-color-ansi-bright-cyan:#56d4dd;--shiki-color-ansi-bright-cyan-dim:rgba(86,212,221,.5);--shiki-color-ansi-bright-white:#fafbfc;--shiki-color-ansi-bright-white-dim:rgba(250,251,252,.5)}@supports (color:lab(0% 0 0)){.dark{--shiki-color-text:lab(83.8412% -.0000298023 0);--shiki-token-constant:lab(72.6797% -5.9377 -41.8341);--shiki-token-string:lab(77.5312% 27.4176 43.2358);--shiki-token-comment:lab(47.984% -1.63257 -6.06269);--shiki-token-keyword:lab(65.9075% 52.4906 18.1315);--shiki-token-function:lab(66.4473% 27.2323 -43.2583);--shiki-token-string-expression:lab(66.4666% -48.7314 44.7269);--shiki-token-punctuation:lab(75.8836% 0 -.0000119209)}}code{-webkit-box-decoration-break:slice;box-decoration-break:slice;font-feature-settings:"rlig" 1,"calt" 1,"ss01" 1}code[data-line-numbers]>.line{padding-left:.5rem}code[data-line-numbers]>.line:before{counter-increment:line;content:counter(line);float:left;text-align:right;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity));min-width:2.6rem;height:100%;padding-right:1rem}code .line.highlighted{background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/.1);color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/.5);--tw-shadow:2px 0 currentColor inset;--tw-shadow-colored:inset 2px 0 var(--tw-shadow-color)}code .line .highlighted,code .line.highlighted{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}code .line .highlighted{--tw-shadow:0 0 0 2px rgba(0,0,0,.3);--tw-shadow-colored:0 0 0 2px var(--tw-shadow-color);background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/.1);--tw-shadow-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/.1);--tw-shadow:var(--tw-shadow-colored);border-radius:.125rem}:is(html[class~=dark] code .line .highlighted){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1);--tw-shadow-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1);--tw-shadow:var(--tw-shadow-colored)}pre{contain:paint}pre code{color:currentColor;border-style:none;border-radius:0;min-width:100%;font-size:.875rem;line-height:1.25rem;display:grid;background-color:transparent!important;padding:0!important}:is(html[class~=dark] pre code){background-color:transparent!important}pre code .line,pre:not([data-theme]){padding-left:1rem;padding-right:1rem}html[data-nextra-word-wrap] pre{word-break:break-word;white-space:pre-wrap}@media (min-width:768px){html[data-nextra-word-wrap] pre{white-space:pre}}html[data-nextra-word-wrap] pre .line{display:inline-block}pre .nextra-copy-icon{animation:fade-in .3s forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@supports (-webkit-backdrop-filter:blur(1px)) or ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.nextra-button{--tw-bg-opacity:.85;--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}:is(html[class~=dark] .nextra-button){--tw-bg-opacity:.8}}.subheading-anchor{opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:is([dir=ltr] .subheading-anchor){margin-left:.25rem}:is([dir=rtl] .subheading-anchor){margin-right:.25rem}.subheading-anchor:focus,:hover>.subheading-anchor{opacity:1}.subheading-anchor:after{--tw-content:"#";content:var(--tw-content);--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity));padding-left:.25rem;padding-right:.25rem}:is(html[class~=dark] .subheading-anchor):after{--tw-text-opacity:1;color:rgba(64,64,64,var(--tw-text-opacity))}span:target+.subheading-anchor:after{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] span:target+.subheading-anchor):after{--tw-text-opacity:1;color:rgba(115,115,115,var(--tw-text-opacity))}.nextra-scrollbar{scrollbar-width:thin;scrollbar-color:hsla(0,0%,45%,.4) transparent;scrollbar-gutter:stable}@supports (color:lab(0% 0 0)){.nextra-scrollbar{scrollbar-color:lab(48.438% 0 0/.4) transparent}}.nextra-scrollbar::-webkit-scrollbar{width:.75rem;height:.75rem}.nextra-scrollbar::-webkit-scrollbar-track{background-color:transparent}.nextra-scrollbar::-webkit-scrollbar-thumb{border-radius:10px}.nextra-scrollbar:hover::-webkit-scrollbar-thumb{background-color:var(--tw-shadow-color);--tw-shadow-color:hsla(0,0%,45%,.2);--tw-shadow:var(--tw-shadow-colored);background-clip:content-box;border:3px solid transparent}.nextra-scrollbar:hover::-webkit-scrollbar-thumb:hover{--tw-shadow-color:hsla(0,0%,45%,.4);--tw-shadow:var(--tw-shadow-colored)}@media (max-width:767px){.nextra-container .nextra-scrollbar{scrollbar-gutter:auto}}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.nextra-steps h3{counter-increment:step}.nextra-steps h3:before{--tw-border-opacity:1;border-width:4px;border-color:rgba(255,255,255,var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity));width:33px;height:33px;position:absolute}:is(html[class~=dark] .nextra-steps h3):before{--tw-border-opacity:1;border-color:rgba(17,17,17,var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}.nextra-steps h3:before{text-align:center;text-indent:-1px;--tw-text-opacity:1;color:rgba(163,163,163,var(--tw-text-opacity));content:counter(step);border-radius:9999px;margin-top:3px;margin-left:-41px;font-size:1rem;font-weight:400}.nextra-cards{grid-template-columns:repeat(auto-fill,minmax(max(250px,calc((100% - 1rem*2)/var(--rows))),1fr))}.nextra-card img{-webkit-user-select:none;-moz-user-select:none;user-select:none}.nextra-card:hover svg{color:currentColor}.nextra-card svg{color:rgba(0,0,0,.2);width:1.5rem;transition:color .3s}.nextra-card p{margin-top:.5rem}.dark .nextra-card svg{color:hsla(0,0%,100%,.4)}.dark .nextra-card:hover svg{color:currentColor}.nextra-hamburger svg g{transform-origin:50%;transition:transform .2s cubic-bezier(.25,1,.5,1)}.nextra-hamburger svg path{opacity:1;transition:transform .2s cubic-bezier(.25,1,.5,1) .2s,opacity .2s .2s}.nextra-hamburger svg.open path{transition:transform .2s cubic-bezier(.25,1,.5,1),opacity 0s .2s}.nextra-hamburger svg.open g{transition:transform .2s cubic-bezier(.25,1,.5,1) .2s}.nextra-hamburger svg.open>path{opacity:0}.nextra-hamburger svg.open>g:first-of-type{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nextra-hamburger svg.open>g:first-of-type path{transform:translateY(6px)}.nextra-hamburger svg.open>g:nth-of-type(2){--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.nextra-hamburger svg.open>g:nth-of-type(2) path{transform:translateY(-6px)}article.nextra-body-typesetting-article{font-feature-settings:"rlig" 1,"calt" 1;font-size:17px}article.nextra-body-typesetting-article h1{text-align:center;margin-top:1.5rem;margin-bottom:1rem;font-size:2.5rem}article.nextra-body-typesetting-article h2{border-style:none}article.nextra-body-typesetting-article a{text-decoration-line:none}article.nextra-body-typesetting-article a:hover{text-decoration-line:underline}article.nextra-body-typesetting-article p{line-height:2rem}article.nextra-body-typesetting-article code{border-style:none}:is(html[class~=dark] article.nextra-body-typesetting-article code){--tw-bg-opacity:1;background-color:rgba(64,64,64,var(--tw-bg-opacity))}:is(html[class~=dark] article.nextra-body-typesetting-article pre code){background-color:transparent}article.nextra-body-typesetting-article .subheading-anchor+a{text-decoration-line:none}article.nextra-body-typesetting-article .subheading-anchor+a:after{content:var(--tw-content);display:none}article.nextra-body-typesetting-article .subheading-anchor+a:hover{text-decoration-line:none}html{scroll-padding-top:var(--nextra-navbar-height);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"rlig" 1,"calt" 1,"ss01" 1;-webkit-tap-highlight-color:transparent;font-size:1rem}body{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));width:100%}:is(html[class~=dark] body){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}[tabindex]:not([tabindex="-1"]),a,button,input,summary{outline-offset:2px;outline:2px solid transparent}a:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}summary:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}button:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}input:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}[tabindex]:not([tabindex="-1"]):focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)86%/var(--tw-ring-opacity));--tw-ring-offset-width:1px;--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%)}:is(html[class~=dark] a:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] summary:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] button:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] input:focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}:is(html[class~=dark] [tabindex]:not([tabindex="-1"]):focus-visible){--tw-ring-opacity:1;--tw-ring-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)32%/var(--tw-ring-opacity));--tw-ring-offset-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)39%)}a,summary{border-radius:.25rem}.nextra-content{--tw-text-opacity:1;color:rgba(51,65,85,var(--tw-text-opacity))}:is(html[class~=dark] .nextra-content){--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity))}@media (max-width:767px){.nextra-sidebar-container{z-index:15;overscroll-behavior:contain;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));padding-top:calc(var(--nextra-navbar-height));width:100%;position:fixed;top:0;bottom:0}:is(html[class~=dark] .nextra-sidebar-container){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}.nextra-sidebar-container{will-change:transform,opacity;contain:layout style;backface-visibility:hidden;transition:transform .8s cubic-bezier(.52,.16,.04,1)}.nextra-sidebar-container>.nextra-scrollbar{-webkit-mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0);mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0)}.nextra-banner-container~div .nextra-sidebar-container{padding-top:6.5rem}.nextra-banner-container~div.nextra-nav-container{top:2.5rem}@media (min-width:768px){.nextra-banner-container~div.nextra-nav-container{top:0}}.nextra-banner-hidden .nextra-banner-container~div .nextra-sidebar-container{padding-top:4rem}.nextra-banner-hidden .nextra-nav-container{top:0!important}.nextra-search .excerpt{text-overflow:ellipsis;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}@media (prefers-reduced-motion:reduce) and (max-width:767px){.nextra-sidebar-container,.nextra-sidebar-container.open,article:before,body.resizing .nextra-sidebar-container{transition-property:none}}article details>summary::-webkit-details-marker{display:none}article details>summary:before{vertical-align:-4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='h-5 w-5' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E");width:1.2em;height:1.2em}@media (min-width:768px){.nextra-sidebar-container,.nextra-toc>.div{-webkit-mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0);mask-image:linear-gradient(transparent,#000 20px),linear-gradient(270deg,#000 10px,transparent 0)}}@supports (-webkit-backdrop-filter:blur(1px)) or ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.nextra-search ul{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);background-color:hsla(0,0%,100%,.7)}:is(html[class~=dark] .nextra-search ul){background-color:hsla(0,0%,7%,.8)}.nextra-nav-container-blur{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);background-color:hsla(0,0%,100%,.85)}:is(html[class~=dark] .nextra-nav-container-blur){background-color:hsla(0,0%,7%,.8)!important}}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}.contains-task-list{margin-left:0;list-style-type:none}.contains-task-list input[type=checkbox]{margin-right:.25rem}.nextra-banner-hidden .nextra-banner-container{display:none}.nextra-sidebar-container [data-toggle-animation=show] button{opacity:0;animation:nextra-fadein 1s .2s forwards}.nextra-sidebar-container [data-toggle-animation=hide] button{opacity:0;animation:nextra-fadein2 1s .2s forwards}.footnotes a[data-footnote-backref]{font-family:initial}@keyframes nextra-fadein{0%{opacity:0}to{opacity:1}}@keyframes nextra-fadein2{0%{opacity:0}to{opacity:1}}.placeholder\:nx-text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.placeholder\:nx-text-gray-500::placeholder{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.before\:nx-absolute:before{content:var(--tw-content);position:absolute}.before\:nx-inset-y-1:before{content:var(--tw-content);top:.25rem;bottom:.25rem}.before\:nx-mr-1:before{content:var(--tw-content);margin-right:.25rem}.before\:nx-inline-block:before{content:var(--tw-content);display:inline-block}.before\:nx-w-px:before{content:var(--tw-content);width:1px}.before\:nx-shrink-0:before{content:var(--tw-content);flex-shrink:0}.before\:nx-bg-gray-200:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.before\:nx-opacity-25:before{content:var(--tw-content);opacity:.25}.before\:nx-transition-transform:before{content:var(--tw-content);transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.before\:nx-content-\[\"\"\]:before{--tw-content:"";content:var(--tw-content)}.before\:nx-content-\[\"\#\"\]:before{--tw-content:"#";content:var(--tw-content)}.before\:nx-content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.first\:nx-mt-0:first-child{margin-top:0}.even\:nx-bg-gray-100:nth-child(2n){--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.focus-within\:nx-opacity-100:focus-within{opacity:1}.hover\:nx-border-gray-200:hover{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hover\:nx-border-gray-300:hover{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.hover\:nx-bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:nx-bg-gray-800\/5:hover{background-color:rgba(31,41,55,.05)}.hover\:nx-bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.hover\:nx-text-black:hover{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.hover\:nx-text-gray-800:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.hover\:nx-text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:nx-text-primary-600:hover{--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}.hover\:nx-opacity-100:hover{opacity:1}.hover\:nx-opacity-60:hover{opacity:.6}.hover\:nx-opacity-70:hover{opacity:.7}.hover\:nx-opacity-75:hover{opacity:.75}.hover\:nx-shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:nx-shadow-lg:hover,.hover\:nx-shadow-md:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hover\:nx-shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.hover\:nx-shadow-gray-100:hover{--tw-shadow-color:#f3f4f6;--tw-shadow:var(--tw-shadow-colored)}.focus\:nx-not-sr-only:focus{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:nx-fixed:focus{position:fixed}.focus\:nx-z-50:focus{z-index:50}.focus\:nx-m-3:focus{margin:.75rem}.focus\:nx-ml-4:focus{margin-left:1rem}.focus\:nx-h-\[calc\(var\(--nextra-navbar-height\)-1\.5rem\)\]:focus{height:calc(var(--nextra-navbar-height) - 1.5rem)}.focus\:nx-rounded-lg:focus{border-radius:.5rem}.focus\:nx-border:focus{border-width:1px}.focus\:nx-border-neutral-400:focus{--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}.focus\:nx-bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.focus\:nx-px-3:focus{padding-left:.75rem;padding-right:.75rem}.focus\:nx-py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:nx-align-middle:focus{vertical-align:middle}.focus\:nx-text-sm:focus{font-size:.875rem}.focus\:nx-font-bold:focus{font-weight:700}.focus\:nx-text-gray-900:focus{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.active\:nx-bg-gray-400\/20:active{background-color:rgba(156,163,175,.2)}.active\:nx-opacity-50:active{opacity:.5}.active\:nx-shadow-sm:active{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.active\:nx-shadow-gray-200:active{--tw-shadow-color:#e5e7eb;--tw-shadow:var(--tw-shadow-colored)}.nx-group:hover .group-hover\:nx-translate-x-\[2px\]{--tw-translate-x:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-right-1){right:.25rem}:is([dir=ltr] .ltr\:nx-right-1\.5){right:.375rem}:is([dir=ltr] .ltr\:nx-right-3){right:.75rem}:is([dir=ltr] .ltr\:-nx-mr-4){margin-right:-1rem}:is([dir=ltr] .ltr\:nx-ml-3){margin-left:.75rem}:is([dir=ltr] .ltr\:nx-ml-6){margin-left:1.5rem}:is([dir=ltr] .ltr\:nx-ml-auto){margin-left:auto}:is([dir=ltr] .ltr\:nx-mr-auto){margin-right:auto}:is([dir=ltr] .ltr\:nx-rotate-180){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-rotate-90){--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=ltr] .ltr\:nx-border-l-2){border-left-width:2px}:is([dir=ltr] .ltr\:nx-pl-10){padding-left:2.5rem}:is([dir=ltr] .ltr\:nx-pl-12){padding-left:3rem}:is([dir=ltr] .ltr\:nx-pl-16){padding-left:4rem}:is([dir=ltr] .ltr\:nx-pl-3){padding-left:.75rem}:is([dir=ltr] .ltr\:nx-pl-4){padding-left:1rem}:is([dir=ltr] .ltr\:nx-pl-6){padding-left:1.5rem}:is([dir=ltr] .ltr\:nx-pl-8){padding-left:2rem}:is([dir=ltr] .ltr\:nx-pr-0){padding-right:0}:is([dir=ltr] .ltr\:nx-pr-2){padding-right:.5rem}:is([dir=ltr] .ltr\:nx-pr-4){padding-right:1rem}:is([dir=ltr] .ltr\:nx-pr-9){padding-right:2.25rem}:is([dir=ltr] .ltr\:nx-text-right){text-align:right}:is([dir=ltr] .ltr\:before\:nx-left-0):before{content:var(--tw-content);left:0}:is([dir=rtl] .rtl\:nx-left-1){left:.25rem}:is([dir=rtl] .rtl\:nx-left-1\.5){left:.375rem}:is([dir=rtl] .rtl\:nx-left-3){left:.75rem}:is([dir=rtl] .rtl\:-nx-ml-4){margin-left:-1rem}:is([dir=rtl] .rtl\:nx-ml-auto){margin-left:auto}:is([dir=rtl] .rtl\:nx-mr-3){margin-right:.75rem}:is([dir=rtl] .rtl\:nx-mr-6){margin-right:1.5rem}:is([dir=rtl] .rtl\:nx-mr-auto){margin-right:auto}:is([dir=rtl] .rtl\:-nx-rotate-180){--tw-rotate:-180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-rotate-180){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-rotate-\[-270deg\]){--tw-rotate:-270deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:nx-border-r-2){border-right-width:2px}:is([dir=rtl] .rtl\:nx-pl-0){padding-left:0}:is([dir=rtl] .rtl\:nx-pl-2){padding-left:.5rem}:is([dir=rtl] .rtl\:nx-pl-4){padding-left:1rem}:is([dir=rtl] .rtl\:nx-pl-9){padding-left:2.25rem}:is([dir=rtl] .rtl\:nx-pr-10){padding-right:2.5rem}:is([dir=rtl] .rtl\:nx-pr-12){padding-right:3rem}:is([dir=rtl] .rtl\:nx-pr-16){padding-right:4rem}:is([dir=rtl] .rtl\:nx-pr-3){padding-right:.75rem}:is([dir=rtl] .rtl\:nx-pr-4){padding-right:1rem}:is([dir=rtl] .rtl\:nx-pr-6){padding-right:1.5rem}:is([dir=rtl] .rtl\:nx-pr-8){padding-right:2rem}:is([dir=rtl] .rtl\:nx-text-left){text-align:left}:is([dir=rtl] .rtl\:before\:nx-right-0):before{content:var(--tw-content);right:0}:is([dir=rtl] .rtl\:before\:nx-rotate-180):before{content:var(--tw-content);--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@media (prefers-reduced-motion:reduce){.motion-reduce\:nx-transform-none{transform:none}.motion-reduce\:nx-transition-none{transition-property:none}}@media (prefers-contrast:more){.contrast-more\:nx-border{border-width:1px}.contrast-more\:nx-border-t{border-top-width:1px}.contrast-more\:nx-border-current{border-color:currentColor}.contrast-more\:nx-border-gray-600{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}.contrast-more\:nx-border-gray-900{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.contrast-more\:nx-border-neutral-400{--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}.contrast-more\:nx-border-primary-500{--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}.contrast-more\:nx-border-primary-900\/20{border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)24%/.2)}.contrast-more\:nx-border-transparent{border-color:transparent}.contrast-more\:nx-font-bold{font-weight:700}.contrast-more\:\!nx-text-primary-600{--tw-text-opacity:1!important;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))!important}.contrast-more\:nx-text-current{color:currentColor}.contrast-more\:nx-text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.contrast-more\:nx-text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.contrast-more\:nx-text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.contrast-more\:nx-underline{text-decoration-line:underline}.contrast-more\:nx-shadow-\[0_0_0_1px_\#000\]{--tw-shadow:0 0 0 1px #000;--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color)}.contrast-more\:nx-shadow-\[0_0_0_1px_\#000\],.contrast-more\:nx-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.contrast-more\:nx-shadow-none{--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}.contrast-more\:nx-contrast-150{--tw-contrast:contrast(1.5);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.contrast-more\:hover\:nx-border-gray-900:hover{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}}:is(html[class~=dark] .dark\:nx-border-blue-200\/30){border-color:rgba(191,219,254,.3)}:is(html[class~=dark] .dark\:nx-border-gray-100\/20){border-color:rgba(243,244,246,.2)}:is(html[class~=dark] .dark\:nx-border-gray-600){--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-gray-700){--tw-border-opacity:1;border-color:rgba(55,65,81,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-neutral-700){--tw-border-opacity:1;border-color:rgba(64,64,64,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-neutral-800){--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:nx-border-orange-400\/30){border-color:rgba(251,146,60,.3)}:is(html[class~=dark] .dark\:nx-border-primary-100\/10){border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.1)}:is(html[class~=dark] .dark\:nx-border-red-200\/30){border-color:hsla(0,96%,89%,.3)}:is(html[class~=dark] .dark\:nx-border-white\/10){border-color:hsla(0,0%,100%,.1)}:is(html[class~=dark] .dark\:nx-border-white\/20){border-color:hsla(0,0%,100%,.2)}:is(html[class~=dark] .dark\:nx-border-yellow-200\/30){border-color:hsla(53,98%,77%,.3)}:is(html[class~=dark] .dark\:nx-bg-black\/60){background-color:rgba(0,0,0,.6)}:is(html[class~=dark] .dark\:nx-bg-blue-900\/30){background-color:rgba(30,58,138,.3)}:is(html[class~=dark] .dark\:nx-bg-dark){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-dark\/50){background-color:hsla(0,0%,7%,.5)}:is(html[class~=dark] .dark\:nx-bg-gray-50\/10){background-color:rgba(249,250,251,.1)}:is(html[class~=dark] .dark\:nx-bg-neutral-800){--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-neutral-900){--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:nx-bg-orange-400\/20){background-color:rgba(251,146,60,.2)}:is(html[class~=dark] .dark\:nx-bg-primary-100\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-300\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)77%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-400\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)66%/.1)}:is(html[class~=dark] .dark\:nx-bg-primary-500\/10){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/.1)}:is(html[class~=dark] .dark\:nx-bg-red-900\/30){background-color:rgba(127,29,29,.3)}:is(html[class~=dark] .dark\:nx-bg-white\/10){background-color:hsla(0,0%,100%,.1)}:is(html[class~=dark] .dark\:nx-bg-yellow-700\/30){background-color:rgba(161,98,7,.3)}:is(html[class~=dark] .dark\:nx-bg-\[linear-gradient\(1deg\,\#383838\,\#212121\)\]){background-image:linear-gradient(1deg,#383838,#212121)}:is(html[class~=dark] .dark\:nx-text-blue-200){--tw-text-opacity:1;color:rgba(191,219,254,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-100){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-200){--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-300){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-400){--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-gray-50){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-200){--tw-text-opacity:1;color:rgba(229,229,229,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-400){--tw-text-opacity:1;color:rgba(163,163,163,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-neutral-600){--tw-text-opacity:1;color:rgba(82,82,82,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-orange-300){--tw-text-opacity:1;color:rgba(253,186,116,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-primary-600){--tw-text-opacity:1;color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)45%/var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-red-200){--tw-text-opacity:1;color:rgba(254,202,202,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-slate-100){--tw-text-opacity:1;color:rgba(241,245,249,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-white){--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-text-yellow-200){--tw-text-opacity:1;color:rgba(254,240,138,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:nx-shadow-\[0_-12px_16px_\#111\]){--tw-shadow:0 -12px 16px #111;--tw-shadow-colored:0 -12px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-shadow-\[0_-1px_0_rgba\(255\,255\,255\,\.1\)_inset\]){--tw-shadow:0 -1px 0 hsla(0,0%,100%,.1) inset;--tw-shadow-colored:inset 0 -1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-shadow-none){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .dark\:nx-ring-white\/20){--tw-ring-color:hsla(0,0%,100%,.2)}:is(html[class~=dark] .dark\:placeholder\:nx-text-gray-400)::-moz-placeholder{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:placeholder\:nx-text-gray-400)::placeholder{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:before\:nx-bg-neutral-800):before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:before\:nx-invert):before{content:var(--tw-content);--tw-invert:invert(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}:is(html[class~=dark] .even\:dark\:nx-bg-gray-600\/20):nth-child(2n){background-color:rgba(75,85,99,.2)}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-500:hover){--tw-border-opacity:1;border-color:rgba(115,115,115,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-700:hover){--tw-border-opacity:1;border-color:rgba(64,64,64,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-border-neutral-800:hover){--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-gray-100\/5:hover){background-color:rgba(243,244,246,.05)}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-700:hover){--tw-bg-opacity:1;background-color:rgba(64,64,64,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-800:hover){--tw-bg-opacity:1;background-color:rgba(38,38,38,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-neutral-900:hover){--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .dark\:hover\:nx-bg-primary-100\/5:hover){background-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.05)}:is(html[class~=dark] .dark\:hover\:nx-text-gray-100:hover){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-200:hover){--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-300:hover){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-gray-50:hover){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-neutral-50:hover){--tw-text-opacity:1;color:rgba(250,250,250,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-text-white:hover){--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}:is(html[class~=dark] .dark\:hover\:nx-shadow-none:hover){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .focus\:dark\:nx-border-neutral-800):focus{--tw-border-opacity:1;border-color:rgba(38,38,38,var(--tw-border-opacity))}:is(html[class~=dark] .dark\:focus\:nx-bg-dark:focus){--tw-bg-opacity:1;background-color:rgba(17,17,17,var(--tw-bg-opacity))}:is(html[class~=dark] .focus\:dark\:nx-bg-neutral-900):focus{--tw-bg-opacity:1;background-color:rgba(23,23,23,var(--tw-bg-opacity))}:is(html[class~=dark] .focus\:dark\:nx-text-gray-100):focus{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}@media (prefers-contrast:more){:is(html[class~=dark] .contrast-more\:dark\:nx-border-current){border-color:currentColor}:is(html[class~=dark] .contrast-more\:dark\:nx-border-gray-50){--tw-border-opacity:1;border-color:rgba(249,250,251,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-border-neutral-400){--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-border-primary-100\/40){border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)94%/.4)}:is(html[class~=dark] .contrast-more\:dark\:nx-border-primary-500){--tw-border-opacity:1;border-color:hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)50%/var(--tw-border-opacity))}:is(html[class~=dark] .dark\:contrast-more\:nx-border-neutral-400){--tw-border-opacity:1;border-color:rgba(163,163,163,var(--tw-border-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-current){color:currentColor}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-100){--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-300){--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-text-gray-50){--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}:is(html[class~=dark] .contrast-more\:dark\:nx-shadow-\[0_0_0_1px_\#fff\]){--tw-shadow:0 0 0 1px #fff;--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .contrast-more\:dark\:nx-shadow-none){--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}:is(html[class~=dark] .contrast-more\:dark\:hover\:nx-border-gray-50:hover){--tw-border-opacity:1;border-color:rgba(249,250,251,var(--tw-border-opacity))}}@media print{.print\:nx-hidden{display:none}.print\:nx-bg-transparent{background-color:transparent}}@media not all and (min-width:1280px){.max-xl\:nx-hidden{display:none}}@media not all and (min-width:768px){.max-md\:nx-hidden{display:none}.max-md\:nx-grow{flex-grow:1}.max-md\:\[transform\:translate3d\(0\,-100\%\,0\)\]{transform:translateY(-100%)}.max-md\:\[transform\:translate3d\(0\,0\,0\)\]{transform:translate(0)}}@media (min-width:640px){.sm\:nx-flex{display:flex}}@media (min-width:768px){.md\:nx-relative{position:relative}.md\:nx-sticky{position:sticky}.md\:nx-top-16{top:4rem}.md\:-nx-mx-8{margin-left:-2rem;margin-right:-2rem}.md\:nx-inline-block{display:inline-block}.md\:nx-inline{display:inline}.md\:nx-inline-flex{display:inline-flex}.md\:nx-hidden{display:none}.md\:nx-h-\[calc\(100vh-var\(--nextra-navbar-height\)-var\(--nextra-menu-height\)\)\]{height:calc(100vh - var(--nextra-navbar-height) - var(--nextra-menu-height))}.md\:nx-max-h-\[min\(calc\(100vh-5rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(100vh - 5rem - env(safe-area-inset-bottom)),400px)}.md\:nx-w-20{width:5rem}.md\:nx-w-64{width:16rem}.md\:nx-shrink-0{flex-shrink:0}.md\:nx-justify-start{justify-content:flex-start}.md\:nx-self-start{align-self:flex-start}.md\:nx-overflow-auto{overflow:auto}.md\:nx-px-12{padding-left:3rem;padding-right:3rem}.md\:nx-text-lg{font-size:1.125rem}.md\:nx-text-sm{font-size:.875rem}:is([dir=ltr] .ltr\:md\:nx-left-auto){left:auto}:is([dir=rtl] .rtl\:md\:nx-right-auto){right:auto}}@media (min-width:1280px){.xl\:nx-block{display:block}:is([dir=ltr] .ltr\:xl\:nx-ml-\[calc\(50\%-50vw\+16rem\)\]){margin-left:calc(50% - 50vw + 16rem)}:is([dir=ltr] .ltr\:xl\:nx-mr-\[calc\(50\%-50vw\)\]){margin-right:calc(50% - 50vw)}:is([dir=rtl] .rtl\:xl\:nx-ml-\[calc\(50\%-50vw\)\]){margin-left:calc(50% - 50vw)}:is([dir=rtl] .rtl\:xl\:nx-mr-\[calc\(50\%-50vw\+16rem\)\]){margin-right:calc(50% - 50vw + 16rem)}}@media (min-width:1536px){.\32 xl\:-nx-mx-24{margin-left:-6rem;margin-right:-6rem}}[data-expanded]>.\[\[data-expanded\]\>\&\]\:before\:nx-rotate-90:before{content:var(--tw-content);--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}body.nextra-banner-hidden .\[body\.nextra-banner-hidden_\&\]\:nx-hidden{display:none}div:hover>.\[div\:hover\>\&\]\:nx-opacity-100{opacity:1} +/* +! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.h-\[150px\]{height:150px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.w-32{width:8rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.grow{flex-grow:1}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-evenly{justify-content:space-evenly}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.self-end{align-self:flex-end}.self-center{align-self:center}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-tr-lg{border-top-right-radius:.5rem}.border{border-width:1px}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.bg-sky-500\/20{background-color:rgba(14,165,233,.2)}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\[script\:test\]{script:test}#__next,body,html{width:100%;height:100%}a{text-decoration:none!important}ul.nx-list-disc{margin-top:0!important;list-style-type:disc}ul.nx-list-disc li li{list-style-type:circle}ul.nx-list-disc li li li{list-style-type:square}ol.nx-list-decimal{margin-top:0!important}:root{--docsearch-highlight-color:#0ea5e9;--docsearch-primary-color:#0ea5e9}.DocSearch--active{overflow:unset!important}.DocSearch-Modal{border-radius:.375rem!important;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Modal:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Button{margin:0;width:13rem;border-radius:.375rem;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.DocSearch-Button,.DocSearch-Button:hover{background-color:rgb(229 229 229/var(--tw-bg-opacity))}.DocSearch-Button:hover{--tw-bg-opacity:1}.DocSearch-Button:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.DocSearch-Search-Icon{display:flex!important;align-items:center!important;justify-content:center!important;--tw-text-opacity:1!important;color:rgb(31 41 55/var(--tw-text-opacity))!important}.DocSearch-Search-Icon:is(.dark *){--tw-text-opacity:1!important;color:rgb(156 163 175/var(--tw-text-opacity))!important}.DocSearch-Screen-Icon{display:flex;justify-content:center}.DocSearch-Button-Keys{height:100%;align-items:center}.DocSearch-Button-Key{top:0;--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity));background-image:none!important;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Button-Key:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity))!important;--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.DocSearch-Commands-Key{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity));background-image:none!important;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Commands-Key:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity))!important;--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.DocSearch-Container:is(.dark *){background-color:rgba(0,0,0,.5)}.DocSearch-Input{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.DocSearch-Input:focus-visible{--tw-ring-color:transparent!important;--tw-ring-offset-width:0px}.DocSearch-Input:is(.dark *){background-color:transparent}.DocSearch-Form{--tw-shadow-color:#3b82f6;--tw-shadow:var(--tw-shadow-colored)}.DocSearch-Form:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-SearchBar{border-radius:.375rem}.DocSearch-SearchBar:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Dropdown:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Footer{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Footer:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Hit-source:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.DocSearch-Hit[aria-selected=true]>a{background-color:var(--docsearch-primary-color)!important}.DocSearch-Hit>a{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Hit>a:is(.dark *){--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.DocSearch-Hit-title:is(.dark *){--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.DocSearch-Hit-icon:is(.dark *){--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.DocSearch-Dropdown:is(.dark *)::-webkit-scrollbar-thumb{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}.DocSearch-Dropdown:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}.nextra-code-block pre:is(.dark *){--tw-bg-opacity:1!important;background-color:rgb(39 39 42/var(--tw-bg-opacity))!important}:is([dir=ltr] .ltr\:nx-pl-3){padding-left:.6rem}:is([dir=ltr] .ltr\:nx-ml-3){margin-left:.6rem}.hover\:bg-black:hover{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.hover\:bg-sky-500\/30:hover{background-color:rgba(14,165,233,.3)}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:border-neutral-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}.dark\:border-white:is(.dark *){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.dark\:bg-neutral-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hover\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.dark\:hover\:bg-white:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.dark\:hover\:text-black:hover:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} \ No newline at end of file diff --git a/_next/static/p-066_Cc34uP4vLflYhOc/_buildManifest.js b/_next/static/p-066_Cc34uP4vLflYhOc/_buildManifest.js new file mode 100644 index 0000000000..37ca1e0a7b --- /dev/null +++ b/_next/static/p-066_Cc34uP4vLflYhOc/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-711b79d226390d26.js"],"/404":["static/chunks/pages/404-73a1ab73a8a1e327.js"],"/_error":["static/chunks/pages/_error-094bb0cfcf67c3f3.js"],"/guides":[e,"static/chunks/pages/guides-0554132321698319.js"],"/guides/git":[e,"static/chunks/pages/guides/git-f61cc489918d5fe9.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-6daa6f967033422f.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-d60d59534ec903fe.js"],"/guides/types":[e,"static/chunks/pages/guides/types-fa5fe5d1ee308bea.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-a6f407eb046a7fa4.js"],"/ox_core":[e,"static/chunks/pages/ox_core-87d0fc2a5c42bbe0.js"],"/ox_core/Classes/Client/OxPlayer":[e,"static/chunks/pages/ox_core/Classes/Client/OxPlayer-b262ef5e6401be98.js"],"/ox_core/Classes/Server/OxAccount":[e,"static/chunks/pages/ox_core/Classes/Server/OxAccount-6e09273994e9cb78.js"],"/ox_core/Classes/Server/OxPlayer":[e,"static/chunks/pages/ox_core/Classes/Server/OxPlayer-2fe4018bc4600939.js"],"/ox_core/Classes/Server/OxVehicle":[e,"static/chunks/pages/ox_core/Classes/Server/OxVehicle-dc0b72c495905e06.js"],"/ox_core/Events/client":[e,"static/chunks/pages/ox_core/Events/client-74e885b2ac7d8a2b.js"],"/ox_core/Events/server":[e,"static/chunks/pages/ox_core/Events/server-480535e95a4df78d.js"],"/ox_core/Functions/common":[e,"static/chunks/pages/ox_core/Functions/common-3f89be5210cfbdd7.js"],"/ox_core/Functions/server":[e,"static/chunks/pages/ox_core/Functions/server-e3465ceb0283f840.js"],"/ox_doorlock":[e,"static/chunks/pages/ox_doorlock-13d0ea7f46f69ff7.js"],"/ox_doorlock/Client/functions":[e,"static/chunks/pages/ox_doorlock/Client/functions-9de093007bdca9db.js"],"/ox_doorlock/Server/events":[e,"static/chunks/pages/ox_doorlock/Server/events-a95fe0c1308e29c4.js"],"/ox_doorlock/Server/functions":[e,"static/chunks/pages/ox_doorlock/Server/functions-33c97b8d95457bba.js"],"/ox_doorlock/settings":[e,"static/chunks/pages/ox_doorlock/settings-45183d6697da2113.js"],"/ox_fuel":[e,"static/chunks/pages/ox_fuel-e8700659d32d9a76.js"],"/ox_fuel/Client/functions":[e,"static/chunks/pages/ox_fuel/Client/functions-1bdb435f9a39aa86.js"],"/ox_fuel/Server/functions":[e,"static/chunks/pages/ox_fuel/Server/functions-1622d7c7c0653801.js"],"/ox_fuel/Shared":[e,"static/chunks/pages/ox_fuel/Shared-e079809618e90f17.js"],"/ox_inventory":[e,"static/chunks/pages/ox_inventory-b8adb6c25b32c89b.js"],"/ox_inventory/Events/Client":[e,"static/chunks/pages/ox_inventory/Events/Client-01c12f568d572be2.js"],"/ox_inventory/Events/Server":[e,"static/chunks/pages/ox_inventory/Events/Server-9d8d599687bf5ad6.js"],"/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/ox_inventory/Frameworks/esx-a430f754ebd7ca77.js"],"/ox_inventory/Frameworks/qbx":[e,"static/chunks/pages/ox_inventory/Frameworks/qbx-db81eecf233fcad1.js"],"/ox_inventory/Functions/Client":[e,"static/chunks/pages/ox_inventory/Functions/Client-775b0cd78ca5f341.js"],"/ox_inventory/Functions/Server":[e,"static/chunks/pages/ox_inventory/Functions/Server-a8810716c65673f1.js"],"/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/ox_inventory/Functions/Server/Hooks-500b05172c446ce6.js"],"/ox_inventory/Guides/crafting":[e,"static/chunks/pages/ox_inventory/Guides/crafting-e4072eb7c4f14ae1.js"],"/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/ox_inventory/Guides/creatingItems-9d25936877eb92e4.js"],"/ox_inventory/Guides/metadata":[e,"static/chunks/pages/ox_inventory/Guides/metadata-ae8916aec3f22034.js"],"/ox_inventory/Guides/shops":[e,"static/chunks/pages/ox_inventory/Guides/shops-8a5833404bbc016d.js"],"/ox_inventory/Guides/stashes":[e,"static/chunks/pages/ox_inventory/Guides/stashes-ab92bec26a9cc052.js"],"/ox_inventory/issues":[e,"static/chunks/pages/ox_inventory/issues-9e19185f6cb1fb6a.js"],"/ox_lib":[e,"static/chunks/pages/ox_lib-2aa8f6b11f50a5b3.js"],"/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/ox_lib/Modules/ACL/Server-dafffbeef7f1bd76.js"],"/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/ox_lib/Modules/AddCommand/Server-9e9e3936c0b4618e.js"],"/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/ox_lib/Modules/AddKeybind/Client-9cda8a73e80a6dc0.js"],"/ox_lib/Modules/Array/Shared":[e,"static/chunks/pages/ox_lib/Modules/Array/Shared-46989929334a032c.js"],"/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/ox_lib/Modules/Cache/Client-edd76a6660c73743.js"],"/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/ox_lib/Modules/Cache/Shared-0ff60fb35dac66af.js"],"/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-04b4da5fde84e12e.js"],"/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-b1b1ba0aa2dce7dd.js"],"/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-a9a8efd3b2c42270.js"],"/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-ace556f325f19e92.js"],"/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/ox_lib/Modules/Class/Shared-df0b14cbf61ed323.js"],"/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/ox_lib/Modules/Cron/Server-843c04f1b3e07755.js"],"/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/ox_lib/Modules/DisableControls/Client-c3af78c8ad7d3bf6.js"],"/ox_lib/Modules/Dui/Javascript/Client":[e,"static/chunks/pages/ox_lib/Modules/Dui/Javascript/Client-aab1cb51a6f3058c.js"],"/ox_lib/Modules/Dui/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Dui/Lua/Client-efed75f97508feab.js"],"/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-d70aa7d07fd736c4.js"],"/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-e1d5e0468fb6d1e7.js"],"/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-7c4e8a8ac1dad1ab.js"],"/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-0c9d39ba098e6576.js"],"/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-a4069cf31d2b9407.js"],"/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-b14af4a9197451e5.js"],"/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-a18073bf2185123f.js"],"/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-dd70d17ae5bf8017.js"],"/ox_lib/Modules/Interface":[e,"static/chunks/pages/ox_lib/Modules/Interface-45cca23f1617ebd9.js"],"/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/alert-a23809f4eb39c2fc.js"],"/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-6178a317e100e8df.js"],"/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/context-5b0bb1887f6a3dfd.js"],"/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/input-e4a973edff4bc121.js"],"/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/menu-17f5923483c99241.js"],"/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/notify-8474c3648fba790e.js"],"/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/progress-82b0faf107c936ce.js"],"/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/radial-e3ced883e64d7800.js"],"/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-19eea89a1006338d.js"],"/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/textui-4707a2e915ef84ba.js"],"/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/ox_lib/Modules/Locale/Shared-9ab66c2dc0acc516.js"],"/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/ox_lib/Modules/Logger/Server-d053df161a2fceee.js"],"/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/ox_lib/Modules/Marker/Client-5c7da1401ef85208.js"],"/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/ox_lib/Modules/Math/Shared-95fd6d58ed9c4b08.js"],"/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-554183eb0ec80783.js"],"/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/Lua/Client-864c82af26aa22c5.js"],"/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/ox_lib/Modules/Print/Shared-451f227690360adc.js"],"/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/ox_lib/Modules/Raycast/Client-b940a4ee574cc4e0.js"],"/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/ox_lib/Modules/Require/Shared-c45851c3368ab813.js"],"/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/ox_lib/Modules/Streaming/Client-46f1398917dc59fd.js"],"/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/ox_lib/Modules/String/Shared-4d2cf6ff6bcd9392.js"],"/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/ox_lib/Modules/Table/Shared-055d8f70811b6ced.js"],"/ox_lib/Modules/Timer/Shared":[e,"static/chunks/pages/ox_lib/Modules/Timer/Shared-216b6e5016c7ccff.js"],"/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-b1ba91ed7e331200.js"],"/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/ox_lib/Modules/Version/Server-0c2541409379c601.js"],"/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/ox_lib/Modules/Version/Shared-5ae5ea0c9b40e27c.js"],"/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/ox_lib/Modules/WaitFor/Shared-b94f7770803fdbd3.js"],"/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/ox_lib/Modules/Zones/Shared-a4b6c21d153dbe05.js"],"/ox_target":[e,"static/chunks/pages/ox_target-fc8f48ceae6e22df.js"],"/ox_target/Functions/Client":[e,"static/chunks/pages/ox_target/Functions/Client-b07ea9f5607f2a9d.js"],"/ox_target/TargetOptions":[e,"static/chunks/pages/ox_target/TargetOptions-c8d7f28475b6b91f.js"],"/oxmysql":[e,"static/chunks/pages/oxmysql-675d990728d616e7.js"],"/oxmysql/Functions/insert":[e,"static/chunks/pages/oxmysql/Functions/insert-d7416eb5acb2ce44.js"],"/oxmysql/Functions/prepare":[e,"static/chunks/pages/oxmysql/Functions/prepare-0c67598fd38072cb.js"],"/oxmysql/Functions/query":[e,"static/chunks/pages/oxmysql/Functions/query-dd6be384c9a87851.js"],"/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/oxmysql/Functions/rawExecute-5d2c65791cb88ca7.js"],"/oxmysql/Functions/scalar":[e,"static/chunks/pages/oxmysql/Functions/scalar-0a86b75e937efa0c.js"],"/oxmysql/Functions/single":[e,"static/chunks/pages/oxmysql/Functions/single-74f3cf11212b27a0.js"],"/oxmysql/Functions/transaction":[e,"static/chunks/pages/oxmysql/Functions/transaction-26fee29a6b762090.js"],"/oxmysql/Functions/update":[e,"static/chunks/pages/oxmysql/Functions/update-951df841729e0a60.js"],"/oxmysql/benchmark":[e,"static/chunks/pages/oxmysql/benchmark-3f6fa6a22e39baa7.js"],"/oxmysql/placeholders":[e,"static/chunks/pages/oxmysql/placeholders-e4edfd6dba9e3655.js"],"/oxmysql/ui":[e,"static/chunks/pages/oxmysql/ui-fc82894a1d782e0a.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/ox_core","/ox_core/Classes/Client/OxPlayer","/ox_core/Classes/Server/OxAccount","/ox_core/Classes/Server/OxPlayer","/ox_core/Classes/Server/OxVehicle","/ox_core/Events/client","/ox_core/Events/server","/ox_core/Functions/common","/ox_core/Functions/server","/ox_doorlock","/ox_doorlock/Client/functions","/ox_doorlock/Server/events","/ox_doorlock/Server/functions","/ox_doorlock/settings","/ox_fuel","/ox_fuel/Client/functions","/ox_fuel/Server/functions","/ox_fuel/Shared","/ox_inventory","/ox_inventory/Events/Client","/ox_inventory/Events/Server","/ox_inventory/Frameworks/esx","/ox_inventory/Frameworks/qbx","/ox_inventory/Functions/Client","/ox_inventory/Functions/Server","/ox_inventory/Functions/Server/Hooks","/ox_inventory/Guides/crafting","/ox_inventory/Guides/creatingItems","/ox_inventory/Guides/metadata","/ox_inventory/Guides/shops","/ox_inventory/Guides/stashes","/ox_inventory/issues","/ox_lib","/ox_lib/Modules/ACL/Server","/ox_lib/Modules/AddCommand/Server","/ox_lib/Modules/AddKeybind/Client","/ox_lib/Modules/Array/Shared","/ox_lib/Modules/Cache/Client","/ox_lib/Modules/Cache/Shared","/ox_lib/Modules/Callback/JavaScript/Client","/ox_lib/Modules/Callback/JavaScript/Server","/ox_lib/Modules/Callback/Lua/Client","/ox_lib/Modules/Callback/Lua/Server","/ox_lib/Modules/Class/Shared","/ox_lib/Modules/Cron/Server","/ox_lib/Modules/DisableControls/Client","/ox_lib/Modules/Dui/Javascript/Client","/ox_lib/Modules/Dui/Lua/Client","/ox_lib/Modules/GetClosestObject/Shared","/ox_lib/Modules/GetClosestPed/Shared","/ox_lib/Modules/GetClosestPlayer/Shared","/ox_lib/Modules/GetClosestVehicle/Shared","/ox_lib/Modules/GetNearbyObjects/Shared","/ox_lib/Modules/GetNearbyPeds/Shared","/ox_lib/Modules/GetNearbyPlayers/Shared","/ox_lib/Modules/GetNearbyVehicles/Shared","/ox_lib/Modules/Interface","/ox_lib/Modules/Interface/Client/alert","/ox_lib/Modules/Interface/Client/clipboard","/ox_lib/Modules/Interface/Client/context","/ox_lib/Modules/Interface/Client/input","/ox_lib/Modules/Interface/Client/menu","/ox_lib/Modules/Interface/Client/notify","/ox_lib/Modules/Interface/Client/progress","/ox_lib/Modules/Interface/Client/radial","/ox_lib/Modules/Interface/Client/skillcheck","/ox_lib/Modules/Interface/Client/textui","/ox_lib/Modules/Locale/Shared","/ox_lib/Modules/Logger/Server","/ox_lib/Modules/Marker/Client","/ox_lib/Modules/Math/Shared","/ox_lib/Modules/Points/JavaScript/Client","/ox_lib/Modules/Points/Lua/Client","/ox_lib/Modules/Print/Shared","/ox_lib/Modules/Raycast/Client","/ox_lib/Modules/Require/Shared","/ox_lib/Modules/Streaming/Client","/ox_lib/Modules/String/Shared","/ox_lib/Modules/Table/Shared","/ox_lib/Modules/Timer/Shared","/ox_lib/Modules/VehicleProperties/Client","/ox_lib/Modules/Version/Server","/ox_lib/Modules/Version/Shared","/ox_lib/Modules/WaitFor/Shared","/ox_lib/Modules/Zones/Shared","/ox_target","/ox_target/Functions/Client","/ox_target/TargetOptions","/oxmysql","/oxmysql/Functions/insert","/oxmysql/Functions/prepare","/oxmysql/Functions/query","/oxmysql/Functions/rawExecute","/oxmysql/Functions/scalar","/oxmysql/Functions/single","/oxmysql/Functions/transaction","/oxmysql/Functions/update","/oxmysql/benchmark","/oxmysql/placeholders","/oxmysql/ui"]}}("static/chunks/2601-a643f2bef9ecb8af.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/Eltl1YDebRayaJ_4oJXF4/_ssgManifest.js b/_next/static/p-066_Cc34uP4vLflYhOc/_ssgManifest.js similarity index 100% rename from _next/static/Eltl1YDebRayaJ_4oJXF4/_ssgManifest.js rename to _next/static/p-066_Cc34uP4vLflYhOc/_ssgManifest.js diff --git a/guides.html b/guides.html index 443e85ff71..1de1f2cf4d 100644 --- a/guides.html +++ b/guides.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Guides

Guides

+

Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/guides/git.html b/guides/git.html index 8c84252ec9..a2b8e310cb 100644 --- a/guides/git.html +++ b/guides/git.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -

Git

+

Git

Git is a version control system, allowing changes to be effectively tracked, merged, and reverted.

As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data.


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/guides/nodejs.html b/guides/nodejs.html index 2f6e955b1a..3f4b63a3f4 100644 --- a/guides/nodejs.html +++ b/guides/nodejs.html @@ -11,10 +11,10 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Node.js

Node.js

+
Node.js

Node.js

Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client.

  • Download (opens in a new tab) and install the LTS version of Node.js.
  • Open a command-line terminal (e.g. Terminal, Command Prompt).
  • Enter node --version to confirm successful installation.
  • -

Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/guides/pnpm.html b/guides/pnpm.html index 8ce05c0c8e..d5a074c8a2 100644 --- a/guides/pnpm.html +++ b/guides/pnpm.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
pnpm

pnpm

+
pnpm

pnpm

pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn.

  • Ensure you have installed Node.js.
  • @@ -27,4 +27,4 @@ "preview": "vite preview", "format": "prettier --write \"./src/**/*.{ts,tsx,css}\"" },
-

Using the example above pnpm build will run the build script for the given package.


Overextended
\ No newline at end of file +

Using the example above pnpm build will run the build script for the given package.


Overextended
\ No newline at end of file diff --git a/guides/types.html b/guides/types.html index 52fd9b8e67..746790d6b6 100644 --- a/guides/types.html +++ b/guides/types.html @@ -11,8 +11,8 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Types

Setup git, vscode, and vscode extensions

Download our Lua type definitions

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

Update your settings

You can modify the user, workspace, or folder settings for vscode.
+

Types

Setup git, vscode, and vscode extensions

Download our Lua type definitions

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

Update your settings

You can modify the user, workspace, or folder settings for vscode.
Create an entry in Lua.workspace.library pointing to the cloned directory, or specific subdirectories.

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

Overextended
\ No newline at end of file +],

Overextended
\ No newline at end of file diff --git a/guides/vscode.html b/guides/vscode.html index 2965f10117..48b6cd674a 100644 --- a/guides/vscode.html +++ b/guides/vscode.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
VS Code

VS Code

+

Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/index.html b/index.html index 4c1d5298a6..7fdf1b961f 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Introduction

Introduction

+
Introduction

Introduction

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

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

Support our team

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

More information about these creators is available in our Discord (opens in a new tab).

Andyyy

Andyyy

Code: ox20

20% off

Artwork Inventory

Artwork Inventory

Code: ox10

10% off

Berkie's Workshop

Berkie's Workshop

Code: ox10

10% off

CeebStudio

CeebStudio

Code: ox10

10% off

Dolu Mods

Dolu Mods

Code: overextended

25% off

Electus Scripts

Electus Scripts

Code: ox10

10% off

Loaf Scripts

Loaf Scripts

Code: ox10

10% off

OT Studios

OT Studios

Code: ox10

10% off

RAHE Development

RAHE Development

Code: ox10

10% off

Randolio Scripts

Randolio Scripts

Code: OVEREXTENDED

20% off

rcore

rcore

Code: ox10

10% off

Renewed Scripts

Renewed Scripts

Code: ox15

15% off

Three Amigos Modding

Three Amigos Modding

Code: overextended

10% off

Wasabi Scripts

Wasabi Scripts

Code: OX20

20% off

-

You can apply a creator code at checkout under "Support A Creator".


Overextended
\ No newline at end of file +

You can apply a creator code at checkout under "Support A Creator".


Overextended
\ No newline at end of file diff --git a/ox_core.html b/ox_core.html index 3e71c19936..d530436608 100644 --- a/ox_core.html +++ b/ox_core.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Ox Core

Ox Core

+
Ox Core

Ox Core

A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities.

txAdmin recipe

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

Sets the default spawn location for newly created characters. -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Classes/Client/OxPlayer.html b/ox_core/Classes/Client/OxPlayer.html index 81312c139f..f1015b444f 100644 --- a/ox_core/Classes/Client/OxPlayer.html +++ b/ox_core/Classes/Client/OxPlayer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Classes
Client
OxPlayer

OxPlayer

+
Classes
Client
OxPlayer

OxPlayer

  • state: StateBagInterface
  • userId: number
  • @@ -134,4 +134,4 @@

    new value of key

-

Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Classes/Server/OxAccount.html b/ox_core/Classes/Server/OxAccount.html index e4081daff7..b79d204536 100644 --- a/ox_core/Classes/Server/OxAccount.html +++ b/ox_core/Classes/Server/OxAccount.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxAccount

OxAccount

+
Classes
Server
OxAccount

OxAccount

  • accountId number
@@ -249,4 +249,4 @@

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


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Classes/Server/OxPlayer.html b/ox_core/Classes/Server/OxPlayer.html index 9f910c1ad8..d4425f1a66 100644 --- a/ox_core/Classes/Server/OxPlayer.html +++ b/ox_core/Classes/Server/OxPlayer.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxPlayer

OxPlayer

+
Classes
Server
OxPlayer

OxPlayer

  • charId: number
  • identifier: string
  • @@ -364,4 +364,4 @@

    Returns

    • boolean
    • -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Classes/Server/OxVehicle.html b/ox_core/Classes/Server/OxVehicle.html index 8cafd8e96b..1216f5219b 100644 --- a/ox_core/Classes/Server/OxVehicle.html +++ b/ox_core/Classes/Server/OxVehicle.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Classes
Server
OxVehicle

OxVehicle

+
Classes
Server
OxVehicle

OxVehicle

  • entity: number
  • make: string
  • @@ -117,4 +117,4 @@

  • value?: string
  • despawn?: boolean
  • -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Events/client.html b/ox_core/Events/client.html index 685d62b0c8..0ce0e7f989 100644 --- a/ox_core/Events/client.html +++ b/ox_core/Events/client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Events
Client

Client Events

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

Overextended
\ No newline at end of file +
function(character: Character, groups: Record<string, number>)

Overextended
\ No newline at end of file diff --git a/ox_core/Events/server.html b/ox_core/Events/server.html index 388e82d1ae..53d4e9d11d 100644 --- a/ox_core/Events/server.html +++ b/ox_core/Events/server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Events
Server

Server Events

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

Overextended
\ No newline at end of file +
function(entityId: number, id: number)

Overextended
\ No newline at end of file diff --git a/ox_core/Functions/common.html b/ox_core/Functions/common.html index 468de3f9f7..8b6f445e9b 100644 --- a/ox_core/Functions/common.html +++ b/ox_core/Functions/common.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Functions
Common

Ox.GetTopVehicleStats

+
Functions
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
  • -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_core/Functions/server.html b/ox_core/Functions/server.html index f63067533e..feb3420f13 100644 --- a/ox_core/Functions/server.html +++ b/ox_core/Functions/server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Functions
Server

Ox.CreateAccount

+
Functions
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
  • -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_doorlock.html b/ox_doorlock.html index 8f9233d2ca..6934a2a56a 100644 --- a/ox_doorlock.html +++ b/ox_doorlock.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Ox Doorlock

Ox Doorlock

+
Ox Doorlock

Ox Doorlock

A door management resource that can be used standalone or alongside ox_core, qbx_core, and es_extended.

Installation

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

Conversion cannot be guaranteed, especially if the config was not written for nui_doorlock.

Adding new native audio

-

A guide can be found here (opens in a new tab) for adding new native audio.


Overextended
\ No newline at end of file +

A guide can be found here (opens in a new tab) for adding new native audio.


Overextended
\ No newline at end of file diff --git a/ox_doorlock/Client/functions.html b/ox_doorlock/Client/functions.html index 7434b99518..aa4171e92f 100644 --- a/ox_doorlock/Client/functions.html +++ b/ox_doorlock/Client/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Client
Functions

Functions

+
Client
Functions

Functions

pickClosestDoor

Attempt to pick the lock of the closest door. Dependant on server-side checks and may fail.

exports.ox_doorlock:pickClosestDoor()
@@ -24,4 +24,4 @@

Return:

  • door: number
  • -


Overextended
\ No newline at end of file +

Overextended
\ No newline at end of file diff --git a/ox_doorlock/Server/events.html b/ox_doorlock/Server/events.html index 1e3132ab73..1b12bd9e89 100644 --- a/ox_doorlock/Server/events.html +++ b/ox_doorlock/Server/events.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
Server
Events

Events

+
Server
Events

Events

Handlers

These events should not be triggered by any other scripts.

ox_doorlock:stateChanged

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

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_doorlock/Server/functions.html b/ox_doorlock/Server/functions.html index af9bf481e0..9dc23c26fa 100644 --- a/ox_doorlock/Server/functions.html +++ b/ox_doorlock/Server/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Server
    Functions

    Functions

    +
    Server
    Functions

    Functions

    Gets data for a door with the given id, matching the id for the database entry.

    getDoor

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

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_doorlock/settings.html b/ox_doorlock/settings.html index 15db479de3..34080d3a41 100644 --- a/ox_doorlock/settings.html +++ b/ox_doorlock/settings.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Door Settings

    Door Settings

    +
    Door Settings

    Door Settings

    General

    • Door name @@ -140,4 +140,4 @@

      Note: Sounds are stored in the ./web/public/sounds directory.


    Overextended
    \ No newline at end of file +

    Note: Sounds are stored in the ./web/public/sounds directory.


    Overextended
    \ No newline at end of file diff --git a/ox_fuel.html b/ox_fuel.html index 867a7576d7..2b755a3386 100644 --- a/ox_fuel.html +++ b/ox_fuel.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Ox Fuel

    Ox Fuel

    +
    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.


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_fuel/Client/functions.html b/ox_fuel/Client/functions.html index c336304464..08439ce9ad 100644 --- a/ox_fuel/Client/functions.html +++ b/ox_fuel/Client/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_fuel/Server/functions.html b/ox_fuel/Server/functions.html index 0a3c82455e..3d8e1bb284 100644 --- a/ox_fuel/Server/functions.html +++ b/ox_fuel/Server/functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_fuel/Shared.html b/ox_fuel/Shared.html index 5ed57007aa..f66edff05a 100644 --- a/ox_fuel/Shared.html +++ b/ox_fuel/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Shared

    Get vehicle fuel amount

    +
    Shared

    Get vehicle fuel amount

    local fuel = Entity(vehicleId).state.fuel

    Set vehicle fuel amount

    -
    Entity(vehicleId).state.fuel = fuelAmount

    Overextended
    \ No newline at end of file +
    Entity(vehicleId).state.fuel = fuelAmount

    Overextended
    \ No newline at end of file diff --git a/ox_inventory.html b/ox_inventory.html index df63e57466..b07fea241e 100644 --- a/ox_inventory.html +++ b/ox_inventory.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +end

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Events/Client.html b/ox_inventory/Events/Client.html index aeca2d0bf5..85929b1ca7 100644 --- a/ox_inventory/Events/Client.html +++ b/ox_inventory/Events/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Events
    Client

    Client

    +
    Events
    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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Events/Server.html b/ox_inventory/Events/Server.html index 2b8ef58e5b..a192d3729e 100644 --- a/ox_inventory/Events/Server.html +++ b/ox_inventory/Events/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Events
    Server

    Server

    +
    Events
    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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Frameworks/esx.html b/ox_inventory/Frameworks/esx.html index 47f0d773f2..34603eb968 100644 --- a/ox_inventory/Frameworks/esx.html +++ b/ox_inventory/Frameworks/esx.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Frameworks
    ESX

    ESX

    +
    Frameworks
    ESX

    ESX

    • You will need a compatible version of ESX Legacy (opens in a new tab) (1.6.0 or higher).
    • You can convert player inventories with convertinventory esx.
    • @@ -52,4 +52,4 @@

      xPlayer.removeInventoryItem("acetone", 3) xPlayer.removeInventoryItem("antifreeze", 5) xPlayer.removeInventoryItem("sudo", 10) -end


    Overextended
    \ No newline at end of file +end

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Frameworks/qbx.html b/ox_inventory/Frameworks/qbx.html index 9510dd6f12..382a3b6e98 100644 --- a/ox_inventory/Frameworks/qbx.html +++ b/ox_inventory/Frameworks/qbx.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Frameworks
    Qbox

    Qbox Project

    +
    Frameworks
    Qbox

    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.

    -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Functions/Client.html b/ox_inventory/Functions/Client.html index 3f02202661..13c5777382 100644 --- a/ox_inventory/Functions/Client.html +++ b/ox_inventory/Functions/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    Client

    Client

    +
    Functions
    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

    Overextended
    \ No newline at end of file +
    LocalPlayer.state.canUseWeapons = false

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Functions/Server.html b/ox_inventory/Functions/Server.html index 1945c884d7..c3048faa02 100644 --- a/ox_inventory/Functions/Server.html +++ b/ox_inventory/Functions/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    Server

    Server

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


    Overextended
    \ No newline at end of file +print(('modified %sx water in slot %s with new metadata'):format(water.count, water.slot))

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Functions/Server/Hooks.html b/ox_inventory/Functions/Server/Hooks.html index 55180f82be..cfe4764918 100644 --- a/ox_inventory/Functions/Server/Hooks.html +++ b/ox_inventory/Functions/Server/Hooks.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    Hooks

    Hooks

    +
    Functions
    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
    • -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Guides/crafting.html b/ox_inventory/Guides/crafting.html index 76298a9075..fcd46e537b 100644 --- a/ox_inventory/Guides/crafting.html +++ b/ox_inventory/Guides/crafting.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Guides
    Crafting

    Crafting

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Guides/creatingItems.html b/ox_inventory/Guides/creatingItems.html index 474375f188..2201caf907 100644 --- a/ox_inventory/Guides/creatingItems.html +++ b/ox_inventory/Guides/creatingItems.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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' } -})


    Overextended
    \ No newline at end of file +})

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Guides/metadata.html b/ox_inventory/Guides/metadata.html index cbba507da3..102f060bd2 100644 --- a/ox_inventory/Guides/metadata.html +++ b/ox_inventory/Guides/metadata.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Guides
    Metadata

    Metadata

    +
    Guides
    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' -})


    Overextended
    \ No newline at end of file +})

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Guides/shops.html b/ox_inventory/Guides/shops.html index df2d8201e9..20efc59115 100644 --- a/ox_inventory/Guides/shops.html +++ b/ox_inventory/Guides/shops.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Guides
    Creating Shops

    Creating Shops

    +

    Overextended
    \ No newline at end of file +})

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Guides/stashes.html b/ox_inventory/Guides/stashes.html index 3ae4a132f9..5be3fbb294 100644 --- a/ox_inventory/Guides/stashes.html +++ b/ox_inventory/Guides/stashes.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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:

    -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/issues.html b/ox_inventory/issues.html index 735784342b..0116545d9f 100644 --- a/ox_inventory/issues.html +++ b/ox_inventory/issues.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Common Issues

    Common Issues

    +
    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.
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib.html b/ox_lib.html index 3ef9734a79..e26be50d77 100644 --- a/ox_lib.html +++ b/ox_lib.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Ox Lib

    Ox Lib

    +
    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.


    Overextended
    \ No newline at end of file +the only thing you have to do is restart the resource for it take affect.


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/ACL/Server.html b/ox_lib/Modules/ACL/Server.html index 22e5cb7ac7..6c79404799 100644 --- a/ox_lib/Modules/ACL/Server.html +++ b/ox_lib/Modules/ACL/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    ACL
    Server

    Server

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/AddCommand/Server.html b/ox_lib/Modules/AddCommand/Server.html index be9e3640e3..f0905b6d4e 100644 --- a/ox_lib/Modules/AddCommand/Server.html +++ b/ox_lib/Modules/AddCommand/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)

    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/AddKeybind/Client.html b/ox_lib/Modules/AddKeybind/Client.html index 8f8eeda208..14850798c5 100644 --- a/ox_lib/Modules/AddKeybind/Client.html +++ b/ox_lib/Modules/AddKeybind/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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

    Overextended
    \ No newline at end of file +keybind:disable(false) -- enables the keybind

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Array/Shared.html b/ox_lib/Modules/Array/Shared.html index ea5159b7c4..03e6cf6a6d 100644 --- a/ox_lib/Modules/Array/Shared.html +++ b/ox_lib/Modules/Array/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Cache/Client.html b/ox_lib/Modules/Cache/Client.html index 8e35489406..1a4d232820 100644 --- a/ox_lib/Modules/Cache/Client.html +++ b/ox_lib/Modules/Cache/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Cache/Shared.html b/ox_lib/Modules/Cache/Shared.html index 3de6ffebbd..75d2d3a6cf 100644 --- a/ox_lib/Modules/Cache/Shared.html +++ b/ox_lib/Modules/Cache/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +> 6

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Callback/JavaScript/Client.html b/ox_lib/Modules/Callback/JavaScript/Client.html index 7e5c9be4ab..1abe1c7e44 100644 --- a/ox_lib/Modules/Callback/JavaScript/Client.html +++ b/ox_lib/Modules/Callback/JavaScript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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);


    Overextended
    \ No newline at end of file +}, 100);

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Callback/JavaScript/Server.html b/ox_lib/Modules/Callback/JavaScript/Server.html index 9fe742d7f8..5114bb10a2 100644 --- a/ox_lib/Modules/Callback/JavaScript/Server.html +++ b/ox_lib/Modules/Callback/JavaScript/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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);


    Overextended
    \ No newline at end of file +}, 100);

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Callback/Lua/Client.html b/ox_lib/Modules/Callback/Lua/Client.html index 7447af5275..eb20fc5131 100644 --- a/ox_lib/Modules/Callback/Lua/Client.html +++ b/ox_lib/Modules/Callback/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Callback/Lua/Server.html b/ox_lib/Modules/Callback/Lua/Server.html index 27d3b0cea0..af42ae7948 100644 --- a/ox_lib/Modules/Callback/Lua/Server.html +++ b/ox_lib/Modules/Callback/Lua/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Class/Shared.html b/ox_lib/Modules/Class/Shared.html index 1f6930fd59..59c57a1dc2 100644 --- a/ox_lib/Modules/Class/Shared.html +++ b/ox_lib/Modules/Class/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Cron/Server.html b/ox_lib/Modules/Cron/Server.html index 114acafd1d..23137828ec 100644 --- a/ox_lib/Modules/Cron/Server.html +++ b/ox_lib/Modules/Cron/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/DisableControls/Client.html b/ox_lib/Modules/DisableControls/Client.html index b5b006a125..62c1e455ed 100644 --- a/ox_lib/Modules/DisableControls/Client.html +++ b/ox_lib/Modules/DisableControls/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    DisableControls
    Client

    Client

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Dui/Javascript/Client.html b/ox_lib/Modules/Dui/Javascript/Client.html index 6f1a58a9bf..b6c320421c 100644 --- a/ox_lib/Modules/Dui/Javascript/Client.html +++ b/ox_lib/Modules/Dui/Javascript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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()


    Overextended
    \ No newline at end of file +dui.remove()

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Dui/Lua/Client.html b/ox_lib/Modules/Dui/Lua/Client.html index 4f526e04e7..706dd0f23d 100644 --- a/ox_lib/Modules/Dui/Lua/Client.html +++ b/ox_lib/Modules/Dui/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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()


    Overextended
    \ No newline at end of file +dui:remove()

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetClosestObject/Shared.html b/ox_lib/Modules/GetClosestObject/Shared.html index 34d5b43ec4..f206cbec43 100644 --- a/ox_lib/Modules/GetClosestObject/Shared.html +++ b/ox_lib/Modules/GetClosestObject/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetClosestPed/Shared.html b/ox_lib/Modules/GetClosestPed/Shared.html index 387abd698c..5468531a2c 100644 --- a/ox_lib/Modules/GetClosestPed/Shared.html +++ b/ox_lib/Modules/GetClosestPed/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetClosestPlayer/Shared.html b/ox_lib/Modules/GetClosestPlayer/Shared.html index 320a88d7ab..1bda51935a 100644 --- a/ox_lib/Modules/GetClosestPlayer/Shared.html +++ b/ox_lib/Modules/GetClosestPlayer/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetClosestVehicle/Shared.html b/ox_lib/Modules/GetClosestVehicle/Shared.html index 81eb82e309..3160a5ec02 100644 --- a/ox_lib/Modules/GetClosestVehicle/Shared.html +++ b/ox_lib/Modules/GetClosestVehicle/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetNearbyObjects/Shared.html b/ox_lib/Modules/GetNearbyObjects/Shared.html index 414cf5e3a4..3b939b463e 100644 --- a/ox_lib/Modules/GetNearbyObjects/Shared.html +++ b/ox_lib/Modules/GetNearbyObjects/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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 }[]
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetNearbyPeds/Shared.html b/ox_lib/Modules/GetNearbyPeds/Shared.html index fbe672403e..f6c601e219 100644 --- a/ox_lib/Modules/GetNearbyPeds/Shared.html +++ b/ox_lib/Modules/GetNearbyPeds/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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 }[]
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetNearbyPlayers/Shared.html b/ox_lib/Modules/GetNearbyPlayers/Shared.html index c6ace01748..2f386a2d5e 100644 --- a/ox_lib/Modules/GetNearbyPlayers/Shared.html +++ b/ox_lib/Modules/GetNearbyPlayers/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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 }[]
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetNearbyVehicles/Shared.html b/ox_lib/Modules/GetNearbyVehicles/Shared.html index 68ebb78350..8c229355e6 100644 --- a/ox_lib/Modules/GetNearbyVehicles/Shared.html +++ b/ox_lib/Modules/GetNearbyVehicles/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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 }[]
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface.html b/ox_lib/Modules/Interface.html index 0380a26a16..9d61cca4bc 100644 --- a/ox_lib/Modules/Interface.html +++ b/ox_lib/Modules/Interface.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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.


    Overextended
    \ No newline at end of file +Keep in mind doing so will require you to download the source code and build the UI.


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/alert.html b/ox_lib/Modules/Interface/Client/alert.html index 09e67642ab..f14a67bb1f 100644 --- a/ox_lib/Modules/Interface/Client/alert.html +++ b/ox_lib/Modules/Interface/Client/alert.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +

    alert_dialog


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/clipboard.html b/ox_lib/Modules/Interface/Client/clipboard.html index 62c880c154..f0af23009a 100644 --- a/ox_lib/Modules/Interface/Client/clipboard.html +++ b/ox_lib/Modules/Interface/Client/clipboard.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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 @@

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/context.html b/ox_lib/Modules/Interface/Client/context.html index edf5d307ee..f3b24436a2 100644 --- a/ox_lib/Modules/Interface/Client/context.html +++ b/ox_lib/Modules/Interface/Client/context.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Context Menu

    Context Menu

    +
    Modules
    Client
    Context Menu

    Context Menu

    lib.registerContext

    Used for registering a context menu.

    lib.registerContext(context)
    @@ -263,4 +263,4 @@

    menu_example metadata sub_menu -event_menu


    Overextended
    \ No newline at end of file +event_menu


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/input.html b/ox_lib/Modules/Interface/Client/input.html index d6c0e047bd..0f3e917772 100644 --- a/ox_lib/Modules/Interface/Client/input.html +++ b/ox_lib/Modules/Interface/Client/input.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +

    Example image


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/menu.html b/ox_lib/Modules/Interface/Client/menu.html index 64dbea2968..abf88b15a3 100644 --- a/ox_lib/Modules/Interface/Client/menu.html +++ b/ox_lib/Modules/Interface/Client/menu.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    Client
    Menu

    Menu

    +
    Modules
    Client
    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


    Overextended
    \ No newline at end of file +

    Example


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/notify.html b/ox_lib/Modules/Interface/Client/notify.html index b9c8c82a1f..0772d98dcc 100644 --- a/ox_lib/Modules/Interface/Client/notify.html +++ b/ox_lib/Modules/Interface/Client/notify.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +

    custom_notification


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/progress.html b/ox_lib/Modules/Interface/Client/progress.html index 3f466728ab..a857f49419 100644 --- a/ox_lib/Modules/Interface/Client/progress.html +++ b/ox_lib/Modules/Interface/Client/progress.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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()

    Overextended
    \ No newline at end of file +
    lib.cancelProgress()

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/radial.html b/ox_lib/Modules/Interface/Client/radial.html index 5dde4e6d95..2f635ec18e 100644 --- a/ox_lib/Modules/Interface/Client/radial.html +++ b/ox_lib/Modules/Interface/Client/radial.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +radial2


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/skillcheck.html b/ox_lib/Modules/Interface/Client/skillcheck.html index a3ad93e422..0aae603f59 100644 --- a/ox_lib/Modules/Interface/Client/skillcheck.html +++ b/ox_lib/Modules/Interface/Client/skillcheck.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +

    skillcheck_example


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Interface/Client/textui.html b/ox_lib/Modules/Interface/Client/textui.html index 88d5303409..fc39478bcb 100644 --- a/ox_lib/Modules/Interface/Client/textui.html +++ b/ox_lib/Modules/Interface/Client/textui.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +

    custom_example


    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Locale/Shared.html b/ox_lib/Modules/Locale/Shared.html index 6014deb9c3..117c062d84 100644 --- a/ox_lib/Modules/Locale/Shared.html +++ b/ox_lib/Modules/Locale/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Logger/Server.html b/ox_lib/Modules/Logger/Server.html index 58921b7a66..61b7e80325 100644 --- a/ox_lib/Modules/Logger/Server.html +++ b/ox_lib/Modules/Logger/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    Logger
    Server

    Server

    +
    Modules
    Logger
    Server

    Server

    lib.logger

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

    Overextended
    \ No newline at end of file +set fivemanage:key "YOUR_API_KEY"

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Marker/Client.html b/ox_lib/Modules/Marker/Client.html index 0324bced44..67a566dde0 100644 --- a/ox_lib/Modules/Marker/Client.html +++ b/ox_lib/Modules/Marker/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +end

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Math/Shared.html b/ox_lib/Modules/Math/Shared.html index c596d13f2b..b49afd015e 100644 --- a/ox_lib/Modules/Math/Shared.html +++ b/ox_lib/Modules/Math/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Points/JavaScript/Client.html b/ox_lib/Modules/Points/JavaScript/Client.html index 68d4fa503b..6a0e357579 100644 --- a/ox_lib/Modules/Points/JavaScript/Client.html +++ b/ox_lib/Modules/Points/JavaScript/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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) -}


    Overextended
    \ No newline at end of file +}

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Points/Lua/Client.html b/ox_lib/Modules/Points/Lua/Client.html index 850e991a97..9a56f7d5cc 100644 --- a/ox_lib/Modules/Points/Lua/Client.html +++ b/ox_lib/Modules/Points/Lua/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Print/Shared.html b/ox_lib/Modules/Print/Shared.html index 2ed12b82b8..bad935cebc 100644 --- a/ox_lib/Modules/Print/Shared.html +++ b/ox_lib/Modules/Print/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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>"


    Overextended
    \ No newline at end of file +set ox:printlevel:<resourceName> "<level>"

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Raycast/Client.html b/ox_lib/Modules/Raycast/Client.html index b4771daf5e..1a60ad6f3d 100644 --- a/ox_lib/Modules/Raycast/Client.html +++ b/ox_lib/Modules/Raycast/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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!

    Overextended
    \ 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!

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Require/Shared.html b/ox_lib/Modules/Require/Shared.html index a956b6abec..e9746567a9 100644 --- a/ox_lib/Modules/Require/Shared.html +++ b/ox_lib/Modules/Require/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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"
    -}

    Overextended
    \ No newline at end of file +}

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Streaming/Client.html b/ox_lib/Modules/Streaming/Client.html index 10729cea2a..c36d5170fd 100644 --- a/ox_lib/Modules/Streaming/Client.html +++ b/ox_lib/Modules/Streaming/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +16 WEAPON_COMPONENT_GRIP

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/String/Shared.html b/ox_lib/Modules/String/Shared.html index 0ddf8a8bc3..53d1f36e21 100644 --- a/ox_lib/Modules/String/Shared.html +++ b/ox_lib/Modules/String/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Table/Shared.html b/ox_lib/Modules/Table/Shared.html index 847a4c3b53..34e46db864 100644 --- a/ox_lib/Modules/Table/Shared.html +++ b/ox_lib/Modules/Table/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Timer/Shared.html b/ox_lib/Modules/Timer/Shared.html index 945d1be815..6171af83d8 100644 --- a/ox_lib/Modules/Timer/Shared.html +++ b/ox_lib/Modules/Timer/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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) -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/VehicleProperties/Client.html b/ox_lib/Modules/VehicleProperties/Client.html index 30f39059f7..987f54463c 100644 --- a/ox_lib/Modules/VehicleProperties/Client.html +++ b/ox_lib/Modules/VehicleProperties/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    VehicleProperties
    Client

    Client

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Version/Server.html b/ox_lib/Modules/Version/Server.html index aefcf6d620..2e5fb54285 100644 --- a/ox_lib/Modules/Version/Server.html +++ b/ox_lib/Modules/Version/Server.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Modules
    Version
    Server

    Server

    +

    Overextended
    \ No newline at end of file +
    lib.versionCheck('overextended/ox_lib')

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Version/Shared.html b/ox_lib/Modules/Version/Shared.html index 4e6b985cc7..4609c54155 100644 --- a/ox_lib/Modules/Version/Shared.html +++ b/ox_lib/Modules/Version/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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


    Overextended
    \ No newline at end of file +
    if not lib.checkDependency('ox_lib', '1.5.0') then error() end

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/WaitFor/Shared.html b/ox_lib/Modules/WaitFor/Shared.html index 22e4066d42..58988bb467 100644 --- a/ox_lib/Modules/WaitFor/Shared.html +++ b/ox_lib/Modules/WaitFor/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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)


    Overextended
    \ No newline at end of file +end)

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Zones/Shared.html b/ox_lib/Modules/Zones/Shared.html index b699eba03f..077a64e671 100644 --- a/ox_lib/Modules/Zones/Shared.html +++ b/ox_lib/Modules/Zones/Shared.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --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, -})


    Overextended
    \ No newline at end of file +})

    Overextended
    \ No newline at end of file diff --git a/ox_target.html b/ox_target.html index cfd7c938d0..b742fa8610 100644 --- a/ox_target.html +++ b/ox_target.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Ox Target

    Ox Target

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_target/Functions/Client.html b/ox_target/Functions/Client.html index b3aa5f3497..4fca055d68 100644 --- a/ox_target/Functions/Client.html +++ b/ox_target/Functions/Client.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    Client

    Client

    +

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_target/TargetOptions.html b/ox_target/TargetOptions.html index ec953a1621..c124c9dea7 100644 --- a/ox_target/TargetOptions.html +++ b/ox_target/TargetOptions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    TargetOptions

    TargetOptions

    +
    TargetOptions

    TargetOptions

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

    TargetOption

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql.html b/oxmysql.html index 06d4ffdbc4..62b1df9fbc 100644 --- a/oxmysql.html +++ b/oxmysql.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    OxMySQL

    OxMySQL

    +
    OxMySQL

    OxMySQL

    A replacement of mysql-async and ghmattimysql with expanded API and improved compatibility for MySQL 8.

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

    When uncertain if a row should be inserted into the database, or an existing row should be updated, queries should check for duplicate keys.

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

    This is preferred over checking the existence of a row, then inserting or updating depending on the result.
    -Furthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted.


    Overextended
    \ No newline at end of file +Furthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted.


    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/insert.html b/oxmysql/Functions/insert.html index 6aa4c21763..a2bf7de1a5 100644 --- a/oxmysql/Functions/insert.html +++ b/oxmysql/Functions/insert.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    insert

    Insert

    +
    Functions
    insert

    Insert

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

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/prepare.html b/oxmysql/Functions/prepare.html index dbd64fd491..31862733c4 100644 --- a/oxmysql/Functions/prepare.html +++ b/oxmysql/Functions/prepare.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    prepare

    Prepare

    +
    Functions
    prepare

    Prepare

    Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.

    • Date will not return the datestring commonly used in FiveM
    • @@ -39,4 +39,4 @@

      Aliases

      • exports.oxmysql.prepare
      • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/query.html b/oxmysql/Functions/query.html index 40bbfd298f..f7aa23c31f 100644 --- a/oxmysql/Functions/query.html +++ b/oxmysql/Functions/query.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    query

    Query

    +
    Functions
    query

    Query

    When selecting data, returns all matching rows and columns; otherwise, returns data like 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
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/rawExecute.html b/oxmysql/Functions/rawExecute.html index dff61cfd3e..63bd698980 100644 --- a/oxmysql/Functions/rawExecute.html +++ b/oxmysql/Functions/rawExecute.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    rawExecute

    RawExecute

    +
    Functions
    rawExecute

    RawExecute

    rawExecute can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.

    • Date will not return the datestring commonly used in FiveM
    • @@ -40,4 +40,4 @@

      Aliases

      • exports.oxmysql.rawExecute
      • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/scalar.html b/oxmysql/Functions/scalar.html index 13aa357d3d..be2c66c8d0 100644 --- a/oxmysql/Functions/scalar.html +++ b/oxmysql/Functions/scalar.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    scalar

    Scalar

    +
    Functions
    scalar

    Scalar

    Returns the first column for a single row.

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/single.html b/oxmysql/Functions/single.html index f30552c8ee..e36c20e027 100644 --- a/oxmysql/Functions/single.html +++ b/oxmysql/Functions/single.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    single

    Single

    +
    Functions
    single

    Single

    Returns all selected columns for a single row.

    Promise

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

    Aliases

    • exports.oxmysql.single
    • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/transaction.html b/oxmysql/Functions/transaction.html index e188208086..609cc1c6ef 100644 --- a/oxmysql/Functions/transaction.html +++ b/oxmysql/Functions/transaction.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    transaction

    Transaction

    +
    Functions
    transaction

    Transaction

    A transaction executes multiple queries and commits them only if all succeed.
    If one fails, none of the queries are committed.

    The return value is a boolean, which is the result of the transaction.

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

    Transaction Isolation Level

    This can be set through the convar mysql_transaction_isolation_level, and is an integer ranging from 1-4.
    The default value is 2.

    -
    Convar ValueResult
    1Repeatable Read
    2Read Committed
    3Read Uncommitted
    4Serializable

    Overextended
    \ No newline at end of file +
    Convar ValueResult
    1Repeatable Read
    2Read Committed
    3Read Uncommitted
    4Serializable

    Overextended
    \ No newline at end of file diff --git a/oxmysql/Functions/update.html b/oxmysql/Functions/update.html index 4b9b2a55d3..5f79058fad 100644 --- a/oxmysql/Functions/update.html +++ b/oxmysql/Functions/update.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Functions
    update

    Update

    +
    Functions
    update

    Update

    Returns the number of rows affected by the query.

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


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql/benchmark.html b/oxmysql/benchmark.html index 5b2994a312..5d91b4022a 100644 --- a/oxmysql/benchmark.html +++ b/oxmysql/benchmark.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Benchmark

    Benchmark

    +
    Benchmark

    Benchmark

    Benchmarking is based on the time spent when to receive a response from exports.
    Real query speeds will be reported in the debug UI and in the server console with mysql_debug enabled.

    Speeds will vary greatly based on system hardware, database settings, database version, and the current workload.

    @@ -134,4 +134,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


    Overextended
    \ No newline at end of file +[script:test] Executed 1 queries in 1.1588ms

    Overextended
    \ No newline at end of file diff --git a/oxmysql/placeholders.html b/oxmysql/placeholders.html index 1e95fce343..e5e1b40d06 100644 --- a/oxmysql/placeholders.html +++ b/oxmysql/placeholders.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Placeholders

    Placeholders

    +
    Placeholders

    Placeholders

    Placeholders allow for query parameters to be safely executed, preventing common SQL injection methods (opens in a new tab).

    Parameters can be passed an an array or object (referred to as named parameters).

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

    These are distinct from prepared statements which are handled by the MySQL server; you can use MySQL.prepare for more optimised and secure queries.


    Overextended
    \ No newline at end of file +

    These are distinct from prepared statements which are handled by the MySQL server; you can use MySQL.prepare for more optimised and secure queries.


    Overextended
    \ No newline at end of file diff --git a/oxmysql/ui.html b/oxmysql/ui.html index 47f9688fa4..9a6c1c29c6 100644 --- a/oxmysql/ui.html +++ b/oxmysql/ui.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Using the Debug UI

    Using the Debug UI

    +
    Using the Debug UI

    Using the Debug UI

    The debug UI lets you easily see all the queries that have been executed by resources, query response times, and per-resource statistics. You should only enable this during development, or with a small player count - for larger servers, look into builtin MySQL logging.

    @@ -29,4 +29,4 @@

    Columns can be sorted by ascending and descending order, and hovering over a query will display the full query inside a tooltip.

    Queries that exceed mysql_slow_query_warning (default 150ms) are displayed in orange.
    For demonstation purposes the mysql_slow_query_warning convar was set to 5 here.

    -

    oxmysql_ui_queries


    Overextended
    \ No newline at end of file +

    oxmysql_ui_queries


    Overextended
    \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 15d5729d89..5515431421 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,110 +1,110 @@ -https://overextended.dev2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides/git2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides/nodejs2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides/pnpm2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides/types2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/guides/vscode2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Classes/Client/OxPlayer2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Classes/Server/OxAccount2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Classes/Server/OxPlayer2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Classes/Server/OxVehicle2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Events/client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Events/server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Functions/common2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_core/Functions/server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_doorlock2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_doorlock/Client/functions2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_doorlock/Server/events2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_doorlock/Server/functions2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_doorlock/settings2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_fuel2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_fuel/Client/functions2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_fuel/Server/functions2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_fuel/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Events/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Events/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Frameworks/esx2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Frameworks/qbx2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Server/Hooks2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/crafting2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/creatingItems2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/metadata2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/shops2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/stashes2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_inventory/issues2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/ACL/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/AddCommand/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/AddKeybind/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Array/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cache/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cache/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/Lua/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/Lua/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Class/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cron/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/DisableControls/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Dui/Javascript/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Dui/Lua/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestObject/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestPed/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestPlayer/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestVehicle/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyObjects/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyPeds/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyPlayers/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyVehicles/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/alert2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/clipboard2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/context2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/input2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/menu2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/notify2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/progress2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/radial2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/textui2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Locale/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Logger/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Marker/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Math/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Points/JavaScript/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Points/Lua/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Print/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Raycast/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Require/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Streaming/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/String/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Table/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Timer/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/VehicleProperties/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Version/Server2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Version/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/WaitFor/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Zones/Shared2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_target2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_target/Functions/Client2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/ox_target/TargetOptions2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/insert2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/prepare2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/query2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/rawExecute2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/scalar2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/single2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/transaction2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/Functions/update2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/benchmark2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/placeholders2024-10-21T13:16:54.230Zdaily0.7 -https://overextended.dev/oxmysql/ui2024-10-21T13:16:54.230Zdaily0.7 +https://overextended.dev2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides/git2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides/nodejs2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides/pnpm2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides/types2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/guides/vscode2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Classes/Client/OxPlayer2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Classes/Server/OxAccount2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Classes/Server/OxPlayer2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Classes/Server/OxVehicle2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Events/client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Events/server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Functions/common2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_core/Functions/server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_doorlock2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_doorlock/Client/functions2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_doorlock/Server/events2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_doorlock/Server/functions2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_doorlock/settings2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_fuel2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_fuel/Client/functions2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_fuel/Server/functions2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_fuel/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Events/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Events/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Frameworks/esx2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Frameworks/qbx2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Server/Hooks2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/crafting2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/creatingItems2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/metadata2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/shops2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/stashes2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_inventory/issues2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/ACL/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/AddCommand/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/AddKeybind/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Array/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cache/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cache/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/Lua/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/Lua/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Class/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cron/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/DisableControls/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Dui/Javascript/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Dui/Lua/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestObject/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestPed/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestPlayer/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestVehicle/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyObjects/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyPeds/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyPlayers/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyVehicles/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/alert2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/clipboard2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/context2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/input2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/menu2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/notify2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/progress2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/radial2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/textui2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Locale/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Logger/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Marker/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Math/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Points/JavaScript/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Points/Lua/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Print/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Raycast/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Require/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Streaming/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/String/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Table/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Timer/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/VehicleProperties/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Version/Server2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Version/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/WaitFor/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Zones/Shared2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_target2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_target/Functions/Client2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/ox_target/TargetOptions2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/insert2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/prepare2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/query2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/rawExecute2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/scalar2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/single2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/transaction2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/Functions/update2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/benchmark2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/placeholders2024-10-21T15:32:05.499Zdaily0.7 +https://overextended.dev/oxmysql/ui2024-10-21T15:32:05.499Zdaily0.7 \ No newline at end of file