fivem icon indicating copy to clipboard operation
fivem copied to clipboard

feat(scripting/state): add GET_PLAYER_SERVER_ID_FROM_PED

Open AvarianKnight opened this issue 2 years ago • 4 comments

This was a native I remember complaining about not existing a while ago and makes working with certain checkable events easier to work with (i.e. weaponDamageEvent and the sort)

This is meant to function somewhat like NetworkGetPlayerIndexFromPed does on the client

AvarianKnight avatar Dec 30 '22 22:12 AvarianKnight

Technically it is what NETWORK_GET_ENTITY_OWNER does maybe you could group both natives?

PichotM avatar Dec 30 '22 22:12 PichotM

For such a simple thing I don't really feel like its really worth doing, you save a negligible amount of space (aprox 4 lines)

AvarianKnight avatar Dec 30 '22 22:12 AvarianKnight

This is meant to function somewhat like NetworkGetPlayerIndexFromPed does on the client

What is the difference - why only 'somewhat'? Why does it need to have its own name instead of using the same name as the game function?

blattersturm avatar Dec 31 '22 13:12 blattersturm

I thought that the native referring to PlayerIndex instead of Player would be confusing for a server side native, but if wanted I can rename it.

AvarianKnight avatar Dec 31 '22 16:12 AvarianKnight