mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faa9dda57f | ||
|
|
619ecc9e55 | ||
|
|
56c0a91022 | ||
|
|
d6417b9a84 |
@@ -6,7 +6,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw
|
|||||||
|
|
||||||
name 'ox_lib'
|
name 'ox_lib'
|
||||||
author 'Overextended'
|
author 'Overextended'
|
||||||
version '3.31.3'
|
version '3.31.4'
|
||||||
license 'LGPL-3.0-or-later'
|
license 'LGPL-3.0-or-later'
|
||||||
repository 'https://github.com/communityox/ox_lib'
|
repository 'https://github.com/communityox/ox_lib'
|
||||||
description 'A library of shared functions to utilise in other resources.'
|
description 'A library of shared functions to utilise in other resources.'
|
||||||
|
|||||||
@@ -84,6 +84,29 @@ function lib.dui:sendMessage(message)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param x number
|
||||||
|
---@param y number
|
||||||
|
function lib.dui:sendMouseMove(x, y)
|
||||||
|
SendDuiMouseMove(self.duiObject, x, y)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param button 'left' | 'middle' | 'right'
|
||||||
|
function lib.dui:sendMouseDown(button)
|
||||||
|
SendDuiMouseDown(self.duiObject, button)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param button 'left' | 'middle' | 'right'
|
||||||
|
function lib.dui:sendMouseUp(button)
|
||||||
|
SendDuiMouseUp(self.duiObject, button)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param deltaX number
|
||||||
|
---@param deltaY number
|
||||||
|
function lib.dui:sendMouseWheel(deltaX, deltaY)
|
||||||
|
SendDuiMouseWheel(self.duiObject, deltaY, deltaX)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
AddEventHandler('onResourceStop', function(resourceName)
|
AddEventHandler('onResourceStop', function(resourceName)
|
||||||
if cache.resource ~= resourceName then return end
|
if cache.resource ~= resourceName then return end
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ end
|
|||||||
|
|
||||||
if service == 'fivemanage' then
|
if service == 'fivemanage' then
|
||||||
local key = GetConvar('fivemanage:key', '')
|
local key = GetConvar('fivemanage:key', '')
|
||||||
|
local dataset = GetConvar('fivemanage:dataset', '')
|
||||||
|
|
||||||
if key ~= '' then
|
if key ~= '' then
|
||||||
local endpoint = 'https://api.fivemanage.com/api/logs/batch'
|
local endpoint = 'https://api.fivemanage.com/api/logs/batch'
|
||||||
@@ -101,9 +102,13 @@ if service == 'fivemanage' then
|
|||||||
local headers = {
|
local headers = {
|
||||||
['Content-Type'] = 'application/json',
|
['Content-Type'] = 'application/json',
|
||||||
['Authorization'] = key,
|
['Authorization'] = key,
|
||||||
['User-Agent'] = 'ox_lib'
|
['User-Agent'] = 'ox_lib',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dataset ~= "" then
|
||||||
|
headers['X-Fivemanage-Dataset'] = dataset
|
||||||
|
end
|
||||||
|
|
||||||
function lib.logger(source, event, message, ...)
|
function lib.logger(source, event, message, ...)
|
||||||
if not buffer then
|
if not buffer then
|
||||||
buffer = {}
|
buffer = {}
|
||||||
|
|||||||
@@ -345,6 +345,8 @@ local function setZone(data)
|
|||||||
data.contains = data.contains or contains
|
data.contains = data.contains or contains
|
||||||
|
|
||||||
if lib.context == 'client' then
|
if lib.context == 'client' then
|
||||||
|
local coords = cache.coords or GetEntityCoords(cache.ped)
|
||||||
|
data.distance = #(data.coords - coords)
|
||||||
data.setDebug = setDebug
|
data.setDebug = setDebug
|
||||||
|
|
||||||
if data.debug then
|
if data.debug then
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@communityox/ox_lib",
|
"name": "@communityox/ox_lib",
|
||||||
"author": "Overextended",
|
"author": "Overextended",
|
||||||
"version": "3.31.3",
|
"version": "3.31.4",
|
||||||
"description": "JS/TS wrapper for ox_lib exports",
|
"description": "JS/TS wrapper for ox_lib exports",
|
||||||
"main": "./shared/index.js",
|
"main": "./shared/index.js",
|
||||||
"types": "./shared/index.d.ts",
|
"types": "./shared/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user