Getting a players ID

So we all know the function player.GetByID(), right?

Well i am needing to send a player over the network, and using their ID seems the best way. I have hit a total mind block with the whole thing, i have a huge nagging feeling that there is a better way, and i cannot remember how to get a players id for the life of me.

Forgive my idiot moment, but either the function that gets a players id, or a ‘better’ way to do this would be much appreciated :slight_smile:


lua_run_cl print( player.GetByID( 1 ):EntIndex() )

Ignore me too. hides in corner

Player.UserID is most likely what you’re looking for. How do you want to send the player?

Or that. Thanks.

And it doesn’t really matter, as long as im not trying to send an entire player (as i were) to the client and back. I’m really tired and not so onto it at the moment. D: