mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-23 13:21:25 +01:00
Update init.lua
This commit is contained in:
parent
664b03135c
commit
be7441143a
10
init.lua
10
init.lua
@ -71,10 +71,12 @@ local function tpc_send(player,coordinates)
|
||||
minetest.chat_send_player(pname, "Usage: /tpc <x,y,z>")
|
||||
return nil
|
||||
end
|
||||
|
||||
posx = tonumber(posx) + 0.0
|
||||
posy = tonumber(posy) + 0.0
|
||||
posz = tonumber(posz) + 0.0
|
||||
|
||||
if posx ~= nil or posy ~= nil or posz ~= nil then
|
||||
posx = tonumber(posx) + 0.0
|
||||
posy = tonumber(posy) + 0.0
|
||||
posz = tonumber(posz) + 0.0
|
||||
end
|
||||
|
||||
if posx > 32765 or posx < -32765 or posy > 32765 or posy < -32765 or posz > 32765 or posz < -32765 then
|
||||
minetest.chat_send_player(pname, "Error: Invalid coordinates.")
|
||||
|
Loading…
Reference in New Issue
Block a user