esx_core icon indicating copy to clipboard operation
esx_core copied to clipboard

refactor: use esx cache

Open MoskalykA opened this issue 10 months ago • 2 comments

MoskalykA avatar Mar 27 '24 17:03 MoskalykA

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.

Gellipapa avatar Apr 13 '24 17:04 Gellipapa

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)

mikigoalie avatar Apr 28 '24 08:04 mikigoalie

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.

Gellipapa avatar May 03 '24 08:05 Gellipapa