Page 1 of 1

Players to have initial items?

PostPosted: Tue Jun 21, 2016 15:26
by MykieDoesStuff
How do I make the players who join the server first time to have initial items?

Re: Players to have initial items? *SOLVED*

PostPosted: Tue Jun 21, 2016 15:26
by MykieDoesStuff
Neeeever mind.. found it..

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
minetest.register_on_newplayer(function(player)
   print("[minimal] giving initial stuff to player")
   player:get_inventory():add_item('main', 'default:pick_stone')
   player:get_inventory():add_item('main', 'default:torch 99')
   player:get_inventory():add_item('main', 'default:cobble 99')
   player:get_inventory():add_item('main', 'default:wood 99')
   player:get_inventory():add_item('main', 'default:axe_steel')
   player:get_inventory():add_item('main', 'default:shovel_steel')
   player:get_inventory():add_item('main', 'default:pick_wood')
   player:get_inventory():add_item('main', 'default:pick_steel')
   player:get_inventory():add_item('main', 'default:pick_mese')
   player:get_inventory():add_item('main', 'default:mese 99')
   player:get_inventory():add_item('main', 'default:water_source 99')
   player:get_inventory():add_item('main', 'experimental:tester_tool_1')
end)

Re: Players to have initial items?

PostPosted: Tue Jun 21, 2016 16:26
by rubenwardy
Don't do that, instead use the give_initial_stuff mod.

Set these in minetest.conf

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
give_initial_stuff = true
initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99

Re: Players to have initial items?

PostPosted: Tue Jun 21, 2016 17:16
by MykieDoesStuff
rubenwardy wrote:Don't do that, instead use the give_initial_stuff mod.

Set these in minetest.conf

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
give_initial_stuff = true
initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99

oo... alright thanks! I'll change that.