Hello! Guys tell me please how import player blueprints from the player.blueprints.db file to data file in folder oxide\data ?
P.S: I'm a beginner plugin developer. Sorry for my bad english.
Exporting player blueprints and sign data?
Discussion in 'Rust Development' started by Eco © ¯\_(ツ)_/¯, Mar 23, 2018.
-
Wulf Community Admin
What data file are you trying to import to? Oxide doesn't have any blueprint data.
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
Okay, then another question. I want to save the blueprints of the players before the global wipe servers. That's how I find drawings in sleeping and active players.
Code:void FindBP(BasePlayer player) { foreach (var aplayer in BasePlayer.activePlayerList) BpListSave(aplayer.userID); foreach (var splayer in BasePlayer.sleepingPlayerList) BpListSave(splayer.userID); } void BpListSave(ulong steamID) { if(!storedlist.PlayerBlueprint.ContainsKey(steamID)) storedlist.PlayerBlueprint.Add(steamID, new List<int>()); PersistantPlayer playerInfo = SingletonComponent<ServerMgr>.Instance.persistance.GetPlayerInfo(steamID); foreach (var bp in playerInfo.unlockedItems) if(!storedlist.PlayerBlueprint[steamID].Contains(bp)) storedlist.PlayerBlueprint[steamID].Add(bp); SaveData(); }
-
Google “BPSync Rust”, that plugin has a command “bpsync.syncall” where you can push all locally stored BPs to a MySQL DB to persist past global BP wipes.
-
-
Code:
covalence.Players.All
But keep in mind, Rust already stores players in db, so you will do almost the same thing, instead of combine db or something else.
Anyway, if you'll use another thread for sql requests, this won't cause any server performance issues. -
Wulf Community Admin
-
Ok, thanks guys, I'll try