Skip to content

Commit

Permalink
fix: missing and invalid types and parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Feb 25, 2023
1 parent b779ea7 commit b3b49b1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion imports/getNearbyPlayers/client.lua
Original file line number Diff line number Diff line change
@@ -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 includePlayer boolean? Whether or not to include the current player.
---@return table players
function lib.getNearbyPlayers(coords, maxDistance, includePlayer)
local players = GetActivePlayers()
Expand Down
2 changes: 1 addition & 1 deletion imports/requestStreamedTextureDict/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function lib.requestStreamedTextureDict(textureDict, timeout)
error(("expected textureDict to have type 'string' (received %s)"):format(type(textureDict)))
end

RequestStreamedTextureDict(textureDict)
RequestStreamedTextureDict(textureDict, false)

if coroutine.running() then
timeout = tonumber(timeout) or 500
Expand Down
2 changes: 1 addition & 1 deletion resource/interface/client/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local input

---@param heading string
---@param rows string[] | InputDialogRowProps[]
---@param options InputDialogOptionsProps[]
---@param options InputDialogOptionsProps[]?
---@return string[] | number[] | boolean[] | nil
function lib.inputDialog(heading, rows, options)
if input then return end
Expand Down
7 changes: 4 additions & 3 deletions resource/interface/client/radial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
---@field label string
---@field menu? string
---@field onSelect? function
---@field [string] any

---@class RadialMenuProps
---@field id string
Expand All @@ -23,8 +24,8 @@ local menuHistory = {}
---@type RadialMenuProps?
local currentRadial = nil

---Open a registered radial submenu with the given id.
---@param id string
---Open a the global radial menu or a registered radial submenu with the given id.
---@param id string?
local function showRadial(id)
local radial = id and menus[id]

Expand All @@ -48,7 +49,7 @@ local function showRadial(id)
SendNUIMessage({
action = 'openRadialMenu',
data = {
items = radial?.items or menuItems,
items = radial and radial.items or menuItems,
sub = radial and true or nil
}
})
Expand Down
4 changes: 2 additions & 2 deletions resource/vehicleProperties/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function lib.setVehicleProperties(vehicle, props)
if state == 1 then
SetVehicleTyreBurst(vehicle, tyre, false, 1000.0)
else
SetVehicleTyreBurst(vehicle, tyre, true)
SetVehicleTyreBurst(vehicle, tyre, true, 1000.0)
end
end
end
Expand Down Expand Up @@ -594,4 +594,4 @@ function lib.setVehicleProperties(vehicle, props)
end

return true
end
end
3 changes: 2 additions & 1 deletion resource/zoneCreator/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ local function closeCreator(cancel)
points[#points + 1] = vec(xCoord, yCoord)
end

---@type string[]
local input = lib.inputDialog(('Name your %s Zone'):format(firstToUpper(zoneType)), {
{ type = 'input', label = 'Name', placeholder = 'none' },
{ type = 'select', label = 'Format', default = format, options = {
Expand Down Expand Up @@ -229,7 +230,7 @@ local function startCreator(arg, useLast)
end

if controlsActive then
DisableAllControlActions()
DisableAllControlActions(0)
EnableControlAction(0, controls['INPUT_LOOK_LR'], true)
EnableControlAction(0, controls['INPUT_LOOK_UD'], true)
EnableControlAction(0, controls['INPUT_MP_TEXT_CHAT_ALL'], true)
Expand Down

0 comments on commit b3b49b1

Please sign in to comment.