mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-08 14:07:28 +01:00
First working commit.
Thanks to DonBatman and NathanS21 for helping as testers.
This commit is contained in:
parent
71288b302a
commit
ab53bbc594
4
init.lua
4
init.lua
@ -88,7 +88,7 @@ local function tpc_send(player,coordinates)
|
||||
|
||||
-- If the area is protected, reject the user's request to teleport to these coordinates
|
||||
-- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission.
|
||||
local protected = minetest.is_protected(target_coords)
|
||||
local protected = minetest.is_protected(target_coords,pname)
|
||||
if protected then
|
||||
minetest.chat_send_player(player, "Error: These coordinates are within a protected area.")
|
||||
return
|
||||
@ -96,7 +96,7 @@ local function tpc_send(player,coordinates)
|
||||
|
||||
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
||||
minetest.sound_play("tps_portal", {pos = target_coords, gain = 1.0, max_hear_distance = 10})
|
||||
pname:setpos(find_free_position_near(target_coords))
|
||||
pname:setpos(target_coords)
|
||||
end
|
||||
|
||||
local function tpr_deny(name)
|
||||
|
Loading…
Reference in New Issue
Block a user