Raised This Month: $51 Target: $400
 12% 

sharing xp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
masterfluid
Junior Member
Join Date: Jul 2004
Old 07-30-2004 , 02:00   sharing xp
Reply With Quote #1

how do u share the vault between two servers?
masterfluid is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 07-30-2004 , 04:28  
Reply With Quote #2

If both server's are running at once, it would take some pretty fancy footwork to share a single vault.ini file (because, if I understand correctly, the entire file is loaded once initially, and not loaded again unless the server restarts or the admin uses the 'reload' command....it might be reloaded on server-change, but I doubt it)...

However, if you just want to copy the vault from one server to another, simply copy the addons\amx\vault.ini file. Of course, if the latter server already has a vault, it will be deleted.
It would probably be most practical to simply append entries from one file onto the another, and just copy that new appended file onto both servers (you could do this, say, once a day or once an hour). The only problem is that this would become extremely tedious by hand. You could (fairly) easily write a script to do this for you, though; there are only three entires you need to know:
The first entry should look something like this: shinfo.192.168.1.52:27005. That's the IP address of the player.
The second entry should look like this: "Killza". That's the screen-name of the player. Together, these identify the player - you should check to see if these entries are already in place for a single player in the first vault.ini, and if they aren't, append the entire line to the end of it. If they are, you could either ignore the entire line, or...
The ninth entry should look like this: 12345. This is how many experience points the player has. You could, if you wanted, check to see if a one entry (of the same player) has more experience than the other, and write the one with higher XP to the main file. This has the disadvantage of players being able to TK all they want, and not (permenantly) losing XP, though...
Alternatively, the third entry is the 'epoch-time', which I *think* is the time the entry was last saved at.
If you can't do it yourself (and no one points out some blatently obvious, and much simpler soultion than mine, like they always do..), just ask me and give me a few days, and I'll code a quick DOSsy for ya; at the moment, however, I'm busy maintaining my own server, as well as a horseload of other sh*t.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-30-2004 , 06:41  
Reply With Quote #3

use mySQL
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
BlueRaja
Senior Member
Join Date: Nov 2004
Old 07-30-2004 , 19:14  
Reply With Quote #4

Quote:
If you can't do it yourself (and no one points out some blatently obvious, and much simpler soultion than mine, like they always do..)
Quote:
use mySQL
...DAMN IT
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
masterfluid
Junior Member
Join Date: Jul 2004
Old 07-30-2004 , 22:38  
Reply With Quote #5

sorry blue raja but i knew everything u said.. cause i saw two servers with sharing xp cause i can jump between them and still work. The thing i don't under stand is mysql though. can some one post a tutural or somehting?
masterfluid is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 08-02-2004 , 23:39  
Reply With Quote #6

It's not difficult; look on google
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode