[b3258/Canary] GetPlayerServerId() returns "65261" instead of the actual player server id

1. Client (production/canary) and FXServer version: b3258 Canary / “FXServer-master SERVER v1.0.0.8851 win32”
2. What you expected to happen: GetPlayerServerId - FiveM Natives @ Cfx.re Docs should return the player’s server ID on client.
3. What actually happens: The native always returns 65261. GetPlayerFromServerId - FiveM Natives @ Cfx.re Docs also needs “65261” as input to find the client’s PlayerId(), instead of the correct server ID.

The server is aware of the correct client’s source.
4. Category of bug (eg. client, server, weapons, peds, native): client / native
5. Reproducible steps, preferably with example script(s)

--lua, client-side
RegisterCommand('clid', function(source, args)
    print(GetPlayerServerId(PlayerId()))
end)

You can also just use the default playernames resource.

In the above image, the gamertag gets the player’s server Id for the client-side native, while the chat gets the server Id directly from the server.

edit: might be related to this warning/info from onesync?


I get it as soon as the client scripts are initialized.

ps: first bug report of this release :o

2 Likes

Fixed in fix(client): hotfix for GetGamerInfo · citizenfx/fivem@61353b6 · GitHub