예제 #1
0
 public static void save()
 {
     if (Level.info.type == ELevelType.SURVIVAL)
     {
         for (int i = 0; i < Provider.clients.Count; i++)
         {
             if (Provider.clients[i].model != null)
             {
                 Player component = Provider.clients[i].model.GetComponent <Player>();
                 component.save();
             }
         }
         VehicleManager.save();
         BarricadeManager.save();
         StructureManager.save();
         ObjectManager.save();
         LightingManager.save();
         GroupManager.save();
     }
     if (Dedicator.isDedicated)
     {
         SteamWhitelist.save();
         SteamBlacklist.save();
         SteamAdminlist.save();
     }
 }
예제 #2
0
 private static void onServerDisconnected(CSteamID steamID)
 {
     if (Provider.isServer && Level.isLoaded)
     {
         Player player = PlayerTool.getPlayer(steamID);
         if (player != null)
         {
             player.save();
         }
     }
 }