[C#] player.Handle different on server/client

Hey guys,

so I just found out that player.Handle on serverside is different from player.Handle on clientside. I do not know if this is supposed to be like that but it makes no sense to me.

Server side:
player.Handle starts from 1, when reconnected, it’s 2, it never(probably) goes back older values

Client side:
player.Handle starts from 0, when reconnected, it’s again 0, another player would be 1. If the first player reconnects, his player.Handle is 0 again.

Either this, or my code is completely wrong. You can test this if you wish, but I’ve literally spent so much time testing and it makes me lose my mind

1 Like

in client-side at least in LUA the playerID or Handle as you call it its Ped ID not player…
You can get the real playerID using this:

GetPlayerServerId(PlayerId())

In LUA i dont know how to get it in C# but i think there should be a similar way

Yes, this is a correct observation and happens due to inherent properties of the interim network model currently used.