mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Merge branch 'esx-framework:legacy' into legacy
This commit is contained in:
@@ -310,7 +310,7 @@ end
|
|||||||
|
|
||||||
ESX.Game.Teleport = function(entity, coords, cb)
|
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)
|
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
|
if DoesEntityExist(entity) then
|
||||||
RequestCollisionAtCoord(vector.xyz)
|
RequestCollisionAtCoord(vector.xyz)
|
||||||
while not HasCollisionLoadedAroundEntity(entity) do
|
while not HasCollisionLoadedAroundEntity(entity) do
|
||||||
@@ -331,10 +331,10 @@ ESX.Game.SpawnObject = function(object, coords, cb, networked, dynamic)
|
|||||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||||
networked = networked == nil and true or false
|
networked = networked == nil and true or false
|
||||||
dynamic = dynamic ~= nil and true or false
|
dynamic = dynamic ~= nil and true or false
|
||||||
|
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
ESX.Streaming.RequestModel(model)
|
ESX.Streaming.RequestModel(model)
|
||||||
|
|
||||||
-- The below has to be done just for CreateObject since for some reason CreateObjects model argument is set
|
-- 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
|
-- as an Object instead of a hash so it doesn't automatically hash the item
|
||||||
model = type(model) == 'number' and model or GetHashKey(model)
|
model = type(model) == 'number' and model or GetHashKey(model)
|
||||||
@@ -714,8 +714,8 @@ ESX.Game.Utils.DrawText3D = function(coords, text, scale, font)
|
|||||||
AddTextComponentString(text)
|
AddTextComponentString(text)
|
||||||
SetDrawOrigin(vector.xyz, 0)
|
SetDrawOrigin(vector.xyz, 0)
|
||||||
DrawText(0.0, 0.0)
|
DrawText(0.0, 0.0)
|
||||||
local factor = string.len(text) / 370
|
local scaleFactor = scale / 0.35
|
||||||
DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
|
DrawRect(0.0, 0.0 + 0.0111 * scaleFactor, 0.017 + (string.len(text) / 370) * scaleFactor, 0.03 * scaleFactor, 0, 0, 0, 75)
|
||||||
ClearDrawOrigin()
|
ClearDrawOrigin()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ ESX.ShowInventory = function()
|
|||||||
canRemove = canDrop
|
canRemove = canDrop
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for k,v in ipairs(ESX.PlayerData.inventory) do
|
for k,v in ipairs(ESX.PlayerData.inventory) do
|
||||||
if v.count > 0 then
|
if v.count > 0 then
|
||||||
|
|||||||
+3
-3
@@ -11,9 +11,9 @@ Config.DefaultWeaponTints = {
|
|||||||
|
|
||||||
Config.Weapons = {
|
Config.Weapons = {
|
||||||
-- Melee
|
-- Melee
|
||||||
{name = `WEAPON_DAGGER`, label = _U('weapon_dagger'), components = {}},
|
{name = 'WEAPON_DAGGER', label = _U('weapon_dagger'), components = {}},
|
||||||
{name = `WEAPON_BAT`, label = _U('weapon_bat'), components = {}},
|
{name = 'WEAPON_BAT', label = _U('weapon_bat'), components = {}},
|
||||||
{name = `WEAPON_BATTLEAXE`, label = _U('weapon_battleaxe'), components = {}},
|
{name = 'WEAPON_BATTLEAXE', label = _U('weapon_battleaxe'), components = {}},
|
||||||
{
|
{
|
||||||
name = 'WEAPON_KNUCKLE',
|
name = 'WEAPON_KNUCKLE',
|
||||||
label = _U('weapon_knuckle'),
|
label = _U('weapon_knuckle'),
|
||||||
|
|||||||
Reference in New Issue
Block a user