refactor: more logical code

This commit is contained in:
MoskalykA
2023-03-01 09:54:49 +01:00
parent 1df1423027
commit a80f5f952a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -357,7 +357,7 @@ function ESX.Game.Teleport(entity, coords, cb)
end
function ESX.Game.SpawnObject(object, coords, cb, networked)
networked = networked == nil and true or networked
networked = networked or true
if networked then
ESX.TriggerServerCallback('esx:Onesync:SpawnObject', function(NetworkID)
if cb then
@@ -405,7 +405,7 @@ end
function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked)
local model = type(vehicle) == 'number' and vehicle or joaat(vehicle)
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
networked = networked == nil and true or networked
networked = networked or true
CreateThread(function()
ESX.Streaming.RequestModel(model)
+1 -1
View File
@@ -13,7 +13,7 @@ function Post(fn,...)
end
function Open(position,eles,onSelect,onClose,canClose)
local canClose = canClose == nil and true or canClose
local canClose = canClose or true
activeMenu = {
position = position,
eles = eles,