esx-framework / esx_core

Official Repo For core resources for esx-legacy
https://documentation.esx-framework.org/
373 stars 739 forks source link

[Bug] - es_extended coords (position) #1421

Open kFxDaKing opened 3 weeks ago

kFxDaKing commented 3 weeks ago

Describe the bug Some players had issues with connecting to the server, they got error unknown pool pool full size == 256 while spawning.

I found it helped when i changed their coords and when i checked their coords i found this: {"y":-27648.0,"x":-1054.3780517578126,"heading":0.0,"z":4.864501953125}

To Reproduce Steps to reproduce the behavior: Cant reporoduce, its happening just sometimes and for some players.

Debug Info (please complete the following information):

Gellipapa commented 3 weeks ago

@kFxDaKing Hi! The error you get means that for some reason the pool size memory is full, it's not a coordinate. It could be a bad script a bad mapping etc.

What do you want to do with the coordinate?

kFxDaKing commented 3 weeks ago

@kFxDaKing Hi! The error you get means that for some reason the pool size memory is full, it's not a coordinate. It could be a bad script a bad mapping etc.

What do you want to do with the coordinate?

Check y of the coords, that why he gets the error. When i changed his coords, he can play again without problems.

kFxDaKing commented 3 weeks ago

They dont crash midgame with this error, but when they are connecting and spawning, we have around 100+ online palyers every day and it happend like 3 times this week, with same problem , always bad coords in position table.

Previous esx version way okay 1.10.5

kFxDaKing commented 3 weeks ago

image

Gellipapa commented 3 weeks ago

@kFxDaKing Do you use multicharacter? by the way we latest version is 1.10.9.

kFxDaKing commented 3 weeks ago

@kFxDaKing Do you use multicharacter? by the way we latest version is 1.10.9.

yes i do and i know, but get coord function is same

kFxDaKing commented 3 weeks ago

another guy with that problem image

Naifen-Phoxidas commented 2 weeks ago

Had same error, but got fixed

kFxDaKing commented 1 week ago

This started happening since the heading was added i think

kFxDaKing commented 1 week ago

It seems its happening, when they log of when falling throught map.

Mycroft-Studios commented 6 days ago

This started happening since the heading was added i think

Heading has been there for years.

kFxDaKing commented 6 days ago

---@param vector boolean ---@return vector3 | table function self.getCoords(vector) local ped <const> = _GetPlayerPed(self.source) local coordinates <const> = _GetEntityCoords(ped)

    `return vector and coordinates or { x = coordinates.x, y = coordinates.y, z = coordinates.z }`
`end`

Version 1.10.5, we had no issues on this version
AI-Wall3 commented 12 hours ago

Inside client main lua: line 35 you have to much parameters

SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true)

FIX: '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()

FreezeEntityPosition(playerPed, true)
SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false)
SetEntityHeading(playerPed, coords.heading)

-- Wartet, bis die Kollision geladen ist oder 5 Sekunden verstrichen sind
while not HasCollisionLoadedAroundEntity(playerPed) and (GetGameTimer() - timer) < 5000 do
    Wait(0)
end

NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, true, true, false)
TriggerEvent('playerSpawned', coords)

if cb then cb() end

end` Thanks for watching.