mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-08 14:07:28 +01:00
Update init.lua
This commit is contained in:
parent
0829e02c19
commit
30718b325f
4
init.lua
4
init.lua
@ -221,7 +221,7 @@ local function tpj(player,param)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local args = param:split(" ")
|
local args = param:split(" ") -- look into this. Can it crash if the player does not have two parameters?
|
||||||
if #args < 2 then
|
if #args < 2 then
|
||||||
minetest.chat_send_player(player, "Usage. <X|Y|Z> <Number>")
|
minetest.chat_send_player(player, "Usage. <X|Y|Z> <Number>")
|
||||||
return false
|
return false
|
||||||
@ -271,7 +271,7 @@ local function tpe(player)
|
|||||||
isnegative = negatives[math.random(2)] -- choose randomly whether this is this way or that
|
isnegative = negatives[math.random(2)] -- choose randomly whether this is this way or that
|
||||||
distance = isnegative .. math.random(mindistance,maxdistance) -- the distance to jump
|
distance = isnegative .. math.random(mindistance,maxdistance) -- the distance to jump
|
||||||
axis = options[math.random(3)]
|
axis = options[math.random(3)]
|
||||||
param = axis .. distance
|
param = axis .. " " .. distance
|
||||||
tpj(param)
|
tpj(param)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user