diff --git a/404.html b/404.html index 2ddb51c14b..26c64c7035 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/pl1-02qh6IT8IngxXe3ZY/_buildManifest.js b/_next/static/LAP3UqwLpKjga5BhV46b-/_buildManifest.js similarity index 99% rename from _next/static/pl1-02qh6IT8IngxXe3ZY/_buildManifest.js rename to _next/static/LAP3UqwLpKjga5BhV46b-/_buildManifest.js index 6f8352bf5d..57c834e53b 100644 --- a/_next/static/pl1-02qh6IT8IngxXe3ZY/_buildManifest.js +++ b/_next/static/LAP3UqwLpKjga5BhV46b-/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-1075a5f972241c53.js"],"/404":["static/chunks/pages/404-d31671b33f52e827.js"],"/_error":["static/chunks/pages/_error-2279e6cb9ef84b6a.js"],"/guides":[e,"static/chunks/pages/guides-e0393300bd51d1cb.js"],"/guides/git":[e,"static/chunks/pages/guides/git-1736491deaebc3a0.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-0e3d40d03b458c96.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-56fbaca819a4ce52.js"],"/guides/types":[e,"static/chunks/pages/guides/types-f8827f56cbbd888d.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-974adf8b1a5d0f3c.js"],"/ox_core":[e,"static/chunks/pages/ox_core-8df6f3346002542d.js"],"/ox_core/Client/Player":[e,"static/chunks/pages/ox_core/Client/Player-b3006715713158ea.js"],"/ox_core/Client/Player/callbacks":[e,"static/chunks/pages/ox_core/Client/Player/callbacks-ff4918762336b7e5.js"],"/ox_core/Client/Player/events":[e,"static/chunks/pages/ox_core/Client/Player/events-20c2084060045285.js"],"/ox_core/Client/functions":[e,"static/chunks/pages/ox_core/Client/functions-dd77fe2d95dea0c0.js"],"/ox_core/Server/Player":[e,"static/chunks/pages/ox_core/Server/Player-8a9c8a47d55c3bda.js"],"/ox_core/Server/Player/events":[e,"static/chunks/pages/ox_core/Server/Player/events-0bfe9eea0576a3e8.js"],"/ox_core/Server/Player/methods":[e,"static/chunks/pages/ox_core/Server/Player/methods-5959115939eb96ca.js"],"/ox_core/Server/Vehicle":[e,"static/chunks/pages/ox_core/Server/Vehicle-9cad5ee5f9ed757f.js"],"/ox_core/Server/Vehicle/callbacks":[e,"static/chunks/pages/ox_core/Server/Vehicle/callbacks-1da2bf06caa397ae.js"],"/ox_core/Server/Vehicle/methods":[e,"static/chunks/pages/ox_core/Server/Vehicle/methods-fe72b7d714bb15c4.js"],"/ox_core/Server/functions":[e,"static/chunks/pages/ox_core/Server/functions-32dbeb72594eeee1.js"],"/ox_core/concepts":[e,"static/chunks/pages/ox_core/concepts-f5dbaa1d8dcb5fe9.js"],"/ox_doorlock":[e,"static/chunks/pages/ox_doorlock-cccb2f247358df26.js"],"/ox_doorlock/Client/functions":[e,"static/chunks/pages/ox_doorlock/Client/functions-3a7f03e7fc3f349c.js"],"/ox_doorlock/Server/events":[e,"static/chunks/pages/ox_doorlock/Server/events-8bfaf4fa839157fd.js"],"/ox_doorlock/Server/functions":[e,"static/chunks/pages/ox_doorlock/Server/functions-e6ec8e74e8131b41.js"],"/ox_doorlock/settings":[e,"static/chunks/pages/ox_doorlock/settings-cb218c44b0b48fa2.js"],"/ox_fuel":[e,"static/chunks/pages/ox_fuel-b9d0c9af470eda98.js"],"/ox_fuel/Client/functions":[e,"static/chunks/pages/ox_fuel/Client/functions-80fcb783356e6ff6.js"],"/ox_fuel/Server/functions":[e,"static/chunks/pages/ox_fuel/Server/functions-bf30ef7a9f557a09.js"],"/ox_fuel/Shared":[e,"static/chunks/pages/ox_fuel/Shared-6dec5fb18f4cfb7d.js"],"/ox_inventory":[e,"static/chunks/pages/ox_inventory-8a7c2c0a6c5e3f61.js"],"/ox_inventory/Events/Client":[e,"static/chunks/pages/ox_inventory/Events/Client-441b1dba62b27f48.js"],"/ox_inventory/Events/Server":[e,"static/chunks/pages/ox_inventory/Events/Server-424e2ced90473dc1.js"],"/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/ox_inventory/Frameworks/esx-2745742e7e54732b.js"],"/ox_inventory/Frameworks/qb":[e,"static/chunks/pages/ox_inventory/Frameworks/qb-540367fc4e2a158b.js"],"/ox_inventory/Functions/Client":[e,"static/chunks/pages/ox_inventory/Functions/Client-4304dedfff02dfc9.js"],"/ox_inventory/Functions/Server":[e,"static/chunks/pages/ox_inventory/Functions/Server-836e4f28c5115b3a.js"],"/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/ox_inventory/Functions/Server/Hooks-9fc0d88facce7e46.js"],"/ox_inventory/Guides/crafting":[e,"static/chunks/pages/ox_inventory/Guides/crafting-c57e9e51b90edec3.js"],"/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/ox_inventory/Guides/creatingItems-62f38372ba682463.js"],"/ox_inventory/Guides/metadata":[e,"static/chunks/pages/ox_inventory/Guides/metadata-c520f846abe2b7ef.js"],"/ox_inventory/Guides/shops":[e,"static/chunks/pages/ox_inventory/Guides/shops-0e798e995ba21ae3.js"],"/ox_inventory/Guides/stashes":[e,"static/chunks/pages/ox_inventory/Guides/stashes-3211176f3973002d.js"],"/ox_inventory/issues":[e,"static/chunks/pages/ox_inventory/issues-7fada16f46dabdc4.js"],"/ox_lib":[e,"static/chunks/pages/ox_lib-fdfea56f8d4c7587.js"],"/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/ox_lib/Modules/ACL/Server-ee3aaa3e689040a0.js"],"/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/ox_lib/Modules/AddCommand/Server-102c11c52819c84d.js"],"/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/ox_lib/Modules/AddKeybind/Client-95b02130c2570314.js"],"/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/ox_lib/Modules/Cache/Client-5d30c12c78c7d1fb.js"],"/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/ox_lib/Modules/Cache/Shared-8e4f35acaaf1af24.js"],"/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-13e93c6835fe9899.js"],"/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-fe675fa8db0b6ed6.js"],"/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-0e763159b9ac992e.js"],"/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-b4f3fb556c951db5.js"],"/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/ox_lib/Modules/Class/Shared-9a72e6d6c0b6c6cc.js"],"/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/ox_lib/Modules/Cron/Server-36ba208057b937be.js"],"/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/ox_lib/Modules/DisableControls/Client-b9d4cb3b8cfbc479.js"],"/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-e6495c1370074318.js"],"/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-2ec0472e6cfe62c9.js"],"/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d1581c69d677d4ed.js"],"/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-1a9d887d67a28b50.js"],"/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-88cfcf8df4661634.js"],"/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-555a6494ad85c931.js"],"/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-bb518d465352158d.js"],"/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-123eb1170b638be5.js"],"/ox_lib/Modules/Interface":[e,"static/chunks/pages/ox_lib/Modules/Interface-49ecd5e1720e5b9e.js"],"/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/alert-d26d4e5fadd7ff9a.js"],"/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-f7bb4ac1ca2f607d.js"],"/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/context-07e6254c6a94e876.js"],"/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/input-903df8e44ef86f9d.js"],"/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/menu-a96d02f040f758f2.js"],"/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/notify-9c214b90b7f7c5fa.js"],"/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/progress-8cf2229d8652dcdf.js"],"/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/radial-3799eaaf2507a3e8.js"],"/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-dbbccd202d35c621.js"],"/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/textui-db9ea38083e35cbf.js"],"/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/ox_lib/Modules/Locale/Shared-06ecac76d932ef0c.js"],"/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/ox_lib/Modules/Logger/Server-0f9aa724a221dd8a.js"],"/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/ox_lib/Modules/Marker/Client-92ef0b2960245e93.js"],"/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/ox_lib/Modules/Math/Shared-de154544900aa4e8.js"],"/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-56f6c81965f48d6c.js"],"/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/Lua/Client-27b9931b7ef6e6d1.js"],"/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/ox_lib/Modules/Print/Shared-c48cd186c778682d.js"],"/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/ox_lib/Modules/Raycast/Client-a1428293fc26bd8d.js"],"/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/ox_lib/Modules/Require/Shared-0151ce18c505673e.js"],"/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/ox_lib/Modules/Streaming/Client-45e6dfbc6a5d0797.js"],"/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/ox_lib/Modules/String/Shared-513338301ba9df67.js"],"/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/ox_lib/Modules/Table/Shared-9d3b26ffde2da9c8.js"],"/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-23e18c1942998e2a.js"],"/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/ox_lib/Modules/Version/Server-0a40f7184c9226f3.js"],"/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/ox_lib/Modules/Version/Shared-71540cd70cf87ee2.js"],"/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/ox_lib/Modules/WaitFor/Shared-66b19e6fc930df43.js"],"/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/ox_lib/Modules/Zones/Shared-8511bc5317576d47.js"],"/ox_target":[e,"static/chunks/pages/ox_target-466666fb6f4ac8cf.js"],"/ox_target/Functions/Client":[e,"static/chunks/pages/ox_target/Functions/Client-cb27c0b4551e51a6.js"],"/ox_target/Options":[e,"static/chunks/pages/ox_target/Options-385be0489e9fb27c.js"],"/oxmysql":[e,"static/chunks/pages/oxmysql-8b4466739ce863d4.js"],"/oxmysql/Functions/insert":[e,"static/chunks/pages/oxmysql/Functions/insert-24b2474d0cdad50e.js"],"/oxmysql/Functions/prepare":[e,"static/chunks/pages/oxmysql/Functions/prepare-0d3b6567649b576f.js"],"/oxmysql/Functions/query":[e,"static/chunks/pages/oxmysql/Functions/query-0b398e948e5dc310.js"],"/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/oxmysql/Functions/rawExecute-1be90f88656f2c8a.js"],"/oxmysql/Functions/scalar":[e,"static/chunks/pages/oxmysql/Functions/scalar-c85b4821da62a974.js"],"/oxmysql/Functions/single":[e,"static/chunks/pages/oxmysql/Functions/single-9c2e1584741a1a2c.js"],"/oxmysql/Functions/transaction":[e,"static/chunks/pages/oxmysql/Functions/transaction-02875a32110e4e54.js"],"/oxmysql/Functions/update":[e,"static/chunks/pages/oxmysql/Functions/update-ccb153d09e2ed269.js"],"/oxmysql/benchmark":[e,"static/chunks/pages/oxmysql/benchmark-d00c2db0c32d6fa5.js"],"/oxmysql/issues":[e,"static/chunks/pages/oxmysql/issues-155bdb285d1219b1.js"],"/oxmysql/placeholders":[e,"static/chunks/pages/oxmysql/placeholders-e9dd98b0e42e906e.js"],"/oxmysql/ui":[e,"static/chunks/pages/oxmysql/ui-26e43c146f6278ab.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/ox_core","/ox_core/Client/Player","/ox_core/Client/Player/callbacks","/ox_core/Client/Player/events","/ox_core/Client/functions","/ox_core/Server/Player","/ox_core/Server/Player/events","/ox_core/Server/Player/methods","/ox_core/Server/Vehicle","/ox_core/Server/Vehicle/callbacks","/ox_core/Server/Vehicle/methods","/ox_core/Server/functions","/ox_core/concepts","/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/qb","/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/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/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/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/Options","/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/issues","/oxmysql/placeholders","/oxmysql/ui"]}}("static/chunks/2059-ce0716acefc68b4d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(e){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[e,"static/chunks/pages/index-1075a5f972241c53.js"],"/404":["static/chunks/pages/404-d31671b33f52e827.js"],"/_error":["static/chunks/pages/_error-2279e6cb9ef84b6a.js"],"/guides":[e,"static/chunks/pages/guides-e0393300bd51d1cb.js"],"/guides/git":[e,"static/chunks/pages/guides/git-1736491deaebc3a0.js"],"/guides/nodejs":[e,"static/chunks/pages/guides/nodejs-0e3d40d03b458c96.js"],"/guides/pnpm":[e,"static/chunks/pages/guides/pnpm-56fbaca819a4ce52.js"],"/guides/types":[e,"static/chunks/pages/guides/types-f8827f56cbbd888d.js"],"/guides/vscode":[e,"static/chunks/pages/guides/vscode-974adf8b1a5d0f3c.js"],"/ox_core":[e,"static/chunks/pages/ox_core-8df6f3346002542d.js"],"/ox_core/Client/Player":[e,"static/chunks/pages/ox_core/Client/Player-b3006715713158ea.js"],"/ox_core/Client/Player/callbacks":[e,"static/chunks/pages/ox_core/Client/Player/callbacks-ff4918762336b7e5.js"],"/ox_core/Client/Player/events":[e,"static/chunks/pages/ox_core/Client/Player/events-20c2084060045285.js"],"/ox_core/Client/functions":[e,"static/chunks/pages/ox_core/Client/functions-dd77fe2d95dea0c0.js"],"/ox_core/Server/Player":[e,"static/chunks/pages/ox_core/Server/Player-8a9c8a47d55c3bda.js"],"/ox_core/Server/Player/events":[e,"static/chunks/pages/ox_core/Server/Player/events-0bfe9eea0576a3e8.js"],"/ox_core/Server/Player/methods":[e,"static/chunks/pages/ox_core/Server/Player/methods-5959115939eb96ca.js"],"/ox_core/Server/Vehicle":[e,"static/chunks/pages/ox_core/Server/Vehicle-9cad5ee5f9ed757f.js"],"/ox_core/Server/Vehicle/callbacks":[e,"static/chunks/pages/ox_core/Server/Vehicle/callbacks-1da2bf06caa397ae.js"],"/ox_core/Server/Vehicle/methods":[e,"static/chunks/pages/ox_core/Server/Vehicle/methods-fe72b7d714bb15c4.js"],"/ox_core/Server/functions":[e,"static/chunks/pages/ox_core/Server/functions-32dbeb72594eeee1.js"],"/ox_core/concepts":[e,"static/chunks/pages/ox_core/concepts-f5dbaa1d8dcb5fe9.js"],"/ox_doorlock":[e,"static/chunks/pages/ox_doorlock-cccb2f247358df26.js"],"/ox_doorlock/Client/functions":[e,"static/chunks/pages/ox_doorlock/Client/functions-3a7f03e7fc3f349c.js"],"/ox_doorlock/Server/events":[e,"static/chunks/pages/ox_doorlock/Server/events-8bfaf4fa839157fd.js"],"/ox_doorlock/Server/functions":[e,"static/chunks/pages/ox_doorlock/Server/functions-e6ec8e74e8131b41.js"],"/ox_doorlock/settings":[e,"static/chunks/pages/ox_doorlock/settings-cb218c44b0b48fa2.js"],"/ox_fuel":[e,"static/chunks/pages/ox_fuel-b9d0c9af470eda98.js"],"/ox_fuel/Client/functions":[e,"static/chunks/pages/ox_fuel/Client/functions-80fcb783356e6ff6.js"],"/ox_fuel/Server/functions":[e,"static/chunks/pages/ox_fuel/Server/functions-bf30ef7a9f557a09.js"],"/ox_fuel/Shared":[e,"static/chunks/pages/ox_fuel/Shared-6dec5fb18f4cfb7d.js"],"/ox_inventory":[e,"static/chunks/pages/ox_inventory-8a7c2c0a6c5e3f61.js"],"/ox_inventory/Events/Client":[e,"static/chunks/pages/ox_inventory/Events/Client-441b1dba62b27f48.js"],"/ox_inventory/Events/Server":[e,"static/chunks/pages/ox_inventory/Events/Server-424e2ced90473dc1.js"],"/ox_inventory/Frameworks/esx":[e,"static/chunks/pages/ox_inventory/Frameworks/esx-2745742e7e54732b.js"],"/ox_inventory/Frameworks/qb":[e,"static/chunks/pages/ox_inventory/Frameworks/qb-540367fc4e2a158b.js"],"/ox_inventory/Functions/Client":[e,"static/chunks/pages/ox_inventory/Functions/Client-4304dedfff02dfc9.js"],"/ox_inventory/Functions/Server":[e,"static/chunks/pages/ox_inventory/Functions/Server-836e4f28c5115b3a.js"],"/ox_inventory/Functions/Server/Hooks":[e,"static/chunks/pages/ox_inventory/Functions/Server/Hooks-9fc0d88facce7e46.js"],"/ox_inventory/Guides/crafting":[e,"static/chunks/pages/ox_inventory/Guides/crafting-c57e9e51b90edec3.js"],"/ox_inventory/Guides/creatingItems":[e,"static/chunks/pages/ox_inventory/Guides/creatingItems-62f38372ba682463.js"],"/ox_inventory/Guides/metadata":[e,"static/chunks/pages/ox_inventory/Guides/metadata-c520f846abe2b7ef.js"],"/ox_inventory/Guides/shops":[e,"static/chunks/pages/ox_inventory/Guides/shops-0e798e995ba21ae3.js"],"/ox_inventory/Guides/stashes":[e,"static/chunks/pages/ox_inventory/Guides/stashes-3211176f3973002d.js"],"/ox_inventory/issues":[e,"static/chunks/pages/ox_inventory/issues-7fada16f46dabdc4.js"],"/ox_lib":[e,"static/chunks/pages/ox_lib-fdfea56f8d4c7587.js"],"/ox_lib/Modules/ACL/Server":[e,"static/chunks/pages/ox_lib/Modules/ACL/Server-ee3aaa3e689040a0.js"],"/ox_lib/Modules/AddCommand/Server":[e,"static/chunks/pages/ox_lib/Modules/AddCommand/Server-102c11c52819c84d.js"],"/ox_lib/Modules/AddKeybind/Client":[e,"static/chunks/pages/ox_lib/Modules/AddKeybind/Client-95b02130c2570314.js"],"/ox_lib/Modules/Cache/Client":[e,"static/chunks/pages/ox_lib/Modules/Cache/Client-5d30c12c78c7d1fb.js"],"/ox_lib/Modules/Cache/Shared":[e,"static/chunks/pages/ox_lib/Modules/Cache/Shared-8e4f35acaaf1af24.js"],"/ox_lib/Modules/Callback/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Client-13e93c6835fe9899.js"],"/ox_lib/Modules/Callback/JavaScript/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/JavaScript/Server-fe675fa8db0b6ed6.js"],"/ox_lib/Modules/Callback/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Client-0e763159b9ac992e.js"],"/ox_lib/Modules/Callback/Lua/Server":[e,"static/chunks/pages/ox_lib/Modules/Callback/Lua/Server-b4f3fb556c951db5.js"],"/ox_lib/Modules/Class/Shared":[e,"static/chunks/pages/ox_lib/Modules/Class/Shared-9a72e6d6c0b6c6cc.js"],"/ox_lib/Modules/Cron/Server":[e,"static/chunks/pages/ox_lib/Modules/Cron/Server-36ba208057b937be.js"],"/ox_lib/Modules/DisableControls/Client":[e,"static/chunks/pages/ox_lib/Modules/DisableControls/Client-b9d4cb3b8cfbc479.js"],"/ox_lib/Modules/GetClosestObject/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestObject/Shared-e6495c1370074318.js"],"/ox_lib/Modules/GetClosestPed/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPed/Shared-2ec0472e6cfe62c9.js"],"/ox_lib/Modules/GetClosestPlayer/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestPlayer/Shared-d1581c69d677d4ed.js"],"/ox_lib/Modules/GetClosestVehicle/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetClosestVehicle/Shared-1a9d887d67a28b50.js"],"/ox_lib/Modules/GetNearbyObjects/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyObjects/Shared-88cfcf8df4661634.js"],"/ox_lib/Modules/GetNearbyPeds/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPeds/Shared-555a6494ad85c931.js"],"/ox_lib/Modules/GetNearbyPlayers/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyPlayers/Shared-bb518d465352158d.js"],"/ox_lib/Modules/GetNearbyVehicles/Shared":[e,"static/chunks/pages/ox_lib/Modules/GetNearbyVehicles/Shared-123eb1170b638be5.js"],"/ox_lib/Modules/Interface":[e,"static/chunks/pages/ox_lib/Modules/Interface-49ecd5e1720e5b9e.js"],"/ox_lib/Modules/Interface/Client/alert":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/alert-d26d4e5fadd7ff9a.js"],"/ox_lib/Modules/Interface/Client/clipboard":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/clipboard-f7bb4ac1ca2f607d.js"],"/ox_lib/Modules/Interface/Client/context":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/context-07e6254c6a94e876.js"],"/ox_lib/Modules/Interface/Client/input":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/input-903df8e44ef86f9d.js"],"/ox_lib/Modules/Interface/Client/menu":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/menu-a96d02f040f758f2.js"],"/ox_lib/Modules/Interface/Client/notify":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/notify-9c214b90b7f7c5fa.js"],"/ox_lib/Modules/Interface/Client/progress":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/progress-8cf2229d8652dcdf.js"],"/ox_lib/Modules/Interface/Client/radial":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/radial-3799eaaf2507a3e8.js"],"/ox_lib/Modules/Interface/Client/skillcheck":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/skillcheck-dbbccd202d35c621.js"],"/ox_lib/Modules/Interface/Client/textui":[e,"static/chunks/pages/ox_lib/Modules/Interface/Client/textui-a212da01b6a9fcc9.js"],"/ox_lib/Modules/Locale/Shared":[e,"static/chunks/pages/ox_lib/Modules/Locale/Shared-06ecac76d932ef0c.js"],"/ox_lib/Modules/Logger/Server":[e,"static/chunks/pages/ox_lib/Modules/Logger/Server-0f9aa724a221dd8a.js"],"/ox_lib/Modules/Marker/Client":[e,"static/chunks/pages/ox_lib/Modules/Marker/Client-92ef0b2960245e93.js"],"/ox_lib/Modules/Math/Shared":[e,"static/chunks/pages/ox_lib/Modules/Math/Shared-de154544900aa4e8.js"],"/ox_lib/Modules/Points/JavaScript/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/JavaScript/Client-56f6c81965f48d6c.js"],"/ox_lib/Modules/Points/Lua/Client":[e,"static/chunks/pages/ox_lib/Modules/Points/Lua/Client-27b9931b7ef6e6d1.js"],"/ox_lib/Modules/Print/Shared":[e,"static/chunks/pages/ox_lib/Modules/Print/Shared-c48cd186c778682d.js"],"/ox_lib/Modules/Raycast/Client":[e,"static/chunks/pages/ox_lib/Modules/Raycast/Client-a1428293fc26bd8d.js"],"/ox_lib/Modules/Require/Shared":[e,"static/chunks/pages/ox_lib/Modules/Require/Shared-0151ce18c505673e.js"],"/ox_lib/Modules/Streaming/Client":[e,"static/chunks/pages/ox_lib/Modules/Streaming/Client-45e6dfbc6a5d0797.js"],"/ox_lib/Modules/String/Shared":[e,"static/chunks/pages/ox_lib/Modules/String/Shared-513338301ba9df67.js"],"/ox_lib/Modules/Table/Shared":[e,"static/chunks/pages/ox_lib/Modules/Table/Shared-9d3b26ffde2da9c8.js"],"/ox_lib/Modules/VehicleProperties/Client":[e,"static/chunks/pages/ox_lib/Modules/VehicleProperties/Client-23e18c1942998e2a.js"],"/ox_lib/Modules/Version/Server":[e,"static/chunks/pages/ox_lib/Modules/Version/Server-0a40f7184c9226f3.js"],"/ox_lib/Modules/Version/Shared":[e,"static/chunks/pages/ox_lib/Modules/Version/Shared-71540cd70cf87ee2.js"],"/ox_lib/Modules/WaitFor/Shared":[e,"static/chunks/pages/ox_lib/Modules/WaitFor/Shared-66b19e6fc930df43.js"],"/ox_lib/Modules/Zones/Shared":[e,"static/chunks/pages/ox_lib/Modules/Zones/Shared-8511bc5317576d47.js"],"/ox_target":[e,"static/chunks/pages/ox_target-466666fb6f4ac8cf.js"],"/ox_target/Functions/Client":[e,"static/chunks/pages/ox_target/Functions/Client-cb27c0b4551e51a6.js"],"/ox_target/Options":[e,"static/chunks/pages/ox_target/Options-385be0489e9fb27c.js"],"/oxmysql":[e,"static/chunks/pages/oxmysql-8b4466739ce863d4.js"],"/oxmysql/Functions/insert":[e,"static/chunks/pages/oxmysql/Functions/insert-24b2474d0cdad50e.js"],"/oxmysql/Functions/prepare":[e,"static/chunks/pages/oxmysql/Functions/prepare-0d3b6567649b576f.js"],"/oxmysql/Functions/query":[e,"static/chunks/pages/oxmysql/Functions/query-0b398e948e5dc310.js"],"/oxmysql/Functions/rawExecute":[e,"static/chunks/pages/oxmysql/Functions/rawExecute-1be90f88656f2c8a.js"],"/oxmysql/Functions/scalar":[e,"static/chunks/pages/oxmysql/Functions/scalar-c85b4821da62a974.js"],"/oxmysql/Functions/single":[e,"static/chunks/pages/oxmysql/Functions/single-9c2e1584741a1a2c.js"],"/oxmysql/Functions/transaction":[e,"static/chunks/pages/oxmysql/Functions/transaction-02875a32110e4e54.js"],"/oxmysql/Functions/update":[e,"static/chunks/pages/oxmysql/Functions/update-ccb153d09e2ed269.js"],"/oxmysql/benchmark":[e,"static/chunks/pages/oxmysql/benchmark-d00c2db0c32d6fa5.js"],"/oxmysql/issues":[e,"static/chunks/pages/oxmysql/issues-155bdb285d1219b1.js"],"/oxmysql/placeholders":[e,"static/chunks/pages/oxmysql/placeholders-e9dd98b0e42e906e.js"],"/oxmysql/ui":[e,"static/chunks/pages/oxmysql/ui-26e43c146f6278ab.js"],sortedPages:["/","/404","/_app","/_error","/guides","/guides/git","/guides/nodejs","/guides/pnpm","/guides/types","/guides/vscode","/ox_core","/ox_core/Client/Player","/ox_core/Client/Player/callbacks","/ox_core/Client/Player/events","/ox_core/Client/functions","/ox_core/Server/Player","/ox_core/Server/Player/events","/ox_core/Server/Player/methods","/ox_core/Server/Vehicle","/ox_core/Server/Vehicle/callbacks","/ox_core/Server/Vehicle/methods","/ox_core/Server/functions","/ox_core/concepts","/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/qb","/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/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/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/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/Options","/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/issues","/oxmysql/placeholders","/oxmysql/ui"]}}("static/chunks/2059-ce0716acefc68b4d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/pl1-02qh6IT8IngxXe3ZY/_ssgManifest.js b/_next/static/LAP3UqwLpKjga5BhV46b-/_ssgManifest.js similarity index 100% rename from _next/static/pl1-02qh6IT8IngxXe3ZY/_ssgManifest.js rename to _next/static/LAP3UqwLpKjga5BhV46b-/_ssgManifest.js diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index e761a02a17..a7d9bb6193 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],"}},"/ox_core":{"title":"Ox Core","data":{"":"An experimental framework for FiveM. Limited support and breaking changes guaranteed.\nThis resource does not have a stable (v1.0) release; breaking changes are likely.\nDocumentation may not be kept updated in some cases.","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\nfivem-appearance\nox_appearance","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_core.git\ncd ox_core/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_inventory\nnpwd\npefcl","optional-configure-pefcl#(Optional) Configure pefcl":"If using it with ox_inventory, open pefcl/config.json and enable framework integration.\n\"frameworkIntegration\": {\n \"enabled\": true,\n \"resource\": \"ox_inventory\",\n \"syncInitialBankBalance\": false\n},","importing-into-resources#Importing into resources":"","lua#Lua":"Lua imports can be defined as part of fxmanifest, or loaded with the load function.\nclient_scripts {\n '@ox_core/imports/client.lua',\n 'client/main.lua',\n}\nserver_scripts {\n '@oxmysql/lib/MySQL.lua',\n '@ox_core/imports/server.lua',\n 'server/main.lua',\n}\nlocal file = ('imports/%s.lua'):format(IsDuplicityVersion() and 'server' or 'client')\nlocal import = LoadResourceFile('ox_core', file)\nlocal chunk = assert(load(import, ('@@ox_core/%s'):format(file)))\nchunk()","javascript#JavaScript":"To use ox_core with your JS/TS resources you'll need to use our npm package, allowing you to import core functions with full type and intellisense support.","config#Config":"Resource configuration is handled using convars.\n# Players must have a valid identifier to join the server. Used to fetch userid from the database.\nset ox:primaryIdentifier \"fivem\"\n# Set the number of active characters a user can have registered.\nsetr ox:characterSlots 5\n# Enables debug and development features. Should only be used in a development environment.\nsetr ox:debug 0\n# Disable death system handle by core.\nsetr ox:deathSystem 0\n# Disable the spawn selection.\nsetr ox:spawnSelect 0"}},"/":{"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":"Our projects will always remain free and open-source, with our core developers working voluntarily.\nIf you love what we do and want to help us continue, why not show your appreciation with a donation?","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.\nYou can apply a creator code at checkout under \"Support A Creator\"."}},"/ox_core/Client/Player":{"title":"Client","data":{"":"When ox_core is imported into a resource it will create the player global.\nIf player is nil, then the client has not yet selected a character and spawned.Example:\nprint(json.encode(player, { indent = true }))\nplayer?: table\nuserId: number\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nname: string\ngroups: table"}},"/ox_core/Client/Player/callbacks":{"title":"Callbacks","data":{"oxgetstatus#ox:getStatus":"lib.callback.await('ox:getStatus', delay, targetId, statusName)\ndelay: number\ntargetId: number\nThe server id for the player to get statuses for.\nstatusName?: string\nThe name of the status (i.e. hunger). Can be omitted to return all statuses.","oxgetlicense#ox:getLicense":"lib.callback.await('ox:getLicense', delay, licenseName, targetId)\ndelay: number\nlicenseName: string\nThe name of the license to get data for. Can be omitted to return all licenses.\ntargetId?: number\nThe server id to get license data for, defaulting to the current player.","oxgetnearbyvehicles#ox:getNearbyVehicles":"lib.callback.register('ox:getNearbyVehicles', function(radius)\nReturns an array of vehicle netids within a given radius of the player's location.\nradius?: number\nThe radius from the player's location to return vehicles."}},"/ox_core/Client/Player/events":{"title":"Events","data":{"client-events#Client events":"","oxplayerloaded#ox:playerLoaded":"Triggered once the player has selected a character and spawned.\nAddEventHandler('ox:playerLoaded', function(data) end)","oxplayerlogout#ox:playerLogout":"Triggered when the player enters character selection if they were previously playing a character.\nAddEventHandler('ox:playerLogout', function() end)","oxstatustick#ox:statusTick":"Triggered every 1000ms interval, when status values are updated internally.\nAddEventHandler('ox:statusTick', function(statuses) end)","oxplayerdeath#ox:playerDeath":"Triggered on player death and revival.\nAddEventHandler('ox:playerDeath', function(isDead) end)","networked-events#Networked events":"","oxsetgroup#ox:setGroup":"Triggered when the player's grade in a group is modified on the server with player.setGroup.\nRegisterNetEvent('ox:setGroup', function(group, grade) end)","oxlicenseadded#ox:licenseAdded":"Triggered when the player has been granted a license.\nRegisterNetEvent('ox:licenseAdded', function(name) end)","oxlicenseremoved#ox:licenseRemoved":"Triggered when the player's license is revoked.\nRegisterNetEvent('ox:licenseRemoved', function(name) end)"}},"/ox_core/Server/Player":{"title":"Server","data":{"oxgetplayer#Ox.GetPlayer":"Return an instance of OxPlayer for the given player source.\nlocal player = Ox.GetPlayer(source)\nprint(json.encode(player, { indent = true }))\nimport { GetPlayer } from '@overextended/ox_core/server';\nconst player = GetPlayer(source);\nconsole.log(JSON.stringify(player));\nplayer?: table\nsource: number\nuserId: number\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nname: string\nusername: string","oxgetplayerbyfilter#Ox.GetPlayerByFilter":"Return the first OxPlayer that matches the filter properties.\nlocal filter = { phoneNumber = '556-560-6609' }\nlocal player = Ox.GetPlayerByFilter(filter)\nprint(json.encode(player, { indent = true }))\nimport { GetPlayerByFilter } from '@overextended/ox_core/server';\nconst filter = { phoneNumber: '556-560-6609' };\nconst player = GetPlayerByFilter(filter);\nconsole.log(JSON.stringify(player));","oxgetplayers#Ox.GetPlayers":"Returns an array containing all players. Methods will not be applied if the first argument is false.\nPlayers can be filtered to only return players that match the given properties, or groups.\n-- Get an array containing all players in the police or sheriff groups, with grade 3 or higher.\nlocal filter = { groups = {['sheriff'] = 3, ['police'] = 3} })\nlocal players = Ox.GetPlayers(filter)\nfor i = 1, #players do\n local player = players[i]\n print(json.encode(player, { indent = true }))\nend\nimport { GetPlayers } from '@overextended/ox_core/server';\n// Get an array containing all players in the police or sheriff groups, with grade 3 or higher.\nconst filter = { groups: { sheriff: 3, police: 3 } })\nconst players = GetPlayers(filter);\nfor (let i = 0; i < players.length; i++) {\n const player = players[i];\n console.log(JSON.stringify(player));\n}"}},"/ox_core/Client/functions":{"title":"Functions","data":{"":"todo"}},"/ox_core/Server/Player/events":{"title":"Events","data":{"server-events#Server events":"","oxplayerloaded#ox:playerLoaded":"Triggered after a player has selected a character.\nAddEventHandler('ox:playerLoaded', function(source, userid, charid) end)","oxsetgroup#ox:setGroup":"Triggered when a player's grade in a group is modified with player.setGroup.\nAddEventHandler('ox:setGroup', function(source, group, grade) end)","oxplayerlogout#ox:playerLogout":"Triggered when a player logs out from their current character or disconnects from the server.\nAddEventHandler('ox:playerLogout', function(source, userid, charid) end)","oxcharacterdeleted#ox:characterDeleted":"Triggered when a player has deleted a character.\nAddEventHandler('ox:characterDeleted', function(source, userid, charid) end)","oxlicenseadded#ox:licenseAdded":"Triggered when a player has been granted a license.\nAddEventHandler('ox:licenseAdded', function(source, name) end)","oxlicenseremoved#ox:licenseRemoved":"Triggered when a player's license is revoked.\nAddEventHandler('ox:licenseRemoved', function(source, name) end)","networked-events#Networked events":"","oxplayerdeath#ox:playerDeath":"Triggered on player death and revival.\nRegisterNetEvent('ox:playerDeath', function(isDead) end)","oxsetplayerinservice#ox:setPlayerInService":"Can be triggered to set a player as \"in service\" for a specific group they are a member of.\nRegisterNetEvent('ox:setPlayerInService', function(group) end)"}},"/ox_core/Server/Player/methods":{"title":"Methods","data":{"":"These functions are inherited from the Player class.","playerset#player.set":"Update the player's metadata, optionally syncing it with the client.\nplayer.set(key, value, replicated)\nkey: string\nvalue: any\nreplicated?: boolean","playerget#player.get":"Get a value from the player's metadata, or omit the argument to get all metadata.\nplayer.get(key)\nkey?: string","playergetstate#player.getState":"Return the player's statebag.\nplayer.getState()","playergetcoords#player.getCoords":"Return the player's position.\nplayer.getCoords()","playersetgroup#player.setGroup":"Updates the player's grade for the given group. Any value below 1 will remove the group from the player.\nplayer.setGroup(group, grade)\ngroup: string\ngrade?: number","playergetgroup#player.getGroup":"Returns the player's current grade for a given group.\nplayer.getGroup()","playergetgroups#player.getGroups":"Returns an object of all groups the player is in, with the current grade as the value.\nplayer.getGroups()","playerhasgroup#player.hasGroup":"Check if the player is a member of a given group, and returns the matching group name and grade.\nThe filter can be a string, array, or object where key is the group, and value is the minimum grade.\nplayer.hasGroup(filter)\nfilter: string | string[] | { [string]: number }","playersetstatus#player.setStatus":"Set the current value for a status (i.e. hunger, thirst).\nplayer.setStatus(name, value)\nname: string\nvalue: number","playeraddstatus#player.addStatus":"Add the given amount to the total value for a status (i.e. hunger, thirst).\nplayer.addStatus(name, value)\nname: string\nvalue: number","playerremovestatus#player.removeStatus":"Remove the given amount from the total value for a status (i.e. hunger, thirst).\nplayer.removeStatus(name, value)\nname: string\nvalue: number","playergetlicenses#player.getLicenses":"Get all licenses for the player.\nplayer.getLicenses()","playergetlicense#player.getLicense":"Get the license of the given name for the player, as an object containing license information.\nplayer.getLicense(name)\nname: string","playeraddlicense#player.addLicense":"Grants a license to the player and triggers 'ox:licenseAdded' on the server and client.\nplayer.addLicense(name)\nname: string","playerremovelicense#player.removeLicense":"Revokes a license from the player and triggers 'ox:licenseRemoved' on the server and client.\nplayer.removeLicense(name)\nname: string","playergetplayersinscope#player.getPlayersInScope":"Return an array of all player id's inside the player's scope.\nplayer.getPlayersInScope()","playerisplayerinscope#player.isPlayerInScope":"Check if the given source is inside the player's scope.\nplayer.isPlayerInScope(target)\ntarget: number","playertriggerscopedevent#player.triggerScopedEvent":"player.triggerScopedEvent(eventName, ...)\neventName: string\n...?: any[]"}},"/ox_core/Server/Vehicle":{"title":"Server","data":{"oxgetvehicle#Ox.GetVehicle":"Return an instance of OxVehicle for the given entity.\nlocal vehicle = Ox.GetVehicle(entity)\nprint(json.encode(vehicle, { indent = true }))","oxgetvehicles#Ox.GetVehicles":"Returns an array containing all vehicles. Methods will not be applied if the first argument is false.\nlocal vehicles = Ox.GetVehicles(usemetatable)\nfor i = 1, #vehicles do\n local vehicle = vehicles[i]\n print(json.encode(vehicle, { indent = true }))\nend","oxcreatevehicle#Ox.CreateVehicle":"Spawns a vehicle and returns the instance of OxVehicle.\nIf the first argument is a number, it will attempt to spawn a vehicle from the database with a matching id.\nlocal vehicleId = MySQL.scalar.await('SELECT id FROM vehicles WHERE owner = ? LIMIT 1', { player.charid })\nif vehicleId then\n local coords = player.getCoords()\n local vehicle = Ox.CreateVehicle(vehicleId, vector3(coords.x, coords.y + 1.0, coords.z) , GetEntityHeading(player.ped))\n if vehicle then\n print(json.encode(vehicle, { indent = true }))\n end\nend\nIf the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database.\nSetting the owner as false creates a non-persistent vehicle.\nlocal vehicle = Ox.CreateVehicle({\n model = 'sultanrs',\n owner = player.charid,\n}, player.getCoords(), GetEntityHeading(player.ped))"}},"/ox_core/Server/Vehicle/methods":{"title":"Methods","data":{"":"These functions are inherited from the Vehicle class.","vehicleset#vehicle.set":"Sets the vehicle's metadata for key to the given value.\nvehicle.set(key, value)\nkey: string\nvalue: any","vehicleget#vehicle.get":"Get a value from the vehicles's metadata, or omit the argument to get all metadata.\nvehicle.get(key)\nkey?: string","vehiclegetstate#vehicle.getState":"Return the vehicle's statebag.\nvehicle.getState()","vehiclegetcoords#vehicle.getCoords":"Return the vehicle's position.\nvehicle.getCoords()","vehicledespawn#vehicle.despawn":"Despawns the vehicle but doesn't save it or update the stored value.","vehicledelete#vehicle.delete":"Remove the vehicle from the database and despawns the entity.\nvehicle.delete()","vehiclesetstored#vehicle.setStored":"Updates the vehicle's \"stored\" value and optionally despawns it.\nvehicle.setStored(value, despawn)\nvalue?: string\ndespawn?: boolean","vehiclesetowner#vehicle.setOwner":"Sets the vehicle's owner, matching a charid or nil to set it as unowned.\nvehicle.setOwner(owner)\nowner?: number","vehiclesetgroup#vehicle.setGroup":"Sets the vehicle's group, which can be used for garage restrictions, unowned group vehicles, etc.\nvehicle.setGroup(group)\ngroup?: string","vehiclesetplate#vehicle.setPlate":"Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates).\nPlate is always formatted to 8 characters.\nvehicle.setPlate(plate)\nplate: string"}},"/ox_core/Server/Vehicle/callbacks":{"title":"Callbacks","data":{"oxgetnearbyvehicles#ox:getNearbyVehicles":"Get all vehicles within range of the target player.\nlib.callback.await('ox:getNearbyVehicles', playerId, radius)\nplayerId: number\nradius?: number"}},"/ox_core/Server/functions":{"title":"Functions","data":{"":"todo"}},"/ox_core/concepts":{"title":"Concepts","data":{"":"We'll try to explain some technical but core concepts used in ox_core here.","classes#Classes":"Lua doesn't have support for true classes, but rather prototype-based inheritance.\nA prototype can hold its own variables and methods, which another object (an instance) can reference or call.\n-- OxPlayer will hold all inherited variables and methods for instances of it.\nlocal OxPlayer = {}\n-- Sets the \"index metamethod\" of OxPlayer to reference itself.\n-- This is how instances will know to look up the table.\nOxPlayer.__index = OxPlayer\n-- Set a new metatable on the table passed to the function.\n-- The important code here is { __index = OxPlayer }.\nfunction OxPlayer.new(player)\n return setmetatable(player, OxPlayer)\nend\n-- Using the `:` syntax will pass the object as the first parameter.\nfunction OxPlayer:getUsername()\n return self.username\nend\n-- Create our instance of OxPlayer.\nlocal player = OxPlayer.new({\n username = 'Bob the Builder'\n})\n-- This is the same as OxPlayer.getUsername(player).\nlocal username = player:getUsername()\n-- 'Bob the Builder'\nprint(username)\nWhen using the imported classes in your resources you can treat the methods as if you are calling a regular function.\nlocal player = Ox.GetPlayer(playerId)\nprint(player.getUsername())"}},"/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()"}},"/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":{"title":"Ox Doorlock","data":{"":"A door management resource that can be used standalone or alongside ox_core, qb-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 or qb-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 (and its fork, qb-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/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_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, qb-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, qb, 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# 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","esx#ESX":"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!","qbcore#QBCore":"Support for QBCore is extremely limited, highly incompatible, and unlikely to improve.\nYou can use any \"version\" of qb-core that supports QBCore.Functions.AddPlayerMethod.\nYou can convert player and vehicle inventories with convertinventory qb.\nAll QB.Shared.Items will be migrated to the internal item data.\nAlways restart the resource when items are migrated!","qbox-project#Qbox Project":"Qbox Project GitHub\nQbox txAdmin Recipe\nQbox is a fork of QBCore developed by former team members and contributors to QBCore.\nImproved security and performance of qb resources.\nIntegrated support for ox_inventory, with improved compatibility.\nSupport for ox_lib and ox_target."}},"/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/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/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/esx":{"title":"ESX","data":{"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/qb":{"title":"QBCore","data":{"":"QBCore support is experimental and cannot work as a \"drag and drop\" solution due to many incompatibilities.","compatibility#Compatibility":"Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from QBCore, and is not intended to be used with resources designed around it.\nStashes used by qb-inventory and its forks do not work, but can possibly be converted.\nRemove qb-inventory (or similar), or qb-core will not function properly.\nRemove qb-shops and qb-weapons, as they depend on qb-inventory and conflict.\nWeapon holstering and draw animations (like in qb-smallresources) may break our own methods.","qbox-project#Qbox Project":"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).We strongly advise using Qbox as an alternative to QBCore.\nQbox Project GitHub\nQbox Project Discord","installation#Installation":"Setup qb-core or qbox.\nEdit your server.cfg.\nAdd setr inventory:framework \"qb\" before starting your resources.\nStart ox_inventory immediately after qb-core.","convert-qbcore#Convert QBCore":"If you have existing player data, you will need to convert it to a compatible format.\nStart the server and type convertinventory qb into the server console.\nRestart the server once conversion is complete.","optional-optimisation#Optional Optimisation":"All item related functions from Player, such as Player.Functions.GetItemByName, 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.\nlocal acetone = Player.Functions.GetItemByName('acetone')\nlocal antifreeze = Player.Functions.GetItemByName('antifreeze')\nlocal sudo = Player.Functions.GetItemByName('sudo')\nif acetone?.amount > 2 and antifreeze?.amount > 4 and sudo?.amount > 9 then\n Player.Functions.RemoveItem(\"acetone\", 3)\n Player.Functions.RemoveItem(\"antifreeze\", 5)\n Player.Functions.RemoveItem(\"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/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.\nexports.ox_inventory:Items()\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 items.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.\nexports.ox_inventory:Items()\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)","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)\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 QBCore, you can continue using QBCore.Functions.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_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\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/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/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'\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/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/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/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/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 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 table\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 table\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 table\nControl(s) to clear out from being tracked"}},"/ox_lib/Modules/Class/Shared":{"title":"Shared","data":{"libclass#lib.class":"Creates a new class.\nlocal MyClass = lib.class(name, super)\nname: string\nsuper?: table\nSets the new class as a subset of the super class, inheriting its methods and fields.\nReturn:\nclass: table\ntodo: more class info blah, look at the example","example#Example":"local fruits = {}\nlocal Fruit = lib.class('Fruit')\nfunction Fruit:init()\n print(('Created a %s %s'):format(self:getColour(), self:getName()))\n fruits[self.name] = self\nend\nfunction Fruit:remove()\n print('Removed', self:getName(), self)\n fruits[self.name] = nil\nend\nfunction Fruit:getName() return self.name end\nfunction Fruit:getColour() return self.colour end\nfunction Fruit:getSeeds() return self.private.seeds end\n-- Inherits methods and properties from the Fruit class.\nlocal SpoiledFruit = lib.class('SpoiledFruit', Fruit)\nfunction SpoiledFruit:getStench() return self.stench end\nCreateThread(function()\n local apple = Fruit:new({\n name = 'apple',\n colour = math.random(0, 1) == 1 and 'red' or 'green'\n })\n local orange = Fruit:new({\n name = 'orange',\n colour = 'orange',\n -- the private table is not serialisable (data is hidden cross-resource)\n private = {\n seeds = 7\n }\n })\n print(('the apple is %s; the orange contains %d seeds'):format(apple:getColour(), orange:getSeeds()))\n apple:remove()\n local rottenBanana = SpoiledFruit:new({\n name = 'banana',\n colour = 'black',\n stench = 'musty'\n })\n print(('the banana is %s and %s - gross!'):format(rottenBanana:getColour(), rottenBanana:getStench()))\nend)"}},"/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\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\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\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nalignIcon?: 'top' or 'center'\nDefault: 'center'\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 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 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\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\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\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\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/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 \"\""}},"/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'\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/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 point = lib.points.new({\r\n coords = SharedConfig.Warehouse.coords,\r\n distance = 20,\r\n})\r\n\r\nlocal marker = lib.marker.new({\r\n coords = GetEntityCoords(SharedConfig.Warehouse.coords),\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 if lib.isTextUIOpen() then\r\n lib.hideTextUI()\r\n end\r\n end\r\nend"}},"/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/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"}},"/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":{"libraycastcam#lib.raycast.cam":"Starts a shapetest originating from the camera, extending to ~10m by default.\nlib.raycast.cam(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"}},"/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":"lib.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: 500","librequestanimset#lib.requestAnimSet":"lib.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: 500","librequestmodel#lib.requestModel":"lib.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: 500","librequeststreamedtexturedict#lib.requestStreamedTextureDict":"lib.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: 500","librequestnamedptfxasset#lib.requestNamedPtfxAsset":"lib.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: 500","librequestscaleformmovie#lib.requestScaleformMovie":"lib.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: 500","librequestweaponasset#lib.requestWeaponAsset":"lib.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: 500\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/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/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/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":"Requires the vehicle to belong to the client. Do not use NetworkRequestControlOfEntity.\nlib.setVehicleProperties(vehicle, props)\nvehicle: entity\nprops: table (object)\nRegisterNetEvent('ox_lib:setVehicleProperties', function(netid, data)\n lib.setVehicleProperties(NetToVeh(netid), data)\nend)\nimport lib from '@overextended/ox_lib/client'\nonNet('ox_lib:setVehicleProperties', (netid, data) => {\n lib.setVehicleProperties(NetToVeh(netid), data)\n})","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_target":{"title":"Ox Target","data":{"":"A performant and flexible standalone targeting resource or \"third-eye\", with additional functionality for ox_inventory, ox_core, qb-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\nqb-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[]\nAll z values must match\nthickness?: number\nDefault: 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\nDefault: 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_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\nThe duration to run the function for, defaulting to 1000ms.\nlocal value --[['abc']] = lib.waitFor(function()\n if math.random(0, 1) == 1 then return 'abc' end\nend)"}},"/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.","addglobalobject#addGlobalObject":"Creates new targetable options for all Object entity types.\nexports.ox_target:addGlobalObject(options)\noptions: table","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: table","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: table","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: table","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: table","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: table","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: table","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: vector\nradius?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\nReturn:\nid: number","addboxzone#addBoxZone":"Creates a new targetable box zone.\nexports.ox_target:addBoxZone(parameters)\nparameters: table\ncoords: vector\nsize?: vector3\nrotation?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\nReturn:\nid: number","addpolyzone#addPolyZone":"Creates a new targetable poly zone.\nexports.ox_target:addPolyZone(parameters)\nparameters: table\npoints: vector3[]\nAll z values must match\nthickness?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\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 that can be specified by the user"}},"/ox_target/Options":{"title":"Options","data":{"":"When creating a targetable option you must send an array of options with the following properties.","option-parameters#Option Parameters":"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","option-effects#Option Effects":"When selecting an option it will trigger a single action, in order of priority:\nonSelect function\nexport\nevent\nserver event\ncommand"}},"/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-the-latest-release#Download the latest release.":"","configure-your-server#Configure your server":"When using convars do not replicate sensitive information to the client.\nset will only be set on the server, while setr is replicated.\nStart by opening your server configuration (i.e. server.cfg) and adding start oxmysql before any of its dependents (usually it's the first resource you start).\nSet a mysql connection string using either of the following formats, using your server authentication details and target database.\nset mysql_connection_string \"mysql://root:12345@localhost:3306/es_extended\"\nset mysql_connection_string \"user=root;password=12345;host=localhost;port=3306;database=es_extended\"\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":"By default you will receive warnings if a query took ~150ms to complete, however\nQuery time is calculated on fxserver based on response time, and may not be entirely accurate.\nServer hitches may delay the query response, and may not indicate a database issue.\nExcessive queries in a short timeframe may report with higher response times.\nYou can adjust the minimum response time with a convar.\nset mysql_slow_query_warning 150\nSlow query warnings are only shown if mysql_ui or mysql_debug is enabled.","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]\nThis value can be changed without restarting oxmysql, and you can temporarily modify the list with commands.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","mysql-async-compatibility#mysql-async compatibility":"The mysql-async directory must be deleted to properly provide support.\n🗹 Supports server_script '@mysql-async/lib/MySQL.lua'.\n🗹 Supports MySQL.Sync and MySQL.Async methods.\n☐ Raw exports are not supported (i.e. exports['mysql-async].mysql_execute).\n☐ Multi-statements are disabled for security reasons (see #102).","ghmattimysql-compatibility#ghmattimysql compatibility":"The ghmattimysql resource must be stopped to properly provide support.\n🗹 Supports exports.ghmattimysql.execute and other similar exports.\n🗹 Supports exports.ghmattimysql.executeSync and other similar exports.","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'\nIf you're using Lua Language Server you can get access to basic types and intellisense.\n\"Lua.workspace.library\": [\n \"C:/pathtoserver/resources/oxmysql/lib/define.lua\",\n]","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/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/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/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/issues":{"title":"Common Issues","data":{"unable-to-establish-a-connection#Unable to establish a connection":"This is usually the result of incorrect database settings or your password containing reserved characters.\n; , / ? : @ & = + $ # are reserved.\nEnsure you have entered the correct database settings in the mysql_connection_string convar. You can try using the\nsemicolon-separated format if your password contains reserved characters.","no-such-export--in-resource-oxmysql#No such export ... in resource oxmysql":"Download the latest release build (not the source code) of oxmysql.\nEnsure it is starting before any resources that require it.","numbers-treated-as-string#Numbers treated as string":"To resolve this issue simply enable decimalNumbers in your connection string, ie. mysql://root@localhost/essentialmode?decimalNumbers=true.\nJavaScript treats all numbers as floats, so a double or decimal value will be cast as a float with this setting.\nNumbers will have less precision when this setting is enabled."}},"/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/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 map (referred to as named 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/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/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[]\nGrade 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})"}},"/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/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":"Our projects will always remain free and open-source, with our core developers working voluntarily.\nIf you love what we do and want to help us continue, why not show your appreciation with a donation?","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.\nYou can apply a creator code at checkout under \"Support A Creator\"."}},"/ox_core":{"title":"Ox Core","data":{"":"An experimental framework for FiveM. Limited support and breaking changes guaranteed.\nThis resource does not have a stable (v1.0) release; breaking changes are likely.\nDocumentation may not be kept updated in some cases.","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\nfivem-appearance\nox_appearance","download-a-release-or-build-the-source-code#Download a release or build the source code.":"git clone https://github.com/overextended/ox_core.git\ncd ox_core/web\npnpm i\npnpm build","install-optional-dependencies#Install optional dependencies.":"These resources aren't required but provide additional functionality.\nox_inventory\nnpwd\npefcl","optional-configure-pefcl#(Optional) Configure pefcl":"If using it with ox_inventory, open pefcl/config.json and enable framework integration.\n\"frameworkIntegration\": {\n \"enabled\": true,\n \"resource\": \"ox_inventory\",\n \"syncInitialBankBalance\": false\n},","importing-into-resources#Importing into resources":"","lua#Lua":"Lua imports can be defined as part of fxmanifest, or loaded with the load function.\nclient_scripts {\n '@ox_core/imports/client.lua',\n 'client/main.lua',\n}\nserver_scripts {\n '@oxmysql/lib/MySQL.lua',\n '@ox_core/imports/server.lua',\n 'server/main.lua',\n}\nlocal file = ('imports/%s.lua'):format(IsDuplicityVersion() and 'server' or 'client')\nlocal import = LoadResourceFile('ox_core', file)\nlocal chunk = assert(load(import, ('@@ox_core/%s'):format(file)))\nchunk()","javascript#JavaScript":"To use ox_core with your JS/TS resources you'll need to use our npm package, allowing you to import core functions with full type and intellisense support.","config#Config":"Resource configuration is handled using convars.\n# Players must have a valid identifier to join the server. Used to fetch userid from the database.\nset ox:primaryIdentifier \"fivem\"\n# Set the number of active characters a user can have registered.\nsetr ox:characterSlots 5\n# Enables debug and development features. Should only be used in a development environment.\nsetr ox:debug 0\n# Disable death system handle by core.\nsetr ox:deathSystem 0\n# Disable the spawn selection.\nsetr ox:spawnSelect 0"}},"/ox_core/Client/Player":{"title":"Client","data":{"":"When ox_core is imported into a resource it will create the player global.\nIf player is nil, then the client has not yet selected a character and spawned.Example:\nprint(json.encode(player, { indent = true }))\nplayer?: table\nuserId: number\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nname: string\ngroups: table"}},"/ox_core/Client/Player/callbacks":{"title":"Callbacks","data":{"oxgetstatus#ox:getStatus":"lib.callback.await('ox:getStatus', delay, targetId, statusName)\ndelay: number\ntargetId: number\nThe server id for the player to get statuses for.\nstatusName?: string\nThe name of the status (i.e. hunger). Can be omitted to return all statuses.","oxgetlicense#ox:getLicense":"lib.callback.await('ox:getLicense', delay, licenseName, targetId)\ndelay: number\nlicenseName: string\nThe name of the license to get data for. Can be omitted to return all licenses.\ntargetId?: number\nThe server id to get license data for, defaulting to the current player.","oxgetnearbyvehicles#ox:getNearbyVehicles":"lib.callback.register('ox:getNearbyVehicles', function(radius)\nReturns an array of vehicle netids within a given radius of the player's location.\nradius?: number\nThe radius from the player's location to return vehicles."}},"/ox_core/Client/Player/events":{"title":"Events","data":{"client-events#Client events":"","oxplayerloaded#ox:playerLoaded":"Triggered once the player has selected a character and spawned.\nAddEventHandler('ox:playerLoaded', function(data) end)","oxplayerlogout#ox:playerLogout":"Triggered when the player enters character selection if they were previously playing a character.\nAddEventHandler('ox:playerLogout', function() end)","oxstatustick#ox:statusTick":"Triggered every 1000ms interval, when status values are updated internally.\nAddEventHandler('ox:statusTick', function(statuses) end)","oxplayerdeath#ox:playerDeath":"Triggered on player death and revival.\nAddEventHandler('ox:playerDeath', function(isDead) end)","networked-events#Networked events":"","oxsetgroup#ox:setGroup":"Triggered when the player's grade in a group is modified on the server with player.setGroup.\nRegisterNetEvent('ox:setGroup', function(group, grade) end)","oxlicenseadded#ox:licenseAdded":"Triggered when the player has been granted a license.\nRegisterNetEvent('ox:licenseAdded', function(name) end)","oxlicenseremoved#ox:licenseRemoved":"Triggered when the player's license is revoked.\nRegisterNetEvent('ox:licenseRemoved', function(name) end)"}},"/ox_core/Client/functions":{"title":"Functions","data":{"":"todo"}},"/ox_core/Server/Player/events":{"title":"Events","data":{"server-events#Server events":"","oxplayerloaded#ox:playerLoaded":"Triggered after a player has selected a character.\nAddEventHandler('ox:playerLoaded', function(source, userid, charid) end)","oxsetgroup#ox:setGroup":"Triggered when a player's grade in a group is modified with player.setGroup.\nAddEventHandler('ox:setGroup', function(source, group, grade) end)","oxplayerlogout#ox:playerLogout":"Triggered when a player logs out from their current character or disconnects from the server.\nAddEventHandler('ox:playerLogout', function(source, userid, charid) end)","oxcharacterdeleted#ox:characterDeleted":"Triggered when a player has deleted a character.\nAddEventHandler('ox:characterDeleted', function(source, userid, charid) end)","oxlicenseadded#ox:licenseAdded":"Triggered when a player has been granted a license.\nAddEventHandler('ox:licenseAdded', function(source, name) end)","oxlicenseremoved#ox:licenseRemoved":"Triggered when a player's license is revoked.\nAddEventHandler('ox:licenseRemoved', function(source, name) end)","networked-events#Networked events":"","oxplayerdeath#ox:playerDeath":"Triggered on player death and revival.\nRegisterNetEvent('ox:playerDeath', function(isDead) end)","oxsetplayerinservice#ox:setPlayerInService":"Can be triggered to set a player as \"in service\" for a specific group they are a member of.\nRegisterNetEvent('ox:setPlayerInService', function(group) end)"}},"/ox_core/Server/Player":{"title":"Server","data":{"oxgetplayer#Ox.GetPlayer":"Return an instance of OxPlayer for the given player source.\nlocal player = Ox.GetPlayer(source)\nprint(json.encode(player, { indent = true }))\nimport { GetPlayer } from '@overextended/ox_core/server';\nconst player = GetPlayer(source);\nconsole.log(JSON.stringify(player));\nplayer?: table\nsource: number\nuserId: number\ncharId: number\nstateId: string\nfirstName: string\nlastName: string\nname: string\nusername: string","oxgetplayerbyfilter#Ox.GetPlayerByFilter":"Return the first OxPlayer that matches the filter properties.\nlocal filter = { phoneNumber = '556-560-6609' }\nlocal player = Ox.GetPlayerByFilter(filter)\nprint(json.encode(player, { indent = true }))\nimport { GetPlayerByFilter } from '@overextended/ox_core/server';\nconst filter = { phoneNumber: '556-560-6609' };\nconst player = GetPlayerByFilter(filter);\nconsole.log(JSON.stringify(player));","oxgetplayers#Ox.GetPlayers":"Returns an array containing all players. Methods will not be applied if the first argument is false.\nPlayers can be filtered to only return players that match the given properties, or groups.\n-- Get an array containing all players in the police or sheriff groups, with grade 3 or higher.\nlocal filter = { groups = {['sheriff'] = 3, ['police'] = 3} })\nlocal players = Ox.GetPlayers(filter)\nfor i = 1, #players do\n local player = players[i]\n print(json.encode(player, { indent = true }))\nend\nimport { GetPlayers } from '@overextended/ox_core/server';\n// Get an array containing all players in the police or sheriff groups, with grade 3 or higher.\nconst filter = { groups: { sheriff: 3, police: 3 } })\nconst players = GetPlayers(filter);\nfor (let i = 0; i < players.length; i++) {\n const player = players[i];\n console.log(JSON.stringify(player));\n}"}},"/ox_core/Server/Player/methods":{"title":"Methods","data":{"":"These functions are inherited from the Player class.","playerset#player.set":"Update the player's metadata, optionally syncing it with the client.\nplayer.set(key, value, replicated)\nkey: string\nvalue: any\nreplicated?: boolean","playerget#player.get":"Get a value from the player's metadata, or omit the argument to get all metadata.\nplayer.get(key)\nkey?: string","playergetstate#player.getState":"Return the player's statebag.\nplayer.getState()","playergetcoords#player.getCoords":"Return the player's position.\nplayer.getCoords()","playersetgroup#player.setGroup":"Updates the player's grade for the given group. Any value below 1 will remove the group from the player.\nplayer.setGroup(group, grade)\ngroup: string\ngrade?: number","playergetgroup#player.getGroup":"Returns the player's current grade for a given group.\nplayer.getGroup()","playergetgroups#player.getGroups":"Returns an object of all groups the player is in, with the current grade as the value.\nplayer.getGroups()","playerhasgroup#player.hasGroup":"Check if the player is a member of a given group, and returns the matching group name and grade.\nThe filter can be a string, array, or object where key is the group, and value is the minimum grade.\nplayer.hasGroup(filter)\nfilter: string | string[] | { [string]: number }","playersetstatus#player.setStatus":"Set the current value for a status (i.e. hunger, thirst).\nplayer.setStatus(name, value)\nname: string\nvalue: number","playeraddstatus#player.addStatus":"Add the given amount to the total value for a status (i.e. hunger, thirst).\nplayer.addStatus(name, value)\nname: string\nvalue: number","playerremovestatus#player.removeStatus":"Remove the given amount from the total value for a status (i.e. hunger, thirst).\nplayer.removeStatus(name, value)\nname: string\nvalue: number","playergetlicenses#player.getLicenses":"Get all licenses for the player.\nplayer.getLicenses()","playergetlicense#player.getLicense":"Get the license of the given name for the player, as an object containing license information.\nplayer.getLicense(name)\nname: string","playeraddlicense#player.addLicense":"Grants a license to the player and triggers 'ox:licenseAdded' on the server and client.\nplayer.addLicense(name)\nname: string","playerremovelicense#player.removeLicense":"Revokes a license from the player and triggers 'ox:licenseRemoved' on the server and client.\nplayer.removeLicense(name)\nname: string","playergetplayersinscope#player.getPlayersInScope":"Return an array of all player id's inside the player's scope.\nplayer.getPlayersInScope()","playerisplayerinscope#player.isPlayerInScope":"Check if the given source is inside the player's scope.\nplayer.isPlayerInScope(target)\ntarget: number","playertriggerscopedevent#player.triggerScopedEvent":"player.triggerScopedEvent(eventName, ...)\neventName: string\n...?: any[]"}},"/ox_core/Server/Vehicle":{"title":"Server","data":{"oxgetvehicle#Ox.GetVehicle":"Return an instance of OxVehicle for the given entity.\nlocal vehicle = Ox.GetVehicle(entity)\nprint(json.encode(vehicle, { indent = true }))","oxgetvehicles#Ox.GetVehicles":"Returns an array containing all vehicles. Methods will not be applied if the first argument is false.\nlocal vehicles = Ox.GetVehicles(usemetatable)\nfor i = 1, #vehicles do\n local vehicle = vehicles[i]\n print(json.encode(vehicle, { indent = true }))\nend","oxcreatevehicle#Ox.CreateVehicle":"Spawns a vehicle and returns the instance of OxVehicle.\nIf the first argument is a number, it will attempt to spawn a vehicle from the database with a matching id.\nlocal vehicleId = MySQL.scalar.await('SELECT id FROM vehicles WHERE owner = ? LIMIT 1', { player.charid })\nif vehicleId then\n local coords = player.getCoords()\n local vehicle = Ox.CreateVehicle(vehicleId, vector3(coords.x, coords.y + 1.0, coords.z) , GetEntityHeading(player.ped))\n if vehicle then\n print(json.encode(vehicle, { indent = true }))\n end\nend\nIf the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database.\nSetting the owner as false creates a non-persistent vehicle.\nlocal vehicle = Ox.CreateVehicle({\n model = 'sultanrs',\n owner = player.charid,\n}, player.getCoords(), GetEntityHeading(player.ped))"}},"/ox_core/Server/Vehicle/callbacks":{"title":"Callbacks","data":{"oxgetnearbyvehicles#ox:getNearbyVehicles":"Get all vehicles within range of the target player.\nlib.callback.await('ox:getNearbyVehicles', playerId, radius)\nplayerId: number\nradius?: number"}},"/ox_core/Server/functions":{"title":"Functions","data":{"":"todo"}},"/ox_core/Server/Vehicle/methods":{"title":"Methods","data":{"":"These functions are inherited from the Vehicle class.","vehicleset#vehicle.set":"Sets the vehicle's metadata for key to the given value.\nvehicle.set(key, value)\nkey: string\nvalue: any","vehicleget#vehicle.get":"Get a value from the vehicles's metadata, or omit the argument to get all metadata.\nvehicle.get(key)\nkey?: string","vehiclegetstate#vehicle.getState":"Return the vehicle's statebag.\nvehicle.getState()","vehiclegetcoords#vehicle.getCoords":"Return the vehicle's position.\nvehicle.getCoords()","vehicledespawn#vehicle.despawn":"Despawns the vehicle but doesn't save it or update the stored value.","vehicledelete#vehicle.delete":"Remove the vehicle from the database and despawns the entity.\nvehicle.delete()","vehiclesetstored#vehicle.setStored":"Updates the vehicle's \"stored\" value and optionally despawns it.\nvehicle.setStored(value, despawn)\nvalue?: string\ndespawn?: boolean","vehiclesetowner#vehicle.setOwner":"Sets the vehicle's owner, matching a charid or nil to set it as unowned.\nvehicle.setOwner(owner)\nowner?: number","vehiclesetgroup#vehicle.setGroup":"Sets the vehicle's group, which can be used for garage restrictions, unowned group vehicles, etc.\nvehicle.setGroup(group)\ngroup?: string","vehiclesetplate#vehicle.setPlate":"Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates).\nPlate is always formatted to 8 characters.\nvehicle.setPlate(plate)\nplate: string"}},"/ox_core/concepts":{"title":"Concepts","data":{"":"We'll try to explain some technical but core concepts used in ox_core here.","classes#Classes":"Lua doesn't have support for true classes, but rather prototype-based inheritance.\nA prototype can hold its own variables and methods, which another object (an instance) can reference or call.\n-- OxPlayer will hold all inherited variables and methods for instances of it.\nlocal OxPlayer = {}\n-- Sets the \"index metamethod\" of OxPlayer to reference itself.\n-- This is how instances will know to look up the table.\nOxPlayer.__index = OxPlayer\n-- Set a new metatable on the table passed to the function.\n-- The important code here is { __index = OxPlayer }.\nfunction OxPlayer.new(player)\n return setmetatable(player, OxPlayer)\nend\n-- Using the `:` syntax will pass the object as the first parameter.\nfunction OxPlayer:getUsername()\n return self.username\nend\n-- Create our instance of OxPlayer.\nlocal player = OxPlayer.new({\n username = 'Bob the Builder'\n})\n-- This is the same as OxPlayer.getUsername(player).\nlocal username = player:getUsername()\n-- 'Bob the Builder'\nprint(username)\nWhen using the imported classes in your resources you can treat the methods as if you are calling a regular function.\nlocal player = Ox.GetPlayer(playerId)\nprint(player.getUsername())"}},"/ox_doorlock":{"title":"Ox Doorlock","data":{"":"A door management resource that can be used standalone or alongside ox_core, qb-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 or qb-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 (and its fork, qb-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/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()"}},"/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/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_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, qb-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, qb, 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# 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","esx#ESX":"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!","qbcore#QBCore":"Support for QBCore is extremely limited, highly incompatible, and unlikely to improve.\nYou can use any \"version\" of qb-core that supports QBCore.Functions.AddPlayerMethod.\nYou can convert player and vehicle inventories with convertinventory qb.\nAll QB.Shared.Items will be migrated to the internal item data.\nAlways restart the resource when items are migrated!","qbox-project#Qbox Project":"Qbox Project GitHub\nQbox txAdmin Recipe\nQbox is a fork of QBCore developed by former team members and contributors to QBCore.\nImproved security and performance of qb resources.\nIntegrated support for ox_inventory, with improved compatibility.\nSupport for ox_lib and ox_target."}},"/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/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/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/esx":{"title":"ESX","data":{"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/qb":{"title":"QBCore","data":{"":"QBCore support is experimental and cannot work as a \"drag and drop\" solution due to many incompatibilities.","compatibility#Compatibility":"Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from QBCore, and is not intended to be used with resources designed around it.\nStashes used by qb-inventory and its forks do not work, but can possibly be converted.\nRemove qb-inventory (or similar), or qb-core will not function properly.\nRemove qb-shops and qb-weapons, as they depend on qb-inventory and conflict.\nWeapon holstering and draw animations (like in qb-smallresources) may break our own methods.","qbox-project#Qbox Project":"Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).We strongly advise using Qbox as an alternative to QBCore.\nQbox Project GitHub\nQbox Project Discord","installation#Installation":"Setup qb-core or qbox.\nEdit your server.cfg.\nAdd setr inventory:framework \"qb\" before starting your resources.\nStart ox_inventory immediately after qb-core.","convert-qbcore#Convert QBCore":"If you have existing player data, you will need to convert it to a compatible format.\nStart the server and type convertinventory qb into the server console.\nRestart the server once conversion is complete.","optional-optimisation#Optional Optimisation":"All item related functions from Player, such as Player.Functions.GetItemByName, 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.\nlocal acetone = Player.Functions.GetItemByName('acetone')\nlocal antifreeze = Player.Functions.GetItemByName('antifreeze')\nlocal sudo = Player.Functions.GetItemByName('sudo')\nif acetone?.amount > 2 and antifreeze?.amount > 4 and sudo?.amount > 9 then\n Player.Functions.RemoveItem(\"acetone\", 3)\n Player.Functions.RemoveItem(\"antifreeze\", 5)\n Player.Functions.RemoveItem(\"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/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.\nexports.ox_inventory:Items()\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 items.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.\nexports.ox_inventory:Items()\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)","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)\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 QBCore, you can continue using QBCore.Functions.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_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\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/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/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'\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/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/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/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/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":{"libclass#lib.class":"Creates a new class.\nlocal MyClass = lib.class(name, super)\nname: string\nsuper?: table\nSets the new class as a subset of the super class, inheriting its methods and fields.\nReturn:\nclass: table\ntodo: more class info blah, look at the example","example#Example":"local fruits = {}\nlocal Fruit = lib.class('Fruit')\nfunction Fruit:init()\n print(('Created a %s %s'):format(self:getColour(), self:getName()))\n fruits[self.name] = self\nend\nfunction Fruit:remove()\n print('Removed', self:getName(), self)\n fruits[self.name] = nil\nend\nfunction Fruit:getName() return self.name end\nfunction Fruit:getColour() return self.colour end\nfunction Fruit:getSeeds() return self.private.seeds end\n-- Inherits methods and properties from the Fruit class.\nlocal SpoiledFruit = lib.class('SpoiledFruit', Fruit)\nfunction SpoiledFruit:getStench() return self.stench end\nCreateThread(function()\n local apple = Fruit:new({\n name = 'apple',\n colour = math.random(0, 1) == 1 and 'red' or 'green'\n })\n local orange = Fruit:new({\n name = 'orange',\n colour = 'orange',\n -- the private table is not serialisable (data is hidden cross-resource)\n private = {\n seeds = 7\n }\n })\n print(('the apple is %s; the orange contains %d seeds'):format(apple:getColour(), orange:getSeeds()))\n apple:remove()\n local rottenBanana = SpoiledFruit:new({\n name = 'banana',\n colour = 'black',\n stench = 'musty'\n })\n print(('the banana is %s and %s - gross!'):format(rottenBanana:getColour(), rottenBanana:getStench()))\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 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 table\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 table\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 table\nControl(s) to clear out from being tracked"}},"/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/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/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/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/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\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\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\niconAnimation?: 'spin' 'spinPulse' 'spinReverse' 'pulse' 'beat' 'fade' 'beatFade' 'bounce' 'shake'\nalignIcon?: 'top' or 'center'\nDefault: 'center'\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 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 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\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\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\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\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/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/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/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 \"\""}},"/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/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 point = lib.points.new({\r\n coords = SharedConfig.Warehouse.coords,\r\n distance = 20,\r\n})\r\n\r\nlocal marker = lib.marker.new({\r\n coords = GetEntityCoords(SharedConfig.Warehouse.coords),\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 if lib.isTextUIOpen() 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"}},"/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/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/Raycast/Client":{"title":"Client","data":{"libraycastcam#lib.raycast.cam":"Starts a shapetest originating from the camera, extending to ~10m by default.\nlib.raycast.cam(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"}},"/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":"lib.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: 500","librequestanimset#lib.requestAnimSet":"lib.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: 500","librequestmodel#lib.requestModel":"lib.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: 500","librequeststreamedtexturedict#lib.requestStreamedTextureDict":"lib.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: 500","librequestnamedptfxasset#lib.requestNamedPtfxAsset":"lib.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: 500","librequestscaleformmovie#lib.requestScaleformMovie":"lib.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: 500","librequestweaponasset#lib.requestWeaponAsset":"lib.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: 500\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/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/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/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/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":"Requires the vehicle to belong to the client. Do not use NetworkRequestControlOfEntity.\nlib.setVehicleProperties(vehicle, props)\nvehicle: entity\nprops: table (object)\nRegisterNetEvent('ox_lib:setVehicleProperties', function(netid, data)\n lib.setVehicleProperties(NetToVeh(netid), data)\nend)\nimport lib from '@overextended/ox_lib/client'\nonNet('ox_lib:setVehicleProperties', (netid, data) => {\n lib.setVehicleProperties(NetToVeh(netid), data)\n})","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/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/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[]\nAll z values must match\nthickness?: number\nDefault: 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\nDefault: 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_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\nThe duration to run the function for, defaulting to 1000ms.\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, qb-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\nqb-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.","addglobalobject#addGlobalObject":"Creates new targetable options for all Object entity types.\nexports.ox_target:addGlobalObject(options)\noptions: table","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: table","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: table","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: table","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: table","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: table","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: table","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: vector\nradius?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\nReturn:\nid: number","addboxzone#addBoxZone":"Creates a new targetable box zone.\nexports.ox_target:addBoxZone(parameters)\nparameters: table\ncoords: vector\nsize?: vector3\nrotation?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\nReturn:\nid: number","addpolyzone#addPolyZone":"Creates a new targetable poly zone.\nexports.ox_target:addPolyZone(parameters)\nparameters: table\npoints: vector3[]\nAll z values must match\nthickness?: number\ndebug?: boolean\ndrawSprite?: boolean\noptions: table\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 that can be specified by the user"}},"/ox_target/Options":{"title":"Options","data":{"":"When creating a targetable option you must send an array of options with the following properties.","option-parameters#Option Parameters":"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","option-effects#Option Effects":"When selecting an option it will trigger a single action, in order of priority:\nonSelect function\nexport\nevent\nserver event\ncommand"}},"/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-the-latest-release#Download the latest release.":"","configure-your-server#Configure your server":"When using convars do not replicate sensitive information to the client.\nset will only be set on the server, while setr is replicated.\nStart by opening your server configuration (i.e. server.cfg) and adding start oxmysql before any of its dependents (usually it's the first resource you start).\nSet a mysql connection string using either of the following formats, using your server authentication details and target database.\nset mysql_connection_string \"mysql://root:12345@localhost:3306/es_extended\"\nset mysql_connection_string \"user=root;password=12345;host=localhost;port=3306;database=es_extended\"\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":"By default you will receive warnings if a query took ~150ms to complete, however\nQuery time is calculated on fxserver based on response time, and may not be entirely accurate.\nServer hitches may delay the query response, and may not indicate a database issue.\nExcessive queries in a short timeframe may report with higher response times.\nYou can adjust the minimum response time with a convar.\nset mysql_slow_query_warning 150\nSlow query warnings are only shown if mysql_ui or mysql_debug is enabled.","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]\nThis value can be changed without restarting oxmysql, and you can temporarily modify the list with commands.\noxmysql_debug remove ox_core\noxmysql_debug add ox_core","mysql-async-compatibility#mysql-async compatibility":"The mysql-async directory must be deleted to properly provide support.\n🗹 Supports server_script '@mysql-async/lib/MySQL.lua'.\n🗹 Supports MySQL.Sync and MySQL.Async methods.\n☐ Raw exports are not supported (i.e. exports['mysql-async].mysql_execute).\n☐ Multi-statements are disabled for security reasons (see #102).","ghmattimysql-compatibility#ghmattimysql compatibility":"The ghmattimysql resource must be stopped to properly provide support.\n🗹 Supports exports.ghmattimysql.execute and other similar exports.\n🗹 Supports exports.ghmattimysql.executeSync and other similar exports.","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'\nIf you're using Lua Language Server you can get access to basic types and intellisense.\n\"Lua.workspace.library\": [\n \"C:/pathtoserver/resources/oxmysql/lib/define.lua\",\n]","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/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/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/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/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/issues":{"title":"Common Issues","data":{"unable-to-establish-a-connection#Unable to establish a connection":"This is usually the result of incorrect database settings or your password containing reserved characters.\n; , / ? : @ & = + $ # are reserved.\nEnsure you have entered the correct database settings in the mysql_connection_string convar. You can try using the\nsemicolon-separated format if your password contains reserved characters.","no-such-export--in-resource-oxmysql#No such export ... in resource oxmysql":"Download the latest release build (not the source code) of oxmysql.\nEnsure it is starting before any resources that require it.","numbers-treated-as-string#Numbers treated as string":"To resolve this issue simply enable decimalNumbers in your connection string, ie. mysql://root@localhost/essentialmode?decimalNumbers=true.\nJavaScript treats all numbers as floats, so a double or decimal value will be cast as a float with this setting.\nNumbers will have less precision when this setting is enabled."}},"/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"}},"/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 map (referred to as named 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/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"}},"/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[]\nGrade 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})"}},"/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 diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-a212da01b6a9fcc9.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-a212da01b6a9fcc9.js new file mode 100644 index 0000000000..71faf4ba6f --- /dev/null +++ b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-a212da01b6a9fcc9.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8870],{8076:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/textui",function(){return l(7563)}])},7563:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(1527),i=l(2059),r=l(3443),o=l(8242);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 c(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)(c,{...e})}):c(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Interface/Client/textui.mdx",route:"/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},title:"TextUI",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2059,9774,2888,179],function(){return e(e.s=8076)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-db9ea38083e35cbf.js b/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-db9ea38083e35cbf.js deleted file mode 100644 index 8b96620dfe..0000000000 --- a/_next/static/chunks/pages/ox_lib/Modules/Interface/Client/textui-db9ea38083e35cbf.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8870],{8076:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ox_lib/Modules/Interface/Client/textui",function(){return l(7563)}])},7563:function(e,s,l){"use strict";l.r(s),l.d(s,{__toc:function(){return t}});var n=l(1527),i=l(2059),r=l(3443),o=l(8242);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 c(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'"}),"\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)(c,{...e})}):c(e)},pageOpts:{filePath:"pages/ox_lib/Modules/Interface/Client/textui.mdx",route:"/ox_lib/Modules/Interface/Client/textui",frontMatter:{title:"TextUI"},title:"TextUI",headings:t},pageNextRoute:"/ox_lib/Modules/Interface/Client/textui"})}},function(e){e.O(0,[2059,9774,2888,179],function(){return e(e.s=8076)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/guides.html b/guides.html index 8c4dd2f7b9..44a3d41612 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 b951b1cb49..046a210c16 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 8a733b36b8..c1e9f750dd 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 1170d34be0..0c6f15b67c 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 170ce8ead3..880e9a4208 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 bc722939ad..a7c3f55625 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 9edfd94ff9..3b4c50ec7a 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

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

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

Andyyy

Andyyy

Code: ox20

20% off

Berkie's Workshop

Berkie's Workshop

Code: ox10

10% off

Dolu Mods

Dolu Mods

Code: overextended

15% 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

Pickle Mods

Pickle Mods

Code: ox30

30% off

rcore

rcore

Code: ox10

10% off

Roleplay inventory icons

Roleplay inventory icons

Code: ox10

10% off

Renewed Scripts

Renewed Scripts

Code: ox15

15% 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 f42898c274..ef1f5e85a7 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

An experimental framework for FiveM. Limited support and breaking changes guaranteed.

⚠️

This resource does not have a stable (v1.0) release; breaking changes are likely.
@@ -66,4 +66,4 @@

setr ox:deathSystem 0 # Disable the spawn selection. -setr ox:spawnSelect 0


Overextended
\ No newline at end of file +setr ox:spawnSelect 0

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

Client

+
Client
Player

Client

When ox_core is imported into a resource it will create the player global.
If player is nil, then the client has not yet selected a character and spawned.

Example:

@@ -28,4 +28,4 @@
  • groups: table
  • -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_core/Client/Player/callbacks.html b/ox_core/Client/Player/callbacks.html index 1d27b7845d..4780ac736d 100644 --- a/ox_core/Client/Player/callbacks.html +++ b/ox_core/Client/Player/callbacks.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Client
    Callbacks

    Callbacks

    +
    Client
    Callbacks

    Callbacks

    ox:getStatus

    lib.callback.await('ox:getStatus', delay, targetId, statusName)
      @@ -51,4 +51,4 @@

      The radius from the player's location to return vehicles.

    -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_core/Client/Player/events.html b/ox_core/Client/Player/events.html index d6cd466554..74f0f5c686 100644 --- a/ox_core/Client/Player/events.html +++ b/ox_core/Client/Player/events.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Client
    Events

    Events

    +
    Client
    Events

    Events

    Client events

    ox:playerLoaded

    Triggered once the player has selected a character and spawned.

    @@ -34,4 +34,4 @@

    RegisterNetEvent('ox:licenseAdded', function(name) end)

    ox:licenseRemoved

    Triggered when the player's license is revoked.

    -
    RegisterNetEvent('ox:licenseRemoved', function(name) end)

    Overextended
    \ No newline at end of file +
    RegisterNetEvent('ox:licenseRemoved', function(name) end)

    Overextended
    \ No newline at end of file diff --git a/ox_core/Client/functions.html b/ox_core/Client/functions.html index 69ddca9685..aa31af66e5 100644 --- a/ox_core/Client/functions.html +++ b/ox_core/Client/functions.html @@ -11,5 +11,5 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -

    Overextended
    \ No newline at end of file +

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

    Server

    +
    Server
    Player

    Server

    Ox.GetPlayer

    Return an instance of OxPlayer for the given player source.

    local player = Ox.GetPlayer(source)
    @@ -45,4 +45,4 @@ 

    for i = 1, #players do local player = players[i] print(json.encode(player, { indent = true })) -end


    Overextended
    \ No newline at end of file +end

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

    Events

    +
    Server
    Events

    Events

    Server events

    ox:playerLoaded

    Triggered after a player has selected a character.

    @@ -37,4 +37,4 @@

    RegisterNetEvent('ox:playerDeath', function(isDead) end)

    ox:setPlayerInService

    Can be triggered to set a player as "in service" for a specific group they are a member of.

    -
    RegisterNetEvent('ox:setPlayerInService', function(group) end)

    Overextended
    \ No newline at end of file +
    RegisterNetEvent('ox:setPlayerInService', function(group) end)

    Overextended
    \ No newline at end of file diff --git a/ox_core/Server/Player/methods.html b/ox_core/Server/Player/methods.html index 2a9624300f..5ad942122a 100644 --- a/ox_core/Server/Player/methods.html +++ b/ox_core/Server/Player/methods.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Server
    Methods

    Methods

    +
    Server
    Methods

    Methods

    These functions are inherited from the Player class.

    player.set

    Update the player's metadata, optionally syncing it with the client.

    @@ -109,4 +109,4 @@

  • eventName: string
  • ...?: any[]
  • -


    Overextended
    \ No newline at end of file +

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

    Server

    +
    Server
    Server

    Server

    Ox.GetVehicle

    Return an instance of OxVehicle for the given entity.

    local vehicle = Ox.GetVehicle(entity)
    @@ -42,4 +42,4 @@ 

    local vehicle = Ox.CreateVehicle({
         model = 'sultanrs',
         owner = player.charid,
    -}, player.getCoords(), GetEntityHeading(player.ped))


    Overextended
    \ No newline at end of file +}, player.getCoords(), GetEntityHeading(player.ped))

    Overextended
    \ No newline at end of file diff --git a/ox_core/Server/Vehicle/callbacks.html b/ox_core/Server/Vehicle/callbacks.html index 42c6950bba..ccb1b2366f 100644 --- a/ox_core/Server/Vehicle/callbacks.html +++ b/ox_core/Server/Vehicle/callbacks.html @@ -11,11 +11,11 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Server
    Callbacks

    Callbacks

    +
    Server
    Callbacks

    Callbacks

    ox:getNearbyVehicles

    Get all vehicles within range of the target player.

    lib.callback.await('ox:getNearbyVehicles', playerId, radius)
    • playerId: number
    • radius?: number
    • -

    Overextended
    \ No newline at end of file +

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

    Methods

    +
    Server
    Methods

    Methods

    These functions are inherited from the Vehicle class.

    vehicle.set

    Sets the vehicle's metadata for key to the given value.

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

    vehicle.setPlate(plate)

    • plate: string
    • -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_core/Server/functions.html b/ox_core/Server/functions.html index a5dc446059..483690f457 100644 --- a/ox_core/Server/functions.html +++ b/ox_core/Server/functions.html @@ -11,5 +11,5 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -

    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_core/concepts.html b/ox_core/concepts.html index 12767e63c5..0a4be80e22 100644 --- a/ox_core/concepts.html +++ b/ox_core/concepts.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Concepts

    Concepts

    +
    Concepts

    Concepts

    We'll try to explain some technical but core concepts used in ox_core here.

    Classes

    Lua doesn't have support for true classes, but rather prototype-based inheritance.
    @@ -46,4 +46,4 @@

    print(username)

    When using the imported classes in your resources you can treat the methods as if you are calling a regular function.

    local player = Ox.GetPlayer(playerId)
    -print(player.getUsername())

    Overextended
    \ No newline at end of file +print(player.getUsername())

    Overextended
    \ No newline at end of file diff --git a/ox_doorlock.html b/ox_doorlock.html index 0b7245f35c..7f55d2ef71 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, qb-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 84f7a3cec1..1eef42564b 100644 --- a/ox_doorlock/Client/functions.html +++ b/ox_doorlock/Client/functions.html @@ -11,10 +11,10 @@ --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()

    useClosestDoor

    Interact with the closest door. Dependant on server-side checks and may fail.

    -
    exports.ox_doorlock:useClosestDoor()

    Overextended
    \ No newline at end of file +
    exports.ox_doorlock:useClosestDoor()

    Overextended
    \ No newline at end of file diff --git a/ox_doorlock/Server/events.html b/ox_doorlock/Server/events.html index 0cb1027018..1c01c12252 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 58b206b8ca..5a90e08d4d 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 a8ccd9558a..6b556aaab1 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 ac6be0031d..0535ccc005 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 1e63b5fa2f..4c3d623cb7 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

    +

    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 c0579a70dd..09c6c5fa41 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 a0fac6a3d0..4490af978d 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 40aeb26c56..69844670bb 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.
    @@ -190,4 +190,4 @@

    Improved security and performance of qb resources.
  • Integrated support for ox_inventory, with improved compatibility.
  • Support for ox_lib and ox_target.
  • -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Events/Client.html b/ox_inventory/Events/Client.html index b2404301a0..041ec0ac7e 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 edbbf6be86..187700b8b5 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 834571096a..d4e25af490 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

    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.

      @@ -43,4 +43,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/qb.html b/ox_inventory/Frameworks/qb.html index b690556388..d9585f14e7 100644 --- a/ox_inventory/Frameworks/qb.html +++ b/ox_inventory/Frameworks/qb.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Frameworks
    QBCore

    QBCore

    +
    Frameworks
    QBCore

    QBCore

    ⚠️

    QBCore support is experimental and cannot work as a "drag and drop" solution due to many incompatibilities.

    Compatibility

    Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from QBCore, and is not intended to be used with resources designed around it.

    @@ -55,4 +55,4 @@

    Player.Functions.RemoveItem("acetone", 3) Player.Functions.RemoveItem("antifreeze", 5) Player.Functions.RemoveItem("sudo", 10) -end


    Overextended
    \ No newline at end of file +end

    Overextended
    \ No newline at end of file diff --git a/ox_inventory/Functions/Client.html b/ox_inventory/Functions/Client.html index 96da3efd05..c2aff91e1e 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)
    @@ -352,4 +352,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 b67c926dbc..09565bce73 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)
    @@ -744,4 +744,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 ee079d992d..0de059c02c 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 cbb047eee9..96b52dd8f7 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 d655ea8dea..bc88ffaeb2 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. @@ -259,4 +259,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 0bcb37b7af..317a3cb477 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 93ca625faf..9215eee5b9 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 53c472de99..502753627c 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 82d2bd30b2..7e788abb38 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 c63bd201e1..a5481a3f64 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

    @@ -68,4 +68,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 782c9df6bf..676cfdd424 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 ee89d49bca..12db31f55e 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 58e3015ddd..5a300f0f53 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/Cache/Client.html b/ox_lib/Modules/Cache/Client.html index 1a9fbe5eea..64338e4430 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 7526b4ff95..65d4ab44c9 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 e0fb225ed2..f2f9e96614 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 164e87e232..a36be4b10d 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 28d6423c71..52ffe1648d 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 bce5d2cdf4..febed6eb3e 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 f55dc73e78..056b39c9b3 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

    lib.class

    Creates a new class.

    local MyClass = lib.class(name, super)
    @@ -79,4 +79,4 @@

    }) print(('the banana is %s and %s - gross!'):format(rottenBanana:getColour(), rottenBanana:getStench())) -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 ccb9235b66..0e6420f890 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 7412de822c..ce9831ea6a 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

    +
    Modules
    DisableControls
    Client

    Client

    A centralized way to track and disable controls.

    lib.disableControls

    Call on frame to disable all stored controls.

    @@ -47,4 +47,4 @@

    Control(s) to clear out from being tracked -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/GetClosestObject/Shared.html b/ox_lib/Modules/GetClosestObject/Shared.html index 35582ee2cf..bbfe886e7b 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 2c4274d2cd..98c693028f 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 aa7fa106d7..4ad7114d81 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 e90a4c6d80..d8b6947186 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 8c78c5b0d3..0003f1e171 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 dfefa56159..e108794b75 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 754da8a568..585a4e1622 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 b33da30ad5..c17a649737 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 e70a0214c6..0262fc8b6f 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 2a3c0bd975..0917488c7b 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 2a0d5fa718..84e4e5dae4 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 22c6d8061f..4e74cc188a 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 67af6843cf..37678752d0 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)
    @@ -255,4 +255,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 eb7d84a636..883b961d83 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 252b552873..1e7409e428 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)
    @@ -86,4 +86,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 45dc5aa51a..7f61d5ea8d 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)
    @@ -251,4 +251,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 d580604dbc..3343dc68b7 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 9325544582..9d5dbdb643 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 1994a5e7e6..4a3cd03049 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.

    @@ -20,7 +20,7 @@

    text: string
  • options?: table
      -
    • position?: 'right-center' or 'left-center' or 'top-center' +
    • position?: 'right-center' or 'left-center' or 'top-center' or 'bottom-center'
      • Default: 'right-center'
      @@ -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 f021ab7835..2402a60bb4 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 b6c6549b5a..0b6ae478f8 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, ...)
      @@ -59,4 +59,4 @@

      set ox:logger "loki"
       set loki:user "<insert your user>"
       set loki:password "<insert the api key or password>"
      -set loki:endpoint "<insert loki url without http:// or https://>"


    Overextended
    \ No newline at end of file +set loki:endpoint "<insert loki url without http:// or https://>"

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Marker/Client.html b/ox_lib/Modules/Marker/Client.html index 6ee9c5231d..32c3c1c56c 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

    @@ -77,4 +77,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 e5c8a95995..93797a70b3 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
    @@ -115,4 +115,4 @@

    Return:

    • number: 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 08da61cada..a2aa266910 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 e8b8747941..20e87656af 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 ecd31fdd45..c2f82ec58d 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 fb19b36865..babf2f5e33 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.cam

    Starts a shapetest originating from the camera, extending to ~10m by default.

    lib.raycast.cam(flags, ignore, distance)
    @@ -57,4 +57,4 @@

    materialHash: number -


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/ox_lib/Modules/Require/Shared.html b/ox_lib/Modules/Require/Shared.html index 47fcba81f9..2e9b3b8895 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 e07d093fbf..31d237fd96 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

    @@ -115,4 +115,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 f35a1a2b6f..088e6c423e 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 2d5aa0a2b0..b9e1ade2be 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/VehicleProperties/Client.html b/ox_lib/Modules/VehicleProperties/Client.html index 7f97df873b..4519865c55 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 d6161b0e5e..a5983720d5 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 9e7cc7a47b..fafc33001f 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 1b03672761..b12ac977dc 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 2b570ea015..de0b8b0bb5 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.

    @@ -163,4 +163,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 94358b9651..94f7f58757 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 f6e2fdf49e..c16040f0bc 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/Options.html b/ox_target/Options.html index b4ff14759c..8e0514ee47 100644 --- a/ox_target/Options.html +++ b/ox_target/Options.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Options

    Options

    +
    Options

    Options

    When creating a targetable option you must send an array of options with the following properties.

    Option Parameters


    Overextended
    \ No newline at end of file +

    Overextended
    \ No newline at end of file diff --git a/oxmysql.html b/oxmysql.html index 9beb78c9e9..03d9d60f74 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.

    @@ -75,4 +75,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 8453e55511..74cc69120d 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 2e3a5452f1..840352bb1e 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 f8f40c556a..a9635762c0 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 087933c076..cd8d72313b 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 5eed9afcee..95e0efa848 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 0a4cc036a5..34c5d7ee1f 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 df9ee022b4..80e2fed69b 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 0891317bd8..d5b0f48992 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 28f86d22ba..d7a45b774e 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/issues.html b/oxmysql/issues.html index 454a784837..e37a5ebcb1 100644 --- a/oxmysql/issues.html +++ b/oxmysql/issues.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 200deg; --nextra-primary-saturation: 100%; } -
    Common Issues

    Common Issues

    +
    Common Issues

    Common Issues

    Unable to establish a connection

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

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

    Numbers treated as string

    To resolve this issue simply enable decimalNumbers in your connection string, ie. mysql://root@localhost/essentialmode?decimalNumbers=true.

    ⚠️

    JavaScript treats all numbers as floats, so a double or decimal value will be cast as a float with this setting. -Numbers will have less precision when this setting is enabled.


    Overextended
    \ No newline at end of file +Numbers will have less precision when this setting is enabled.


    Overextended
    \ No newline at end of file diff --git a/oxmysql/placeholders.html b/oxmysql/placeholders.html index 34418ba2ef..4338edd3d6 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 map (referred to as named 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 4a60716115..a9dda0d92a 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 69f42eb8f2..52d345c6cb 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,111 +1,111 @@ -https://overextended.dev2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides/git2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides/nodejs2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides/pnpm2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides/types2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/guides/vscode2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Client/Player2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Client/Player/callbacks2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Client/Player/events2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Client/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Player2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Player/events2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Player/methods2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Vehicle2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Vehicle/callbacks2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/Vehicle/methods2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/Server/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_core/concepts2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_doorlock2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_doorlock/Client/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_doorlock/Server/events2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_doorlock/Server/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_doorlock/settings2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_fuel2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_fuel/Client/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_fuel/Server/functions2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_fuel/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Events/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Events/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Frameworks/esx2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Frameworks/qb2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Functions/Server/Hooks2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/crafting2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/creatingItems2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/metadata2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/shops2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/Guides/stashes2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_inventory/issues2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/ACL/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/AddCommand/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/AddKeybind/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cache/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cache/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/Lua/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Callback/Lua/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Class/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Cron/Server2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/DisableControls/Client2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestObject/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestPed/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestPlayer/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetClosestVehicle/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyObjects/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyPeds/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyPlayers/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/GetNearbyVehicles/Shared2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/alert2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/clipboard2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/context2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/input2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/menu2024-03-12T14:14:23.581Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/notify2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/progress2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/radial2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Interface/Client/textui2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Locale/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Logger/Server2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Marker/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Math/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Points/JavaScript/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Points/Lua/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Print/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Raycast/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Require/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Streaming/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/String/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Table/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/VehicleProperties/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Version/Server2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Version/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/WaitFor/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_lib/Modules/Zones/Shared2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_target2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_target/Functions/Client2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/ox_target/Options2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/insert2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/prepare2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/query2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/rawExecute2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/scalar2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/single2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/transaction2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/Functions/update2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/benchmark2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/issues2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/placeholders2024-03-12T14:14:23.582Zdaily0.7 -https://overextended.dev/oxmysql/ui2024-03-12T14:14:23.582Zdaily0.7 +https://overextended.dev2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides/git2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides/nodejs2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides/pnpm2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides/types2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/guides/vscode2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Client/Player2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Client/Player/callbacks2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Client/Player/events2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Client/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Player2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Player/events2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Player/methods2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Vehicle2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Vehicle/callbacks2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/Vehicle/methods2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/Server/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_core/concepts2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_doorlock2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_doorlock/Client/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_doorlock/Server/events2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_doorlock/Server/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_doorlock/settings2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_fuel2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_fuel/Client/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_fuel/Server/functions2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_fuel/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Events/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Events/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Frameworks/esx2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Frameworks/qb2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Functions/Server/Hooks2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/crafting2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/creatingItems2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/metadata2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/shops2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/Guides/stashes2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_inventory/issues2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/ACL/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/AddCommand/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/AddKeybind/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cache/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cache/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/JavaScript/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/Lua/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Callback/Lua/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Class/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Cron/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/DisableControls/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestObject/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestPed/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestPlayer/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetClosestVehicle/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyObjects/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyPeds/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyPlayers/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/GetNearbyVehicles/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/alert2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/clipboard2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/context2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/input2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/menu2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/notify2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/progress2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/radial2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Interface/Client/textui2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Locale/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Logger/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Marker/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Math/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Points/JavaScript/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Points/Lua/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Print/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Raycast/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Require/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Streaming/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/String/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Table/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/VehicleProperties/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Version/Server2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Version/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/WaitFor/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_lib/Modules/Zones/Shared2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_target2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_target/Functions/Client2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/ox_target/Options2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/insert2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/prepare2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/query2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/rawExecute2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/scalar2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/single2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/transaction2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/Functions/update2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/benchmark2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/issues2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/placeholders2024-03-12T14:50:36.356Zdaily0.7 +https://overextended.dev/oxmysql/ui2024-03-12T14:50:36.356Zdaily0.7 \ No newline at end of file