All I did was replace this section of code in esx_ambulancejob client and in esx_kashacters client
stock esx_ambulancejob/client/main.lua lines 43 - 61
AddEventHandler('playerSpawned', function()
IsDead = false
if FirstSpawn then
exports.spawnmanager:setAutoSpawn(false) -- disable respawn
FirstSpawn = false
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
if isDead and Config.AntiCombatLog then
while not PlayerLoaded do
Citizen.Wait(1000)
end
ESX.ShowNotification(_U('combatlog_message'))
RemoveItemsAfterRPDeath()
end
end)
end
end)
Replacement lines 43 - 78 now
addEventHandler('playerSpawned', function()
IsDead = false
if FirstSpawn then
exports.spawnmanager:setAutoSpawn(false) -- disable respawn
FirstSpawn = false
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
if isDead and Config.AntiCombatLog then
while not PlayerLoaded do
Citizen.Wait(1000)
end
ESX.ShowNotification(_U('combatlog_message'))
RemoveItemsAfterRPDeath()
end
end)
end
end)
RegisterNetEvent('esx_ambulancejob:multicharacter')
AddEventHandler('esx_ambulancejob:multicharacter', function()
IsDead = false
exports.spawnmanager:setAutoSpawn(false) -- disable respawn
FirstSpawn = false
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
if isDead and Config.AntiCombatLog then
while not PlayerLoaded do
Citizen.Wait(1000)
end
ESX.ShowNotification(_U('combatlog_message'))
RemoveItemsAfterRPDeath()
end
end)
end)
make sure you trigger esx_ambulancejob:multicharacter in esx_kashacters/client/main.lua
TriggerEvent('esx_ambulancejob:multicharacter')
Stock esx_kashacters/client/main.lua lines 53 - 81
RegisterNetEvent('kashactersC:SpawnCharacter')
AddEventHandler('kashactersC:SpawnCharacter', function(spawn)
TriggerServerEvent('es:firstJoinProper')
TriggerEvent('es:allowedToSpawn')
SetTimecycleModifier('default')
local pos = spawn
SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
DoScreenFadeIn(500)
Citizen.Wait(500)
cam2 = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", -1355.93,-1487.78,520.75, 300.00,0.00,0.00, 100.00, false, 0)
PointCamAtCoord(cam2, pos.x,pos.y,pos.z+200)
SetCamActiveWithInterp(cam2, cam, 900, true, true)
Citizen.Wait(900)
cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", pos.x,pos.y,pos.z+200, 300.00,0.00,0.00, 100.00, false, 0)
PointCamAtCoord(cam, pos.x,pos.y,pos.z+2)
SetCamActiveWithInterp(cam, cam2, 3700, true, true)
Citizen.Wait(3700)
PlaySoundFrontend(-1, "Zoom_Out", "DLC_HEIST_PLANNING_BOARD_SOUNDS", 1)
RenderScriptCams(false, true, 500, true, true)
PlaySoundFrontend(-1, "CAR_BIKE_WHOOSH", "MP_LOBBY_SOUNDS", 1)
FreezeEntityPosition(GetPlayerPed(-1), false)
Citizen.Wait(500)
SetCamActive(cam, false)
DestroyCam(cam, true)
IsChoosing = false
DisplayHud(true)
DisplayRadar(true)
end)
Replacement lines 53 - 87 now
RegisterNetEvent('kashactersC:SpawnCharacter')
AddEventHandler('kashactersC:SpawnCharacter', function(spawn, isnew)
TriggerServerEvent('es:firstJoinProper')
TriggerEvent('es:allowedToSpawn')
TriggerEvent('esx_ambulancejob:multicharacter')
SetTimecycleModifier('default')
local pos = spawn
SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
DoScreenFadeIn(500)
Citizen.Wait(500)
cam2 = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", -1355.93,-1487.78,520.75, 300.00,0.00,0.00, 100.00, false, 0)
PointCamAtCoord(cam2, pos.x,pos.y,pos.z+200)
SetCamActiveWithInterp(cam2, cam, 900, true, true)
Citizen.Wait(900)
if isnew then
TriggerEvent('esx_identity:showRegisterIdentity')
end
cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", pos.x,pos.y,pos.z+200, 300.00,0.00,0.00, 100.00, false, 0)
PointCamAtCoord(cam, pos.x,pos.y,pos.z+2)
SetCamActiveWithInterp(cam, cam2, 3700, true, true)
Citizen.Wait(3700)
PlaySoundFrontend(-1, "Zoom_Out", "DLC_HEIST_PLANNING_BOARD_SOUNDS", 1)
RenderScriptCams(false, true, 500, true, true)
PlaySoundFrontend(-1, "CAR_BIKE_WHOOSH", "MP_LOBBY_SOUNDS", 1)
FreezeEntityPosition(GetPlayerPed(-1), false)
Citizen.Wait(500)
SetCamActive(cam, false)
DestroyCam(cam, true)
IsChoosing = false
DisplayHud(true)
DisplayRadar(true)
end)