TGame.OnSteamAuth

From Soldat Community Wiki
Revision as of 00:48, 7 May 2020 by H (talk | contribs) (Created page with " '''''property OnSteamAuth''''' Access mode: RW Event handler type: TOnSteamAuthEvent Event handler declaration: function(PlayerId: Byte; AuthState: Byte): Byte...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnSteamAuth
 Access mode: RW
 Event handler type: TOnSteamAuthEvent
 Event handler declaration: 
   function(PlayerId: Byte; AuthState: Byte): Byte;

Description

Event property called when when server gets final decision about identity of the steam user, only after receiving this event with value of AuthState set to 0 you can be sure about identity of the player

AuthState value can be one of the following:
0 Steam has verified the user is online, the ticket is valid and ticket has not been reused.
1 The user in question is not connected to steam.
2 The user doesn't have a license for this App ID or the ticket has expired.
3 The user is VAC banned for this game.
4 The user account has logged in elsewhere and the session containing the game instance has been disconnected.
5 VAC has been unable to perform anti-cheat checks on this user.
6 The ticket has been canceled by the issuer.
7 This ticket has already been used, it is not valid.
8 This ticket is not from a user instance currently connected to steam.
9 The user is banned for this game. The ban came via the web api and not VAC.

 function OnSteamAuth(PlayerId: Byte; AuthState: Byte): Byte;
 begin
   if AuthState = 0 then
   begin
     // Logged in
   end else
    // Not logged
 end;

 // ...

 begin
   // assign OnSteamAuth handler
   Game.OnSteamAuth := @OnSteamAuth;

 end;