1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

remove spawn mod--> now in h2omes

add button tp to spawn, send my pos to player, tp to player
This commit is contained in:
2016-05-19 14:30:04 +02:00
parent 4d5aebde7b
commit d503aabd6d
4 changed files with 208 additions and 50 deletions

View File

@ -1 +0,0 @@
action_timers

View File

@ -1,23 +0,0 @@
local SPAWN_INTERVAL = 5*60
minetest.register_chatcommand("spawn", {
description = "Teleport a player to the defined spawnpoint",
func = function(name)
local player = minetest.get_player_by_name(name)
local function go_to_spawn()
if minetest.setting_get_pos("static_spawnpoint") then
minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...")
player:setpos(minetest.setting_get_pos("static_spawnpoint"))
minetest.log("action","Player ".. name .." respawned. Next allowed respawn in ".. SPAWN_INTERVAL .." seconds.")
return true
else
minetest.chat_send_player(player:get_player_name(), "ERROR: No spawn point is set on this server!")
return false
end
end
action_timers.wrapper(name, "spawn", "spawn_" .. name, SPAWN_INTERVAL, go_to_spawn, {})
end
})