ESX
Deleting Scripts
if you have esx_skin and skinchanger delete
Remove esx_skin and skinchanger from dependencies in the fxmanifest file of all scripts
Esx_multicharacter Edit (For ESX V11)
Download the edited file below and replace it with your own esx_multicharacter script
Non Multichar Version
If you are not using multichar system in ESX
open es_extended/client/functions.lua file
Find the following codes in the file
function ESX.SpawnPlayer(skin, coords, cb)
local p = promise.new()
TriggerEvent("skinchanger:loadSkin", skin, function()
p:resolve()
end)
Citizen.Await(p)
RequestCollisionAtCoord(coords.x, coords.y, coords.z)
local playerPed = PlayerPedId()
local timer = GetGameTimer()
Core.FreezePlayer(true)
SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, true)
SetEntityHeading(playerPed, coords.heading)
RequestCollisionAtCoord(coords.x, coords.y, coords.z)
while not HasCollisionLoadedAroundEntity(playerPed) and (GetGameTimer() - timer) < 5000 do
Wait(0)
end
NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, 0, true)
TriggerEvent('playerSpawned', coords)
cb()
endReplace with the following codes
function ESX.SpawnPlayer(skin, coords, cb)
RequestCollisionAtCoord(coords.x, coords.y, coords.z)
local playerPed = PlayerPedId()
local timer = GetGameTimer()
Core.FreezePlayer(true)
SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, true)
SetEntityHeading(playerPed, coords.heading)
RequestCollisionAtCoord(coords.x, coords.y, coords.z)
while not HasCollisionLoadedAroundEntity(playerPed) and (GetGameTimer() - timer) < 5000 do
Wait(0)
end
NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, 0, true)
TriggerEvent('playerSpawned', coords)
cb()
end
Last updated