replace spawn point
This commit is contained in:
parent
10d0c3ca45
commit
d5239404c5
16
init.lua
16
init.lua
@ -1,7 +1,9 @@
|
|||||||
local S = minetest.get_translator("towns")
|
local S = minetest.get_translator("towns")
|
||||||
|
|
||||||
local towns_list = {}
|
local towns_list = {}
|
||||||
|
-- static spawn position
|
||||||
|
|
||||||
|
local central_spawn = { x = 206.7,y = 6,z = -84.2 }
|
||||||
local city_pos = { x = -12003, y = 22, z = -7498 }
|
local city_pos = { x = -12003, y = 22, z = -7498 }
|
||||||
table.insert(towns_list, S("The city built by the player H743")..S(" | command - ").."/city")
|
table.insert(towns_list, S("The city built by the player H743")..S(" | command - ").."/city")
|
||||||
|
|
||||||
@ -30,3 +32,17 @@ minetest.register_chatcommand("list_towns", {
|
|||||||
return true, S("Total number of towns:") .." ".. #towns_list
|
return true, S("Total number of towns:") .." ".. #towns_list
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_chatcommand("spawn", {
|
||||||
|
description = S("Go to central Spawn"),
|
||||||
|
privs = {home = true},
|
||||||
|
func = function(name)
|
||||||
|
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
|
||||||
|
if player~=nil then
|
||||||
|
player:set_pos(central_spawn)
|
||||||
|
minetest.chat_send_player(name,minetest.colorize("cyan", S("Welcome to central Spawn!")))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
@ -7,3 +7,5 @@ Welcome to the City!=Добро пожаловать в City!
|
|||||||
List of server towns=Список городов сервера
|
List of server towns=Список городов сервера
|
||||||
Towns:=Города:
|
Towns:=Города:
|
||||||
Total number of towns:=Всего городов на сервере:
|
Total number of towns:=Всего городов на сервере:
|
||||||
|
Go to central Spawn=Отправиться на центральный Спавн
|
||||||
|
Welcome to central Spawn!=Добро пожаловать на центральный Спавн!
|
Loading…
Reference in New Issue
Block a user