mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Update main.lua
This commit is contained in:
@@ -31,8 +31,10 @@ Citizen.CreateThread(function ()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local cam = nil
|
||||
local cam2 = nil
|
||||
|
||||
RegisterNetEvent('kashactersC:SetupCharacters')
|
||||
AddEventHandler('kashactersC:SetupCharacters', function()
|
||||
DoScreenFadeOut(10)
|
||||
@@ -59,39 +61,49 @@ end)
|
||||
|
||||
RegisterNetEvent('kashactersC:SpawnCharacter')
|
||||
AddEventHandler('kashactersC:SpawnCharacter', function(spawn, isnew)
|
||||
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)
|
||||
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
TriggerEvent('esx_ambulancejob:multicharacter', source)
|
||||
|
||||
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)
|
||||
|
||||
TriggerEvent('esx:kashloaded')
|
||||
|
||||
if isnew then
|
||||
TriggerEvent('esx_identity:showRegisterIdentity')
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent('kashactersC:ReloadCharacters')
|
||||
@@ -109,6 +121,7 @@ RegisterNUICallback("CharacterChosen", function(data, cb)
|
||||
end
|
||||
cb("ok")
|
||||
end)
|
||||
|
||||
RegisterNUICallback("DeleteCharacter", function(data, cb)
|
||||
SetNuiFocus(false,false)
|
||||
DoScreenFadeOut(500)
|
||||
|
||||
Reference in New Issue
Block a user