Jump to content
  • 1

Selectplayer requires token?


exploadead

Question

1 answer to this question

Recommended Posts

  • 0

This is a part of our security checks, it basically makes sure the data sent to the server not getting spoofed by another player. If you make a new player body then you also must give this new body the proper token to communicate with the server.


Server Side:

_tokenToSendToPlayer = _newPlayerObject call EPOCH_server_setPToken;
...
[_newPlayerObject, _tokenToSendToPlayer] remoteExec ['EPOCH_clientRevive',_player];

Client Side:

Epoch_personalToken = _tokenSentFromServer;

(Above is just an example)

You can see this in action with the player revive functions:
Server:
https://github.com/EpochModTeam/Epoch/blob/a4bf2926f12c7e68e1970da42b12f054cbfc279a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf#L255
https://github.com/EpochModTeam/Epoch/blob/a4bf2926f12c7e68e1970da42b12f054cbfc279a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf#L268

Client:
https://github.com/EpochModTeam/Epoch/blob/a4bf2926f12c7e68e1970da42b12f054cbfc279a/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf#L36

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...