0 Members and 1 Guest are viewing this topic.
procedure Reg_Steam_ID(ID: byte);
procedure Reg_Steam_ID(ID: byte);var i, Steam_Index_ID, Temp_Length: int64;begin Steam_Index_ID := -1; Temp_Length := Length(Memory.Data)-1; for i := 0 to Temp_Length do begin if Memory.Data[i].Active_Steam = Players[ID].SteamIDString then if Steam_Index_ID = -1 then begin Steam_Index_ID := i; break; end; end; if Steam_Index_ID <> -1 then begin Player_Info[ID].Steam_Control.New_Account_Index_ID := Player_Info[ID].Last_Index; Player_Info[ID].Steam_Control.Steam_Auth_Time_Left := 0; Player_Info[ID].Last_Index := Steam_Index_ID; Check_New_Devices(Players[ID], false); Swap_Active_Data(Players[ID], Steam_Index_ID); Players[ID].WriteConsole(' ',GOOD); Players[ID].WriteConsole(' ',GOOD); Players[ID].WriteConsole(' ',GOOD); Players[ID].WriteConsole(Center('Welcome back '+Players[ID].Name+' (Steam ID: '+Players[ID].SteamIDString+')', Center_Message_Pos), GOOD); //Remove new account if create for hwid if Player_Info[ID].Steam_Control.Is_New_Account then begin for i := Player_Info[ID].Steam_Control.New_Account_Index_ID+1 to Temp_Length do Memory.Data[i-1] := Memory.Data[i]; SetLength(Memory.Data, Temp_Length); Rank_List.Delete(Player_Info[ID].Steam_Control.New_Account_Index_ID); end; exit; end else begin if (Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Data_String = nil) and (not Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Is_Active) then begin Player_Info[ID].Other_Data_Actual_ID[2] := 0; Memory.Data[Player_Info[ID].Last_Index].Active_Steam := Players[ID].SteamIDString; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Data_String := Players[ID].SteamIDString; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Is_Active := true; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].First_Used := false; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Last_Used := true; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Login_Count := 0; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Time_On_Spectator := 0; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Time_Played := 0; Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].First_Used_Date := now(); Memory.Data[Player_Info[ID].Last_Index].Other_STEAMs[0].Last_Used_Date := now(); Player_Info[ID].Steam_Control.Steam_Auth_Time_Left := 0; if Player_Info[ID].Steam_Control.Is_New_Account then begin Player_Info[ID].Steam_Control.Is_New_Account := false; Players[ID].WriteConsole(' ',GOODInfo); Players[ID].WriteConsole(' ',GOODInfo); Players[ID].WriteConsole(Center('Your stats will be stored for your steam ID! (Steam ID: '+Players[ID].SteamIDString+')', Center_Message_Pos), GOOD) end else begin Players[ID].WriteConsole(' ',GOODInfo); Players[ID].WriteConsole(' ',GOODInfo); Players[ID].WriteConsole(Center('We detect your new steam ID we saved it, that you can login automatically in the future.', Center_Message_Pos), GOODInfo); Players[ID].WriteConsole(Center('Welcome back '+Players[ID].Name+' (Steam ID: '+Players[ID].SteamIDString+')', Center_Message_Pos), GOOD); end; end; end;end;