From 10db769f4144fc40e3eab6817122de4a8ecfb2a2 Mon Sep 17 00:00:00 2001 From: ANTOND <71350868+antond15@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:01:52 +0100 Subject: [PATCH] fix(types): optional params in getClosest* (#519) --- imports/getClosestObject/shared.lua | 2 +- imports/getClosestPed/shared.lua | 2 +- imports/getClosestPlayer/client.lua | 4 ++-- imports/getClosestVehicle/shared.lua | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/imports/getClosestObject/shared.lua b/imports/getClosestObject/shared.lua index e094aed..ead1dfe 100644 --- a/imports/getClosestObject/shared.lua +++ b/imports/getClosestObject/shared.lua @@ -1,5 +1,5 @@ ---@param coords vector3 The coords to check from. ----@param maxDistance number The max distance to check. +---@param maxDistance? number The max distance to check. ---@return number? object ---@return vector3? objectCoords function lib.getClosestObject(coords, maxDistance) diff --git a/imports/getClosestPed/shared.lua b/imports/getClosestPed/shared.lua index 38e6053..a00974b 100644 --- a/imports/getClosestPed/shared.lua +++ b/imports/getClosestPed/shared.lua @@ -1,5 +1,5 @@ ---@param coords vector3 The coords to check from. ----@param maxDistance number The max distance to check. +---@param maxDistance? number The max distance to check. ---@return number? ped ---@return vector3? pedCoords function lib.getClosestPed(coords, maxDistance) diff --git a/imports/getClosestPlayer/client.lua b/imports/getClosestPlayer/client.lua index 064df74..249ee5b 100644 --- a/imports/getClosestPlayer/client.lua +++ b/imports/getClosestPlayer/client.lua @@ -1,6 +1,6 @@ ---@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. +---@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 diff --git a/imports/getClosestVehicle/shared.lua b/imports/getClosestVehicle/shared.lua index c2647b7..dc7d717 100644 --- a/imports/getClosestVehicle/shared.lua +++ b/imports/getClosestVehicle/shared.lua @@ -1,6 +1,6 @@ ---@param coords vector3 The coords to check from. ----@param maxDistance number The max distance to check. ----@param includePlayerVehicle boolean Whether or not to include the player's current vehicle. Ignored on the server. +---@param maxDistance? number The max distance to check. +---@param includePlayerVehicle? boolean Whether or not to include the player's current vehicle. Ignored on the server. ---@return number? vehicle ---@return vector3? vehicleCoords function lib.getClosestVehicle(coords, maxDistance, includePlayerVehicle)