mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Minor change to functions
Add a TriggerEvent to `ESX.SetPlayerData` so we can tell other resources to update Only set networked vehicles as persistent and able to migrate Return entityCoords from `ESX.Game.GetVehicleInDirection` Only run `ServerSyncLoops` while ESX.PlayerLoaded is true Create an imports file to set ESX object and EventHandler for `esx:setPlayerData`
This commit is contained in:
+2
-2
@@ -352,7 +352,7 @@ end
|
||||
function StartServerSyncLoops()
|
||||
-- keep track of ammo
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
while ESX.PlayerLoaded do
|
||||
Citizen.Wait(1000)
|
||||
|
||||
local letSleep = true
|
||||
@@ -379,7 +379,7 @@ function StartServerSyncLoops()
|
||||
Citizen.CreateThread(function()
|
||||
local previousCoords = vector3(ESX.PlayerData.coords.x, ESX.PlayerData.coords.y, ESX.PlayerData.coords.z)
|
||||
|
||||
while true do
|
||||
while ESX.PlayerLoaded do
|
||||
Citizen.Wait(1500)
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user