Server Talk > Scripting Releases

Zitro Stats & Ranks 3.1-build_12 (Steam / HWID)

<< < (2/2)

soldat-game:
Update build 11:
- Fixed bug when player changed steam account to another. Which is why it didn't display the "<--- You" indicator.
- Removed var which was used but did nothing.

SneS:
Dude, really? Soldat is dead and nobody plays this game :| I have a lot of respect for your work but it's pointless.

soldat-game:
The funny thing is that you say that when the script is already used on several servers :)

You Got Served!:
Dominikkk, I am always inspired to see your tireless passion & dedication to the development of this great game. If only we saw that same level of commitment from the actual dev team.

Your work has helped many & enriched the community 🍻

soldat-game:
To fix bug random script crashing when a player joins the game.

--- Code: (find function) ---procedure Reg_Steam_ID(ID: byte);
--- End code ---

--- Code: (replace to) ---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;
--- End code ---

What be fixed:



If you don't want to modify the code and you have a vanilla version that you haven't modified, you can use the attachment.

Navigation

[0] Message Index

[*] Previous page

Go to full version