esx-framework / esx_core

Official Repo For core resources for esx-legacy
https://documentation.esx-framework.org/
GNU General Public License v3.0
356 stars 737 forks source link

refactor: use esx cache #1338

Closed MoskalykA closed 2 months ago

Gellipapa commented 3 months ago

Hi! It might be a bit misleading to say id, independent since the user would probably think of it as source, it should be called something else because it is an id but it is not the source, it would need wrapping GetPlayerServerId(PlayerId()) this is return player source.

So I would suggest that we rename it and then I think it will be appropriate.

mikigoalie commented 2 months ago

playerid doesnt change but pedid changes... :D Just saying it's probably better to just get PlayerPedId() directly than caching in case of ped mismatch (either changed ped or whatever)

Gellipapa commented 2 months ago

playerid doesnt change but pedid changes... :D Just saying it's probably better to just get PlayerPedId() directly than caching in case of ped mismatch (either changed ped or whatever)

The PlayerPedId is already cached, but there's no point in caching the PlayerId, it's just more confusing if you enter the cached PlayerPedId and it doesn't work, so we won't merge it.

Thanks for your understanding and comments.