diff --git a/docs/ox_lib/AddCommand/Server.md b/docs/ox_lib/AddCommand/Server.md index 7f67d592..25a267b3 100644 --- a/docs/ox_lib/AddCommand/Server.md +++ b/docs/ox_lib/AddCommand/Server.md @@ -1,5 +1,5 @@ ```lua --- principal: string or false +-- principal: string or string[] or false -- command: string -- callback: function -- parameters: table (optional) diff --git a/docs/ox_lib/GetClosestPlayer/Client.md b/docs/ox_lib/GetClosestPlayer/Client.md new file mode 100644 index 00000000..65c1ebc1 --- /dev/null +++ b/docs/ox_lib/GetClosestPlayer/Client.md @@ -0,0 +1,11 @@ +### lib.getNearbyPlayers + +Get the id, ped, and coords of all players within range of a set of coordinates. + +```lua +---@param coords vector3 The coords to check from. +---@param maxDistance number The max distance to check. +---@param includePlayer boolean Whether or not to include the current player. +---@return number[] +function lib.getNearbyPlayers(coords, maxDistance, includePlayer) end +``` diff --git a/docs/ox_lib/GetNearbyPlayers/Client.md b/docs/ox_lib/GetNearbyPlayers/Client.md new file mode 100644 index 00000000..26f88915 --- /dev/null +++ b/docs/ox_lib/GetNearbyPlayers/Client.md @@ -0,0 +1,13 @@ +### lib.getClosestPlayer + +Get the id, ped, and coords of the closest player to a set of coordinates. + +```lua +---@param coords vector3 The coords to check from. +---@param maxDistance number The max distance to check. +---@param includePlayer boolean Whether or not to include the current player. +---@return number? playerId +---@return number? playerPed +---@return vector3? playerCoords +function lib.getClosestPlayer(coords, maxDistance, includePlayer) end +``` diff --git a/docs/ox_lib/Raycast/Client.md b/docs/ox_lib/Raycast/Client.md new file mode 100644 index 00000000..c090ab0e --- /dev/null +++ b/docs/ox_lib/Raycast/Client.md @@ -0,0 +1,14 @@ +### lib.raycast.cam + +Starts a shapetest originating from the camera, extending to ~10m. + +```lua +---@param fov number? GetFinalRenderedCamFov +---@param ratio number? GetAspectRatio +---@param flag number? Defaults to 1|2|8|16 (see: https://docs.fivem.net/natives/?_0x377906D8A31E5586) +---@return number entityHit +---@return vector3 endCoords +---@return vector3 surfaceNormal +---@return number materialHash +function lib.raycast.cam(fov, ratio, flag) end +```