mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Improvement: Set the camera position offset from the entity
- Modifying the spawn location would previously require adjusting the camera parameters. - This, along with the previous camera change, ensures the camera is always facing the ped
This commit is contained in:
+2
-2
@@ -29,11 +29,11 @@ if ESX.GetConfig().Multichar then
|
||||
local playerPed = PlayerPedId()
|
||||
SetEntityCoords(playerPed, Config.Spawn.x, Config.Spawn.y, Config.Spawn.z, true, false, false, false)
|
||||
SetEntityHeading(playerPed, Config.Spawn.w)
|
||||
local offset = GetOffsetFromEntityInWorldCoords(playerPed, 0, 1.7, 0.4)
|
||||
DoScreenFadeOut(0)
|
||||
SetCamActive(cam, true)
|
||||
RenderScriptCams(true, false, 1, true, true)
|
||||
|
||||
SetCamCoord(cam, Config.Spawn.x, Config.Spawn.y + 1.6, Config.Spawn.z + 1.3)
|
||||
SetCamCoord(cam, offset.x, offset.y, offset.z)
|
||||
PointCamAtCoord(cam, Config.Spawn.x, Config.Spawn.y, Config.Spawn.z + 1.3)
|
||||
|
||||
ESX.UI.HUD.SetDisplay(0.0)
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@ Config = {}
|
||||
Config.Locale = 'en'
|
||||
|
||||
Config.Slots = 4
|
||||
Config.Spawn = vector4(-113.7, 565.3, 195.2, 0)
|
||||
Config.Spawn = vector4(-113.7, 565.3, 195.2, 0) -- Sets the location for character selection
|
||||
-- To set the spawn location for new characters, modify the default value in the `users` SQL table
|
||||
|
||||
--------------------
|
||||
-- Do not use unless you are prepared to adjust your resources to correctly reset data
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
fx_version 'adamant'
|
||||
game 'gta5'
|
||||
description 'https://github.com/thelindat/esx_multicharacter'
|
||||
version '1.2.1'
|
||||
version '1.2.2'
|
||||
|
||||
dependencies {
|
||||
'es_extended',
|
||||
|
||||
Reference in New Issue
Block a user