mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
refactor(command): Remove unneeded variable
This commit is contained in:
@@ -324,7 +324,7 @@ ESX.Game.Teleport = function(entity, coords, cb)
|
||||
if DoesEntityExist(entity) then
|
||||
RequestCollisionAtCoord(vector.xyz)
|
||||
while not HasCollisionLoadedAroundEntity(entity) do
|
||||
Wait(0)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
SetEntityCoords(entity, vector.xyz, false, false, false, false)
|
||||
@@ -342,7 +342,7 @@ ESX.Game.SpawnObject = function(object, coords, cb, networked, dynamic)
|
||||
networked = networked == nil and true or false
|
||||
dynamic = dynamic ~= nil and true or false
|
||||
|
||||
CreateThread(function()
|
||||
Citizen.CreateThread(function()
|
||||
ESX.Streaming.RequestModel(model)
|
||||
|
||||
-- The below has to be done just for CreateObject since for some reason CreateObjects model argument is set
|
||||
@@ -374,7 +374,7 @@ ESX.Game.SpawnVehicle = function(vehicle, coords, heading, cb, networked)
|
||||
local model = (type(vehicle) == 'number' and vehicle or GetHashKey(vehicle))
|
||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||
networked = networked == nil and true or false
|
||||
CreateThread(function()
|
||||
Citizen.CreateThread(function()
|
||||
ESX.Streaming.RequestModel(model)
|
||||
|
||||
local vehicle = CreateVehicle(model, vector.xyz, heading, networked, false)
|
||||
@@ -391,7 +391,7 @@ ESX.Game.SpawnVehicle = function(vehicle, coords, heading, cb, networked)
|
||||
|
||||
RequestCollisionAtCoord(vector.xyz)
|
||||
while not HasCollisionLoadedAroundEntity(vehicle) do
|
||||
Wait(0)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
if cb then
|
||||
|
||||
+1
-4
@@ -1,4 +1,3 @@
|
||||
local crash = false
|
||||
ESX.RegisterCommand('setcoords', 'admin', function(xPlayer, args, showError)
|
||||
xPlayer.setCoords({x = args.x, y = args.y, z = args.z})
|
||||
end, false, {help = _U('command_setcoords'), validate = true, arguments = {
|
||||
@@ -169,9 +168,7 @@ ESX.RegisterCommand('sv_restart', "admin", function(xPlayer, args, showError)
|
||||
DropPlayer(playerId, "Server Restart")
|
||||
end
|
||||
print('^2[INFO] ^1 Server Restarting, Please Wait :)')
|
||||
crash = true
|
||||
while crash do
|
||||
end
|
||||
while true do end
|
||||
end)
|
||||
end, true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user