linushsao wrote:As title,i mean when player A login,server will reload player A's inventorydata from folder .minetest/PLAYER/playerA. i had check Category:Methods, but seems no method could do this,or i miss?
Krock wrote:Why the hell do you use 2 servers on 1 player folder?
That's never a good idea.
Btw: player data also saves all <map_save_interval> seconds.
rubenwardy wrote:You could make a mod to change the player's inventory when they log in, syncing it. The mod could read from a shared file or daemon somewhere.
No need to edit players/*
local inv = player:get_inventory()
inv:set("askdnas")
BrandonReese wrote:What if they logged into both servers at the same time?
BrandonReese wrote:What if they logged into both servers at the same time?
rubenwardy wrote:The mod would change the inventory of the player on the server (in its RAM). It would work.Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local inv = player:get_inventory()
inv:set("askdnas")
or something (I have never used inventories)
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set("askdnas")
end)
Users browsing this forum: No registered users and 17 guests