Register for your free account! | Forgot your password?

You last visited: Today at 06:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Auto-save [5165]

Discussion on Auto-save [5165] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Auto-save [5165]

Okayy so,

Why am I releasing this?
Because I was asked by a few people and I saw a thread asking about it.
What is autosave?
Helps prevent roll back but I MUST tell you this is a temp soultion but it will work. For a true system preventing rollbacks update whatever gets changed on the character as it happens.
Is this code any good?
Scrap newestcoserver and all it's codes. However this code is good but is being used on a shit source.
Get to the codes?
Okay

Okay so goto Program.cs and define
Code:
DateTime LastSave;
Under where it says something like
Code:
Console.WriteLine("Server is ready for connections.");
Add
Code:
LastSave = DateTime.Now;
then in ServerStuff_Execute add
Code:
#region Autosave
            if (DateTime.Now > Lastsave.AddMinutes(3))
            {
                foreach (Game.Character client in World.H_Chars.Values)
                {
                    Lastsave = DateTime.Now;
                    //Whatever you have for your save code
                }
            }
            #endregion
What the // is add your code that u use to save. I had to leave abit or work for your work.
_DreadNought_ is offline  
Thanks
3 Users
Old 09/18/2010, 12:19   #2
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
Nope this is not the problem for rollback :P
The rollback is first fixed after restart.

I have made tons of saves, aint working, so im just redoing the db.


But good work anyway
dowhatuwant is offline  
Old 09/18/2010, 12:48   #3
 
NukingFuts's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 480
Received Thanks: 111
nice work bro keep it up
NukingFuts is offline  
Old 09/18/2010, 13:49   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by ☆★Zuper★☆ View Post
Nope this is not the problem for rollback :P
The rollback is first fixed after restart.

I have made tons of saves, aint working, so im just redoing the db.


But good work anyway
That isnt the problem either.

It's that face newestcoserver is so ****
_DreadNought_ is offline  
Old 09/18/2010, 15:05   #5
 
FrontBoy's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 275
Received Thanks: 142
where to define DateTime LastSave; ??
FrontBoy is offline  
Old 09/18/2010, 16:53   #6
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by FrontBoy View Post
where to define DateTime LastSave; ??
Go into program.cs and have a look at some of the code in there. It is very self explanitory.

[Tip]Near the top[/Tip]
.Beatz is offline  
Old 09/18/2010, 20:24   #7
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
Quote:
Originally Posted by Eliminationn View Post
That isnt the problem either.

It's that face newestcoserver is so ****
the database is the problem as it is there all the datas are saved/load.
is just simply bad binary writer/reader
dowhatuwant is offline  
Old 09/18/2010, 20:43   #8
 
FrontBoy's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 275
Received Thanks: 142
then how to make it good?
FrontBoy is offline  
Old 09/18/2010, 20:53   #9
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291

You guys do know that the source already has an autosave right?
Check character.cs and search for lastsave
Arcо is offline  
Thanks
1 User
Old 09/18/2010, 21:38   #10
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
I didn't know.

I dont give a **** to check a big horrible .cs file
_DreadNought_ is offline  
Thanks
1 User
Old 09/18/2010, 21:55   #11
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
ty Elimination nice release..
pintser is offline  
Old 09/18/2010, 22:01   #12
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by Eliminationn View Post
I didn't know.

I dont give a **** to check a big horrible .cs file
So you'd rather release something that's already inside of the source?
Arcо is offline  
Thanks
1 User
Old 09/18/2010, 22:01   #13
 
FrontBoy's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 275
Received Thanks: 142
ty eleminatoion finaly works for me xD D:
FrontBoy is offline  
Old 09/19/2010, 09:52   #14
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by FrontBoy View Post
ty eleminatoion finaly works for me xD D:
Lol, it works now even though it was already there before?
Arcо is offline  
Thanks
1 User
Old 09/19/2010, 16:42   #15
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
LOL

anyways, I think this should be closed, ur just spamming it with facepalms lmao.
The database is simply the problem, bad binary writer/reader.
The database should either be recoded or made again from scratch.
dowhatuwant is offline  
Closed Thread


Similar Threads Similar Threads
Need Auto Save Code for 5165
09/11/2010 - CO2 Private Server - 29 Replies
hi, my source don't save the caracters actions some times ex: i was lvl 120 and i had 2000cps i was in TC , i level up to 200 and i get 5kkcps and i go to BI i relog and i find my character lvl 120 with 2000cps in TC a friend told me you have to make auto save code to save each 2min or 2sec whatever but i don't know what's this code and where i put it
5165 Save or Load Character Problem.
07/29/2010 - CO2 Private Server - 5 Replies
alright so IDK wtf I did 2 dis source dat now wen I login and log out my character doesnt save sumhow and like his/her gears are all fucked up wen u login again like...a necklace is where da armor should be at lol...and da armor is like da weapon...so on...only like 3 things save... well I'm hoping I can get answers from dis...I'll post my SaveCharacter/LoadCharacter void here... public static Game.Character LoadCharacter(string Name, ref string Account) { try ...
Roll Back or No Save Bug!! 5165
07/11/2010 - CO2 Private Server - 1 Replies
Hi, i have a co pserver 5165, i'm getting a fucked bug well i made a video to more understand YouTube - mybug.wmv please tell me what's the problem, or if it's possible help me to fix it and if no one know how to fix, please give me a good 5165 source
5165 source Don't save
07/01/2010 - CO2 Private Server - 3 Replies
hi i have a co pserver 5165 well the server don't save for exemple some one was lvl 50 and had 50kcps he dropped 1kkcps and leveled up to 137, well he disconnect, and after 5 ou 10mn he relog, and he find himself lvl 50 and has 50kcps only so the server didin't saved, i have 2 or 3 players who have same problem
fix 100% code save characters lvl and all for 5165
03/09/2010 - CO2 PServer Guides & Releases - 6 Replies
hello all this code for save lvl character and cps open Database.cs and search return "Error: Character already exists!"; del this code and add this new code



All times are GMT +2. The time now is 06:15.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.