From f1b519807bf2ea32ea4e45578086d3f2f8e60aa2 Mon Sep 17 00:00:00 2001 From: Sergio <89666307+feelfreetofee@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:53:59 +0200 Subject: [PATCH 1/2] fix(es_extended/client/functions.lua): Fix typos Small fixes --- [core]/es_extended/client/functions.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 13ea8eae..e80c9c77 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -321,7 +321,7 @@ function ESX.Game.Teleport(entity, coords, cb) end function ESX.Game.SpawnObject(object, coords, cb, networked) - local obj = CreateObject(ESX.Streaming.RequestModel(object), coords.x, coords.y. coords.z, networked == nil or networked, false, true) + local obj = CreateObject(ESX.Streaming.RequestModel(object), coords.x, coords.y, coords.z, networked == nil or networked, false, true) return cb and cb(obj) or obj end @@ -491,8 +491,9 @@ end function ESX.Game.RaycastScreen(depth, ...) local world, normal = GetWorldCoordFromScreenCoord(.5, .5) + local origin = world + normal local target = world + normal * depth - return target, ESX.Game.GetShapeTestResultAsync(StartShapeTestLosProbe(world + normal, target, ...)) + return target, ESX.Game.GetShapeTestResultSync(StartShapeTestLosProbe(origin.x, origin.y, origin.z, target.x, target.y, target.z, ...)) end function ESX.Game.GetClosestEntity(entities, isPlayerEntities, coords, modelFilter) From 8e170e07b2efe234e3719e0697830c86e1911cc2 Mon Sep 17 00:00:00 2001 From: Sergio <89666307+feelfreetofee@users.noreply.github.com> Date: Wed, 16 Oct 2024 00:42:51 +0200 Subject: [PATCH 2/2] fix(es_extended/client/functions.lua): on_release fix I was wrong #1411 --- [core]/es_extended/client/functions.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index e80c9c77..79f56e26 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -140,12 +140,13 @@ function ESX.RefreshContext(...) end function ESX.RegisterInput(command_name, label, input_group, key, on_press, on_release) - RegisterCommand(on_release and '+' .. command_name or command_name, on_press) - Core.Input[command_name] = ESX.HashString(command_name) + local command = on_release and '+' .. command_name or command_name + RegisterCommand(command, on_press) + Core.Input[command_name] = ESX.HashString(command) if on_release then RegisterCommand('-' .. command_name, on_release) end - RegisterKeyMapping(command_name, label or '', input_group or 'keyboard', key or '') + RegisterKeyMapping(command, label or '', input_group or 'keyboard', key or '') end function ESX.UI.Menu.RegisterType(menuType, open, close)