From 06527c06928ba1c315badcbb746afa265f0b40cd Mon Sep 17 00:00:00 2001 From: DokaDoka Date: Mon, 17 May 2021 15:00:53 +1000 Subject: [PATCH 1/2] fix(legacy/functions) 3Dtext rectangle scale --- client/functions.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 31df80fa..24b1fb7f 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -310,7 +310,7 @@ end ESX.Game.Teleport = function(entity, coords, cb) local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or vec(coords.x, coords.y, coords.z, coords.heading or 0.0) - + if DoesEntityExist(entity) then RequestCollisionAtCoord(vector.xyz) while not HasCollisionLoadedAroundEntity(entity) do @@ -330,10 +330,10 @@ ESX.Game.SpawnObject = function(model, coords, cb, networked, dynamic) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) networked = networked == nil and true or false dynamic = dynamic ~= nil and true or false - + CreateThread(function() ESX.Streaming.RequestModel(model) - + -- The below has to be done just for CreateObject since for some reason CreateObjects model argument is set -- as an Object instead of a hash so it doesn't automatically hash the item model = type(model) == 'number' and model or GetHashKey(model) @@ -712,8 +712,8 @@ ESX.Game.Utils.DrawText3D = function(coords, text, scale, font) AddTextComponentString(text) SetDrawOrigin(vector.xyz, 0) DrawText(0.0, 0.0) - local factor = string.len(text) / 370 - DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75) + local scaleFactor = scale / 0.35 + DrawRect(0.0, 0.0 + 0.0111 * scaleFactor, 0.017 + (string.len(text) / 370) * scaleFactor, 0.03 * scaleFactor, 0, 0, 0, 75) ClearDrawOrigin() end @@ -736,7 +736,7 @@ ESX.ShowInventory = function() canRemove = canDrop }) end - end + end for k,v in ipairs(ESX.PlayerData.inventory) do if v.count > 0 then From d6f5a7a5e6896e2c9210cc74db7d7a81fab3f8fb Mon Sep 17 00:00:00 2001 From: SMVampire Date: Mon, 17 May 2021 01:10:35 -0400 Subject: [PATCH 2/2] fix(config.weapons.lua): Jenkins Hashed Labels Fix mistakenly hashed weapon names for - WEAPON_DAGGER - WEAPON_BAT - WEAPON_BATTLEAXE --- config.weapons.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.weapons.lua b/config.weapons.lua index 07472617..7f555e80 100644 --- a/config.weapons.lua +++ b/config.weapons.lua @@ -11,9 +11,9 @@ Config.DefaultWeaponTints = { Config.Weapons = { -- Melee - {name = `WEAPON_DAGGER`, label = _U('weapon_dagger'), components = {}}, - {name = `WEAPON_BAT`, label = _U('weapon_bat'), components = {}}, - {name = `WEAPON_BATTLEAXE`, label = _U('weapon_battleaxe'), components = {}}, + {name = 'WEAPON_DAGGER', label = _U('weapon_dagger'), components = {}}, + {name = 'WEAPON_BAT', label = _U('weapon_bat'), components = {}}, + {name = 'WEAPON_BATTLEAXE', label = _U('weapon_battleaxe'), components = {}}, { name = 'WEAPON_KNUCKLE', label = _U('weapon_knuckle'),