PlayerId() returns false

I know it would return false if I am the only person connected. However, even if other players are connected, it still returns false. I have had the other players try it, and it works fine for them by returning their ID. I have no idea why it is just me having the issue with it. Any ideas?

Just tried something else, and let my friend join the server first. PlayerId then worked for me, but showed false for him. I’m assuming its just a bug and interprets 0 (the first joining player) as a bool instead of an int.

If you’re in Lua then it does this, just use GetPlayerServerid(Or similar) to get the server ID of the player. It stills works fine,

So… I’m able to return an actual integer now, but its not for the correct player.

I send a command to the server. I get the source from that and get the name and send it out in a chat message, which is correct. I then send that source to a function on the clients. The number is the same, but it corresponds to a different player once its received on the client. How do I get the proper player?

GetPlayerFromServerId

As the source is a serverid and not a client one, run this native on the client with the source as a parameter

Ah… there we go. Works perfect. Thanks!