Jump to content
  • 1
Sign in to follow this  
exploadead

Selectplayer requires token?

Question

I have a script that creates a unit and then a "selectplayer _unit" command is used. It works but in a few seconds battleye kicks me with "Token check failed". Is it some epoch token? Or is it just a battleye problem? Can someone help with this?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...