From feec996976cab59e2d4f6c29630cadd5db727b1b Mon Sep 17 00:00:00 2001 From: LukeWasTaken <39926192+LukeWasTakenn@users.noreply.github.com> Date: Wed, 10 May 2023 16:42:00 +0200 Subject: [PATCH 1/3] add notification description class selector --- docs/ox_lib/Interface/Client/notify.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/ox_lib/Interface/Client/notify.md b/docs/ox_lib/Interface/Client/notify.md index e13190c5..6c4b42a7 100644 --- a/docs/ox_lib/Interface/Client/notify.md +++ b/docs/ox_lib/Interface/Client/notify.md @@ -110,7 +110,10 @@ lib.notify({ position = 'top', style = { backgroundColor = '#141517', - color = '#909296' + color = '#C1C2C5', + '.description' = { + color = '#909296' + } }, icon = 'ban', iconColor = '#C53030' @@ -130,7 +133,10 @@ lib.notify({ position: 'top', style: { backgroundColor: '#141517', - color: '#909296' + color: '#C1C2C5', + '.decription': { + color: '#909296', + }, }, icon: 'ban', iconColor: '#C53030' @@ -140,4 +146,4 @@ lib.notify({ -![custom_notification](https://i.imgur.com/wcjqIlw.png) +![custom_notification](https://i.imgur.com/WpqiW5f.png) From 5486bf3e88ecc890e352490b445fa12b710d7171 Mon Sep 17 00:00:00 2001 From: LukeWasTaken <39926192+LukeWasTakenn@users.noreply.github.com> Date: Wed, 10 May 2023 18:41:50 +0200 Subject: [PATCH 2/3] fix syntax error --- docs/ox_lib/Interface/Client/notify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ox_lib/Interface/Client/notify.md b/docs/ox_lib/Interface/Client/notify.md index 6c4b42a7..c64dad72 100644 --- a/docs/ox_lib/Interface/Client/notify.md +++ b/docs/ox_lib/Interface/Client/notify.md @@ -111,7 +111,7 @@ lib.notify({ style = { backgroundColor = '#141517', color = '#C1C2C5', - '.description' = { + ['.description'] = { color = '#909296' } }, From 6815e4fbac1c0362ccc89a42822c1cef459279f7 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 22 May 2023 07:20:18 +1000 Subject: [PATCH 3/3] lib updates up to 3.5.0 --- docs/ox_lib/GetClosestObject/Client.md | 17 ++++++ docs/ox_lib/GetClosestPed/Client.md | 17 ++++++ docs/ox_lib/GetNearbyObjects/Client.md | 16 ++++++ docs/ox_lib/GetNearbyPeds/Client.md | 16 ++++++ docs/ox_lib/GetNearbyPlayers/Client.md | 2 +- docs/ox_lib/GetNearbyVehicles/Client.md | 2 +- docs/ox_lib/Math/Shared.md | 71 +++++++++++++++++++++++++ 7 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 docs/ox_lib/GetClosestObject/Client.md create mode 100644 docs/ox_lib/GetClosestPed/Client.md create mode 100644 docs/ox_lib/GetNearbyObjects/Client.md create mode 100644 docs/ox_lib/GetNearbyPeds/Client.md create mode 100644 docs/ox_lib/Math/Shared.md diff --git a/docs/ox_lib/GetClosestObject/Client.md b/docs/ox_lib/GetClosestObject/Client.md new file mode 100644 index 00000000..dc58d6d3 --- /dev/null +++ b/docs/ox_lib/GetClosestObject/Client.md @@ -0,0 +1,17 @@ +### lib.getClosestObject + +Get the object handle and coords of the closest object to a set of coordinates. + +```lua +lib.getClosestObject(coords, maxDistance) +``` + +* coords: `vector3` + * The coords to check from. +* maxDistance: `number` + * The max distance to check. + +Return: + +* ped?: `number` +* coords?: `number` diff --git a/docs/ox_lib/GetClosestPed/Client.md b/docs/ox_lib/GetClosestPed/Client.md new file mode 100644 index 00000000..3b6dc87d --- /dev/null +++ b/docs/ox_lib/GetClosestPed/Client.md @@ -0,0 +1,17 @@ +### lib.getClosestPed + +Get the ped handle and coords of the closest ped to a set of coordinates. + +```lua +lib.getClosestPed(coords, maxDistance) +``` + +* coords: `vector3` + * The coords to check from. +* maxDistance: `number` + * The max distance to check. + +Return: + +* ped?: `number` +* coords?: `number` diff --git a/docs/ox_lib/GetNearbyObjects/Client.md b/docs/ox_lib/GetNearbyObjects/Client.md new file mode 100644 index 00000000..0a7d5143 --- /dev/null +++ b/docs/ox_lib/GetNearbyObjects/Client.md @@ -0,0 +1,16 @@ +### lib.getNearbyObjects + +Get the object handle and coords of all objects within range of a set of coordinates. + +```lua +lib.getNearbyObjects(coords, maxDistance) +``` + +* coords: `vector3` + * The coords to check from. +* maxDistance: `number` + * The max distance to check. + +Return: + +* `{ object: number, coords: vector3 }[]` diff --git a/docs/ox_lib/GetNearbyPeds/Client.md b/docs/ox_lib/GetNearbyPeds/Client.md new file mode 100644 index 00000000..52c0a2f4 --- /dev/null +++ b/docs/ox_lib/GetNearbyPeds/Client.md @@ -0,0 +1,16 @@ +### lib.getNearbyPeds + +Get the ped handle and coords of all peds within range of a set of coordinates. + +```lua +lib.getNearbyPeds(coords, maxDistance) +``` + +* coords: `vector3` + * The coords to check from. +* maxDistance: `number` + * The max distance to check. + +Return: + +* `{ ped: number, coords: vector3 }[]` diff --git a/docs/ox_lib/GetNearbyPlayers/Client.md b/docs/ox_lib/GetNearbyPlayers/Client.md index 25674f31..5913a786 100644 --- a/docs/ox_lib/GetNearbyPlayers/Client.md +++ b/docs/ox_lib/GetNearbyPlayers/Client.md @@ -15,4 +15,4 @@ lib.getNearbyPlayers(coords, maxDistance, includePlayer) Return: -* `number[]` +* `{ id: number, ped: number, coords: vector3 }[]` diff --git a/docs/ox_lib/GetNearbyVehicles/Client.md b/docs/ox_lib/GetNearbyVehicles/Client.md index 7da79f13..75ac4f8b 100644 --- a/docs/ox_lib/GetNearbyVehicles/Client.md +++ b/docs/ox_lib/GetNearbyVehicles/Client.md @@ -15,4 +15,4 @@ lib.getNearbyVehicles(coords, maxDistance, includePlayerVehicle) Return: -* `number[]` +* `{ vehicle: number, coords: vector3 }[]` diff --git a/docs/ox_lib/Math/Shared.md b/docs/ox_lib/Math/Shared.md new file mode 100644 index 00000000..3040283b --- /dev/null +++ b/docs/ox_lib/Math/Shared.md @@ -0,0 +1,71 @@ +## lib.math + +Extends the standard Lua math table with extra functions. + +``` +math = lib.math +``` + +### math.toscalars + +Takes a string and returns a set of scalar values. + +```lua +math.toscalars(input, min, max, round) +``` + +- input: `string` +- min?: `number` +- max?: `number` +- round?: `boolean` + +Return: + +- ...: `number` + +### math.tovector + +Takes a string or table and returns a vector value, or a number if only one value was found. + +```lua +math.tovector(input, min, max, round) +``` + +- input: `string` or `table` +- min?: `number` +- max?: `number` +- round?: `boolean` + +Return: + +- value: `number` or `vector2` or `vector3` or `vector4` + +### math.torgba + +Takes a string or table and returns a vector value, or a number if only one value was found. +Values are rounded and must be within the range of 0-255. + +```lua +math.torgba(input) +``` + +- input: `string` or `table` + +Return: + +- value: `number` or `vector2` or `vector3` or `vector4` + +### math.tohex + +Takes a number or string and formats it as a hexadecimal string. + +```lua +math.tohex(n, upper) +``` + +- n: `number` or `string` +- upper?: `boolean` + +Return: + +- hex: `string`