AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=43)
-   -   sharing xp (https://forums.alliedmods.net/showthread.php?t=30396)

masterfluid 07-30-2004 02:00

sharing xp
 
how do u share the vault between two servers?

BlueRaja 07-30-2004 04:28

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.

jtp10181 07-30-2004 06:41

use mySQL

BlueRaja 07-30-2004 19:14

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

masterfluid 07-30-2004 22:38

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?

BlueRaja 08-02-2004 23:39

It's not difficult; look on google


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

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