🔁 1.10.4 sync

1.10.4 hotfix sync
This commit is contained in:
Thekuca
2024-01-30 21:23:22 +01:00
committed by GitHub
17 changed files with 59 additions and 48 deletions
+1 -1
View File
@@ -4,6 +4,6 @@ game 'gta5'
author 'ESX-Framework'
description 'cron'
lua54 'yes'
version '1.10.3'
version '1.10.4'
server_script 'server/main.lua'
+43 -33
View File
@@ -18,54 +18,48 @@ RegisterNetEvent("esx:requestModel", function(model)
ESX.Streaming.RequestModel(model)
end)
function ESX.SpawnPlayer(skin, coords, cb)
local p = promise.new()
TriggerEvent("skinchanger:loadSkin", skin, function()
p:resolve()
end)
Citizen.Await(p)
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, true)
SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true)
SetEntityHeading(playerPed, coords.heading)
while not HasCollisionLoadedAroundEntity(playerPed) do
Wait(0)
end
FreezeEntityPosition(playerPed, false)
NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, true, true, false)
cb()
end
RegisterNetEvent("esx:playerLoaded")
AddEventHandler("esx:playerLoaded", function(xPlayer, isNew, skin)
AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin)
ESX.PlayerData = xPlayer
if Config.Multichar then
Wait(3000)
else
exports.spawnmanager:spawnPlayer({
x = ESX.PlayerData.coords.x,
y = ESX.PlayerData.coords.y,
z = ESX.PlayerData.coords.z + 0.25,
heading = ESX.PlayerData.coords.heading,
model = `mp_m_freemode_01`,
skipFade = false,
}, function()
TriggerServerEvent("esx:onPlayerSpawn")
if not Config.Multichar then
ESX.SpawnPlayer(skin, ESX.PlayerData.coords, function()
TriggerEvent("esx:onPlayerSpawn")
TriggerEvent("esx:restoreLoadout")
if isNew then
TriggerEvent("skinchanger:loadDefaultModel", skin.sex == 0)
elseif skin then
TriggerEvent("skinchanger:loadSkin", skin)
end
TriggerServerEvent("esx:onPlayerSpawn")
TriggerEvent("esx:loadingScreenOff")
ShutdownLoadingScreen()
ShutdownLoadingScreenNui()
end)
end
ESX.PlayerLoaded = true
while ESX.PlayerData.ped == nil do
while not DoesEntityExist(ESX.PlayerData.ped) do
Wait(20)
end
ESX.PlayerLoaded = true
while not HasCollisionLoadedAroundEntity(ESX.PlayerData.ped) do
Wait(0)
end
if Config.EnablePVP then
SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
NetworkSetFriendlyFireOption(true)
end
local playerId = PlayerId()
local metadata = ESX.PlayerData.metadata
if metadata.health then
SetEntityHealth(ESX.PlayerData.ped, metadata.health)
end
@@ -74,6 +68,17 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, isNew, skin)
SetPedArmour(ESX.PlayerData.ped, metadata.armor)
end
local timer = GetGameTimer()
while not HaveAllStreamingRequestsCompleted(ESX.PlayerData.ped) and (GetGameTimer() - timer) < 2000 do
Wait(0)
end
if Config.EnablePVP then
SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
NetworkSetFriendlyFireOption(true)
end
local playerId = PlayerId()
-- RemoveHudComponents
for i = 1, #Config.RemoveHudComponents do
if Config.RemoveHudComponents[i] then
@@ -197,10 +202,15 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, isNew, skin)
end
end
if IsScreenFadedOut() then
DoScreenFadeIn(500)
end
SetDefaultVehicleNumberPlateTextPattern(-1, Config.CustomAIPlates)
StartServerSyncLoops()
end)
RegisterNetEvent("esx:onPlayerLogout")
AddEventHandler("esx:onPlayerLogout", function()
ESX.PlayerLoaded = false
@@ -25,6 +25,7 @@ local function GetData(vehicle)
end
CreateThread(function()
while not ESX.PlayerLoaded do Wait(200) end
while true do
ESX.SetPlayerData("coords", GetEntityCoords(playerPed))
if playerPed ~= PlayerPedId() then
+1 -1
View File
@@ -1,7 +1,7 @@
Config = {}
Config.Locale = GetConvar("esx:locale", "en")
Config.OxInventory = GetResourceState("ox_inventory") ~= 'missing'
Config.OxInventory = GetResourceState("ox_inventory") ~= 'missing'
Config.Accounts = {
bank = {
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'cerulean'
game 'gta5'
description 'ES Extended'
lua54 'yes'
version '1.10.3'
version '1.10.4'
shared_scripts {
'locale.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
author 'ESX-Framework & Brayden'
description 'Offical ESX Legacy Context Menu'
lua54 'yes'
version '1.10.3'
version '1.10.4'
ui_page 'index.html'
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'ESX Identity'
lua54 'yes'
version '1.10.3'
version '1.10.4'
shared_scripts {
'@es_extended/imports.lua',
+1 -1
View File
@@ -1,6 +1,6 @@
game 'common'
version '1.10.3'
version '1.10.4'
fx_version 'cerulean'
author 'ESX-Framework'
lua54 'yes'
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'ESX Menu Default'
lua54 'yes'
version '1.10.3'
version '1.10.4'
client_scripts { '@es_extended/imports.lua', 'client/main.lua' }
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'ESX Menu Dialog'
lua54 'yes'
version '1.10.3'
version '1.10.4'
client_scripts {
'@es_extended/imports.lua',
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'ESX Menu List'
lua54 'yes'
version '1.10.3'
version '1.10.4'
client_scripts {
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'cerulean'
game 'gta5'
author 'ESX-Framework - Linden - KASH'
description 'Official Multicharacter System For ESX Legacy'
version '1.10.3'
version '1.10.4'
lua54 'yes'
dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' }
+1 -1
View File
@@ -2,7 +2,7 @@ fx_version 'adamant'
lua54 'yes'
game 'gta5'
version '1.10.3'
version '1.10.4'
author 'ESX-Framework'
description 'Official NUI Notification system for ESX'
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
lua54 'yes'
version '1.10.3'
version '1.10.4'
description 'ESX Progressbar'
client_scripts { 'Progress.lua' }
+1 -1
View File
@@ -2,7 +2,7 @@ fx_version 'adamant'
game 'gta5'
description 'ESX Skin'
version '1.10.3'
version '1.10.4'
lua54 'yes'
shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -2,7 +2,7 @@ fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
version '1.10.3'
version '1.10.4'
description 'ESX TextUI'
lua54 'yes'
+1 -1
View File
@@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
lua54 'yes'
description 'Official ESX-Legacy resource for handling the Player`s Skin'
version '1.10.3'
version '1.10.4'
client_scripts {
'@es_extended/locale.lua',