mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
chore: add copyright notices to each file
Some people accidentally, mistakenly, and without any malicious intent forget to attribute code from this resource to its source. This change will hopefully assist people, so that they do not make that mistake again.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local function allowAce(allow)
|
||||
return allow == false and 'deny' or 'allow'
|
||||
end
|
||||
|
||||
8
resource/cache/client.lua
vendored
8
resource/cache/client.lua
vendored
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local cache = _ENV.cache
|
||||
cache.playerId = PlayerId()
|
||||
cache.serverId = GetPlayerServerId(cache.playerId)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local registeredCallbacks = {}
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local _registerCommand = RegisterCommand
|
||||
|
||||
---@param commandName string
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@type promise?
|
||||
local alert = nil
|
||||
local alertId = 0
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@param value string
|
||||
function lib.setClipboard(value)
|
||||
SendNUIMessage({
|
||||
action = 'setClipboard',
|
||||
data = value
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local contextMenus = {}
|
||||
local openContextMenu = nil
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local input
|
||||
|
||||
---@class InputDialogRowProps
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@alias IconProp 'fas' | 'far' | 'fal' | 'fat' | 'fad' | 'fab' | 'fak' | 'fass'
|
||||
|
||||
local keepInput = IsNuiFocusKeepingInput()
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@type { [string]: MenuProps }
|
||||
local registeredMenus = {}
|
||||
---@type MenuProps | nil
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@alias NotificationPosition 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left' | 'center-right' | 'center-left'
|
||||
---@alias NotificationType 'info' | 'warning' | 'success' | 'error'
|
||||
---@alias IconAnimationType 'spin' | 'spinPulse' | 'spinReverse' | 'pulse' | 'beat' | 'fade' | 'beatFade' | 'bounce' | 'shake'
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local progress
|
||||
local DisableControlAction = DisableControlAction
|
||||
local DisablePlayerFiring = DisablePlayerFiring
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@class RadialItem
|
||||
---@field icon string | {[1]: IconProp, [2]: string};
|
||||
---@field label string
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@type promise?
|
||||
local skillcheck
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@class TextUIOptions
|
||||
---@field position? 'right-center' | 'left-center' | 'top-center' | 'bottom-center';
|
||||
---@field icon? string | {[1]: IconProp, [2]: string};
|
||||
@@ -38,4 +46,4 @@ end
|
||||
---@return boolean, string | nil
|
||||
function lib.isTextUIOpen()
|
||||
return isOpen, currentText
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
if GetConvarInt('ox:txAdminNotifications', 0) == 0 then return end
|
||||
|
||||
if GetConvarInt('txAdmin-hideDefaultAnnouncement', 0) == 1 then
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local settings = require 'resource.settings'
|
||||
|
||||
local function loadLocaleFile(key)
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
function lib.getLocaleKey() return GetConvar('ox:locale', 'en') end
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
if cache.game == 'redm' then return end
|
||||
|
||||
---@class VehicleProperties
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
---@param vehicle number
|
||||
---@param props VehicleProperties
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
function lib.versionCheck(repository)
|
||||
local resource = GetInvokingResource() or GetCurrentResourceName()
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
function lib.checkDependency(resource, minimumVersion, printMessage)
|
||||
local currentVersion = GetResourceMetadata(resource, 'version', 0)
|
||||
currentVersion = currentVersion and currentVersion:match('%d+%.%d+%.%d+') or 'unknown'
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
--[[
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local creatorActive = false
|
||||
local controlsActive = false
|
||||
local zoneType, step, xCoord, yCoord, zCoord, heading, height, width, length
|
||||
|
||||
@@ -1,40 +1,9 @@
|
||||
--[[
|
||||
-- function
|
||||
local poly = lib.zones.poly({
|
||||
name = poly,
|
||||
points = {
|
||||
vec(447.9, -998.8, 25.8),
|
||||
vec(450.3, -998.2, 25.8),
|
||||
vec(449.9, -995.5, 25.8),
|
||||
vec(447.2, -995.6, 25.8),
|
||||
vec(446.3, -997.9, 25.8),
|
||||
},
|
||||
thickness = 2,
|
||||
})
|
||||
-- array
|
||||
{
|
||||
name = poly,
|
||||
points = {
|
||||
vec(447.9, -998.8, 25.8),
|
||||
vec(450.3, -998.2, 25.8),
|
||||
vec(449.9, -995.5, 25.8),
|
||||
vec(447.2, -995.6, 25.8),
|
||||
vec(446.3, -997.9, 25.8),
|
||||
},
|
||||
thickness = 2,
|
||||
},
|
||||
-- target
|
||||
exports.ox_target:addPolyZone({
|
||||
name = poly,
|
||||
points = {
|
||||
vec(447.9, -998.8, 25.8),
|
||||
vec(450.3, -998.2, 25.8),
|
||||
vec(449.9, -995.5, 25.8),
|
||||
vec(447.2, -995.6, 25.8),
|
||||
vec(446.3, -997.9, 25.8),
|
||||
},
|
||||
thickness = 2,
|
||||
})
|
||||
https://github.com/overextended/ox_lib
|
||||
|
||||
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||
|
||||
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
||||
]]
|
||||
|
||||
local function formatNumber(num)
|
||||
|
||||
Reference in New Issue
Block a user