mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Update main.lua
This commit is contained in:
@@ -61,53 +61,53 @@ end)
|
||||
RegisterNetEvent('kashactersC:SpawnCharacter')
|
||||
AddEventHandler('kashactersC:SpawnCharacter', function(isnew)
|
||||
if isnew == true then
|
||||
SetTimecycleModifier('default')
|
||||
|
||||
local pos = { x = -1044.73, y = -2749.13, z = 21.3634 } -- DEFAULT SPAWN POSITION
|
||||
RequestCollisionAtCoord(pos.x, pos.y, pos.z)
|
||||
SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
|
||||
DoScreenFadeIn(500)
|
||||
SetTimecycleModifier('default')
|
||||
|
||||
Citizen.Wait(500)
|
||||
local pos = { x = -1044.73, y = -2749.13, z = 21.3634 } -- DEFAULT SPAWN POSITION
|
||||
RequestCollisionAtCoord(pos.x, pos.y, pos.z)
|
||||
SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
|
||||
DoScreenFadeIn(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(500)
|
||||
|
||||
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)
|
||||
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(3700)
|
||||
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)
|
||||
|
||||
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)
|
||||
SetPlayerInvincible(GetPlayerPed(-1), false);
|
||||
SetEntityCollision(GetPlayerPed(-1), true, true)
|
||||
SetCamActive(cam, false)
|
||||
DestroyCam(cam, true)
|
||||
IsChoosing = false
|
||||
Citizen.Wait(3700)
|
||||
|
||||
SetEntityVisible(GetPlayerPed(-1), true, false)
|
||||
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)
|
||||
SetPlayerInvincible(GetPlayerPed(-1), false);
|
||||
SetEntityCollision(GetPlayerPed(-1), true, true)
|
||||
SetCamActive(cam, false)
|
||||
DestroyCam(cam, true)
|
||||
IsChoosing = false
|
||||
|
||||
TriggerEvent('esx:kashloaded')
|
||||
SetEntityVisible(GetPlayerPed(-1), true, false)
|
||||
|
||||
TriggerEvent('esx:kashloaded')
|
||||
TriggerEvent('esx_identity:showRegisterIdentity')
|
||||
else
|
||||
SetTimecycleModifier('default')
|
||||
DoScreenFadeIn(500)
|
||||
Citizen.Wait(500)
|
||||
RenderScriptCams(false, true, 500, true, true)
|
||||
SetCamActive(cam, false)
|
||||
DestroyCam(cam, true)
|
||||
IsChoosing = false
|
||||
DisplayHud(true)
|
||||
DisplayRadar(true)
|
||||
TriggerEvent('esx:kashloaded')
|
||||
TriggerEvent("madrp-spawn")
|
||||
else
|
||||
SetTimecycleModifier('default')
|
||||
DoScreenFadeIn(500)
|
||||
Citizen.Wait(500)
|
||||
RenderScriptCams(false, true, 500, true, true)
|
||||
SetCamActive(cam, false)
|
||||
DestroyCam(cam, true)
|
||||
IsChoosing = false
|
||||
DisplayHud(true)
|
||||
DisplayRadar(true)
|
||||
TriggerEvent('esx:kashloaded')
|
||||
TriggerEvent("madrp-spawn")
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user