Replace :getpos() with :get_pos().
This commit is contained in:
parent
33919d5b4b
commit
bbe5074484
|
@ -310,7 +310,7 @@ scriptblocks.register_with_alias('player_detector', {
|
||||||
local nearest = nil
|
local nearest = nil
|
||||||
local min_distance = math.huge
|
local min_distance = math.huge
|
||||||
for index, player in pairs(players) do
|
for index, player in pairs(players) do
|
||||||
local distance = vector.distance(pos, player:getpos())
|
local distance = vector.distance(pos, player:get_pos())
|
||||||
if distance < min_distance then
|
if distance < min_distance then
|
||||||
min_distance = distance
|
min_distance = distance
|
||||||
nearest = player:get_player_name()
|
nearest = player:get_player_name()
|
||||||
|
|
Reference in New Issue