Author Topic: Possible to assign player ID from client?  (Read 1858 times)

fgame

  • Guest
Possible to assign player ID from client?
« on: November 23, 2013, 04:56:59 AM »
Is that possible to specify player ID in client before connecting to server instead auto assigned by the server?

The problem there is a ID for every player in online game server. We want to use it to identify players.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Possible to assign player ID from client?
« Reply #1 on: November 23, 2013, 08:49:25 PM »
Not without modifying TNet. In TNet the player ID is just a temporary identifier -- an instance ID.

fgame

  • Guest
Re: Possible to assign player ID from client?
« Reply #2 on: November 23, 2013, 09:48:35 PM »
Not without modifying TNet. In TNet the player ID is just a temporary identifier -- an instance ID.

How to do it? Or is there a better way workaround?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Possible to assign player ID from client?
« Reply #3 on: November 24, 2013, 01:56:01 AM »
You could encode whatever you need within the player's name itself. For example if the player's ID was 12345 and his name was ArenMook, you could have his name be "12345|ArenMook".