See the two init that was in the mod folder
At first he was like:
init
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_chat_message(function(name, message, playername, player)
local cmd = "/spawn"
if message:sub(0, #cmd) == cmd then
if message == '/spawn' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...")
player:setpos({x=-307, y=20, z=-426})
return true
end
end
end)
After I took a few adjustments and looked like this:
init
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_chat_message(function(name, message, playername, player)
local cmd = "/preinicio"
if message:sub(0, #cmd) == cmd then
if message == '/preinicio' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...")
player:setpos({x=643, y=11, z=937})
return true
end
end
end)
I want to do most others. but do not know which part has to change and we have to do.
Help me please. I have to give this game tomorrow morning at school for a presentation!